Modified: 
openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx?rev=1464962&r1=1464961&r2=1464962&view=diff
==============================================================================
--- 
openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
 (original)
+++ 
openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx
 Fri Apr  5 13:05:53 2013
@@ -19,11 +19,10 @@
  * 
  *************************************************************/
 
-#ifndef SVX_SIDEBAR_PARA_PROPERTY_PAGE_HXX
-#define SVX_SIDEBAR_PARA_PROPERTY_PAGE_HXX
+#ifndef SVX_SIDEBAR_PARA_PROPERTY_PANEL_HXX
+#define SVX_SIDEBAR_PARA_PROPERTY_PANEL_HXX
 
 #include <vcl/ctrl.hxx>
-#include <sfx2/sidebar/SidebarPanelBase.hxx>
 #include <sfx2/sidebar/ControllerItem.hxx>
 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
 #include <editeng/lspcitem.hxx>
@@ -33,7 +32,8 @@
 #include <editeng/svxenum.hxx>
 #include <editeng/fhgtitem.hxx>
 
-#include <com/sun/star/ui/XUIElement.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/ui/XSidebar.hpp>
 
 #include <boost/scoped_ptr.hpp>
 
@@ -50,6 +50,10 @@
 class FloatingWindow;
 class ToolBox;
 
+namespace css = ::com::sun::star;
+namespace cssu = ::com::sun::star::uno;
+
+
 namespace svx { namespace sidebar {
 
 class PopupControl;
@@ -64,7 +68,8 @@ public:
     static ParaPropertyPanel* Create (
         Window* pParent,
         const cssu::Reference<css::frame::XFrame>& rxFrame,
-        SfxBindings* pBindings);
+        SfxBindings* pBindings,
+        const cssu::Reference<css::ui::XSidebar>& rxSidebar);
 
        virtual void DataChanged (const DataChangedEvent& rEvent);
        SfxBindings* GetBindings();
@@ -78,11 +83,10 @@ public:
            const SfxPoolItem* pState);
 
        void ShowMenu (void);
-       sal_uInt16 GetBulletTypeIndex(){ return nBulletTypeIndex; }
-       void SetBulletTypeIndex(sal_uInt16 nInd){ nBulletTypeIndex = nInd; }
-       sal_uInt16 GetNumTypeIndex(){ return nNumTypeIndex; }
-       void SetNumTypeIndex(sal_uInt16 nInd){ nNumTypeIndex = nInd; }
-       //End
+       sal_uInt16 GetBulletTypeIndex(){ return mnBulletTypeIndex; }
+       void SetBulletTypeIndex(sal_uInt16 nInd){ mnBulletTypeIndex = nInd; }
+       sal_uInt16 GetNumTypeIndex(){ return mnNumTypeIndex; }
+       void SetNumTypeIndex(sal_uInt16 nInd){ mnNumTypeIndex = nInd; }
        FieldUnit GetCurrentUnit( SfxItemState eState, const SfxPoolItem* 
pState );
 
        void EndSpacingPopupMode (void);
@@ -160,7 +164,7 @@ private:
        ImageList       maVertImageListH;       
        ImageList       maNumBImageList;
        ImageList       maNumBImageListH;
-       ImageList       maNumBImageListRTL;     //sym2_7380
+       ImageList       maNumBImageListRTL;
        Image           maImgBackColorHigh;
        Image           maImgBackColor;
 
@@ -178,8 +182,8 @@ private:
        long                                    maUpper;
        long                                    maLower;
 
-       sal_uInt16                      nBulletTypeIndex;
-       sal_uInt16                      nNumTypeIndex;
+       sal_uInt16                      mnBulletTypeIndex;
+       sal_uInt16                      mnNumTypeIndex;
        Color                           maColor;
        bool                                    mbColorAvailable;
        FieldUnit                                               m_eMetricUnit;
@@ -188,7 +192,7 @@ private:
        SfxMapUnit                      m_eULSpaceUnit;
        /****************************************************************
        **
-       ** Controll Itemb
+       ** Controll Items
        **
        *****************************************************************/
 
@@ -197,10 +201,8 @@ private:
        ::sfx2::sidebar::ControllerItem  maRightAlignControl;
        ::sfx2::sidebar::ControllerItem  maJustifyAlignControl;
        ::sfx2::sidebar::ControllerItem  maLRSpaceControl;
