[Libreoffice-commits] core.git: 5 commits - drawinglayer/source helpcontent2 include/vcl starmath/inc starmath/source starmath/uiconfig starmath/UIConfig_smath.mk vcl/source

Caolán McNamara caolanm at redhat.com
Wed Jun 19 01:23:35 PDT 2013


 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx |  257 ++++++++++
 drawinglayer/source/processor2d/vclpixelprocessor2d.hxx |   14 
 drawinglayer/source/processor2d/vclprocessor2d.cxx      |   80 ---
 drawinglayer/source/processor2d/vclprocessor2d.hxx      |    2 
 helpcontent2                                            |    2 
 include/vcl/outdev.hxx                                  |    7 
 starmath/UIConfig_smath.mk                              |    1 
 starmath/inc/dialog.hxx                                 |   27 -
 starmath/inc/helpids.h                                  |    1 
 starmath/inc/starmath.hrc                               |    1 
 starmath/source/dialog.cxx                              |   70 --
 starmath/source/smres.src                               |  176 -------
 starmath/uiconfig/smath/ui/fontsizedialog.ui            |  374 ++++++++++++++++
 vcl/source/gdi/outdev.cxx                               |   58 ++
 14 files changed, 716 insertions(+), 354 deletions(-)

New commits:
commit 19b18c40084070ffe10cde45b4c363ee9d16b804
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 18 20:40:57 2013 +0100

    don't need explicit help handlers anymore
    
    Change-Id: I5333ff8c4e50cbc4374b937bc8d7617c3b99ee97

diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 8c1f74d..a16b2f5 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -127,11 +127,9 @@ class SmFontSizeDialog : public ModalDialog
     MetricField* m_pFunctionSize;
     MetricField* m_pOperatorSize;
     MetricField* m_pBorderSize;
-    HelpButton* m_pHelpButton1;
     PushButton* m_pDefaultButton;
 
     DECL_LINK(DefaultButtonClickHdl, Button *);
-    DECL_LINK(HelpButtonClickHdl, Button *);
 
 public:
     SmFontSizeDialog(Window *pParent);
diff --git a/starmath/inc/helpids.h b/starmath/inc/helpids.h
index 7c06d77..437fe42 100644
--- a/starmath/inc/helpids.h
+++ b/starmath/inc/helpids.h
@@ -20,7 +20,6 @@
 #define STARMATH_HELPIDS_H
 
 #define HID_SMA_FONTDIALOG                                "STARMATH_HID_SMA_FONTDIALOG"
-#define HID_SMA_FONTSIZEDIALOG                            "STARMATH_HID_SMA_FONTSIZEDIALOG"
 #define HID_SMA_FONTTYPEDIALOG                            "STARMATH_HID_SMA_FONTTYPEDIALOG"
 #define HID_SMA_DISTANCEDIALOG                            "STARMATH_HID_SMA_DISTANCEDIALOG"
 #define HID_SMA_SYMDEFINEDIALOG                           "STARMATH_HID_SMA_SYMDEFINEDIALOG"
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 9fc2bb1..984461d 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -440,17 +440,6 @@ IMPL_LINK( SmFontSizeDialog, DefaultButtonClickHdl, Button *, EMPTYARG /*pButton
     return 0;
 }
 
-IMPL_LINK( SmFontSizeDialog, HelpButtonClickHdl, Button *, EMPTYARG /*pButton*/ )
-{
-    // start help system
-    Help* pHelp = Application::GetHelp();
-    if( pHelp )
-    {
-        pHelp->Start( OUString( "HID_SMA_FONTSIZEDIALOG" ), m_pHelpButton1 );
-    }
-    return 0;
-}
-
 SmFontSizeDialog::SmFontSizeDialog(Window * pParent)
     : ModalDialog(pParent, "FontSizeDialog", "modules/smath/ui/fontsizedialog.ui")
 {
@@ -460,11 +449,9 @@ SmFontSizeDialog::SmFontSizeDialog(Window * pParent)
     get(m_pOperatorSize, "spinB_operator");
     get(m_pBorderSize, "spinB_limit");
     get(m_pBaseSize, "spinB_baseSize");
-    get(m_pHelpButton1, "help");
     get(m_pDefaultButton, "default");
 
     m_pDefaultButton->SetClickHdl(LINK(this, SmFontSizeDialog, DefaultButtonClickHdl));
-    m_pHelpButton1->SetClickHdl(LINK(this, SmFontSizeDialog, HelpButtonClickHdl));
 }
 
 
commit f0f8eedf46f386be83608e9d37c2e4c0e7cbe8a8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 18 20:33:22 2013 +0100

    add a sizegroup and alignment to line up widgets
    
    Change-Id: I7db65ae46cd4fe5c36cdfda172adcb139b5ca4e0

diff --git a/starmath/uiconfig/smath/ui/fontsizedialog.ui b/starmath/uiconfig/smath/ui/fontsizedialog.ui
index afb5ee6..b9f7b50c1 100644
--- a/starmath/uiconfig/smath/ui/fontsizedialog.ui
+++ b/starmath/uiconfig/smath/ui/fontsizedialog.ui
@@ -1,6 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkAdjustment" id="adjustmentBaseSize">
+    <property name="lower">4</property>
+    <property name="upper">127</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustmentRelativeSizes">
+    <property name="lower">5</property>
+    <property name="upper">200</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkDialog" id="FontSizeDialog">
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
@@ -23,7 +35,6 @@
                 <property name="can_default">True</property>
                 <property name="has_default">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -38,7 +49,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -53,7 +63,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -68,7 +77,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_underline">True</property>
               </object>
               <packing>
@@ -93,39 +101,45 @@
             <property name="orientation">vertical</property>
             <property name="spacing">12</property>
             <child>
-              <object class="GtkBox" id="box2">
+              <object class="GtkAlignment" id="alignment2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="hexpand">True</property>
-                <property name="spacing">12</property>
+                <property name="left_padding">12</property>
                 <child>
