[Libreoffice-commits] core.git: 17 commits - filter/source forms/source include/vcl reportdesign/source svx/source sw/inc sw/source vcl/source

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Sun May 17 23:57:17 PDT 2015


 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx |  105 +------
 forms/source/richtext/richtextviewport.cxx           |   25 -
 forms/source/richtext/richtextviewport.hxx           |    1 
 include/vcl/dialog.hxx                               |    2 
 include/vcl/floatwin.hxx                             |    2 
 reportdesign/source/ui/inc/StartMarker.hxx           |   25 -
 reportdesign/source/ui/report/EndMarker.cxx          |   19 -
 reportdesign/source/ui/report/ReportSection.cxx      |   36 +-
 reportdesign/source/ui/report/StartMarker.cxx        |   49 +--
 svx/source/sidebar/line/LineWidthControl.cxx         |   41 --
 sw/inc/pagepreviewlayout.hxx                         |    2 
 sw/source/core/view/pagepreviewlayout.cxx            |   18 -
 sw/source/ui/chrdlg/drpcps.cxx                       |   99 +++---
 sw/source/ui/config/optload.cxx                      |   64 ++--
 sw/source/ui/config/optpage.cxx                      |   32 +-
 sw/source/ui/envelp/envlop1.cxx                      |   16 -
 sw/source/ui/envelp/labfmt.cxx                       |    4 
 sw/source/ui/frmdlg/frmpage.cxx                      |   15 -
 sw/source/uibase/dbui/mailmergehelper.cxx            |   62 ++--
 sw/source/uibase/inc/mailmergehelper.hxx             |  279 ++++++++++---------
 sw/source/uibase/inc/optload.hxx                     |   47 +--
 sw/source/uibase/inc/optpage.hxx                     |  195 ++++++-------
 sw/source/uibase/inc/pview.hxx                       |  184 +++++++-----
 sw/source/uibase/uiview/pview.cxx                    |   32 +-
 vcl/source/control/scrbar.cxx                        |   20 -
 vcl/source/window/floatwin.cxx                       |   13 
 vcl/source/window/menubarwindow.cxx                  |  116 +++++--
 vcl/source/window/menubarwindow.hxx                  |   12 
 vcl/source/window/menufloatingwindow.cxx             |   20 +
 vcl/source/window/menufloatingwindow.hxx             |   18 -
 vcl/source/window/paint.cxx                          |   27 +
 vcl/source/window/syswin.cxx                         |    8 
 32 files changed, 827 insertions(+), 761 deletions(-)

New commits:
commit 7cd78fc5be35eedb23bafb3dd572409770ef111e
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 15:56:03 2015 +0900

    mark ApplySettings to override in Dialog
    
    Change-Id: I0d87f45fdee03fcfeae57fc02ffc8abc2a152e1e

diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index c7f0a74..2dc4cc3 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -53,7 +53,7 @@ private:
     SAL_DLLPRIVATE void    ImplInitDialogData();
     SAL_DLLPRIVATE void    ImplInitSettings();
 
-    virtual void ApplySettings(vcl::RenderContext& rRenderContext);
+    virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
 
     SAL_DLLPRIVATE         Dialog (const Dialog &) SAL_DELETED_FUNCTION;
     SAL_DLLPRIVATE         Dialog & operator= (const Dialog &) SAL_DELETED_FUNCTION;
commit 24b784140afdc4613563502e05c61ac959085c3f
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 15:39:51 2015 +0900

    refactor SwPagePreview to use RenderContext
    
    Change-Id: I7e19aca13ebde8d18ecf4783e59d71f4ecabeed4

diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx
index ba4abc3..b6e8196 100644
--- a/sw/inc/pagepreviewlayout.hxx
+++ b/sw/inc/pagepreviewlayout.hxx
@@ -362,7 +362,7 @@ public:
 
         @return boolean, indicating, if paint of preview was performed
     */
-    bool Paint( const Rectangle& rOutRect ) const;
+    bool Paint(vcl::RenderContext& rRenderContext, const Rectangle& rOutRect) const;
 
     /** repaint pages on page preview
 
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index fc4468e..28e8160 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -986,22 +986,22 @@ SwTwips SwPagePreviewLayout::GetWinPagesScrollAmount(
 
     OD 12.12.2002 #103492#
 */