-       //::sfx2::sidebar::ControllerItem  maLRSpaceControl2;
        ::sfx2::sidebar::ControllerItem  maLNSpaceControl;
        ::sfx2::sidebar::ControllerItem  maULSpaceControl;
-       //::sfx2::sidebar::ControllerItem  maULSpaceControl2;
        ::sfx2::sidebar::ControllerItem  maOutLineLeftControl;
        ::sfx2::sidebar::ControllerItem  maOutLineRightControl;
        ::sfx2::sidebar::ControllerItem  maDecIndentControl;
@@ -215,20 +217,20 @@ private:
        ::sfx2::sidebar::ControllerItem  maBulletNumRuleIndex;
        ::sfx2::sidebar::ControllerItem  maNumNumRuleIndex;
 
-    cssu::Reference<css::frame::XFrame> mxFrame;
     ::sfx2::sidebar::EnumContext maContext;
     SfxBindings* mpBindings;
-
-
        ParaLineSpacingPopup maLineSpacePopup;
        ParaBulletsPopup maBulletsPopup;
        ParaNumberingPopup maNumberingPopup;
        ColorPopup maBGColorPopup; 
+    cssu::Reference<css::ui::XSidebar> mxSidebar;
+
     
     ParaPropertyPanel (
         Window* pParent,
         const cssu::Reference<css::frame::XFrame>& rxFrame,
-        SfxBindings* pBindings);
+        SfxBindings* pBindings,
+        const cssu::Reference<css::ui::XSidebar>& rxSidebar);
        virtual ~ParaPropertyPanel (void);
 
        void InitImageList(::boost::scoped_ptr<ToolBox>& rTbx, ImageList& 
rImglst, ImageList& rImgHlst);
@@ -251,9 +253,9 @@ private:
        void StateChangedULImpl( sal_uInt16 nSID, SfxItemState eState, const 
SfxPoolItem* pState );
        void StateChangeOutLineImpl( sal_uInt16 nSID, SfxItemState eState, 
const SfxPoolItem* pState );
        void StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eState, const 
SfxPoolItem* pState );
-       //Sym3_1093. Add toggle state for numbering and bullet icons
+       // Add toggle state for numbering and bullet icons
        void StateChangeBulletNumImpl( sal_uInt16 nSID, SfxItemState eState, 
const SfxPoolItem* pState );
-       //Modified for Numbering&Bullets Dialog UX Enh(Story 992) by 
chengjh,2011.7.5
+       //Modified for Numbering&Bullets Dialog UX Enh
        //Handing the transferred the num rule index data of the current 
selection
        void StateChangeBulletNumRuleImpl( sal_uInt16 nSID, SfxItemState 
eState, const SfxPoolItem* pState );
        

Modified: 
openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx?rev=1464962&r1=1464961&r2=1464962&view=diff
==============================================================================
--- 
openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
 (original)
+++ 
openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
 Fri Apr  5 13:05:53 2013