-                  <object class="GtkLabel" id="label4">
+                  <object class="GtkBox" id="box2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">Base _size</property>
-                    <property name="use_underline">True</property>
-                    <property name="mnemonic_widget">spinB_baseSize:0pt</property>
-                  </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <object class="GtkSpinButton" id="spinB_baseSize:0pt">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="margin_left">12</property>
                     <property name="hexpand">True</property>
-                    <property name="invisible_char">●</property>
-                    <property name="adjustment">adjustmentBaseSize</property>
+                    <property name="spacing">12</property>
+                    <child>
+                      <object class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes">Base _size</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">spinB_baseSize:0pt</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkSpinButton" id="spinB_baseSize:0pt">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="invisible_char">●</property>
+                        <property name="adjustment">adjustmentBaseSize</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
                   </object>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">True</property>
-                    <property name="position">1</property>
-                  </packing>
                 </child>
               </object>
               <packing>
@@ -155,8 +169,6 @@
                         <property name="hexpand">True</property>
                         <property name="row_spacing">6</property>
                         <property name="column_spacing">12</property>
-                        <property name="n_rows">5</property>
-                        <property name="n_columns">2</property>
                         <child>
                           <object class="GtkSpinButton" id="spinB_function:0%">
                             <property name="visible">True</property>
@@ -349,16 +361,14 @@
       <action-widget response="0">default</action-widget>
     </action-widgets>
   </object>
-  <object class="GtkAdjustment" id="adjustmentBaseSize">
-    <property name="lower">4</property>
-    <property name="upper">127</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustmentRelativeSizes">
-    <property name="lower">5</property>
-    <property name="upper">200</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
+  <object class="GtkSizeGroup" id="sizegroup1">
+    <widgets>
+      <widget name="label4"/>
+      <widget name="label2"/>
+      <widget name="label3"/>
+      <widget name="label5"/>
+      <widget name="label7"/>
+      <widget name="label6"/>
+    </widgets>
   </object>
 </interface>
commit 0900438214c7f3eeb81a6f5e00978357847bbaef
Author: Manal Alhassoun <malhassoun at kacst.edu.sa>
Date:   Mon Jun 17 07:38:40 2013 +0300

    fontsizedialog.ui widget
    
    Change-Id: I1c91b4c621c5a2da11cebdd8e58a5e5d0d86bf6c