-bool SwPagePreviewLayout::Paint(const Rectangle& rOutRect) const
+bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rOutRect) const
 {
     // check environment and parameters
     {
-        if ( !mrParentViewShell.GetWin() &&
-             !mrParentViewShell.GetOut()->GetConnectMetaFile() )
+        if (!mrParentViewShell.GetWin() && !mrParentViewShell.GetOut()->GetConnectMetaFile())
+        {
             return false;
+        }
 
-        OSL_ENSURE( mbPaintInfoValid,
-                "invalid preview settings - no paint of preview" );
-        if ( !mbPaintInfoValid )
+        OSL_ENSURE(mbPaintInfoValid, "invalid preview settings - no paint of preview");
+        if (!mbPaintInfoValid)
             return false;
     }
 
     // OD 17.11.2003 #i22014# - no paint, if <superfluous> flag is set at layout
-    if ( mrLayoutRootFrm.IsSuperfluous() )
+    if (mrLayoutRootFrm.IsSuperfluous())
     {
         return true;
     }
@@ -1009,13 +1009,13 @@ bool SwPagePreviewLayout::Paint(const Rectangle& rOutRect) const
     // environment and parameter ok
 
     // OD 07.11.2003 #i22014#
-    if ( mbInPaint )
+    if (mbInPaint)
     {
         return false;
     }
     mbInPaint = true;
 
-    OutputDevice* pOutputDev = mrParentViewShell.GetOut();
+    OutputDevice* pOutputDev = &rRenderContext; //mrParentViewShell.GetOut();
 
     // prepare paint
     if ( maPreviewPages.size() > 0 )
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index 26b8be1..2fd7d5b 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -45,14 +45,15 @@ class SwPagePreviewLayout;
 // Delete member <mnVirtPage> and its accessor
 class SwPagePreviewWin : public vcl::Window
 {
-    SwViewShell*          mpViewShell;
-    sal_uInt16              mnSttPage;
-    sal_uInt8                mnRow, mnCol;
-    Size                maPxWinSize;
-    Fraction            maScale;
-    SwPagePreview&      mrView;
-    bool                mbCalcScaleForPreviewLayout;
-    Rectangle           maPaintedPreviewDocRect;
+    SwViewShell* mpViewShell;
+    sal_uInt16 mnSttPage;
+    sal_uInt8 mnRow;
+    sal_uInt8 mnCol;
+    Size maPxWinSize;
+    Fraction maScale;
+    SwPagePreview& mrView;
+    bool mbCalcScaleForPreviewLayout;
+    Rectangle maPaintedPreviewDocRect;
     SwPagePreviewLayout* mpPgPreviewLayout;
 
     void SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol );
@@ -72,16 +73,41 @@ public:
 
     void SetViewShell( SwViewShell* pShell );
 
-    SwViewShell* GetViewShell() const { return mpViewShell; }
+    SwViewShell* GetViewShell() const
+    {
+        return mpViewShell;
+    }
 
-    sal_uInt8    GetRow() const      { return mnRow; }
-    void    SetRow( sal_uInt8 n )    { if( n ) mnRow = n; }
+    sal_uInt8 GetRow() const
+    {
+        return mnRow;
+    }
 
-    sal_uInt8    GetCol() const      { return mnCol; }
-    void    SetCol( sal_uInt8 n )    { if( n ) mnCol = n; }
+    void SetRow(sal_uInt8 n)
+    {
+        if(n)
+        mnRow = n;
+    }
 
-    sal_uInt16  GetSttPage() const      { return mnSttPage; }
-    void    SetSttPage( sal_uInt16 n )  { mnSttPage = n; }
+    sal_uInt8 GetCol() const
+    {
+        return mnCol;
+    }
+    void SetCol(sal_uInt8 n)
+    {
+        if(n)
+            mnCol = n;
+    }
+
+    sal_uInt16 GetSttPage() const
+    {
+        return mnSttPage;
+    }
+
+    void SetSttPage(sal_uInt16 n)
+    {
+        mnSttPage = n;
+    }
 
     /** get selected page number of document preview
 
@@ -97,7 +123,7 @@ public:
     void SetSelectedPage( sal_uInt16 _nSelectedPageNum );
 
     // If we only have one column we do not have a oth page
-    sal_uInt16  GetDefSttPage() const   { return 1 == mnCol ? 1 : 0; }
+    sal_uInt16 GetDefSttPage() const   { return 1 == mnCol ? 1 : 0; }
 
     void CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol );
 
@@ -138,9 +164,7 @@ public:
     */
     bool SetBookPreviewMode( const bool _bBookPreview );
 
-    virtual ::com::sun::star::uno::Reference<
-        ::com::sun::star::accessibility::XAccessible>
-                    CreateAccessible() SAL_OVERRIDE;
+    virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() SAL_OVERRIDE;
 };
 
 /**
@@ -152,48 +176,47 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
     // current dispatcher shell
     VclPtr<SwPagePreviewWin> pViewWin;
     //viewdata of the previous SwView and the new crsrposition
-    OUString                sSwViewData;
+    OUString sSwViewData;
     //and the new cursor position if the user double click in the PagePreview
-    OUString                sNewCrsrPos;
+    OUString sNewCrsrPos;
     // to support keyboard the number of the page to go to can be set too
-    sal_uInt16                  nNewPage;
+    sal_uInt16 nNewPage;
     // visible range
-    OUString                sPageStr;
-    Size                    aDocSz;
+    OUString sPageStr;
+    Size aDocSz;
     Rectangle               aVisArea;
 
     // MDI control elements
-    VclPtr<SwScrollbar>      pHScrollbar;
-    VclPtr<SwScrollbar>     pVScrollbar;
-    bool                    mbHScrollbarEnabled;
-    bool                    mbVScrollbarEnabled;
-    VclPtr<ImageButton>     pPageUpBtn,
-                            pPageDownBtn;
+    VclPtr<SwScrollbar> pHScrollbar;
+    VclPtr<SwScrollbar> pVScrollbar;
+    bool mbHScrollbarEnabled : 1;
+    bool mbVScrollbarEnabled : 1;
+    VclPtr<ImageButton> pPageUpBtn;
+    VclPtr<ImageButton> pPageDownBtn;
     // dummy window for filling the lower right edge when both scrollbars are active
-    VclPtr<vcl::Window>   pScrollFill;
+    VclPtr<vcl::Window> pScrollFill;
 
-    sal_uInt16              mnPageCount;
-    bool                    bNormalPrint;
+    sal_uInt16 mnPageCount;
+    bool bNormalPrint;
 
     // New members to reset design mode at draw view for form shell on switching
     // back from writer page preview to normal view.
-    bool                mbResetFormDesignMode:1;
-    bool                mbFormDesignModeToReset:1;
+    bool mbResetFormDesignMode:1;
+    bool mbFormDesignModeToReset:1;
 
-    SAL_DLLPRIVATE void            Init(const SwViewOption* = 0);
-    SAL_DLLPRIVATE Point           AlignToPixel(const Point& rPt) const;
+    SAL_DLLPRIVATE void Init(const SwViewOption* = 0);
+    SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
 
-    SAL_DLLPRIVATE int             _CreateScrollbar( bool bHori );
-    DECL_DLLPRIVATE_LINK( ScrollHdl, SwScrollbar * );
-    DECL_DLLPRIVATE_LINK( EndScrollHdl, SwScrollbar * );
-    DECL_DLLPRIVATE_LINK( BtnPage, Button * );
-    SAL_DLLPRIVATE bool            ChgPage( int eMvMode, bool bUpdateScrollbar = true );
+    SAL_DLLPRIVATE int _CreateScrollbar( bool bHori);
+    DECL_DLLPRIVATE_LINK(ScrollHdl, SwScrollbar*);
+    DECL_DLLPRIVATE_LINK(EndScrollHdl, SwScrollbar*);
+    DECL_DLLPRIVATE_LINK(BtnPage, Button*);
+    SAL_DLLPRIVATE bool ChgPage( int eMvMode, bool bUpdateScrollbar = true );
 
     SAL_DLLPRIVATE virtual SfxPrinter*     GetPrinter( bool bCreate = false ) SAL_OVERRIDE;
     SAL_DLLPRIVATE virtual sal_uInt16      SetPrinter( SfxPrinter *pNewPrinter, SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false ) SAL_OVERRIDE;
     SAL_DLLPRIVATE virtual bool            HasPrintOptionsPage() const SAL_OVERRIDE;
-    SAL_DLLPRIVATE virtual VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent,
-                                                const SfxItemSet &rOptions ) SAL_OVERRIDE;
+    SAL_DLLPRIVATE virtual VclPtr<SfxTabPage> CreatePrintOptionsPage(vcl::Window *pParent, const SfxItemSet &rOptions ) SAL_OVERRIDE;
 
     SAL_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, bool bInner );
 
@@ -225,45 +248,50 @@ private:
     static void InitInterface_Impl();
 
 public:
-    inline vcl::Window&          GetFrameWindow() const { return GetViewFrame()->GetWindow(); }
-    inline SwViewShell*     GetViewShell() const { return pViewWin->GetViewShell(); }
-    inline const Rectangle& GetVisArea() const { return aVisArea; }
-    inline void             GrabFocusViewWin() { pViewWin->GrabFocus(); }
-    inline void             RepaintCoreRect( const SwRect& rRect )
-                                { pViewWin->RepaintCoreRect( rRect ); }
-
-    void            DocSzChgd(const Size& rNewSize);
-    const Size&     GetDocSz() const { return aDocSz; }
-
-    void            SetVisArea( const Rectangle&, bool bUpdateScrollbar = true);
-
-    inline void     AdjustEditWin();
-
-    void            ScrollViewSzChg();
-    void            ScrollDocSzChg();
-    void            ShowHScrollbar(bool bShow);
-    void            ShowVScrollbar(bool bShow);
-    void            EnableHScrollbar(bool bEnable);
-    void            EnableVScrollbar(bool bEnable);
-
-    sal_uInt16      GetPageCount() const        { return mnPageCount; }
-    sal_uInt16      GetSelectedPage() const {return pViewWin->SelectedPage();}
-
-    bool            HandleWheelCommands( const CommandEvent& );
-
-    OUString        GetPrevSwViewData() const       { return sSwViewData; }
-    void            SetNewCrsrPos( const OUString& rStr ) { sNewCrsrPos = rStr; }
+    inline vcl::Window& GetFrameWindow() const
+    { return GetViewFrame()->GetWindow(); }
+    inline SwViewShell* GetViewShell() const
+    { return pViewWin->GetViewShell(); }
+    inline const Rectangle& GetVisArea() const
+    { return aVisArea; }
+    inline void GrabFocusViewWin()
+    { pViewWin->GrabFocus(); }
+    inline void RepaintCoreRect( const SwRect& rRect )
+    { pViewWin->RepaintCoreRect( rRect ); }
+
+    void DocSzChgd(const Size& rNewSize);
+    const Size& GetDocSz() const
+    { return aDocSz; }
+
+    void SetVisArea( const Rectangle&, bool bUpdateScrollbar = true);
+
+    inline void AdjustEditWin();
+
+    void ScrollViewSzChg();
+    void ScrollDocSzChg();
+    void ShowHScrollbar(bool bShow);
+    void ShowVScrollbar(bool bShow);
+    void EnableHScrollbar(bool bEnable);
+    void EnableVScrollbar(bool bEnable);
+
+    sal_uInt16 GetPageCount() const        { return mnPageCount; }
+    sal_uInt16 GetSelectedPage() const {return pViewWin->SelectedPage();}
+
+    bool HandleWheelCommands( const CommandEvent& );
+
+    OUString GetPrevSwViewData() const       { return sSwViewData; }
+    void SetNewCrsrPos( const OUString& rStr ) { sNewCrsrPos = rStr; }
     const OUString& GetNewCrsrPos() const           { return sNewCrsrPos; }
 
-    sal_uInt16          GetNewPage() const {return nNewPage;}
-    void            SetNewPage(sal_uInt16 nSet)  {nNewPage = nSet;}
+    sal_uInt16 GetNewPage() const {return nNewPage;}
+    void SetNewPage(sal_uInt16 nSet)  {nNewPage = nSet;}
 
     // Handler
-    void            Execute(SfxRequest&);
-    void            GetState(SfxItemSet&);
-    static void     StateUndo(SfxItemSet&);
+    void Execute(SfxRequest&);
+    void GetState(SfxItemSet&);
+    static void StateUndo(SfxItemSet&);
 
-    SwDocShell*     GetDocShell();
+    SwDocShell* GetDocShell();
 
     // apply Accessiblity options
     void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 1e93465..4ac28e8 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -210,31 +210,31 @@ SwPagePreviewWin::~SwPagePreviewWin()
 {
 }
 
-void  SwPagePreviewWin::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect )
+void  SwPagePreviewWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
 {
-    if( !mpViewShell || !mpViewShell->GetLayout() )
+    if (!mpViewShell || !mpViewShell->GetLayout())
         return;
 
-    if( USHRT_MAX == mnSttPage )        // was never calculated ? (Init-Phase!)
+    if (USHRT_MAX == mnSttPage)        // was never calculated ? (Init-Phase!)
     {
         // This is the size to which I always relate.
-        if( !maPxWinSize.Height() || !maPxWinSize.Width() )
-            maPxWinSize = GetOutputSizePixel();
-
-        Rectangle aRect( LogicToPixel( rRect ));
-        mpPgPreviewLayout->Prepare( 1, Point(0,0), maPxWinSize,
-                                  mnSttPage, maPaintedPreviewDocRect );
-        SetSelectedPage( 1 );
-        mpPgPreviewLayout->Paint( PixelToLogic( aRect ) );
+        if (!maPxWinSize.Height() || !maPxWinSize.Width())
+            maPxWinSize = rRenderContext.GetOutputSizePixel();
+
+        Rectangle aRect(rRenderContext.LogicToPixel(rRect));
+        mpPgPreviewLayout->Prepare(1, Point(0,0), maPxWinSize,
+                                   mnSttPage, maPaintedPreviewDocRect);
+        SetSelectedPage(1);
+        mpPgPreviewLayout->Paint(rRenderContext, rRenderContext.PixelToLogic(aRect));
         SetPagePreview(mnRow, mnCol);
     }
     else
     {
-        MapMode aMM( GetMapMode() );
-        aMM.SetScaleX( maScale );
-        aMM.SetScaleY( maScale );
-        SetMapMode( aMM );
-        mpPgPreviewLayout->Paint( rRect );
+        MapMode aMM(rRenderContext.GetMapMode());
+        aMM.SetScaleX(maScale);
+        aMM.SetScaleY(maScale);
+        rRenderContext.SetMapMode(aMM);
+        mpPgPreviewLayout->Paint(rRenderContext, rRect);
     }
 }
 
commit e36b541591e9a229f158b0dbe7ce3859bd88e301
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 15:38:34 2015 +0900

    Don't check for pWin when drawing the Scrollbar
    
    Change-Id: I3e9c55b99d9eb40e69edfd19a0b481139a7df519

diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index e801838..696cae7 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -640,18 +640,18 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
     if (mbCalcSize)
         ImplCalc(false);
 
-    vcl::Window *pWin = NULL;
-    if (rRenderContext.GetOutDevType() == OUTDEV_WINDOW)
-        pWin = static_cast<vcl::Window*>(&rRenderContext);
+    //vcl::Window *pWin = NULL;
+    //if (rRenderContext.GetOutDevType() == OUTDEV_WINDOW)
+    //    pWin = static_cast<vcl::Window*>(&rRenderContext);
 
     // Draw the entire control if the native theme engine needs it
-    if (nDrawFlags && pWin && rRenderContext.IsNativeControlSupported(CTRL_SCROLLBAR, PART_DRAW_BACKGROUND_HORZ))
+    if (nDrawFlags && rRenderContext.IsNativeControlSupported(CTRL_SCROLLBAR, PART_DRAW_BACKGROUND_HORZ))
     {
         ImplDrawNative(rRenderContext, SCRBAR_DRAW_BACKGROUND);
         return;
     }
 
-    if ((nDrawFlags & SCRBAR_DRAW_BTN1) && (!pWin || !ImplDrawNative(rRenderContext, SCRBAR_DRAW_BTN1)))
+    if ((nDrawFlags & SCRBAR_DRAW_BTN1) && (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_BTN1)))
     {
         nStyle = DrawButtonFlags::NoLightBorder;
         if (mnStateFlags & SCRBAR_STATE_BTN1_DOWN)
@@ -678,7 +678,7 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
         aDecoView.DrawSymbol(aTempRect, eSymbolType, rStyleSettings.GetButtonTextColor(), nSymbolStyle);
     }
 
-    if ((nDrawFlags & SCRBAR_DRAW_BTN2) && (!pWin || !ImplDrawNative(rRenderContext, SCRBAR_DRAW_BTN2)))
+    if ((nDrawFlags & SCRBAR_DRAW_BTN2) && (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_BTN2)))
     {
         nStyle = DrawButtonFlags::NoLightBorder;
         if (mnStateFlags & SCRBAR_STATE_BTN2_DOWN)
@@ -707,7 +707,7 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
 
     rRenderContext.SetLineColor();
 
-    if ((nDrawFlags & SCRBAR_DRAW_THUMB) && (!pWin || !ImplDrawNative(rRenderContext, SCRBAR_DRAW_THUMB)))
+    if ((nDrawFlags & SCRBAR_DRAW_THUMB) && (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_THUMB)))
     {
         if (!maThumbRect.IsEmpty())
         {
@@ -724,7 +724,7 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
         }
     }
 
-    if ((nDrawFlags & SCRBAR_DRAW_PAGE1) && (!pWin || !ImplDrawNative(rRenderContext, SCRBAR_DRAW_PAGE1)))
+    if ((nDrawFlags & SCRBAR_DRAW_PAGE1) && (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_PAGE1)))
     {
         if (mnStateFlags & SCRBAR_STATE_PAGE1_DOWN)
             rRenderContext.SetFillColor(rStyleSettings.GetShadowColor());
@@ -732,7 +732,7 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
             rRenderContext.SetFillColor(rStyleSettings.GetCheckedColor());
         rRenderContext.DrawRect(maPage1Rect);
     }
-    if ((nDrawFlags & SCRBAR_DRAW_PAGE2) && (!pWin || !ImplDrawNative(rRenderContext, SCRBAR_DRAW_PAGE2)))
+    if ((nDrawFlags & SCRBAR_DRAW_PAGE2) && (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_PAGE2)))
     {
         if (mnStateFlags & SCRBAR_STATE_PAGE2_DOWN)
             rRenderContext.SetFillColor(rStyleSettings.GetShadowColor());
@@ -1121,7 +1121,7 @@ void ScrollBar::KeyInput( const KeyEvent& rKEvt )
         Control::KeyInput( rKEvt );
 }
 
-void ScrollBar::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
+void ScrollBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
 {
     ImplDraw(rRenderContext, SCRBAR_DRAW_ALL);
 }
commit 29ea595d908523771ab3a4a2f940b616b314b0b2
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 15:37:39 2015 +0900

    cleanup LineWidthControl
    
    Change-Id: I875af6213660ba0fa9831b76c4d72e2092cd0a3a

diff --git a/svx/source/sidebar/line/LineWidthControl.cxx b/svx/source/sidebar/line/LineWidthControl.cxx
index 6118293..6723f6b 100644
--- a/svx/source/sidebar/line/LineWidthControl.cxx
+++ b/svx/source/sidebar/line/LineWidthControl.cxx
@@ -32,7 +32,6 @@
 #include <sfx2/dispatch.hxx>
 #include "svx/sidebar/PopupContainer.hxx"
 
-
 namespace svx { namespace sidebar {
 
 LineWidthControl::LineWidthControl (
@@ -76,9 +75,6 @@ void LineWidthControl::dispose()
     svx::sidebar::PopupControl::dispose();
 }
 
-
-
-
 void LineWidthControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rect)
 {
     svx::sidebar::PopupControl::Paint(rRenderContext, rect);
@@ -104,9 +100,6 @@ void LineWidthControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle
     rRenderContext.Pop();
 }
 
-
-
-
 void LineWidthControl::Initialize()
 {
     maVSWidth->SetStyle( maVSWidth->GetStyle()| WB_3DLOOK |  WB_NO_DIRECTSELECT  );// WB_NAMEFIELD | WB_ITEMBORDER |WB_DOUBLEBORDER | WB_NONEFIELD |
@@ -197,9 +190,6 @@ void LineWidthControl::GetFocus()
         maVSWidth->GrabFocus();
 }
 
-
-
-
 void LineWidthControl::SetWidthSelect( long lValue, bool bValuable, SfxMapUnit eMapUnit)
 {
     mbVSFocus = true;
@@ -207,10 +197,10 @@ void LineWidthControl::SetWidthSelect( long lValue, bool bValuable, SfxMapUnit e
     mbCloseByEdit = false;
     meMapUnit = eMapUnit;
     SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_LINE_WIDTH_GLOBAL_VALUE );
-    if ( aWinOpt.Exists() )
+    if (aWinOpt.Exists())
     {
-        ::com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue > aSeq = aWinOpt.GetUserData();
-        ::rtl::OUString aTmp;
+        css::uno::Sequence <css::beans::NamedValue> aSeq = aWinOpt.GetUserData();
+        OUString aTmp;
         if ( aSeq.getLength())
             aSeq[0].Value >>= aTmp;
 
@@ -235,10 +225,10 @@ void LineWidthControl::SetWidthSelect( long lValue, bool bValuable, SfxMapUnit e
         maVSWidth->SetItemText(9, rStr[8]);
     }
 
-    if(bValuable)
+    if (bValuable)
     {
-        sal_Int64 nVal = OutputDevice::LogicToLogic( lValue, (MapUnit)eMapUnit, MAP_100TH_MM );
-        nVal = maMFWidth->Normalize( nVal );
+        sal_Int64 nVal = OutputDevice::LogicToLogic(lValue, (MapUnit) eMapUnit, MAP_100TH_MM );
+        nVal = maMFWidth->Normalize(nVal);
         maMFWidth->SetValue( nVal, FUNIT_100TH_MM );
     }
     else
@@ -253,11 +243,14 @@ void LineWidthControl::SetWidthSelect( long lValue, bool bValuable, SfxMapUnit e
     OUString strCurrValue = maMFWidth->GetText();
     sal_uInt16 i = 0;
     for(; i < 8; i++)
+    {
         if(strCurrValue == rStr[i])
         {
             maVSWidth->SetSelItem(i+1);
             break;
         }
+    }
+
     if (i>=8)
     {
         mbVSFocus = false;
@@ -268,15 +261,12 @@ void LineWidthControl::SetWidthSelect( long lValue, bool bValuable, SfxMapUnit e
     maVSWidth->StartSelection();
 }
 
-
-
-
 IMPL_LINK(LineWidthControl, VSSelectHdl, void *, pControl)
 {
-    if(pControl == &maVSWidth)
+    if (pControl == &maVSWidth)
     {
         sal_uInt16 iPos = maVSWidth->GetSelectItemId();
-        if(iPos >= 1 && iPos <= 8)
+        if (iPos >= 1 && iPos <= 8)
         {
             sal_IntPtr nVal = LogicToLogic(reinterpret_cast<sal_IntPtr>(maVSWidth->GetItemData( iPos )), MAP_POINT, (MapUnit)meMapUnit);
             nVal = maMFWidth->Denormalize(nVal);
@@ -287,10 +277,10 @@ IMPL_LINK(LineWidthControl, VSSelectHdl, void *, pControl)
             mbCloseByEdit = false;
             mnTmpCustomWidth = 0;
         }
-        else if(iPos == 9)
+        else if (iPos == 9)
         {//last custom
             //modified
-            if(mbCustom)
+            if (mbCustom)
             {
                 long nVal = LogicToLogic(mnCustomWidth , MAP_POINT, (MapUnit)meMapUnit);
                 nVal = maMFWidth->Denormalize(nVal);
@@ -310,15 +300,12 @@ IMPL_LINK(LineWidthControl, VSSelectHdl, void *, pControl)
             }
             //modify end
         }
-        if((iPos >= 1 && iPos <= 8) || (iPos == 9 && mbCustom)) //add
+        if ((iPos >= 1 && iPos <= 8) || (iPos == 9 && mbCustom)) //add
             mrLinePropertyPanel.EndLineWidthPopupMode();
     }
     return 0L;
 }
 
-
-
-
 IMPL_LINK(LineWidthControl, MFModifyHdl, void *, pControl)
 {
     if(pControl == &maMFWidth)
commit 9b6057dcb9eaf1d6b90e86b9c562d9e6f4856acb
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 15:32:54 2015 +0900

    refactor SwAddressPreview to use RenderContext
    
    Change-Id: I82d76c28a2326a41fe78a25d3efcea0196775881

diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index 80082ed..5968fbc 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -316,51 +316,53 @@ void SwAddressPreview::UpdateScrollBar()
     }
 }
 
-void SwAddressPreview::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle&)
+void SwAddressPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
 {
-    const StyleSettings& rSettings = GetSettings().GetStyleSettings();
-    SetFillColor(rSettings.GetWindowColor());
-    SetLineColor( Color(COL_TRANSPARENT) );
-    DrawRect( Rectangle(Point(0, 0), GetOutputSizePixel()) );
+    const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings();
+    rRenderContext.SetFillColor(rSettings.GetWindowColor());
+    rRenderContext.SetLineColor(Color(COL_TRANSPARENT));
+    rRenderContext.DrawRect(Rectangle(Point(0, 0), rRenderContext.GetOutputSizePixel()));
     Color aPaintColor(IsEnabled() ? rSettings.GetWindowTextColor() : rSettings.GetDisableColor());
-    SetLineColor(aPaintColor);
-    vcl::Font aFont(GetFont());
+    rRenderContext.SetLineColor(aPaintColor);
+    vcl::Font aFont(rRenderContext.GetFont());
     aFont.SetColor(aPaintColor);
-    SetFont(aFont);
+    rRenderContext.SetFont(aFont);
 
-    Size aSize = GetOutputSizePixel();
+    Size aSize = rRenderContext.GetOutputSizePixel();
     sal_uInt16 nStartRow = 0;
     if(aVScrollBar->IsVisible())
     {
         aSize.Width() -= aVScrollBar->GetSizePixel().Width();
         nStartRow = (sal_uInt16)aVScrollBar->GetThumbPos();
     }
-    Size aPartSize( aSize.Width()/pImpl->nColumns, aSize.Height()/pImpl->nRows );
+    Size aPartSize(aSize.Width() / pImpl->nColumns,
+                   aSize.Height() / pImpl->nRows);
     aPartSize.Width() -= 2;
     aPartSize.Height() -= 2;
 
     sal_uInt16 nAddress = nStartRow * pImpl->nColumns;
-    const sal_uInt16 nNumAddresses = static_cast< sal_uInt16 >(pImpl->aAddresses.size());
-    for(sal_uInt16 nRow = 0; nRow < pImpl->nRows ; ++nRow)
+    const sal_uInt16 nNumAddresses = static_cast<sal_uInt16>(pImpl->aAddresses.size());
+    for (sal_uInt16 nRow = 0; nRow < pImpl->nRows ; ++nRow)
     {
-        for(sal_uInt16 nCol = 0; nCol < pImpl->nColumns; ++nCol)
+        for (sal_uInt16 nCol = 0; nCol < pImpl->nColumns; ++nCol)
         {
-            if(nAddress >= nNumAddresses)
+            if (nAddress >= nNumAddresses)
                 break;
-            Point aPos(nCol * aPartSize.Width(), (nRow) * aPartSize.Height());
-            aPos.Move(1,1);
+            Point aPos(nCol * aPartSize.Width(),
+                       nRow * aPartSize.Height());
+            aPos.Move(1, 1);
             bool bIsSelected = nAddress == pImpl->nSelectedAddress;
-            if((pImpl->nColumns * pImpl->nRows) == 1)
+            if ((pImpl->nColumns * pImpl->nRows) == 1)
                 bIsSelected = false;
             OUString adr(pImpl->aAddresses[nAddress]);
-            DrawText_Impl(adr,aPos,aPartSize,bIsSelected);
+            DrawText_Impl(rRenderContext, adr, aPos, aPartSize, bIsSelected);
             ++nAddress;
         }
     }
-    SetClipRegion();
+    rRenderContext.SetClipRegion();
 }
 
-void  SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
+void SwAddressPreview::MouseButtonDown( const MouseEvent& rMEvt )
 {
     Window::MouseButtonDown(rMEvt);
     if (rMEvt.IsLeft() && pImpl->nRows && pImpl->nColumns)
@@ -434,30 +436,30 @@ void  SwAddressPreview::KeyInput( const KeyEvent& rKEvt )
 
 void SwAddressPreview::StateChanged( StateChangedType nStateChange )
 {
-    if(nStateChange == StateChangedType::Enable)
+    if (nStateChange == StateChangedType::Enable)
         Invalidate();
     Window::StateChanged(nStateChange);
 }
 
-void SwAddressPreview::DrawText_Impl(
-        const OUString& rAddress, const Point& rTopLeft, const Size& rSize, bool bIsSelected)
+void SwAddressPreview::DrawText_Impl(vcl::RenderContext& rRenderContext, const OUString& rAddress,
+                                     const Point& rTopLeft, const Size& rSize, bool bIsSelected)
 {
-    SetClipRegion( vcl::Region( Rectangle(rTopLeft, rSize)) );
-    if(bIsSelected)
+    rRenderContext.SetClipRegion(vcl::Region(Rectangle(rTopLeft, rSize)));
+    if (bIsSelected)
     {
         //selection rectangle
-        SetFillColor(Color(COL_TRANSPARENT));
-        DrawRect(Rectangle(rTopLeft, rSize));
+        rRenderContext.SetFillColor(Color(COL_TRANSPARENT));
+        rRenderContext.DrawRect(Rectangle(rTopLeft, rSize));
     }
     sal_Int32 nHeight = GetTextHeight();
     OUString sAddress(rAddress);
     sal_uInt16 nTokens = comphelper::string::getTokenCount(sAddress, '\n');
     Point aStart = rTopLeft;
     //put it away from the border
-    aStart.Move( 2, 2);
-    for(sal_uInt16 nToken = 0; nToken < nTokens; nToken++)
+    aStart.Move(2, 2);
+    for (sal_uInt16 nToken = 0; nToken < nTokens; nToken++)
     {
-        DrawText( aStart, sAddress.getToken(nToken, '\n') );
+        rRenderContext.DrawText(aStart, sAddress.getToken(nToken, '\n'));
         aStart.Y() += nHeight;
     }
 }
diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx
index f24a8f7..49edd57 100644
--- a/sw/source/uibase/inc/mailmergehelper.hxx
+++ b/sw/source/uibase/inc/mailmergehelper.hxx
@@ -44,13 +44,13 @@ namespace com { namespace sun { namespace star { namespace mail {
 namespace SwMailMergeHelper
 {
     SW_DLLPUBLIC OUString CallSaveAsDialog(OUString& rFilter);
-    SW_DLLPUBLIC bool    CheckMailAddress( const OUString& rMailAddress );
-    SW_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::mail::XSmtpService >
-                         ConnectToSmtpServer( SwMailMergeConfigItem& rConfigItem,
-                            com::sun::star::uno::Reference< com::sun::star::mail::XMailService >&  xInMailService,
+    SW_DLLPUBLIC bool CheckMailAddress(const OUString& rMailAddress);
+    SW_DLLPUBLIC css::uno::Reference<css::mail::XSmtpService> ConnectToSmtpServer(
+                            SwMailMergeConfigItem& rConfigItem,
+                            css::uno::Reference<css::mail::XMailService>& xInMailService,
                             const OUString& rInMailServerPassword,
                             const OUString& rOutMailServerPassword,
-                            vcl::Window* pDialogParentWindow = 0 );
+                            vcl::Window* pDialogParentWindow = 0);
 }
 
 struct SwAddressPreview_Impl;
@@ -59,18 +59,19 @@ struct SwAddressPreview_Impl;
 // and also the resulting address filled with database data
 class SW_DLLPUBLIC SwAddressPreview : public vcl::Window
 {
-    VclPtr<ScrollBar>       aVScrollBar;
-    SwAddressPreview_Impl*  pImpl;
-    Link<>                  m_aSelectHdl;
+    VclPtr<ScrollBar> aVScrollBar;
+    SwAddressPreview_Impl* pImpl;
+    Link<> m_aSelectHdl;
 
-    void DrawText_Impl( const OUString& rAddress, const Point& rTopLeft, const Size& rSize, bool bIsSelected);
+    void DrawText_Impl(vcl::RenderContext& rRenderContext, const OUString& rAddress,
+                       const Point& rTopLeft, const Size& rSize, bool bIsSelected);
 
-    virtual void        Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE;
-    virtual void        Resize() SAL_OVERRIDE;
-    virtual void        MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
-    virtual void        KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
-    virtual void        StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
-    void                UpdateScrollBar();
+    virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE;
+    virtual void Resize() SAL_OVERRIDE;
+    virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
+    virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
+    virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE;
+    void UpdateScrollBar();
 
     DECL_LINK(ScrollHdl, void*);
 
@@ -88,87 +89,89 @@ public:
      AddAddress appends the new address to the already added ones.
      Initially the first added address will be selected
     */