@@ -58,7 +58,8 @@ namespace svx { namespace sidebar {
 PosSizePropertyPanel::PosSizePropertyPanel(
     Window* pParent,
     const cssu::Reference<css::frame::XFrame>& rxFrame,
-    SfxBindings* pBindings)
+    SfxBindings* pBindings,
+    const cssu::Reference<css::ui::XSidebar>& rxSidebar)
 :   Control(
         pParent, 
         SVX_RES(RID_SIDEBAR_POSSIZE_PANEL)),
@@ -112,7 +113,8 @@ PosSizePropertyPanel::PosSizePropertyPan
     mbAutoHeight(false),
     mbAdjustEnabled(false),
     mbIsFlip(false),
-    mbInDestructor(false)
+    mbInDestructor(false),
+    mxSidebar(rxSidebar)
 {
        Initialize();
        FreeResource();
@@ -150,7 +152,14 @@ void PosSizePropertyPanel::ShowMenu (voi
 
 void PosSizePropertyPanel::Initialize()
 {
-       //Position : Horizontal / Vertical
+    mpFtPosX->SetBackground(Wallpaper());
+    mpFtPosY->SetBackground(Wallpaper());
+    mpFtWidth->SetBackground(Wallpaper());
+    mpFtHeight->SetBackground(Wallpaper());
+    mpFtAngle->SetBackground(Wallpaper());
+    mpFtFlip->SetBackground(Wallpaper());
+
+        //Position : Horizontal / Vertical
        mpMtrPosX->SetModifyHdl( LINK( this, PosSizePropertyPanel, 
ChangePosXHdl ) );
        mpMtrPosY->SetModifyHdl( LINK( this, PosSizePropertyPanel, 
ChangePosYHdl ) );
        mpMtrPosX->SetAccessibleName(::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM("Horizontal")));      //wj acc
@@ -250,7 +259,8 @@ void PosSizePropertyPanel::SetupIcons(vo
 PosSizePropertyPanel* PosSizePropertyPanel::Create (
     Window* pParent,
     const cssu::Reference<css::frame::XFrame>& rxFrame,
-    SfxBindings* pBindings)
+    SfxBindings* pBindings,
+    const cssu::Reference<css::ui::XSidebar>& rxSidebar)
 {
     if (pParent == NULL)
         throw lang::IllegalArgumentException(A2S("no parent Window given to 
PosSizePropertyPanel::Create"), NULL, 0);
@@ -262,7 +272,8 @@ PosSizePropertyPanel* PosSizePropertyPan
     return new PosSizePropertyPanel(
         pParent,
         rxFrame,
-        pBindings);
+        pBindings,
+        rxSidebar);
 }
 
 
@@ -362,6 +373,8 @@ void PosSizePropertyPanel::HandleContext
                        Size 
aSize(GetOutputSizePixel().Width(),PS_SECTIONPAGE_HEIGHT2);
                        aSize = LogicToPixel( aSize, MapMode(MAP_APPFONT) ); 
                        SetSizePixel(aSize);
+            if (mxSidebar.is())
+                mxSidebar->requestLayout();
                }
                break;
 
@@ -393,6 +406,8 @@ void PosSizePropertyPanel::HandleContext
                        Size 
aSize(GetOutputSizePixel().Width(),PS_SECTIONPAGE_HEIGHT3);
                        aSize = LogicToPixel( aSize, MapMode(MAP_APPFONT) ); 
                        SetSizePixel(aSize);
+            if (mxSidebar.is())
+                mxSidebar->requestLayout();
                }
                break;
 
@@ -420,6 +435,8 @@ void PosSizePropertyPanel::HandleContext
                        Size 
aSize(GetOutputSizePixel().Width(),PS_SECTIONPAGE_HEIGHT);
                        aSize = LogicToPixel( aSize, MapMode(MAP_APPFONT) ); 
                        SetSizePixel(aSize);
+            if (mxSidebar.is())
+                mxSidebar->requestLayout();
                }
                break;
         
@@ -445,6 +462,8 @@ void PosSizePropertyPanel::HandleContext
                        Size 
aSize(GetOutputSizePixel().Width(),PS_SECTIONPAGE_HEIGHT4);
                        aSize = LogicToPixel( aSize, MapMode(MAP_APPFONT) ); 
                        SetSizePixel(aSize);
+            if (mxSidebar.is())
+                mxSidebar->requestLayout();
                }
                break;
        }

Modified: 
openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.hxx?rev=1464962&r1=1464961&r2=1464962&view=diff
==============================================================================
--- 
openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
 (original)
+++ 
openoffice/branches/sidebar/main/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
 Fri Apr  5 13:05:53 2013
@@ -30,7 +30,7 @@
 #include <svx/rectenum.hxx>
 #include <svl/poolitem.hxx>
 #include <tools/fldunit.hxx>
-
+#include <com/sun/star/ui/XSidebar.hpp>
 
 class DialControl;
 class SdrView;
@@ -53,7 +53,8 @@ public:
     static PosSizePropertyPanel* Create(
         Window* pParent,
         const cssu::Reference<css::frame::XFrame>& rxFrame,
-        SfxBindings* pBindings);
+        SfxBindings* pBindings,
+        const cssu::Reference<css::ui::XSidebar>& rxSidebar);
 
     virtual void DataChanged(
         const DataChangedEvent& rEvent);
@@ -141,6 +142,8 @@ private:
     bool                                    mbIsFlip : 1;
     bool                                    mbInDestructor : 1;
 
+    cssu::Reference<css::ui::XSidebar> mxSidebar;
+
     DECL_LINK( ChangePosXHdl, void * );
     DECL_LINK( ChangePosYHdl, void * );
     DECL_LINK( ChangeWidthHdl, void * );
@@ -160,7 +163,8 @@ private:
     PosSizePropertyPanel(
         Window* pParent,
         const cssu::Reference<css::frame::XFrame>& rxFrame,
-        SfxBindings* pBindings);
+        SfxBindings* pBindings,
+        const cssu::Reference<css::ui::XSidebar>& rxSidebar);
     virtual ~PosSizePropertyPanel();
 
     void MetricState( SfxItemState eState, const SfxPoolItem* pState );