diff --git a/starmath/UIConfig_smath.mk b/starmath/UIConfig_smath.mk
index 2f26333..402ddec 100644
--- a/starmath/UIConfig_smath.mk
+++ b/starmath/UIConfig_smath.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/smath,\
 $(eval $(call gb_UIConfig_add_uifiles,modules/smath,\
 	starmath/uiconfig/smath/ui/alignmentdialog \
 	starmath/uiconfig/smath/ui/catalogdialog \
+	starmath/uiconfig/smath/ui/fontsizedialog \
 	starmath/uiconfig/smath/ui/printeroptions \
 	starmath/uiconfig/smath/ui/savedefaultsdialog \
 	starmath/uiconfig/smath/ui/smathsettings \
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 6c3586e..8c1f74d 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -121,29 +121,20 @@ public:
 
 class SmFontSizeDialog : public ModalDialog
 {
-    FixedText       aFixedText1;
-    MetricField     aBaseSize;
-    FixedText       aFixedText4;
-    MetricField     aTextSize;
-    FixedText       aFixedText5;
-    MetricField     aIndexSize;
-    FixedText       aFixedText6;
-    MetricField     aFunctionSize;
-    FixedText       aFixedText7;
-    MetricField     aOperatorSize;
-    FixedText       aFixedText8;
-    MetricField     aBorderSize;
-    FixedLine       aFixedLine1;
-    OKButton        aOKButton1;
-    HelpButton      aHelpButton1;
-    CancelButton    aCancelButton1;
-    PushButton      aDefaultButton;
+    MetricField* m_pBaseSize;
+    MetricField* m_pTextSize;
+    MetricField* m_pIndexSize;
+    MetricField* m_pFunctionSize;
+    MetricField* m_pOperatorSize;
+    MetricField* m_pBorderSize;
+    HelpButton* m_pHelpButton1;
+    PushButton* m_pDefaultButton;
 
     DECL_LINK(DefaultButtonClickHdl, Button *);
     DECL_LINK(HelpButtonClickHdl, Button *);
 
 public:
-    SmFontSizeDialog(Window *pParent, bool bFreeRes = true);
+    SmFontSizeDialog(Window *pParent);
 
     void ReadFrom(const SmFormat &rFormat);
     void WriteTo (SmFormat &rFormat) const;
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index dedc3f3..74aebf6 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -77,7 +77,6 @@
 
 
 #define RID_FONTDIALOG              (RID_APP_START + 2)
-#define RID_FONTSIZEDIALOG          (RID_APP_START + 3)
 #define RID_FONTTYPEDIALOG          (RID_APP_START + 4)
 #define RID_SYMDEFINEDIALOG         (RID_APP_START + 9)
 #define RID_PRINTUIOPTIONS          (RID_APP_START + 11)
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 67c4a1d..9fc2bb1 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -446,62 +446,51 @@ IMPL_LINK( SmFontSizeDialog, HelpButtonClickHdl, Button *, EMPTYARG /*pButton*/
     Help* pHelp = Application::GetHelp();
     if( pHelp )
     {
-        pHelp->Start( OUString( "HID_SMA_FONTSIZEDIALOG" ), &aHelpButton1 );
+        pHelp->Start( OUString( "HID_SMA_FONTSIZEDIALOG" ), m_pHelpButton1 );
     }
     return 0;
 }
 
-SmFontSizeDialog::SmFontSizeDialog(Window * pParent, bool bFreeRes)
-    : ModalDialog(pParent, SmResId(RID_FONTSIZEDIALOG)),
-    aFixedText1(this, SmResId(1)),
-    aBaseSize(this, SmResId(1)),
-    aFixedText4(this, SmResId(4)),
-    aTextSize(this, SmResId(4)),
-    aFixedText5(this, SmResId(5)),
-    aIndexSize(this, SmResId(5)),
-    aFixedText6(this, SmResId(6)),
-    aFunctionSize(this, SmResId(6)),
-    aFixedText7(this, SmResId(7)),
-    aOperatorSize(this, SmResId(7)),
-    aFixedText8(this, SmResId(8)),
-    aBorderSize(this, SmResId(8)),
-    aFixedLine1(this, SmResId(1)),
-    aOKButton1(this, SmResId(1)),
-    aHelpButton1(this, SmResId(1)),
-    aCancelButton1(this, SmResId(1)),
-    aDefaultButton(this, SmResId(1))
+SmFontSizeDialog::SmFontSizeDialog(Window * pParent)
+    : ModalDialog(pParent, "FontSizeDialog", "modules/smath/ui/fontsizedialog.ui")
 {
-    if (bFreeRes)
-        FreeResource();
+    get(m_pTextSize, "spinB_text");
+    get(m_pIndexSize, "spinB_index");
+    get(m_pFunctionSize, "spinB_function");
+    get(m_pOperatorSize, "spinB_operator");
+    get(m_pBorderSize, "spinB_limit");
+    get(m_pBaseSize, "spinB_baseSize");
+    get(m_pHelpButton1, "help");
+    get(m_pDefaultButton, "default");
 
-    aDefaultButton.SetClickHdl(LINK(this, SmFontSizeDialog, DefaultButtonClickHdl));
-    aHelpButton1.SetClickHdl(LINK(this, SmFontSizeDialog, HelpButtonClickHdl));
+    m_pDefaultButton->SetClickHdl(LINK(this, SmFontSizeDialog, DefaultButtonClickHdl));
+    m_pHelpButton1->SetClickHdl(LINK(this, SmFontSizeDialog, HelpButtonClickHdl));
 }
 
 
 void SmFontSizeDialog::ReadFrom(const SmFormat &rFormat)
 {
     //! aufpassen: richtig runden!
-    aBaseSize.SetValue( SmRoundFraction(
+    m_pBaseSize->SetValue( SmRoundFraction(
         Sm100th_mmToPts( rFormat.GetBaseSize().Height() ) ) );
 
-    aTextSize    .SetValue( rFormat.GetRelSize(SIZ_TEXT) );
-    aIndexSize   .SetValue( rFormat.GetRelSize(SIZ_INDEX) );
-    aFunctionSize.SetValue( rFormat.GetRelSize(SIZ_FUNCTION) );
-    aOperatorSize.SetValue( rFormat.GetRelSize(SIZ_OPERATOR) );
-    aBorderSize  .SetValue( rFormat.GetRelSize(SIZ_LIMITS) );
+    m_pTextSize->SetValue( rFormat.GetRelSize(SIZ_TEXT) );
+    m_pIndexSize->SetValue( rFormat.GetRelSize(SIZ_INDEX) );
+    m_pFunctionSize->SetValue( rFormat.GetRelSize(SIZ_FUNCTION) );
+    m_pOperatorSize->SetValue( rFormat.GetRelSize(SIZ_OPERATOR) );
+    m_pBorderSize->SetValue( rFormat.GetRelSize(SIZ_LIMITS) );
 }
 
 
 void SmFontSizeDialog::WriteTo(SmFormat &rFormat) const
 {
-    rFormat.SetBaseSize( Size(0, SmPtsTo100th_mm( static_cast< long >(aBaseSize.GetValue()))) );
+    rFormat.SetBaseSize( Size(0, SmPtsTo100th_mm( static_cast< long >(m_pBaseSize->GetValue()))) );
 
-    rFormat.SetRelSize(SIZ_TEXT,     (sal_uInt16) aTextSize    .GetValue());
-    rFormat.SetRelSize(SIZ_INDEX,    (sal_uInt16) aIndexSize   .GetValue());
-    rFormat.SetRelSize(SIZ_FUNCTION, (sal_uInt16) aFunctionSize.GetValue());
-    rFormat.SetRelSize(SIZ_OPERATOR, (sal_uInt16) aOperatorSize.GetValue());
-    rFormat.SetRelSize(SIZ_LIMITS,   (sal_uInt16) aBorderSize  .GetValue());
+    rFormat.SetRelSize(SIZ_TEXT,     (sal_uInt16) m_pTextSize->GetValue());
+    rFormat.SetRelSize(SIZ_INDEX,    (sal_uInt16) m_pIndexSize->GetValue());
+    rFormat.SetRelSize(SIZ_FUNCTION, (sal_uInt16) m_pFunctionSize->GetValue());
+    rFormat.SetRelSize(SIZ_OPERATOR, (sal_uInt16) m_pOperatorSize->GetValue());
+    rFormat.SetRelSize(SIZ_LIMITS,   (sal_uInt16) m_pBorderSize->GetValue());
 
     const Size aTmp (rFormat.GetBaseSize());
     for (sal_uInt16  i = FNT_BEGIN;  i <= FNT_END;  i++)
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index 7a7177e..73d3d4c 100644
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -104,182 +104,6 @@ ModalDialog RID_FONTDIALOG
     };
 };
 
-ModalDialog RID_FONTSIZEDIALOG
-{
-    Moveable = TRUE ;
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    HelpId = CMD_SID_FONTSIZE ;
-    Size = MAP_APPFONT ( 171 , 120 ) ;
-    Text [ en-US ] = "Font Sizes" ;
-    FixedText 1
-    {
-        Left = TRUE ;
-        Pos = MAP_APPFONT ( 12 , 7 ) ;
-        Size = MAP_APPFONT ( 40 , 10 ) ;
-        Text [ en-US ] = "Base ~size";
-    };
-    MetricField 1
-    {
-        HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:1";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 57 , 6 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 4 ;
-        Maximum = 127 ;
-        Unit = FUNIT_POINT ;
-    };
-    FixedText 4
-    {
-        Pos = MAP_APPFONT ( 12 , 37 ) ;
-        Size = MAP_APPFONT ( 40 , 10 ) ;
-        Left = TRUE ;
-        Text [ en-US ] = "~Text";
-    };
-    MetricField 4
-    {
-        HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:4";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 57 , 36 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 5 ;
-        Maximum = 200 ;
-        Unit = FUNIT_CUSTOM ;
-        CustomUnitText = "%" ;
-    };
-    FixedText 5
-    {
-        Pos = MAP_APPFONT ( 12 , 52 ) ;
-        Size = MAP_APPFONT ( 40 , 10 ) ;
-        Left = TRUE ;
-        Text [ en-US ] = "~Indexes";
-    };
-    MetricField 5
-    {
-        HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:5";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 57 , 51 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 5 ;
-        Maximum = 200 ;
-        Unit = FUNIT_CUSTOM ;
-        CustomUnitText = "%" ;
-    };
-    FixedText 6
-    {
-        Pos = MAP_APPFONT ( 12 , 67 ) ;
-        Size = MAP_APPFONT ( 40 , 10 ) ;
-        Left = TRUE ;
-        Text [ en-US ] = "~Functions";
-    };
-    MetricField 6
-    {
-        HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:6";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 57 , 66 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 5 ;
-        Maximum = 200 ;
-        Unit = FUNIT_CUSTOM ;
-        CustomUnitText = "%" ;
-    };
-    FixedText 7
-    {
-        Pos = MAP_APPFONT ( 12 , 82 ) ;
-        Size = MAP_APPFONT ( 40 , 10 ) ;
-        Left = TRUE ;
-        Text [ en-US ] = "~Operators";
-    };
-    MetricField 7
-    {
-        HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:7";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 57 , 81 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 5 ;
-        Maximum = 200 ;
-        Unit = FUNIT_CUSTOM ;
-        CustomUnitText = "%" ;
-    };
-    FixedText 8
-    {
-        Pos = MAP_APPFONT ( 12 , 97 ) ;
-        Size = MAP_APPFONT ( 40 , 10 ) ;
-        Left = TRUE ;
-        Text [ en-US ] = "~Limits";
-    };
-    MetricField 8
-    {
-        HelpID = "starmath:MetricField:RID_FONTSIZEDIALOG:8";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 57 , 96 ) ;
-        Size = MAP_APPFONT ( 40 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 5 ;
-        Maximum = 200 ;
-        Unit = FUNIT_CUSTOM ;
-        CustomUnitText = "%" ;
-    };
-    FixedLine 1
-    {
-        Pos = MAP_APPFONT ( 6 , 24 ) ;
-        Size = MAP_APPFONT ( 99 , 8 ) ;
-        Text [ en-US ] = "Relative sizes" ;
-    };
-    OKButton 1
-    {
-        Pos = MAP_APPFONT ( 114 , 3 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        DefButton = TRUE ;
-    };
-    CancelButton 1
-    {
-        Pos = MAP_APPFONT ( 114 , 21 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-    };
-    HelpButton 1
-    {
-        Pos = MAP_APPFONT ( 114 , 46 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-    HelpID = "starmath:PushButton:RID_FONTSIZEDIALOG:1";
-    Text [ en-US ] = "~Help" ;
-    };
-    PushButton 1
-    {
-        HelpID = "starmath:PushButton:RID_FONTSIZEDIALOG:1";
-        TabStop = TRUE ;
-        Pos = MAP_APPFONT ( 114 , 64 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Text [ en-US ] = "~Default" ;
-    };
-};
-
 ModalDialog RID_FONTTYPEDIALOG
 {
     OutputSize = TRUE ;
diff --git a/starmath/uiconfig/smath/ui/fontsizedialog.ui b/starmath/uiconfig/smath/ui/fontsizedialog.ui
new file mode 100644
index 0000000..afb5ee6
--- /dev/null
+++ b/starmath/uiconfig/smath/ui/fontsizedialog.ui
@@ -0,0 +1,364 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="FontSizeDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Font Sizes</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox4">
+        <property name="can_focus">False</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area4">
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="default">
+                <property name="label" translatable="yes">_Default</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="orientation">vertical</property>
+            <property name="spacing">12</property>
+            <child>
+              <object class="GtkBox" id="box2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="spacing">12</property>
+                <child>
+                  <object class="GtkLabel" id="label4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Base _size</property>
+                    <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">spinB_baseSize:0pt</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkSpinButton" id="spinB_baseSize:0pt">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="margin_left">12</property>
+                    <property name="hexpand">True</property>
+                    <property name="invisible_char">●</property>
+                    <property name="adjustment">adjustmentBaseSize</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="top_padding">6</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkGrid" id="grid1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
+                        <property name="row_spacing">6</property>
+                        <property name="column_spacing">12</property>
+                        <property name="n_rows">5</property>
+                        <property name="n_columns">2</property>
+                        <child>
+                          <object class="GtkSpinButton" id="spinB_function:0%">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="invisible_char">●</property>
+                            <property name="adjustment">adjustmentRelativeSizes</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">2</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">_Operators</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">spinB_function:0%</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">3</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">_Limits</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">spinB_limit:0%</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">4</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="spinB_operator:0%">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="invisible_char">●</property>
+                            <property name="adjustment">adjustmentRelativeSizes</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">3</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="spinB_limit:0%">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="invisible_char">●</property>
+                            <property name="adjustment">adjustmentRelativeSizes</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">4</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label5">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">_Text</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">spinB_text:0%</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label7">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">_Functions</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">spinB_function:0%</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">2</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label6">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">_Indexes</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">spinB_index:0%</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">1</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="spinB_text:0%">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="invisible_char">●</property>
+                            <property name="adjustment">adjustmentRelativeSizes</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="spinB_index:0%">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="hexpand">True</property>
+                            <property name="invisible_char">●</property>
+                            <property name="adjustment">adjustmentRelativeSizes</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="top_attach">1</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Relative sizes</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+      <action-widget response="0">default</action-widget>
+    </action-widgets>
+  </object>
+  <object class="GtkAdjustment" id="adjustmentBaseSize">
+    <property name="lower">4</property>
+    <property name="upper">127</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustmentRelativeSizes">
+    <property name="lower">5</property>
+    <property name="upper">200</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+</interface>
commit 02da9f7a917ffc68dfe7a44c8d03b272cb5bfc18
Author: Armin Le Grand <alg at apache.org>
Date:   Fri May 10 08:48:11 2013 +0000

    Resolves: #i110384# added better fat line rendering where possible
    
    (cherry picked from commit 144eb666b72516ef78c15424087800dff1be5cfd)
    
    Conflicts:
    	drawinglayer/inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx
    	drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
    	vcl/inc/vcl/outdev.hxx
    
    Change-Id: I89f378a4d7a8311b8922f10acff66b000a20a4b7

diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index a320d1a..a486dd8 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -92,6 +92,141 @@ namespace drawinglayer
             mpOutputDevice->SetAntialiasing(mpOutputDevice->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW);
         }
 
+        bool VclPixelProcessor2D::tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency)
+        {
+            basegfx::B2DPolyPolygon aLocalPolyPolygon(rSource.getB2DPolyPolygon());
+
+            if(!aLocalPolyPolygon.count())
+            {
+                // no geometry, done
+                return true;
+            }
+
+            const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rSource.getBColor()));
+
+            mpOutputDevice->SetFillColor(Color(aPolygonColor));
+            mpOutputDevice->SetLineColor();
+            aLocalPolyPolygon.transform(maCurrentTransformation);
+            mpOutputDevice->DrawTransparent(
+                aLocalPolyPolygon,
+                fTransparency);
+
+            return true;
+        }
+
+        bool VclPixelProcessor2D::tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D& rSource, double fTransparency)
+        {
+            basegfx::B2DPolygon aLocalPolygon(rSource.getB2DPolygon());
+
+            if(!aLocalPolygon.count())
+            {
+                // no geometry, done
+                return true;
+            }
+
+            const basegfx::BColor aLineColor(maBColorModifierStack.getModifiedColor(rSource.getBColor()));
+
+            mpOutputDevice->SetFillColor();
+            mpOutputDevice->SetLineColor(Color(aLineColor));
+            aLocalPolygon.transform(maCurrentTransformation);
+
+            // try drawing; if it did not work, use standard fallback
+            if(mpOutputDevice->TryDrawPolyLineDirect(
+                aLocalPolygon,
+                0.0,
+                fTransparency))
+            {
+                return true;
+            }
+
+            return false;
+        }
+
+        bool VclPixelProcessor2D::tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D& rSource, double fTransparency)
+        {
+            basegfx::B2DPolygon aLocalPolygon(rSource.getB2DPolygon());
+
+            if(!aLocalPolygon.count())
+            {
+                // no geometry, done
+                return true;
+            }
+
+            aLocalPolygon = basegfx::tools::simplifyCurveSegments(aLocalPolygon);
+            basegfx::B2DPolyPolygon aHairLinePolyPolygon;
+
+            if(rSource.getStrokeAttribute().isDefault() || 0.0 == rSource.getStrokeAttribute().getFullDotDashLen())
+            {
+                // no line dashing, just copy
+                aHairLinePolyPolygon.append(aLocalPolygon);
+            }
+            else
+            {
+                // apply LineStyle
+                basegfx::tools::applyLineDashing(
+                    aLocalPolygon,
+                    rSource.getStrokeAttribute().getDotDashArray(),
+                    &aHairLinePolyPolygon,
+                    0,
+                    rSource.getStrokeAttribute().getFullDotDashLen());
+            }
+
+            if(!aHairLinePolyPolygon.count())
+            {
+                // no geometry, done
+                return true;
+            }
+
+            const basegfx::BColor aLineColor(
+                maBColorModifierStack.getModifiedColor(
+                    rSource.getLineAttribute().getColor()));
+
+            mpOutputDevice->SetFillColor();
+            mpOutputDevice->SetLineColor(Color(aLineColor));
+            aHairLinePolyPolygon.transform(maCurrentTransformation);
+
+            double fLineWidth(rSource.getLineAttribute().getWidth());
+
+            if(basegfx::fTools::more(fLineWidth, 0.0))
+            {
+                basegfx::B2DVector aLineWidth(fLineWidth, 0.0);
+
+                aLineWidth = maCurrentTransformation * aLineWidth;
+                fLineWidth = aLineWidth.getLength();
+            }
+
+            bool bHasPoints(false);
+            bool bTryWorked(false);
+
+            for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++)
+            {
+                const basegfx::B2DPolygon aSingle(aHairLinePolyPolygon.getB2DPolygon(a));
+
+                if(aSingle.count())
+                {
+                    bHasPoints = true;
+
+                    if(mpOutputDevice->TryDrawPolyLineDirect(
+                        aSingle,
+                        fLineWidth,
+                        fTransparency,
+                        rSource.getLineAttribute().getLineJoin(),
+                        rSource.getLineAttribute().getLineCap()))
+                    {
+                        bTryWorked = true;
+                    }
+                }
+            }
+
+            if(!bTryWorked && !bHasPoints)
+            {
+                // no geometry despite try
+                bTryWorked = true;
+            }
+
+            return bTryWorked;
+        }
+
         void VclPixelProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate)
         {
             switch(rCandidate.getPrimitive2DID())
@@ -169,8 +304,17 @@ namespace drawinglayer
                 }
                 case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D :
                 {
+                    // try to use directly
+                    const primitive2d::PolygonHairlinePrimitive2D& rPolygonHairlinePrimitive2D = static_cast< const primitive2d::PolygonHairlinePrimitive2D& >(rCandidate);
+                    static bool bAllowed(true);
+
+                    if(bAllowed && tryDrawPolygonHairlinePrimitive2DDirect(rPolygonHairlinePrimitive2D, 0.0))
+                    {
+                        break;
+                    }
+
                     // direct draw of hairline
-                    RenderPolygonHairlinePrimitive2D(static_cast< const primitive2d::PolygonHairlinePrimitive2D& >(rCandidate), true);
+                    RenderPolygonHairlinePrimitive2D(rPolygonHairlinePrimitive2D, true);
                     break;
                 }
                 case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D :
@@ -240,8 +384,53 @@ namespace drawinglayer
                 }
                 case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D :
                 {
-                    // direct draw of PolyPolygon with color
-                    RenderPolyPolygonColorPrimitive2D(static_cast< const primitive2d::PolyPolygonColorPrimitive2D& >(rCandidate));
+                    // try to use directly
+                    const primitive2d::PolyPolygonColorPrimitive2D& rPolyPolygonColorPrimitive2D = static_cast< const primitive2d::PolyPolygonColorPrimitive2D& >(rCandidate);
+                    basegfx::B2DPolyPolygon aLocalPolyPolygon;
+                    static bool bAllowed(true);
+
+                    if(bAllowed && tryDrawPolyPolygonColorPrimitive2DDirect(rPolyPolygonColorPrimitive2D, 0.0))
+                    {
+                        // okay, done. In this case no gaps should have to be repaired, too
+                    }
+                    else
+                    {
+                        // direct draw of PolyPolygon with color
+                        const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rPolyPolygonColorPrimitive2D.getBColor()));
+
+                        mpOutputDevice->SetFillColor(Color(aPolygonColor));
+                        mpOutputDevice->SetLineColor();
+                        aLocalPolyPolygon = rPolyPolygonColorPrimitive2D.getB2DPolyPolygon();
+                        aLocalPolyPolygon.transform(maCurrentTransformation);
+                        mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon);
+                    }
+
+                    // when AA is on and this filled polygons are the result of stroked line geometry,
+                    // draw the geometry once extra as lines to avoid AA 'gaps' between partial polygons
+                    // Caution: This is needed in both cases (!)
+                    if(mnPolygonStrokePrimitive2D
+                        && getOptionsDrawinglayer().IsAntiAliasing()
+                        && (mpOutputDevice->GetAntialiasing() & ANTIALIASING_ENABLE_B2DDRAW))
+                    {
+                        const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rPolyPolygonColorPrimitive2D.getBColor()));
+                        sal_uInt32 nCount(aLocalPolyPolygon.count());
+
+                        if(!nCount)
+                        {
+                            aLocalPolyPolygon = rPolyPolygonColorPrimitive2D.getB2DPolyPolygon();
+                            aLocalPolyPolygon.transform(maCurrentTransformation);
+                            nCount = aLocalPolyPolygon.count();
+                        }
+
+                        mpOutputDevice->SetFillColor();
+                        mpOutputDevice->SetLineColor(Color(aPolygonColor));
+
+                        for(sal_uInt32 a(0); a < nCount; a++)
+                        {
+                            mpOutputDevice->DrawPolyLine(aLocalPolyPolygon.getB2DPolygon(a), 0.0);
+                        }
+                    }
+
                     break;
                 }
                 case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D :