-    void                    AddAddress(const OUString& rAddress);
+    void AddAddress(const OUString& rAddress);
     //  for preview mode - replaces the currently used address by the given one
-    void                    SetAddress(const OUString& rAddress);
+    void SetAddress(const OUString& rAddress);
     // removes all addresses
-    void                    Clear();
+    void Clear();
 
     // returns the selected address
-    sal_uInt16              GetSelectedAddress() const;
-    void                    SelectAddress(sal_uInt16 nSelect);
-    void                    ReplaceSelectedAddress(const OUString&);
-    void                    RemoveSelectedAddress();
+    sal_uInt16 GetSelectedAddress() const;
+    void SelectAddress(sal_uInt16 nSelect);
+    void ReplaceSelectedAddress(const OUString&);
+    void RemoveSelectedAddress();
 
     // set the number of rows and columns of addresses
-    void                    SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns);
-    void                    EnableScrollBar(bool bEnable = true);
+    void SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns);
+    void EnableScrollBar(bool bEnable = true);
 
     // fill the actual data into a string (address block or greeting)
-    static OUString FillData(
-            const OUString& rAddress,
-            SwMailMergeConfigItem& rConfigItem,
-            const ::com::sun::star::uno::Sequence< OUString>* pAssignments = 0);
+    static OUString FillData(const OUString& rAddress, SwMailMergeConfigItem& rConfigItem,
+                             const css::uno::Sequence<OUString>* pAssignments = 0);
 