Modified: 
openoffice/branches/sidebar/main/svx/source/sidebar/text/TextPropertyPanel.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/text/TextPropertyPanel.cxx?rev=1464962&r1=1464961&r2=1464962&view=diff
==============================================================================
--- 
openoffice/branches/sidebar/main/svx/source/sidebar/text/TextPropertyPanel.cxx 
(original)
+++ 
openoffice/branches/sidebar/main/svx/source/sidebar/text/TextPropertyPanel.cxx 
Fri Apr  5 13:05:53 2013
@@ -135,7 +135,8 @@ long TextPropertyPanel::GetSelFontSize()
 TextPropertyPanel* TextPropertyPanel::Create (
     Window* pParent,
     const cssu::Reference<css::frame::XFrame>& rxFrame,
-    SfxBindings* pBindings)
+    SfxBindings* pBindings,
+    const cssu::Reference<css::ui::XSidebar>& rxSidebar)
 {
     if (pParent == NULL)
         throw lang::IllegalArgumentException(A2S("no parent Window given to 
TextPropertyPanel::Create"), NULL, 0);
@@ -147,7 +148,8 @@ TextPropertyPanel* TextPropertyPanel::Cr
     return new TextPropertyPanel(
         pParent,
         rxFrame,
-        pBindings);
+        pBindings,
+        rxSidebar);
 }
 
 
@@ -159,7 +161,8 @@ TextPropertyPanel* TextPropertyPanel::Cr
 TextPropertyPanel::TextPropertyPanel (
     Window* pParent,
     const cssu::Reference<css::frame::XFrame>& rxFrame,
-    SfxBindings* pBindings)
+    SfxBindings* pBindings,
+    const cssu::Reference<css::ui::XSidebar>& rxSidebar)
     :  Control(pParent, SVX_RES(RID_SIDEBAR_TEXT_PANEL)),
         mpFontNameBox (new SvxSBFontNameBox(this, SVX_RES(CB_SBFONT_FONT))),
        maFontSizeBox           (this, SVX_RES(MB_SBFONT_FONTSIZE)),
@@ -245,13 +248,11 @@ TextPropertyPanel::TextPropertyPanel (
         mbFocusOnFontSizeCtrl(false),
         mxFrame(rxFrame),
         maContext(),
-        mpBindings(pBindings)
+        mpBindings(pBindings),
+        mxSidebar(rxSidebar)
 {
        Initialize();
        FreeResource();
-
-    // Let the Pane draw the background.
-    SetBackground(Wallpaper());
 }
 
 
@@ -262,17 +263,6 @@ TextPropertyPanel::~TextPropertyPanel (v
     if(mbMustDelete)
         delete mpFontList;
 
-    /*AF
-       delete mpPageUnderline;
-       delete mpFloatWinUnderline;     
-
-       delete mpPageFontColor;
-       delete mpFloatWinFontColor;
-
-       delete mpPageSpacing;
-       delete mpFloatWinSpacing;
-    */
-
     // Destroy the toolbox windows.
     mpToolBoxIncDec.reset();
     mpToolBoxFont.reset();
@@ -317,7 +307,7 @@ void TextPropertyPanel::HandleContextCha
     }
 
     maContext = aContext;
-    switch (maContext.GetCombinedContext())
+    switch (maContext.GetCombinedContext_DI())
     {
         case CombinedEnumContext(Application_Calc, Context_Cell):
         case CombinedEnumContext(Application_Calc, Context_Pivot):
@@ -331,11 +321,13 @@ void TextPropertyPanel::HandleContextCha
             aSize = LogicToPixel( aSize, MapMode(MAP_APPFONT) ); 
             aSize.setWidth(GetOutputSizePixel().Width());
             SetSizePixel(aSize);
+            if (mxSidebar.is())
+                mxSidebar->requestLayout();
             break;
         }
 
-        case CombinedEnumContext(Application_Writer, Context_Text):
-        case CombinedEnumContext(Application_Writer, Context_Table):
+        case CombinedEnumContext(Application_WriterAndWeb, Context_Text):
+        case CombinedEnumContext(Application_WriterAndWeb, Context_Table):
         {
             mpToolBoxScriptSw->Show();
             mpToolBoxScript->Hide();
@@ -346,6 +338,8 @@ void TextPropertyPanel::HandleContextCha
             aSize = LogicToPixel( aSize, MapMode(MAP_APPFONT) ); 
             aSize.setWidth(GetOutputSizePixel().Width());
             SetSizePixel(aSize);
+            if (mxSidebar.is())
+                mxSidebar->requestLayout();
             break;
         }
 
@@ -361,25 +355,20 @@ void TextPropertyPanel::HandleContextCha
             aSize = LogicToPixel( aSize, MapMode(MAP_APPFONT) ); 
             aSize.setWidth(GetOutputSizePixel().Width());
             SetSizePixel(aSize);
+            if (mxSidebar.is())
+                mxSidebar->requestLayout();
             break;
         }
 
         case CombinedEnumContext(Application_Calc, Context_EditCell):
         case CombinedEnumContext(Application_Calc, Context_DrawText):