@@ -313,25 +502,41 @@ namespace drawinglayer
                                             // single transparent PolyPolygon identified, use directly
                                             const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = static_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(pBasePrimitive);
                                             OSL_ENSURE(pPoPoColor, "OOps, PrimitiveID and PrimitiveType do not match (!)");
-                                            const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor()));
-                                            mpOutputDevice->SetFillColor(Color(aPolygonColor));
-                                            mpOutputDevice->SetLineColor();
-
-                                            basegfx::B2DPolyPolygon aLocalPolyPolygon(pPoPoColor->getB2DPolyPolygon());
-                                            aLocalPolyPolygon.transform(maCurrentTransformation);
-
-                                            mpOutputDevice->DrawTransparent(aLocalPolyPolygon, rUniTransparenceCandidate.getTransparence());
-                                            bDrawTransparentUsed = true;
+                                            bDrawTransparentUsed = tryDrawPolyPolygonColorPrimitive2DDirect(*pPoPoColor, rUniTransparenceCandidate.getTransparence());
+                                            break;
+                                        }
+                                        case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D:
+                                        {
+                                            // single transparent PolygonHairlinePrimitive2D identified, use directly
+                                            const primitive2d::PolygonHairlinePrimitive2D* pPoHair = static_cast< const primitive2d::PolygonHairlinePrimitive2D* >(pBasePrimitive);
+                                            OSL_ENSURE(pPoHair, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+
+                                            // do no tallow by default - problem is that self-overlapping parts of this geometry will
+                                            // not be in a all-same transparency but will already alpha-cover themselves with blending.
+                                            // This is not what the UnifiedTransparencePrimitive2D defines: It requires all it's
+                                            // content to be uniformely transparent.
+                                            // For hairline the effect is pretty minimal, but still not correct.
+                                            static bool bAllowed(false);
+
+                                            bDrawTransparentUsed = bAllowed && tryDrawPolygonHairlinePrimitive2DDirect(*pPoHair, rUniTransparenceCandidate.getTransparence());
+                                            break;
+                                        }
+                                        case PRIMITIVE2D_ID_POLYGONSTROKEPRIMITIVE2D:
+                                        {
+                                            // single transparent PolygonStrokePrimitive2D identified, use directly
+                                            const primitive2d::PolygonStrokePrimitive2D* pPoStroke = static_cast< const primitive2d::PolygonStrokePrimitive2D* >(pBasePrimitive);
+                                            OSL_ENSURE(pPoStroke, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+
+                                            // do no tallow by default - problem is that self-overlapping parts of this geometry will
+                                            // not be in a all-same transparency but will already alpha-cover themselves with blending.
+                                            // This is not what the UnifiedTransparencePrimitive2D defines: It requires all it's
+                                            // content to be uniformely transparent.
+                                            // To check, acitvate and draw a wide transparent self-crossing line/curve
+                                            static bool bAllowed(false);
+
+                                            bDrawTransparentUsed = bAllowed && tryDrawPolygonStrokePrimitive2DDirect(*pPoStroke, rUniTransparenceCandidate.getTransparence());
                                             break;
                                         }
-                                        // #i# need to wait for #i101378# which is in CWS vcl112 to directly paint transparent hairlines
-                                        //case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D:
-                                        //{
-                                        //  // single transparent PolygonHairlinePrimitive2D identified, use directly
-                                        //  const primitive2d::PolygonHairlinePrimitive2D* pPoHair = static_cast< const primitive2d::PolygonHairlinePrimitive2D* >(pBasePrimitive);
-                                        //  OSL_ENSURE(pPoHair, "OOps, PrimitiveID and PrimitiveType do not match (!)");
-                                        //  break;
-                                        //}
                                     }
                                 }
                             }