-    void    SetSelectHdl (const Link<>& rLink) {m_aSelectHdl = rLink;}
+    void SetSelectHdl (const Link<>& rLink) { m_aSelectHdl = rLink; }
 };
 
 // iterate over an address block or a greeting line the iterator returns the
 // parts either as pure string or as column
 struct SwMergeAddressItem
 {
-    OUString  sText;
-    bool      bIsColumn;
-    bool      bIsReturn;
-    SwMergeAddressItem() :
-        bIsColumn(false),
-        bIsReturn(false) {}
+    OUString sText;
+    bool bIsColumn;
+    bool bIsReturn;
+
+    SwMergeAddressItem()
+        : bIsColumn(false)
+        , bIsReturn(false)
+    {}
 };
 
-class SW_DLLPUBLIC   SwAddressIterator
+class SW_DLLPUBLIC SwAddressIterator
 {
     OUString sAddress;
 public:
     SwAddressIterator(const OUString& rAddress) :
-        sAddress(rAddress){}
+        sAddress(rAddress)
+    {}
 
     SwMergeAddressItem  Next();
-    bool                HasMore() const{return !sAddress.isEmpty();}
+    bool HasMore() const { return !sAddress.isEmpty(); }
 };
 
 class SW_DLLPUBLIC SwAuthenticator :
-    public cppu::WeakImplHelper< ::com::sun::star::mail::XAuthenticator>
+    public cppu::WeakImplHelper<css::mail::XAuthenticator>
 {
     OUString m_aUserName;
     OUString m_aPassword;
-    VclPtr<vcl::Window>         m_pParentWindow;
+    VclPtr<vcl::Window> m_pParentWindow;
 public:
-    SwAuthenticator() : m_pParentWindow(0) {}
-    SwAuthenticator(const OUString& username, const OUString& password, vcl::Window* pParent) :
-        m_aUserName(username),
-        m_aPassword(password),
-        m_pParentWindow( pParent )
+    SwAuthenticator()
+        : m_pParentWindow(0)
+    {}
+    SwAuthenticator(const OUString& username, const OUString& password, vcl::Window* pParent)
+        : m_aUserName(username)
+        , m_aPassword(password)
+        , m_pParentWindow(pParent)
     {}
     virtual ~SwAuthenticator();
 
-    virtual OUString SAL_CALL getUserName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual OUString SAL_CALL getPassword(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual OUString SAL_CALL getUserName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual OUString SAL_CALL getPassword() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 };
 
-class SW_DLLPUBLIC SwConnectionContext :
-    public cppu::WeakImplHelper< ::com::sun::star::uno::XCurrentContext >
+class SW_DLLPUBLIC SwConnectionContext : public cppu::WeakImplHelper<css::uno::XCurrentContext>
 {
-    OUString     m_sMailServer;
-    sal_Int16           m_nPort;
-    OUString     m_sConnectionType;
+    OUString m_sMailServer;
+    sal_Int16 m_nPort;
+    OUString m_sConnectionType;
 
 public:
     SwConnectionContext(const OUString& rMailServer, sal_Int16 nPort, const OUString& rConnectionType);
     virtual ~SwConnectionContext();
 
-    virtual ::com::sun::star::uno::Any SAL_CALL     getValueByName( const OUString& Name )
-                                                            throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Any SAL_CALL getValueByName(const OUString& Name)
+        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 };
 
 class SwMutexBase
@@ -179,118 +182,140 @@ public:
 
 class SW_DLLPUBLIC SwConnectionListener :
         public SwMutexBase,
-        public cppu::WeakComponentImplHelper< ::com::sun::star::mail::XConnectionListener >
+        public cppu::WeakComponentImplHelper<css::mail::XConnectionListener>
 {
     using cppu::WeakComponentImplHelperBase::disposing;
 
 public:
     SwConnectionListener() :
-        cppu::WeakComponentImplHelper< ::com::sun::star::mail::XConnectionListener>(m_aMutex)
+        cppu::WeakComponentImplHelper<css::mail::XConnectionListener>(m_aMutex)
     {}
     virtual ~SwConnectionListener();
 
-    virtual void SAL_CALL connected(const ::com::sun::star::lang::EventObject& aEvent)
-        throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL connected(const css::lang::EventObject& aEvent)
+        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
-    virtual void SAL_CALL disconnected(const ::com::sun::star::lang::EventObject& aEvent)
-        throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL disconnected(const css::lang::EventObject& aEvent)
+        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
-    virtual void SAL_CALL disposing(const com::sun::star::lang::EventObject& aEvent)
-        throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent)
+        throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 };
 
 class SW_DLLPUBLIC SwMailTransferable :
         public SwMutexBase,