-        case CombinedEnumContext(Application_Draw, Context_DrawText):
-        case CombinedEnumContext(Application_Draw, Context_Text):
-        case CombinedEnumContext(Application_Draw, Context_Table):
-        case CombinedEnumContext(Application_Draw, Context_OutlineText):
-        case CombinedEnumContext(Application_Draw, Context_Draw):
-        case CombinedEnumContext(Application_Draw, Context_TextObject):
-        case CombinedEnumContext(Application_Draw, Context_Graphic):
-        case CombinedEnumContext(Application_Impress, Context_DrawText):
-        case CombinedEnumContext(Application_Impress, Context_Text):
-        case CombinedEnumContext(Application_Impress, Context_Table):
-        case CombinedEnumContext(Application_Impress, Context_OutlineText):
-        case CombinedEnumContext(Application_Impress, Context_Draw):
-        case CombinedEnumContext(Application_Impress, Context_TextObject):
-        case CombinedEnumContext(Application_Impress, Context_Graphic):
+        case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
+        case CombinedEnumContext(Application_DrawImpress, Context_Text):
+        case CombinedEnumContext(Application_DrawImpress, Context_Table):
+        case CombinedEnumContext(Application_DrawImpress, Context_OutlineText):
+        case CombinedEnumContext(Application_DrawImpress, Context_Draw):
+        case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
+        case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
         {
             mpToolBoxScriptSw->Hide();
             mpToolBoxScript->Show();
@@ -390,6 +379,8 @@ void TextPropertyPanel::HandleContextCha
             aSize = LogicToPixel( aSize,MapMode(MAP_APPFONT) ); 
             aSize.setWidth(GetOutputSizePixel().Width());
             SetSizePixel(aSize);
+            if (mxSidebar.is())
+                mxSidebar->requestLayout();
             break;
         }
 

Modified: 
openoffice/branches/sidebar/main/svx/source/sidebar/text/TextPropertyPanel.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/source/sidebar/text/TextPropertyPanel.hxx?rev=1464962&r1=1464961&r2=1464962&view=diff
==============================================================================
--- 
openoffice/branches/sidebar/main/svx/source/sidebar/text/TextPropertyPanel.hxx 
(original)
+++ 
openoffice/branches/sidebar/main/svx/source/sidebar/text/TextPropertyPanel.hxx 
Fri Apr  5 13:05:53 2013
@@ -32,7 +32,8 @@
 #include <editeng/svxenum.hxx>
 #include <editeng/fhgtitem.hxx>
 
-#include <com/sun/star/ui/XUIElement.hpp>
+//#include <com/sun/star/ui/XUIElement.hpp>
+#include <com/sun/star/ui/XSidebar.hpp>
 
 #include <boost/scoped_ptr.hpp>
 #include "TextCharacterSpacingPopup.hxx"
@@ -58,7 +59,8 @@ public:
     static TextPropertyPanel* Create (
         Window* pParent,
         const cssu::Reference<css::frame::XFrame>& rxFrame,
-        SfxBindings* pBindings);
+        SfxBindings* pBindings,
+        const cssu::Reference<css::ui::XSidebar>& rxSidebar);
 
     virtual void DataChanged (const DataChangedEvent& rEvent);
     SfxBindings* GetBindings();
@@ -153,7 +155,6 @@ private:
        Image   maImgFontColorHigh;
        Image   maImgSupScriptHigh;
        Image   maImgSubScriptHigh;
-//     Image   maImgSpacingHigh;  // 
        Image   maImgHighlightHigh;
 
        FontWeight                                      meWeight;
@@ -188,11 +189,13 @@ private:
     cssu::Reference<css::frame::XFrame> mxFrame;
     ::sfx2::sidebar::EnumContext maContext;
     SfxBindings* mpBindings;