@@ -431,6 +636,14 @@ namespace drawinglayer
                 }
                 case PRIMITIVE2D_ID_POLYGONSTROKEPRIMITIVE2D:
                 {
+                    // try to use directly
+                    const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive2D = static_cast< const primitive2d::PolygonStrokePrimitive2D& >(rCandidate);
+
+                    if(tryDrawPolygonStrokePrimitive2DDirect(rPolygonStrokePrimitive2D, 0.0))
+                    {
+                        break;
+                    }
+
                     // the stroke primitive may be decomposed to filled polygons. To keep
                     // evtl. set DrawModes aka DRAWMODE_BLACKLINE, DRAWMODE_GRAYLINE,
                     // DRAWMODE_GHOSTEDLINE, DRAWMODE_WHITELINE or DRAWMODE_SETTINGSLINE
@@ -459,9 +672,7 @@ namespace drawinglayer
                         // as filled polygons is geometrically corret but looks wrong since polygon filling avoids
                         // the right and bottom pixels. The used method evaluates that and takes the correct action,
                         // including calling recursively with decomposition if line is wide enough
-                        const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive = static_cast< const primitive2d::PolygonStrokePrimitive2D& >(rCandidate);
-
-                        RenderPolygonStrokePrimitive2D(rPolygonStrokePrimitive);
+                        RenderPolygonStrokePrimitive2D(rPolygonStrokePrimitive2D);
                     }
 
                     // restore DrawMode
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
index 4ef9813..2b41289 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
@@ -26,6 +26,15 @@
 #include <vcl/outdev.hxx>
 
 //////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace drawinglayer { namespace primitive2d {