-        public cppu::WeakComponentImplHelper
-        <
-            ::com::sun::star::datatransfer::XTransferable,
-            ::com::sun::star::beans::XPropertySet
-        >
+        public cppu::WeakComponentImplHelper<css::datatransfer::XTransferable, css::beans::XPropertySet>
 {
     OUString  m_aMimeType;
     OUString  m_sBody;
     OUString  m_aURL;
     OUString  m_aName;
-    bool           m_bIsBody;
+    bool m_bIsBody;
 
     public:
     SwMailTransferable(const OUString& rURL, const OUString& rName, const OUString& rMimeType);
     SwMailTransferable(const OUString& rBody, const OUString& rMimeType);
     virtual ~SwMailTransferable();
-    virtual ::com::sun::star::uno::Any SAL_CALL
-                        getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
-                            throw (::com::sun::star::datatransfer::UnsupportedFlavorException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL
-                        getTransferDataFlavors(  )
-                            throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE ;
-    virtual sal_Bool SAL_CALL
-                        isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
-                            throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Any SAL_CALL getTransferData(const css::datatransfer::DataFlavor& aFlavor)
+                throw (css::datatransfer::UnsupportedFlavorException, css::io::IOException,
+                       css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
+    virtual css::uno::Sequence<css::datatransfer::DataFlavor> SAL_CALL getTransferDataFlavors()
+                            throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual sal_Bool SAL_CALL isDataFlavorSupported(const css::datatransfer::DataFlavor& aFlavor)
+                            throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     //XPropertySet
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Reference<css::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo()
+                throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL setPropertyValue(const OUString& aPropertyName, const css::uno::Any& aValue)
+                throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException,
+                      css::lang::IllegalArgumentException, css::lang::WrappedTargetException,
+                      css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
+    virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& PropertyName)
+                throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+                      css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL addPropertyChangeListener(const OUString& aPropertyName,
+                                                    const css::uno::Reference<css::beans::XPropertyChangeListener>& xListener)
+                throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+                      css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL removePropertyChangeListener(const OUString& aPropertyName,
+                                                       const css::uno::Reference<css::beans::XPropertyChangeListener >& aListener)
+                throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+                      css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL addVetoableChangeListener(const OUString& PropertyName,
+                                                    const css::uno::Reference<css::beans::XVetoableChangeListener>& aListener)
+                throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+                      css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL removeVetoableChangeListener(const OUString& PropertyName,
+                                                       const css::uno::Reference<css::beans::XVetoableChangeListener>& aListener)
+                throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
+                      css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 };
 
 class SW_DLLPUBLIC SwMailMessage :
         public SwMutexBase,
-        public cppu::WeakComponentImplHelper< ::com::sun::star::mail::XMailMessage >
+        public cppu::WeakComponentImplHelper<css::mail::XMailMessage>
 {
-    OUString                                                                         m_sSenderName;
-    OUString                                                                         m_sSenderAddress;
-    OUString                                                                         m_sReplyToAddress;
-    OUString                                                                         m_sSubject;
-
-    ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable>        m_xBody;
-//    ::com::sun::star::mail::MailMessageBody                                                 m_aBody;
-
-    ::com::sun::star::uno::Sequence< OUString >                                      m_aRecipients;
-    ::com::sun::star::uno::Sequence< OUString >                                      m_aCcRecipients;
-    ::com::sun::star::uno::Sequence< OUString >                                      m_aBccRecipients;
-//    ::com::sun::star::uno::Sequence< ::com::sun::star::mail::MailAttachmentDescriptor >     m_aAttachments;
-    ::com::sun::star::uno::Sequence<  ::com::sun::star::mail::MailAttachment >              m_aAttachments;
+    OUString m_sSenderName;
+    OUString m_sSenderAddress;
+    OUString m_sReplyToAddress;
+    OUString m_sSubject;
+
+    css::uno::Reference<css::datatransfer::XTransferable> m_xBody;
+//  css::mail::MailMessageBody m_aBody;
+
+    css::uno::Sequence<OUString> m_aRecipients;
+    css::uno::Sequence<OUString> m_aCcRecipients;
+    css::uno::Sequence<OUString> m_aBccRecipients;
+//  css::uno::Sequence<css::mail::MailAttachmentDescriptor> m_aAttachments;
+    css::uno::Sequence<css::mail::MailAttachment> m_aAttachments;
 public:
     SwMailMessage();
     virtual ~SwMailMessage();
 
     // attributes
-    virtual OUString SAL_CALL    getSenderName() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual OUString SAL_CALL    getSenderAddress() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual OUString SAL_CALL    getReplyToAddress() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL               setReplyToAddress( const OUString& _replytoaddress ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual OUString SAL_CALL    getSubject() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL               setSubject( const OUString& _subject ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL
-                                        getBody()
-                                                throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL               setBody( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& _body )
-                                                throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual OUString SAL_CALL getSenderName() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual OUString SAL_CALL getSenderAddress() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual OUString SAL_CALL getReplyToAddress() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL setReplyToAddress( const OUString& _replytoaddress )
+                        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual OUString SAL_CALL getSubject() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL setSubject(const OUString& _subject)
+                        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
+    virtual css::uno::Reference<css::datatransfer::XTransferable> SAL_CALL getBody()
+                        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL setBody(const css::uno::Reference<css::datatransfer::XTransferable>& _body)
+                        throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     // methods
-    virtual void SAL_CALL               addRecipient( const OUString& sRecipientAddress ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL               addCcRecipient( const OUString& sRecipientAddress ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL               addBccRecipient( const OUString& sRecipientAddress ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
-                                        getRecipients(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
-                                        getCcRecipients(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
-                                        getBccRecipients(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL               addAttachment( const ::com::sun::star::mail::MailAttachment& aMailAttachment )
-                                            throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual ::com::sun::star::uno::Sequence< ::com::sun::star::mail::MailAttachment > SAL_CALL
-                                        getAttachments(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-    void                                SetSenderName(const OUString& rSenderName)
-                                                {m_sSenderName = rSenderName;}
-    void                                SetSenderAddress(const OUString& rSenderAddress)
-                                                {m_sSenderAddress = rSenderAddress;}
+    virtual void SAL_CALL addRecipient( const OUString& sRecipientAddress )
+                throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL addCcRecipient( const OUString& sRecipientAddress )
+                throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL addBccRecipient( const OUString& sRecipientAddress )
+                throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Sequence<OUString> SAL_CALL getRecipients()
+                throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Sequence<OUString> SAL_CALL getCcRecipients()
+                throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Sequence<OUString> SAL_CALL getBccRecipients()
+                throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual void SAL_CALL addAttachment(const css::mail::MailAttachment& aMailAttachment)
+                throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual css::uno::Sequence<css::mail::MailAttachment> SAL_CALL getAttachments()
+                throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    void SetSenderName(const OUString& rSenderName)
+    {
+        m_sSenderName = rSenderName;
+    }
+    void SetSenderAddress(const OUString& rSenderAddress)
+    {
+        m_sSenderAddress = rSenderAddress;
+    }
 };
 
 #endif
commit c24e30977091dcc8643a14e5f2ce9f85d6b803f0
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 15:13:54 2015 +0900

    cleanup Paint, copy more settings to virtual device
    
    Change-Id: I795784f9f3878abd6db3400d81a56a63458c1b3f

diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index a7aa9b4..2ee0dba 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -98,24 +98,26 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
 {
     WindowImpl* pWindowImpl = m_pWindow->ImplGetWindowImpl();
     vcl::Region* pWinChildClipRegion = m_pWindow->ImplGetWinChildClipRegion();
-    if ( pWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALL )
+    if (pWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALL)
+    {
         pWindowImpl->maInvalidateRegion = *pWinChildClipRegion;
+    }
     else
     {
-        if ( pRegion )
+        if (pRegion)
             pWindowImpl->maInvalidateRegion.Union( *pRegion );
 
-        if( pWindowImpl->mpWinData && pWindowImpl->mbTrackVisible )
+        if (pWindowImpl->mpWinData && pWindowImpl->mbTrackVisible)
             /* #98602# need to repaint all children within the
            * tracking rectangle, so the following invert
            * operation takes places without traces of the previous
            * one.
            */
-            pWindowImpl->maInvalidateRegion.Union( *pWindowImpl->mpWinData->mpTrackRect );
+           pWindowImpl->maInvalidateRegion.Union(*pWindowImpl->mpWinData->mpTrackRect);
 
-        if ( pWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALLCHILDREN )
-            m_pChildRegion = new vcl::Region( pWindowImpl->maInvalidateRegion );
-        pWindowImpl->maInvalidateRegion.Intersect( *pWinChildClipRegion );
+        if (pWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTALLCHILDREN)
+            m_pChildRegion = new vcl::Region(pWindowImpl->maInvalidateRegion);
+        pWindowImpl->maInvalidateRegion.Intersect(*pWinChildClipRegion);
     }
     pWindowImpl->mnPaintFlags = 0;
     if (!pWindowImpl->maInvalidateRegion.IsEmpty())
@@ -141,6 +143,15 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
             pDevice->SetMapMode(m_pWindow->GetMapMode());
             pDevice->SetRefPoint(m_pWindow->GetRefPoint());
             pDevice->SetSettings(m_pWindow->GetSettings());
+            pDevice->SetTextColor(m_pWindow->GetTextColor());
+            pDevice->SetTextLineColor(m_pWindow->GetTextLineColor());
+            pDevice->SetOverlineColor(m_pWindow->GetOverlineColor());
+            pDevice->SetTextFillColor(m_pWindow->GetTextFillColor());
+            pDevice->SetTextAlign(m_pWindow->GetTextAlign());
+            pDevice->SetRasterOp(m_pWindow->GetRasterOp());
+            pDevice->SetRefPoint(m_pWindow->GetRefPoint());
+            pDevice->SetLayoutMode(m_pWindow->GetLayoutMode());
+            pDevice->SetDigitLanguage(m_pWindow->GetDigitLanguage());
 
             // update the output size now, after all the settings were copied
             pDevice->SetOutputSize(m_pWindow->GetOutputSize());
@@ -154,7 +165,7 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
             m_pWindow->Paint(*pDevice.get(), m_aPaintRect);
 
             // debugging of the areas - show where we are painting
-            // export VCL_DOUBLEBUFFERING_REGIONS=1 to see where are we
+            // export VCL_DOUBLEBUFFERING_DEBUG=1 to see where are we
             // painting
             if (getenv("VCL_DOUBLEBUFFERING_DEBUG"))
             {
commit 7092c767b54df65e64b6059a531de4950c1a3b92
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 15:13:16 2015 +0900

    ApplySettings for Menu
    
    Change-Id: Iaf004e3deed19dfc9f808b53f0bbe45e0949c034

diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index a989481..faab3d9 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -120,10 +120,10 @@ void DecoToolBox::SetImages( long nMaxHeight, bool bForce )
 MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
     Window( pParent, 0 ),
     aCloseBtn(VclPtr<DecoToolBox>::Create(this)),
-    aFloatBtn(VclPtr<PushButton>::Create( this, WB_NOPOINTERFOCUS | WB_SMALLSTYLE | WB_RECTSTYLE )),
-    aHideBtn(VclPtr<PushButton>::Create(this, WB_NOPOINTERFOCUS | WB_SMALLSTYLE | WB_RECTSTYLE ))
+    aFloatBtn(VclPtr<PushButton>::Create(this, WB_NOPOINTERFOCUS | WB_SMALLSTYLE | WB_RECTSTYLE)),
+    aHideBtn(VclPtr<PushButton>::Create(this, WB_NOPOINTERFOCUS | WB_SMALLSTYLE | WB_RECTSTYLE))
 {
-    SetType( WINDOW_MENUBARWINDOW );
+    SetType(WINDOW_MENUBARWINDOW);
     pMenu = NULL;
     pActivePopup = NULL;
     nSaveFocusId = 0;
@@ -136,9 +136,9 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
 
     ResMgr* pResMgr = ImplGetResMgr();
 
-    if( pResMgr )
+    if(pResMgr)
     {
-        BitmapEx aBitmap( ResId( SV_RESID_BITMAP_CLOSEDOC, *pResMgr ) );
+        BitmapEx aBitmap(ResId(SV_RESID_BITMAP_CLOSEDOC, *pResMgr));
         aCloseBtn->maImage = Image(aBitmap);
 
         aCloseBtn->SetOutStyle(TOOLBOX_STYLE_FLAT);
@@ -162,7 +162,7 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
 
     ImplInitStyleSettings();
 
-    AddEventListener( LINK( this, MenuBarWindow, ShowHideListener ) );
+    AddEventListener(LINK(this, MenuBarWindow, ShowHideListener));
 }
 
 MenuBarWindow::~MenuBarWindow()
@@ -187,8 +187,8 @@ void MenuBarWindow::SetMenu( MenuBar* pMen )
     pMenu = pMen;
     KillActivePopup();
     nHighlightedItem = ITEMPOS_INVALID;
-    ImplInitMenuWindow( this, true, true );
-    if ( pMen )
+    ImplInitMenuWindow(this, true, true);
+    if (pMen)
     {
         aCloseBtn->ShowItem(IID_DOCUMENTCLOSE, pMen->HasCloseButton());
         aCloseBtn->Show(pMen->HasCloseButton() || !m_aAddButtons.empty());
@@ -988,55 +988,93 @@ void MenuBarWindow::StateChanged( StateChangedType nType )
 {
     Window::StateChanged( nType );
 
-    if ( ( nType == StateChangedType::ControlForeground ) ||
-         ( nType == StateChangedType::ControlBackground ) )
+    if (nType == StateChangedType::ControlForeground ||
+        nType == StateChangedType::ControlBackground)
     {
-        ImplInitMenuWindow( this, false, true );
+        ImplInitMenuWindow(this, false, true);
         Invalidate();
     }
-    else if( pMenu )
+    else if(pMenu)
+    {
         pMenu->ImplKillLayoutData();
-
+    }
 }
 
 void MenuBarWindow::LayoutChanged()
 {
-    if( pMenu )
+    if (!pMenu)
+        return;
+
+    ImplInitMenuWindow(this, true, true);
+
+    // if the font was changed.
+    long nHeight = pMenu->ImplCalcSize(this).Height();
+
+    // depending on the native implementation or the displayable flag
+    // the menubar windows is suppressed (ie, height=0)
+    if (!static_cast<MenuBar*>(pMenu)->IsDisplayable() ||
+        (pMenu->ImplGetSalMenu() && pMenu->ImplGetSalMenu()->VisibleMenuBar()))
     {
-        ImplInitMenuWindow( this, true, true );
-        // if the font was changed.
-        long nHeight = pMenu->ImplCalcSize( this ).Height();
-
-        // depending on the native implementation or the displayable flag
-        // the menubar windows is suppressed (ie, height=0)
-        if( !static_cast<MenuBar*>(pMenu)->IsDisplayable() ||
-            ( pMenu->ImplGetSalMenu() && pMenu->ImplGetSalMenu()->VisibleMenuBar() ) )
-            nHeight = 0;
-
-        setPosSizePixel( 0, 0, 0, nHeight, WINDOW_POSSIZE_HEIGHT );
-        GetParent()->Resize();
-        Invalidate();
-        Resize();
-        if( pMenu )
-            pMenu->ImplKillLayoutData();
+        nHeight = 0;
     }
+    setPosSizePixel(0, 0, 0, nHeight, WINDOW_POSSIZE_HEIGHT);
+    GetParent()->Resize();
+    Invalidate();
+    Resize();
+
+    pMenu->ImplKillLayoutData();
+}
+
+void MenuBarWindow::ApplySettings(vcl::RenderContext& rRenderContext)
+{
+    const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
+
+    SetPointFont(rRenderContext, rStyleSettings.GetMenuFont());
+
+    const BitmapEx& rPersonaBitmap = Application::GetSettings().GetStyleSettings().GetPersonaHeader();
+    if (!rPersonaBitmap.IsEmpty())
+    {
+        Wallpaper aWallpaper(rPersonaBitmap);
+        aWallpaper.SetStyle(WALLPAPER_TOPRIGHT);
+        aWallpaper.SetColor(Application::GetSettings().GetStyleSettings().GetWorkspaceColor());
+
+        rRenderContext.SetBackground(aWallpaper);
+        SetPaintTransparent(false);
+        SetParentClipMode(0);
+    }
+    else if (rRenderContext.IsNativeControlSupported(CTRL_MENUBAR, PART_ENTIRE_CONTROL))
+    {
+        rRenderContext.SetBackground(); // background will be drawn by NWF
+    }
+    else
+    {
+        Wallpaper aWallpaper;
+        aWallpaper.SetStyle(WALLPAPER_APPLICATIONGRADIENT);
+        rRenderContext.SetBackground(aWallpaper);
+        SetPaintTransparent(false);
+        SetParentClipMode(0);
+    }
+
+    rRenderContext.SetTextColor(rStyleSettings.GetMenuBarTextColor());
+    rRenderContext.SetTextFillColor();
+    rRenderContext.SetLineColor();
 }
 
 void MenuBarWindow::ImplInitStyleSettings()
 {
-    if( IsNativeControlSupported( CTRL_MENUBAR, PART_MENU_ITEM ) &&
-        IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) )
+    if (IsNativeControlSupported(CTRL_MENUBAR, PART_MENU_ITEM) &&
+        IsNativeControlSupported(CTRL_MENUBAR, PART_ENTIRE_CONTROL))
     {
-        AllSettings aSettings( GetSettings() );
-        ImplGetFrame()->UpdateSettings( aSettings ); // to update persona
-        StyleSettings aStyle( aSettings.GetStyleSettings() );
+        AllSettings aSettings(GetSettings());
+        ImplGetFrame()->UpdateSettings(aSettings); // to update persona
+        StyleSettings aStyle(aSettings.GetStyleSettings());
         Color aHighlightTextColor = ImplGetSVData()->maNWFData.maMenuBarHighlightTextColor;
-        if( aHighlightTextColor != Color( COL_TRANSPARENT ) )
+        if (aHighlightTextColor != Color(COL_TRANSPARENT))
         {
-            aStyle.SetMenuHighlightTextColor( aHighlightTextColor );
+            aStyle.SetMenuHighlightTextColor(aHighlightTextColor);
         }
-        aSettings.SetStyleSettings( aStyle );
-        OutputDevice::SetSettings( aSettings );
+        aSettings.SetStyleSettings(aStyle);
+        OutputDevice::SetSettings(aSettings);
     }
 }
 
diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx
index ee1036e..0ebb19a 100644
--- a/vcl/source/window/menubarwindow.hxx
+++ b/vcl/source/window/menubarwindow.hxx
@@ -97,11 +97,13 @@ private:
 
     void            ImplInitStyleSettings();
 
-                    DECL_LINK_TYPED(CloseHdl, ToolBox *, void);
-                    DECL_LINK(FloatHdl, void *);
-                    DECL_LINK(HideHdl, void *);
-                    DECL_LINK( ToolboxEventHdl, VclWindowEvent* );
-                    DECL_LINK( ShowHideListener, VclWindowEvent* );
+    virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
+
+    DECL_LINK_TYPED(CloseHdl, ToolBox *, void);
+    DECL_LINK(FloatHdl, void *);
+    DECL_LINK(HideHdl, void *);
+    DECL_LINK( ToolboxEventHdl, VclWindowEvent* );
+    DECL_LINK( ShowHideListener, VclWindowEvent* );
 
     void            StateChanged( StateChangedType nType ) SAL_OVERRIDE;
     void            DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index e9cfd06..dea3016 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -119,6 +119,24 @@ void MenuFloatingWindow::Resize()
     InitMenuClipRegion(*this); // FIXME
 }
 
+void MenuFloatingWindow::ApplySettings(vcl::RenderContext& rRenderContext)
+{
+    const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
+
+    SetPointFont(rRenderContext, rStyleSettings.GetMenuFont());
+
+    if (rRenderContext.IsNativeControlSupported(CTRL_MENU_POPUP, PART_ENTIRE_CONTROL))
+    {
+        rRenderContext.SetBackground(); // background will be drawn by NWF
+    }
+    else
+        rRenderContext.SetBackground(Wallpaper(rStyleSettings.GetMenuColor()));
+
+    rRenderContext.SetTextColor(rStyleSettings.GetMenuTextColor());
+    rRenderContext.SetTextFillColor();
+    rRenderContext.SetLineColor();
+}
+
 long MenuFloatingWindow::ImplGetStartY() const
 {
     long nY = 0;
@@ -1110,7 +1128,7 @@ void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang
 
 void MenuFloatingWindow::ImplDrawScroller(vcl::RenderContext& rRenderContext, bool bUp)
 {
-    if( ! pMenu )
+    if (!pMenu)
         return;
 
     rRenderContext.SetClipRegion();
diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx
index 721ba72..9336664 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -80,21 +80,23 @@ protected:
     Rectangle ImplGetItemRect( sal_uInt16 nPos );
 
 public:
-                    MenuFloatingWindow( Menu* pMenu, vcl::Window* pParent, WinBits nStyle );
-    virtual         ~MenuFloatingWindow();
+    MenuFloatingWindow(Menu* pMenu, vcl::Window* pParent, WinBits nStyle);
+    virtual ~MenuFloatingWindow();
 
     virtual void dispose() SAL_OVERRIDE;
     void doShutdown();
 
-    virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
-    virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
-    virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
-    virtual void KeyInput( const KeyEvent& rKEvent ) SAL_OVERRIDE;
-    virtual void Command( const CommandEvent& rCEvt ) SAL_OVERRIDE;
-    virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE;
+    virtual void MouseMove(const MouseEvent& rMEvt) SAL_OVERRIDE;
+    virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE;
+    virtual void MouseButtonUp(const MouseEvent& rMEvt) SAL_OVERRIDE;
+    virtual void KeyInput(const KeyEvent& rKEvent) SAL_OVERRIDE;
+    virtual void Command(const CommandEvent& rCEvt) SAL_OVERRIDE;
+    virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect) SAL_OVERRIDE;
     virtual void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
     virtual void Resize() SAL_OVERRIDE;
 
+    virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
+
     void SetFocusId( sal_uLong nId ) { nSaveFocusId = nId; }
     sal_uLong GetFocusId() const      { return nSaveFocusId; }
 
commit 12443d117c1289210aad08f92bf21594e9a632aa
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 15:12:02 2015 +0900

    small cleanup of SystemWindow
    
    Change-Id: I4bced5e8d97cd72a75c7d62e5ad0bfee9eb60097

diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 1edd3b2..d770ac3 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -282,18 +282,18 @@ void SystemWindow::SetIcon( sal_uInt16 nIcon )
     }
 }
 
-void SystemWindow::EnableSaveBackground( bool bSave )
+void SystemWindow::EnableSaveBackground(bool bSave)
 {
     if( ImplGetSVData()->maWinData.mbNoSaveBackground )
         bSave = false;
 
     vcl::Window* pWindow = this;
-    while ( pWindow->mpWindowImpl->mpBorderWindow )
+    while (pWindow->mpWindowImpl->mpBorderWindow)
         pWindow = pWindow->mpWindowImpl->mpBorderWindow;
-    if ( pWindow->mpWindowImpl->mbOverlapWin && !pWindow->mpWindowImpl->mbFrame )
+    if (pWindow->mpWindowImpl->mbOverlapWin && !pWindow->mpWindowImpl->mbFrame)
     {
         pWindow->mpWindowImpl->mpOverlapData->mbSaveBack = bSave;
-        if ( !bSave )
+        if (!bSave)
             pWindow->ImplDeleteOverlapBackground();
     }
 }
commit 110bd0729460da3c71d06e9cff7da3e80e061adb
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 15:11:25 2015 +0900

    FloatWindow - add ApplySettings
    
    Change-Id: I72a0560b761ece8d07e5773ab5e90ca2c1af65d5

diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index 16f52cb..411e8c1 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -123,6 +123,8 @@ protected:
     SAL_DLLPRIVATE void    ImplInit( vcl::Window* pParent, WinBits nStyle );
     SAL_DLLPRIVATE void    ImplInitSettings();
 
+    virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
+
 public:
     SAL_DLLPRIVATE FloatingWindow*  ImplFloatHitTest( vcl::Window* pReference, const Point& rPos, HitTest& rHitTest );
     SAL_DLLPRIVATE FloatingWindow*  ImplFindLastLevelFloat();
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index f7aca45..ef051fc 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -186,6 +186,19 @@ void FloatingWindow::doDeferredInit(WinBits nBits)
     mbIsDefferedInit = false;
 }
 
+void FloatingWindow::ApplySettings(vcl::RenderContext& rRenderContext)
+{
+    const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
+
+    Color aColor;
+    if (Window::GetStyle() & WB_3DLOOK)
+        aColor = rStyleSettings.GetFaceColor();
+    else
+        aColor = rStyleSettings.GetWindowColor();
+
+    ApplyControlBackground(rRenderContext, aColor);
+}
+
 FloatingWindow::~FloatingWindow()
 {
     disposeOnce();
commit 3010e6716362cfd1c2199f11add2754ad3d488f6
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 15:07:06 2015 +0900

    setup fg/bg in Paint method
    
    Change-Id: I38c6018816254a92a144160d963fc90a48be739f

diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 664e5c5..1186b66 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2648,12 +2648,6 @@ BmpWindow::BmpWindow(vcl::Window* pPar, WinBits nStyle)
     , bGraphic(false)
     , bLeftAlign(false)
 {
-    SetBackground();
-    SetPaintTransparent(true);
-    // #i119307# the graphic might have transparency, set up white as the color
-    // to use when drawing a rectangle under the image
-    SetLineColor(COL_WHITE);
-    SetFillColor(COL_WHITE);
 }
 
 Size BmpWindow::GetOptimalSize() const
@@ -2665,6 +2659,15 @@ VCL_BUILDER_FACTORY_ARGS(BmpWindow, 0)
 
 void BmpWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
 {
+    // Setup
+    rRenderContext.SetBackground();
+    SetPaintTransparent(true);
+    // #i119307# the graphic might have transparency, set up white as the color
+    // to use when drawing a rectangle under the image
+    rRenderContext.SetLineColor(COL_WHITE);
+    rRenderContext.SetFillColor(COL_WHITE);
+
+    // Paint
     Point aPntPos;
     Size aPntSz(GetSizePixel());
     Size aGrfSize;
commit d015547d8aedeb253a157310c227337abd02d2fe
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 15:00:27 2015 +0900

    add fixme - to refactor settings later
    
    Change-Id: I224daf671c49bf4dd6250a486049c817247a6fcc

diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 56ea266..5f8f72d 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -115,13 +115,15 @@ SwLabPreview::SwLabPreview(vcl::Window* pParent)
 {
     SetMapMode(MAP_PIXEL);
 
+    // FIXME RenderContext
+
     const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
     const Color& rWinColor = rStyleSettings.GetWindowColor();
     SetBackground(Wallpaper(rWinColor));
 
     vcl::Font aFont = GetFont();
     aFont.SetTransparent(true);
-    aFont.SetWeight  (WEIGHT_NORMAL);
+    aFont.SetWeight(WEIGHT_NORMAL);
     SetFont(aFont);
 
     lHDistWidth  = GetTextWidth(aHDistStr );
commit 36e06c9d0641853aba690542083e13a39da8522b
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 14:58:10 2015 +0900

    set background in paint method in evelope preview
    
    Change-Id: Ie0c500c38aca9e47c98e0b8e7f4414e038ec0786

diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 9592b96..1599d99 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -62,25 +62,25 @@ VCL_BUILDER_FACTORY_ARGS(SwEnvPreview, 0)
 void SwEnvPreview::DataChanged( const DataChangedEvent& rDCEvt )
 {
     Window::DataChanged( rDCEvt );
-    if ( DataChangedEventType::SETTINGS == rDCEvt.GetType() )
-        SetBackground( GetSettings().GetStyleSettings().GetDialogColor() );
+    if (DataChangedEventType::SETTINGS == rDCEvt.GetType())
+        Invalidate();
 }
 
 void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &)
 {
     const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings();
+    SetBackground(rRenderContext.GetSettings().GetStyleSettings().GetDialogColor());
 
-    const SwEnvItem& rItem =
-        static_cast<SwEnvDlg*>(GetParentDialog())->aEnvItem;
+    const SwEnvItem& rItem = static_cast<SwEnvDlg*>(GetParentDialog())->aEnvItem;
 
     const long nPageW = std::max(rItem.lWidth, rItem.lHeight);
     const long nPageH = std::min(rItem.lWidth, rItem.lHeight);
 
-    const float f = 0.8 * std::min(
-        float(rRenderContext.GetOutputSizePixel().Width()) / float(nPageW),
-        float(rRenderContext.GetOutputSizePixel().Height()) / float(nPageH));
+    const double f = 0.8 * std::min(
+        double(rRenderContext.GetOutputSizePixel().Width()) / double(nPageW),
+        double(rRenderContext.GetOutputSizePixel().Height()) / double(nPageH));
 
-    Color aBack = rSettings.GetWindowColor( );
+    Color aBack = rSettings.GetWindowColor();
     Color aFront = SwViewOption::GetFontColor();
     Color aMedium = Color((aBack.GetRed() + aFront.GetRed()) / 2,
                           (aBack.GetGreen() + aFront.GetGreen()) / 2,
commit 847c2ac5023c5aabf50ec640b40951e5df632e2e
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon May 18 14:53:22 2015 +0900

    refactor optload / optpage to use RenderContext
    
    Change-Id: I6b4897230963ecde335c5a04b1e34c8ca02d654c

diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 9f24424..3a046a4 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -63,8 +63,7 @@ using namespace ::com::sun::star;
 #include <svl/eitem.hxx>
 
 SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet)
-    : SfxTabPage(pParent, "OptGeneralPage",
-        "modules/swriter/ui/optgeneralpage.ui", &rSet)
+    : SfxTabPage(pParent, "OptGeneralPage", "modules/swriter/ui/optgeneralpage.ui", &rSet)
     , m_pWrtShell(NULL)
     , m_nLastTab(0)
     , m_nOldLinkMode(MANUAL)
@@ -107,7 +106,7 @@ SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet)
     m_pMetricLB->SetSelectHdl(LINK(this, SwLoadOptPage, MetricHdl));
 
     const SfxPoolItem* pItem;
-    if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem )
+    if (SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem)
         && static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON)
     {
         m_pTabFT->Hide();
@@ -382,8 +381,9 @@ SwCaptionOptDlg::SwCaptionOptDlg(vcl::Window* pParent, const SfxItemSet& rSet)
     SetTabPage(SwCaptionOptPage::Create(get_content_area(), &rSet));
 }
 
-SwCaptionPreview::SwCaptionPreview( vcl::Window* pParent, WinBits nStyle )
-    : Window( pParent, nStyle )
+SwCaptionPreview::SwCaptionPreview(vcl::Window* pParent, WinBits nStyle)
+    : Window(pParent, nStyle)
+    , mbFontInitialized(false)
 {
     Init();
 }
@@ -399,21 +399,30 @@ VCL_BUILDER_DECL_FACTORY(SwCaptionPreview)
 
 void SwCaptionPreview::Init()
 {
-    maDrawPos = Point( 4, 6 );
+    maDrawPos = Point(4, 6);
+}
+
+void SwCaptionPreview::ApplySettings(vcl::RenderContext& rRenderContext)
+{
+    Wallpaper aBack(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor());
+    rRenderContext.SetBackground(aBack);
+    rRenderContext.SetFillColor(aBack.GetColor());
+    rRenderContext.SetLineColor(aBack.GetColor());
 
-    Wallpaper   aBack( GetSettings().GetStyleSettings().GetWindowColor() );
-    SetBackground( aBack );
-    SetFillColor( aBack.GetColor() );
-    SetLineColor( aBack.GetColor() );
-    SetBorderStyle( WindowBorderStyle::MONO );
-    vcl::Font aFont(GetFont());
-    aFont.SetHeight(aFont.GetHeight() * 120 / 100 );
-    SetFont(aFont);
+    if (!mbFontInitialized)
+    {
+        maFont = vcl::Font(rRenderContext.GetFont());
+        maFont.SetHeight(maFont.GetHeight() * 120 / 100);
+        mbFontInitialized = true;
+    }
+    rRenderContext.SetFont(maFont);
+
+    SetBorderStyle(WindowBorderStyle::MONO);
 }
 
-void SwCaptionPreview::SetPreviewText( const OUString& rText )
+void SwCaptionPreview::SetPreviewText(const OUString& rText)
 {
-    if( rText != maText )
+    if (rText != maText)
     {
         maText = rText;
         Invalidate();
@@ -429,11 +438,11 @@ void SwCaptionPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle
 {
     Window::Paint(rRenderContext, rRect);
 
-    DrawRect( Rectangle( Point( 0, 0 ), GetSizePixel() ) );
-    DrawText( Point( 4, 6 ), maText );
+    rRenderContext.DrawRect(Rectangle(Point(0, 0), GetSizePixel()));
+    rRenderContext.DrawText(Point(4, 6), maText);
 }
 
-SwCaptionOptPage::SwCaptionOptPage( vcl::Window* pParent, const SfxItemSet& rSet )
+SwCaptionOptPage::SwCaptionOptPage(vcl::Window* pParent, const SfxItemSet& rSet)
     : SfxTabPage(pParent, "OptCaptionPage", "modules/swriter/ui/optcaptionpage.ui", &rSet)
     , m_sSWTable(SW_RESSTR(STR_CAPTION_TABLE))
     , m_sSWFrame(SW_RESSTR(STR_CAPTION_FRAME))
@@ -466,15 +475,12 @@ SwCaptionOptPage::SwCaptionOptPage( vcl::Window* pParent, const SfxItemSet& rSet
     get(m_pCharStyleLB, "charstyle");
     get(m_pApplyBorderCB, "applyborder");
 
-    Wallpaper   aBack( GetSettings().GetStyleSettings().GetWindowColor() );
-    m_pPreview->SetBackground( aBack );
-
     SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_ABB, m_sIllustration);
     SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_TABLE, m_sTable);
     SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_FRAME, m_sText);
     SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_DRAWING, m_sDrawing);
 
-    SwWrtShell *pSh = ::GetActiveWrtShell();
+    SwWrtShell* pSh = ::GetActiveWrtShell();
 
     // m_pFormatBox
     sal_uInt16 nSelFmt = SVX_NUM_ARABIC;
@@ -839,19 +845,19 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl)
     m_pTextText->Enable(bEnable);
     m_pTextEdit->Enable(bEnable);
 
-    DrawSample();
+    InvalidatePreview();
     return 0;
 }
 
 IMPL_LINK_NOARG(SwCaptionOptPage, SelectHdl)
 {
-    DrawSample();
+    InvalidatePreview();
     return 0;
 }
 
 IMPL_LINK( SwCaptionOptPage, OrderHdl, ListBox*, pBox )
 {
-    DrawSample();
+    InvalidatePreview();
 
     SvTreeListEntry* pSelEntry = m_pCheckLB->FirstSelected();
     bool bChecked = false;
@@ -866,7 +872,7 @@ IMPL_LINK( SwCaptionOptPage, OrderHdl, ListBox*, pBox )
     return 0;
 }
 
-void SwCaptionOptPage::DrawSample()
+void SwCaptionOptPage::InvalidatePreview()
 {
     OUString aStr;
 
@@ -924,13 +930,13 @@ void SwCaptionOptPage::DrawSample()
         }
         aStr += m_pTextEdit->GetText();
     }
-    m_pPreview->SetPreviewText( aStr );
+    m_pPreview->SetPreviewText(aStr);
 }
 
 // Description: ComboBox without Spaces
 void CaptionComboBox::KeyInput(const KeyEvent& rEvt)
 {
-    if( rEvt.GetKeyCode().GetCode() != KEY_SPACE )
+    if (rEvt.GetKeyCode().GetCode() != KEY_SPACE)
         SwComboBox::KeyInput(rEvt);
 }
 
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index fa53537..1203f65 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1643,9 +1643,9 @@ void SwMarkPreview::DataChanged( const DataChangedEvent& rDCEvt )
         InitColors();
 }
 
-void SwMarkPreview::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangle &/*rRect*/)
+void SwMarkPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/*rRect*/)
 {
-    const Size aSz(GetOutputSizePixel());
+    const Size aSz(rRenderContext.GetOutputSizePixel());
 
     // Page
     aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
@@ -1670,19 +1670,19 @@ void SwMarkPreview::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangl
     // draw shadow
     Rectangle aShadow(aPage);
     aShadow += Point(3, 3);
-    DrawRect( aShadow, m_aShadowCol, m_aTransCol );
+    DrawRect(rRenderContext, aShadow, m_aShadowCol, m_aTransCol);
 
     // draw page
-    DrawRect( aPage, m_aBgCol, m_aLineCol );
+    DrawRect(rRenderContext, aPage, m_aBgCol, m_aLineCol);
 
     // draw separator
     Rectangle aPageSeparator(aPage);
     aPageSeparator.SetSize(Size(2, aPageSeparator.GetHeight()));
     aPageSeparator.Move(aPage.GetWidth() / 2 - 1, 0);
-    DrawRect( aPageSeparator, m_aLineCol, m_aTransCol );
+    DrawRect(rRenderContext, aPageSeparator, m_aLineCol, m_aTransCol);
 
-    PaintPage(aLeftPagePrtArea);
-    PaintPage(aRightPagePrtArea);
+    PaintPage(rRenderContext, aLeftPagePrtArea);
+    PaintPage(rRenderContext, aRightPagePrtArea);
 
     Rectangle aLeftMark(Point(aPage.Left() + 2, aLeftPagePrtArea.Top() + 4), Size(aLeftPagePrtArea.Left() - 4, 2));
     Rectangle aRightMark(Point(aRightPagePrtArea.Right() + 2, aRightPagePrtArea.Bottom() - 6), Size(aLeftPagePrtArea.Left() - 4, 2));
@@ -1709,14 +1709,14 @@ void SwMarkPreview::Paint(vcl::RenderContext& /*rRenderContext*/, const Rectangl
         default:
             return;
     }
-    DrawRect( aLeftMark, m_aMarkCol, m_aTransCol );
-    DrawRect( aRightMark, m_aMarkCol, m_aTransCol );
+    DrawRect(rRenderContext, aLeftMark, m_aMarkCol, m_aTransCol);
+    DrawRect(rRenderContext, aRightMark, m_aMarkCol, m_aTransCol);
 }
 
-void SwMarkPreview::PaintPage(const Rectangle &rRect)
+void SwMarkPreview::PaintPage(vcl::RenderContext& rRenderContext, const Rectangle &rRect)
 {
     // draw PrintArea
-    DrawRect(rRect, m_aTransCol, m_aPrintAreaCol );
+    DrawRect(rRenderContext, rRect, m_aTransCol, m_aPrintAreaCol);
 
     // draw Testparagraph
     sal_uLong nLTxtBorder = 4;
@@ -1739,18 +1739,18 @@ void SwMarkPreview::PaintPage(const Rectangle &rRect)
             aTextLine.SetSize(Size(aTextLine.GetWidth() / 2, aTextLine.GetHeight()));
 
         if (aPage.IsInside(aTextLine))
-            DrawRect(aTextLine, m_aTxtCol, m_aTransCol );
+            DrawRect(rRenderContext, aTextLine, m_aTxtCol, m_aTransCol);
 
         aTextLine.Move(0, nStep);
     }
     aTextLine.Move(0, -nStep);
 }
 
-void SwMarkPreview::DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor)
+void SwMarkPreview::DrawRect(vcl::RenderContext& rRenderContext, const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor)
 {
-    SetFillColor(rFillColor);
-    SetLineColor(rLineColor);
-    Window::DrawRect(rRect);
+    rRenderContext.SetFillColor(rFillColor);
+    rRenderContext.SetLineColor(rLineColor);
+    rRenderContext.DrawRect(rRect);
 }
 
 Size SwMarkPreview::GetOptimalSize() const