-    
+    cssu::Reference<css::ui::XSidebar> mxSidebar;
+        
     TextPropertyPanel (
         Window* pParent,
         const cssu::Reference<css::frame::XFrame>& rxFrame,
-        SfxBindings* pBindings);
+        SfxBindings* pBindings,
+        const cssu::Reference<css::ui::XSidebar>& rxSidebar);
        virtual ~TextPropertyPanel (void);
 
        

Modified: 
openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx?rev=1464962&r1=1464961&r2=1464962&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx 
(original)
+++ openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx 
Fri Apr  5 13:05:53 2013
@@ -185,6 +185,11 @@ PagePropertyPanel::~PagePropertyPanel()
 
 void PagePropertyPanel::Initialize()
 {
+    maFtOrientation.SetBackground(Wallpaper());
+    maFtMargin.SetBackground(Wallpaper());
+    maFtSize.SetBackground(Wallpaper());
+    maFtColumn.SetBackground(Wallpaper());
+
     // popup for page orientation
     Link aLink = LINK( this, PagePropertyPanel, ClickOrientationHdl );
     mpToolBoxOrientation->SetDropdownClickHdl( aLink );
@@ -266,13 +271,16 @@ void PagePropertyPanel::Initialize()
 
 IMPL_LINK( PagePropertyPanel, ClickOrientationHdl, ToolBox*, pToolBox )
 {
-    mpOrientationPopup.reset(
-        new ::svx::sidebar::Popup(
-            this,
-            ::boost::bind(&PagePropertyPanel::CreatePageOrientationControl, 
this, _1),
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page orientation")) 
) );
+    if ( ! mpOrientationPopup)
+    {
+        mpOrientationPopup.reset(
+            new ::svx::sidebar::Popup(
+                this,
+                
::boost::bind(&PagePropertyPanel::CreatePageOrientationControl, this, _1),
+                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page 
orientation")) ) );
+    }
     mpOrientationPopup->Show( *pToolBox );
-
+    
     return 0L;
 }
 
@@ -383,11 +391,12 @@ void PagePropertyPanel::ExecutePageLayou
 
 IMPL_LINK( PagePropertyPanel, ClickMarginHdl, ToolBox*, pToolBox )
 {
-    mpMarginPopup.reset(
-        new ::svx::sidebar::Popup(
-            this,
-            ::boost::bind(&PagePropertyPanel::CreatePageMarginControl, this, 
_1),
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page margins")) ) );
+    if ( ! mpMarginPopup)
+        mpMarginPopup.reset(
+            new ::svx::sidebar::Popup(
+                this,
+                ::boost::bind(&PagePropertyPanel::CreatePageMarginControl, 
this, _1),
+                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page margins")) 
) );
     mpMarginPopup->Show( *pToolBox );
 
     return 0L;
@@ -428,11 +437,12 @@ void PagePropertyPanel::ExecuteSizeChang
 
 IMPL_LINK( PagePropertyPanel, ClickSizeHdl, ToolBox*, pToolBox )
 {
-    mpSizePopup.reset(
-        new ::svx::sidebar::Popup(
-            this,
-            ::boost::bind(&PagePropertyPanel::CreatePageSizeControl, this, _1),
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page size")) ) );
+    if ( ! mpSizePopup)
+        mpSizePopup.reset(
+            new ::svx::sidebar::Popup(
+                this,
+                ::boost::bind(&PagePropertyPanel::CreatePageSizeControl, this, 
_1),
+                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page size")) ) );
     mpSizePopup->Show( *pToolBox );
 
     return 0L;
@@ -466,11 +476,12 @@ void PagePropertyPanel::ExecuteColumnCha
 
 IMPL_LINK( PagePropertyPanel, ClickColumnHdl, ToolBox*, pToolBox )
 {
-    mpColumnPopup.reset(
-        new ::svx::sidebar::Popup(
-            this,
-            ::boost::bind(&PagePropertyPanel::CreatePageColumnControl, this, 
_1),
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page columns")) ) );
+    if ( ! mpColumnPopup)
+        mpColumnPopup.reset(
+            new ::svx::sidebar::Popup(
+                this,
+                ::boost::bind(&PagePropertyPanel::CreatePageColumnControl, 
this, _1),
+                ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Page columns")) 
) );
     mpColumnPopup->Show( *pToolBox );
 
     return 0L;


Reply via email to