+    class PolyPolygonColorPrimitive2D;
+    class PolygonHairlinePrimitive2D;
+    class PolygonStrokePrimitive2D;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
 
 namespace drawinglayer
 {
@@ -46,6 +55,11 @@ namespace drawinglayer
              */
             virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
 
+            // some helpers to try direct paints (shortcuts)
+            bool tryDrawPolyPolygonColorPrimitive2DDirect(const drawinglayer::primitive2d::PolyPolygonColorPrimitive2D& rSource, double fTransparency);
+            bool tryDrawPolygonHairlinePrimitive2DDirect(const drawinglayer::primitive2d::PolygonHairlinePrimitive2D& rSource, double fTransparency);
+            bool tryDrawPolygonStrokePrimitive2DDirect(const drawinglayer::primitive2d::PolygonStrokePrimitive2D& rSource, double fTransparency);
+
         public:
             /// constructor/destructor
             VclPixelProcessor2D(
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index d0fc7b3..d1b85ff 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -782,86 +782,6 @@ namespace drawinglayer
             }
         }
 
-        // direct draw of PolyPolygon with color
-        void VclProcessor2D::RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate)
-        {
-            const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rPolygonCandidate.getBColor()));
-            mpOutputDevice->SetFillColor(Color(aPolygonColor));
-            mpOutputDevice->SetLineColor();
-
-            basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolygonCandidate.getB2DPolyPolygon());
-            aLocalPolyPolygon.transform(maCurrentTransformation);
-
-            static bool bCheckTrapezoidDecomposition(false);
-            static bool bShowOutlinesThere(false);
-            if(bCheckTrapezoidDecomposition)
-            {
-                // clip against discrete ViewPort
-                const basegfx::B2DRange& rDiscreteViewport = getViewInformation2D().getDiscreteViewport();
-                aLocalPolyPolygon = basegfx::tools::clipPolyPolygonOnRange(
-                    aLocalPolyPolygon, rDiscreteViewport, true, false);
-
-                if(aLocalPolyPolygon.count())
-                {
-                    // subdivide
-                    aLocalPolyPolygon = basegfx::tools::adaptiveSubdivideByDistance(
-                        aLocalPolyPolygon, 0.5);
-
-                    // trapezoidize
-                    basegfx::B2DTrapezoidVector aB2DTrapezoidVector;
-                    basegfx::tools::trapezoidSubdivide(aB2DTrapezoidVector, aLocalPolyPolygon);
-
-                    const sal_uInt32 nCount(aB2DTrapezoidVector.size());
-
-                    if(nCount)
-                    {
-                        basegfx::BColor aInvPolygonColor(aPolygonColor);
-                        aInvPolygonColor.invert();
-
-                        for(sal_uInt32 a(0); a < nCount; a++)
-                        {
-                            const basegfx::B2DPolygon aTempPolygon(aB2DTrapezoidVector[a].getB2DPolygon());
-
-                            if(bShowOutlinesThere)
-                            {
-                                mpOutputDevice->SetFillColor(Color(aPolygonColor));
-                                mpOutputDevice->SetLineColor();
-                            }
-
-                            mpOutputDevice->DrawPolygon(aTempPolygon);
-
-                            if(bShowOutlinesThere)
-                            {
-                                mpOutputDevice->SetFillColor();
-                                mpOutputDevice->SetLineColor(Color(aInvPolygonColor));
-                                mpOutputDevice->DrawPolyLine(aTempPolygon, 0.0);
-                            }
-                        }
-                    }
-                }
-            }
-            else
-            {
-                mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon);
-
-                if(mnPolygonStrokePrimitive2D
-                    && getOptionsDrawinglayer().IsAntiAliasing()
-                    && (mpOutputDevice->GetAntialiasing() & ANTIALIASING_ENABLE_B2DDRAW))
-                {
-                    // when AA is on and this filled polygons are the result of stroked line geometry,
-                    // draw the geometry once extra as lines to avoid AA 'gaps' between partial polygons
-                    mpOutputDevice->SetFillColor();
-                    mpOutputDevice->SetLineColor(Color(aPolygonColor));
-                    const sal_uInt32 nCount(aLocalPolyPolygon.count());
-
-                    for(sal_uInt32 a(0); a < nCount; a++)
-                    {
-                        mpOutputDevice->DrawPolyLine(aLocalPolyPolygon.getB2DPolygon(a), 0.0);
-                    }
-                }
-            }
-        }
-
         // mask group. Force output to VDev and create mask from given mask
         void VclProcessor2D::RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate)
         {
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.hxx b/drawinglayer/source/processor2d/vclprocessor2d.hxx
index b8d984e..f1fccb3 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.hxx
@@ -38,7 +38,6 @@ namespace drawinglayer { namespace primitive2d {
     class FillGraphicPrimitive2D;
     class PolyPolygonGradientPrimitive2D;
     class PolyPolygonGraphicPrimitive2D;
-    class PolyPolygonColorPrimitive2D;
     class MetafilePrimitive2D;
     class MaskPrimitive2D;
     class UnifiedTransparencePrimitive2D;
@@ -95,7 +94,6 @@ namespace drawinglayer
             void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
             void RenderFillGraphicPrimitive2D(const primitive2d::FillGraphicPrimitive2D& rFillBitmapCandidate);
             void RenderPolyPolygonGraphicPrimitive2D(const primitive2d::PolyPolygonGraphicPrimitive2D& rPolygonCandidate);
-            void RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate);
             void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate);
             void RenderModifiedColorPrimitive2D(const primitive2d::ModifiedColorPrimitive2D& rModifiedCandidate);
             void RenderUnifiedTransparencePrimitive2D(const primitive2d::UnifiedTransparencePrimitive2D& rTransCandidate);
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 5edf88a..4a649c2 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -534,6 +534,7 @@ public:
     SAL_DLLPRIVATE bool ImpTryDrawPolyLineDirect(
         const basegfx::B2DPolygon& rB2DPolygon,
         double fLineWidth = 0.0,
+        double fTransparency = 0.0,
         basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_NONE,
         com::sun::star::drawing::LineCap eLineCap = com::sun::star::drawing::LineCap_BUTT);
 
@@ -673,6 +674,12 @@ public:
         double fLineWidth = 0.0,
         basegfx::B2DLineJoin = basegfx::B2DLINEJOIN_ROUND,
         com::sun::star::drawing::LineCap = com::sun::star::drawing::LineCap_BUTT);