diff --git a/sw/source/uibase/inc/optload.hxx b/sw/source/uibase/inc/optload.hxx
index 4f5e10d..9cfd9c6 100644
--- a/sw/source/uibase/inc/optload.hxx
+++ b/sw/source/uibase/inc/optload.hxx
@@ -95,10 +95,13 @@ class SwCaptionPreview : public vcl::Window
 {
 private:
     OUString maText;
-    Point    maDrawPos;
+    bool mbFontInitialized;
+    vcl::Font maFont;
+    Point maDrawPos;
 public:
-    SwCaptionPreview( vcl::Window* pParent, WinBits nStyle );
+    SwCaptionPreview(vcl::Window* pParent, WinBits nStyle);
     void Init();
+    virtual void ApplySettings(vcl::RenderContext& rRenderContext);
     void SetPreviewText( const OUString& rText );
     virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE;
     virtual Size GetOptimalSize() const SAL_OVERRIDE;
@@ -130,25 +133,25 @@ private:
     VclPtr<ListBox>          m_pCharStyleLB;
     VclPtr<CheckBox>         m_pApplyBorderCB;
 
-    OUString        m_sSWTable;
-    OUString        m_sSWFrame;
-    OUString        m_sSWGraphic;
-    OUString        m_sOLE;
+    OUString m_sSWTable;
+    OUString m_sSWFrame;
+    OUString m_sSWGraphic;
+    OUString m_sOLE;
 
-    OUString        m_sIllustration;
-    OUString        m_sTable;
-    OUString        m_sText;
-    OUString        m_sDrawing;
+    OUString m_sIllustration;
+    OUString m_sTable;
+    OUString m_sText;
+    OUString m_sDrawing;
 
-    OUString        m_sBegin;
-    OUString        m_sEnd;
-    OUString        m_sAbove;
-    OUString        m_sBelow;
+    OUString m_sBegin;
+    OUString m_sEnd;
+    OUString m_sAbove;
+    OUString m_sBelow;
 
-    OUString        m_sNone;
+    OUString m_sNone;
 
-    SwFldMgr        *pMgr;
-    bool            bHTMLMode;
+    SwFldMgr* pMgr;
+    bool bHTMLMode;
 
     DECL_LINK(SelectHdl, void *);
     DECL_LINK(ModifyHdl, void * = 0);
@@ -156,12 +159,10 @@ private:
     DECL_LINK(ShowEntryHdl, void *);
     DECL_LINK(SaveEntryHdl, void *);
 
-    void                DelUserData();
-    void                SetOptions( const sal_uLong nPos,
-                                    const SwCapObjType eType,
-                                    const SvGlobalName *pOleId = 0);
-    void                SaveEntry( SvTreeListEntry* pEntry );
-    void                DrawSample();
+    void DelUserData();
+    void SetOptions(const sal_uLong nPos, const SwCapObjType eType, const SvGlobalName *pOleId = 0);
+    void SaveEntry(SvTreeListEntry* pEntry);
+    void InvalidatePreview();
 
 public:
                         SwCaptionOptPage( vcl::Window* pParent,
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index 2cb229a..02f6598 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -67,17 +67,15 @@ class SwContentOptPage : public SfxTabPage
     DECL_LINK(VertRulerHdl, CheckBox*);
     DECL_LINK(AnyRulerHdl, CheckBox*);
 public:
-                        SwContentOptPage( vcl::Window* pParent,
-                                           const SfxItemSet& rSet );
-                        virtual ~SwContentOptPage();
-    virtual void        dispose() SAL_OVERRIDE;
+    SwContentOptPage( vcl::Window* pParent, const SfxItemSet& rSet);
+    virtual ~SwContentOptPage();
 
-    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
-                                const SfxItemSet* rAttrSet);
+    virtual void dispose() SAL_OVERRIDE;
 
-    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
-    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
+    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
 
+    virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE;
+    virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE;
 };
 
 // TabPage printer settings additions
@@ -107,30 +105,27 @@ class SwAddPrinterTabPage : public SfxTabPage
     VclPtr<CheckBox>       m_pPaperFromSetupCB;
     VclPtr<ListBox>        m_pFaxLB;
 
-    OUString        sNone;
+    OUString sNone;
 
-    bool            bAttrModified;
-    bool            bPreview;
+    bool bAttrModified;
+    bool bPreview;
 
-                DECL_LINK(AutoClickHdl, void *);
-                DECL_LINK(SelectHdl, void *);
+    DECL_LINK(AutoClickHdl, void *);
+    DECL_LINK(SelectHdl, void *);
 
 public:
-    SwAddPrinterTabPage( vcl::Window* pParent,
-                         const SfxItemSet& rSet );
+    SwAddPrinterTabPage(vcl::Window* pParent, const SfxItemSet& rSet);
     virtual ~SwAddPrinterTabPage();
     virtual void dispose() SAL_OVERRIDE;
 
-    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
-                                const SfxItemSet* rAttrSet );
-
-    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
-    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
-    void                SetFax( const std::vector<OUString>& );
-    void                SelectFax( const OUString& );
-    void                SetPreview(bool bPrev);
-    virtual void        PageCreated( const SfxAllItemSet& aSet) SAL_OVERRIDE;
+    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
 