+    bool TryDrawPolyLineDirect(
+        const basegfx::B2DPolygon& rB2DPolygon,
+        double fLineWidth = 0.0,
+        double fTransparency = 0.0,
+        basegfx::B2DLineJoin eLineJoin = basegfx::B2DLINEJOIN_NONE,
+        com::sun::star::drawing::LineCap eLineCap = com::sun::star::drawing::LineCap_BUTT);
 
     /** Render the given polygon as a line stroke
 
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index 4c3f73a..23a79d4 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -2148,6 +2148,7 @@ void OutputDevice::ImpDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPo
 bool OutputDevice::ImpTryDrawPolyLineDirect(
     const basegfx::B2DPolygon& rB2DPolygon,
     double fLineWidth,
+    double fTransparency,
     basegfx::B2DLineJoin eLineJoin,
     com::sun::star::drawing::LineCap eLineCap)
 {
@@ -2177,13 +2178,64 @@ bool OutputDevice::ImpTryDrawPolyLineDirect(
     // draw the polyline
     return mpGraphics->DrawPolyLine(
         aB2DPolygon,
-        0.0,
+        fTransparency,
         aB2DLineWidth,
         eLineJoin,
         eLineCap,
         this);
 }
 
+bool OutputDevice::TryDrawPolyLineDirect(
+    const basegfx::B2DPolygon& rB2DPolygon,
+    double fLineWidth,
+    double fTransparency,
+    basegfx::B2DLineJoin eLineJoin,
+    com::sun::star::drawing::LineCap eLineCap)
+{
+    // AW: Do NOT paint empty PolyPolygons
+    if(!rB2DPolygon.count())
+        return true;
+
+    // we need a graphics
+    if( !mpGraphics )
+        if( !ImplGetGraphics() )
+            return false;
+
+    if( mbInitClipRegion )
+        ImplInitClipRegion();
+
+    if( mbOutputClipped )
+        return true;
+
+    if( mbInitLineColor )
+        ImplInitLineColor();
+
+    const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW)
+        && mpGraphics->supportsOperation(OutDevSupport_B2DDraw)
+        && ROP_OVERPAINT == GetRasterOp()
+        && IsLineColor());
+
+    if(bTryAA)
+    {
+        if(ImpTryDrawPolyLineDirect(rB2DPolygon, fLineWidth, fTransparency, eLineJoin, eLineCap))
+        {
+            // worked, add metafile action (if recorded) and return true
+            if( mpMetaFile )
+            {
+                LineInfo aLineInfo;
+                if( fLineWidth != 0.0 )
+                    aLineInfo.SetWidth( static_cast<long>(fLineWidth+0.5) );
+                const Polygon aToolsPolygon( rB2DPolygon );
+                mpMetaFile->AddAction( new MetaPolyLineAction( aToolsPolygon, aLineInfo ) );
+            }
+
+            return true;
+        }
+    }
+
+    return false;
+}
+
 void OutputDevice::DrawPolyLine(
     const basegfx::B2DPolygon& rB2DPolygon,
     double fLineWidth,
@@ -2191,8 +2243,6 @@ void OutputDevice::DrawPolyLine(
     com::sun::star::drawing::LineCap eLineCap)
 {
     DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
-    (void)eLineJoin; // ATM used in UNX, but not in WNT, access it for warning-free
-    (void)eLineCap;
 
     if( mpMetaFile )
     {
@@ -2226,7 +2276,7 @@ void OutputDevice::DrawPolyLine(
         && IsLineColor());
 
     // use b2dpolygon drawing if possible
-    if(bTryAA && ImpTryDrawPolyLineDirect(rB2DPolygon, fLineWidth, eLineJoin, eLineCap))
+    if(bTryAA && ImpTryDrawPolyLineDirect(rB2DPolygon, fLineWidth, 0.0, eLineJoin, eLineCap))
     {
         return;
     }
commit 5e5f3671f8448ee21b00f0d2a08b214e61f7f744
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jun 19 09:20:15 2013 +0100

    Updated core
    Project: help  d6621f90fda77c1d2232f511f42b3ed0dc38ac68

diff --git a/helpcontent2 b/helpcontent2
index 9e61a73..d6621f9 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 9e61a73556425545fc6141adfbccde60488cc88d
+Subproject commit d6621f90fda77c1d2232f511f42b3ed0dc38ac68


More information about the Libreoffice-commits mailing list