+    virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE;
+    virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE;
+    void SetFax(const std::vector<OUString>& );
+    void SelectFax(const OUString& rString);
+    void SetPreview(bool bPrev);
+    virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
 };
 
 class SwStdFontTabPage : public SfxTabPage
@@ -150,17 +145,18 @@ class SwStdFontTabPage : public SfxTabPage
     VclPtr<CheckBox>        pDocOnlyCB  ;
     VclPtr<PushButton>      pStandardPB;
 
-    OUString        sShellStd;
-    OUString        sShellTitle;
-    OUString        sShellList;
-    OUString        sShellLabel;
-    OUString        sShellIndex;
-
-    VclPtr<SfxPrinter>  pPrt;
-    FontList*           pFontList;
-    SwStdFontConfig*    pFontConfig;
-    SwWrtShell*         pWrtShell;
-    LanguageType        eLanguage;
+    OUString sShellStd;
+    OUString sShellTitle;
+    OUString sShellList;
+    OUString sShellLabel;
+    OUString sShellIndex;
+
+    VclPtr<SfxPrinter> pPrt;
+    FontList* pFontList;
+    SwStdFontConfig* pFontConfig;
+    SwWrtShell* pWrtShell;
+    LanguageType eLanguage;
+
     // only defaults were there? they were signed with the boxes
     bool    bListDefault    :1;
     bool    bSetListDefault :1;
@@ -184,24 +180,25 @@ class SwStdFontTabPage : public SfxTabPage
     OUString sScriptComplex;
 
     DECL_LINK(StandardHdl, void *);
-    DECL_LINK( ModifyHdl, ComboBox * );
-    DECL_LINK( ModifyHeightHdl, FontSizeBox * );
-    DECL_LINK( LoseFocusHdl, ComboBox * );
+    DECL_LINK(ModifyHdl, ComboBox * );
+    DECL_LINK(ModifyHeightHdl, FontSizeBox * );
+    DECL_LINK(LoseFocusHdl, ComboBox * );
 
-    SwStdFontTabPage( vcl::Window* pParent,
-                      const SfxItemSet& rSet );
+    SwStdFontTabPage(vcl::Window* pParent, const SfxItemSet& rSet);
     virtual ~SwStdFontTabPage();
-    virtual void       dispose() SAL_OVERRIDE;
+    virtual void dispose() SAL_OVERRIDE;
 
 public:
-    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
-                                const SfxItemSet* rAttrSet );
+    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
 
-    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
-    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
+    virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE;
+    virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE;
 
-    void    SetFontMode(sal_uInt8 nGroup) {nFontGroup = nGroup;}
-    virtual void        PageCreated( const SfxAllItemSet& aSet ) SAL_OVERRIDE;
+    void SetFontMode(sal_uInt8 nGroup)
+    {
+        nFontGroup = nGroup;
+    }
+    virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
 };
 
 class SwTableOptionsTabPage : public SfxTabPage
@@ -231,19 +228,17 @@ class SwTableOptionsTabPage : public SfxTabPage
     DECL_LINK(CheckBoxHdl, void *);
 
 public:
-    SwTableOptionsTabPage( vcl::Window* pParent,
-                                           const SfxItemSet& rSet );
+    SwTableOptionsTabPage(vcl::Window* pParent, const SfxItemSet& rSet);
     virtual ~SwTableOptionsTabPage();
     virtual void dispose() SAL_OVERRIDE;
 
-    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
-                                const SfxItemSet* rAttrSet );
+    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
 
-    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
-    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
+    virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE;
+    virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE;
 
-    void SetWrtShell(SwWrtShell* pSh) {pWrtShell = pSh;}
-    virtual void        PageCreated( const SfxAllItemSet& aSet) SAL_OVERRIDE;
+    void SetWrtShell(SwWrtShell* pSh) { pWrtShell = pSh; }
+    virtual void PageCreated( const SfxAllItemSet& aSet) SAL_OVERRIDE;
 
 };
 
@@ -282,51 +277,54 @@ public:
     virtual ~SwShdwCrsrOptionsTabPage();
     virtual void dispose() SAL_OVERRIDE;
 
-    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
+    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
 
-    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
-    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
+    virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
+    virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
 
-    void    SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; }
-    virtual void        PageCreated( const SfxAllItemSet& aSet ) SAL_OVERRIDE;
+    void SetWrtShell(SwWrtShell* pSh)
+    {
+        m_pWrtShell = pSh;
+    }
+    virtual void PageCreated( const SfxAllItemSet& aSet ) SAL_OVERRIDE;
 };
 
 // mark preview
 class SwMarkPreview : public vcl::Window
 {
-    Size            m_aInitialSize;
+    Size m_aInitialSize;
 
-    Color           m_aBgCol;           // background
-    Color           m_aTransCol;        // transparency
-    Color           m_aMarkCol;         // marks
-    Color           m_aLineCol;         // general lines
-    Color           m_aShadowCol;       // shadow
-    Color           m_aTxtCol;          // text
-    Color           m_aPrintAreaCol;    // frame for print area
+    Color m_aBgCol;    // background
+    Color m_aTransCol; // transparency
+    Color m_aMarkCol;  // marks
+    Color m_aLineCol;  // general lines
+    Color m_aShadowCol; // shadow
+    Color m_aTxtCol;    // text
+    Color m_aPrintAreaCol; // frame for print area
 
-    Rectangle       aPage;
-    Rectangle       aLeftPagePrtArea;
-    Rectangle       aRightPagePrtArea;
+    Rectangle aPage;
+    Rectangle aLeftPagePrtArea;
+    Rectangle aRightPagePrtArea;
 
-    sal_uInt16          nMarkPos;
+    sal_uInt16 nMarkPos;
 
     using OutputDevice::DrawRect;
-    void            DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor);
+    void DrawRect(vcl::RenderContext& rRenderContext, const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor);
 
-    void            Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE;
-    void            PaintPage(const Rectangle &rRect);
-    void            InitColors();
+    void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE;
+    void PaintPage(vcl::RenderContext& rRenderContext, const Rectangle &rRect);
+    void InitColors();
 
 protected:
-    virtual void    DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
+    virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE;
 
 public:
-                    SwMarkPreview(vcl::Window* pParent, WinBits nWinBits);
-    virtual         ~SwMarkPreview();
+    SwMarkPreview(vcl::Window* pParent, WinBits nWinBits);
+    virtual ~SwMarkPreview();
 
-    inline void     SetColor(const Color& rCol) { m_aMarkCol = rCol; }
-    inline void     SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; }
-    virtual Size    GetOptimalSize() const SAL_OVERRIDE;
+    inline void SetColor(const Color& rCol) { m_aMarkCol = rCol; }
+    inline void SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; }
+    virtual Size GetOptimalSize() const SAL_OVERRIDE;
 };
 
 // redlining options
@@ -351,21 +349,21 @@ class SwRedlineOptionsTabPage : public SfxTabPage
     OUString             sAuthor;
     OUString             sNone;
 
-    DECL_LINK( AttribHdl, ListBox *pLB );
-    DECL_LINK(ChangedMaskPrevHdl, void * = 0);
-    DECL_LINK( ColorHdl, ColorListBox *pColorLB );
+    DECL_LINK(AttribHdl, ListBox* pLB);
+    DECL_LINK(ChangedMaskPrevHdl, void* = 0);
+    DECL_LINK(ColorHdl, ColorListBox* pColorLB);
 
-    static void         InitFontStyle(SvxFontPrevWindow& rExampleWin);
+    static void InitFontStyle(SvxFontPrevWindow& rExampleWin);
 
 public:
-    SwRedlineOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+    SwRedlineOptionsTabPage(vcl::Window* pParent, const SfxItemSet& rSet);
     virtual ~SwRedlineOptionsTabPage();
     virtual void dispose() SAL_OVERRIDE;
 
-    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
+    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
 
-    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
-    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
+    virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
+    virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
 };
 
 // TabPage test settings for SW
@@ -375,16 +373,14 @@ public:
 class SwTestTabPage : public SfxTabPage
 {
 public:
-                        SwTestTabPage( vcl::Window* pParent,
-                                           const SfxItemSet& rSet );
+    SwTestTabPage(vcl::Window* pParent, const SfxItemSet& rSet);
     virtual ~SwTestTabPage();
     virtual void dispose() SAL_OVERRIDE;
 
-    static VclPtr<SfxTabPage>  Create( vcl::Window* pParent,
-                                       const SfxItemSet* rAttrSet );
+    static VclPtr<SfxTabPage> Create(vcl::Window* pParent, const SfxItemSet* rAttrSet);
 
-    virtual bool        FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
-    virtual void        Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
+    virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
+    virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
 
 private:
     VclPtr<CheckBox> m_pTest1CBox;
@@ -398,11 +394,10 @@ private:
     VclPtr<CheckBox> m_pTest9CBox;
     VclPtr<CheckBox> m_pTest10CBox;
 
-    bool        bAttrModified;
-
-    void        Init();
-    DECL_LINK(AutoClickHdl, void *);
+    bool bAttrModified;
 
+    void Init();
+    DECL_LINK(AutoClickHdl, void*);
 };
 #endif // DBG_UTIL
 
commit adbd496930c6e2670c6b85328ec1d1b03a882acd

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list