[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 10 commits - bridges/source default_images/svx officecfg/registry sd/source sfx2/inc sfx2/source svx/source sw/source

Pavel Janík paveljanik at apache.org
Tue Apr 23 16:33:01 PDT 2013


 bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s              |    3 
 bridges/source/cpp_uno/gcc3_linux_x86-64/call.s                |    3 
 dev/null                                                       |binary
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu   |  102 ++--
 officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs |   36 +
 sd/source/ui/animations/CustomAnimationPane.cxx                |   21 
 sfx2/inc/sfx2/sidebar/EnumContext.hxx                          |    6 
 sfx2/source/sidebar/Deck.hxx                                   |    2 
 sfx2/source/sidebar/DeckDescriptor.hxx                         |    2 
 sfx2/source/sidebar/EnumContext.cxx                            |    6 
 sfx2/source/sidebar/PanelDescriptor.hxx                        |    2 
 sfx2/source/sidebar/ResourceManager.cxx                        |   73 ++-
 sfx2/source/sidebar/SidebarController.cxx                      |   46 ++
 sfx2/source/sidebar/SidebarController.hxx                      |    6 
 sfx2/source/sidebar/TitleBar.cxx                               |   34 +
 sfx2/source/sidebar/TitleBar.hxx                               |    2 
 svx/source/sidebar/line/LinePropertyPanel.cxx                  |  225 +++++-----
 svx/source/sidebar/line/LinePropertyPanel.hxx                  |    5 
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx             |   10 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx            |   23 -
 svx/source/sidebar/possize/PosSizePropertyPanel.hrc            |    2 
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx            |    4 
 svx/source/sidebar/possize/PosSizePropertyPanel.src            |   17 
 svx/source/sidebar/text/TextPropertyPanel.cxx                  |   12 
 svx/source/sidebar/tools/Popup.cxx                             |    8 
 sw/source/ui/sidebar/PageMarginControl.cxx                     |    2 
 sw/source/ui/sidebar/PagePropertyPanel.cxx                     |  113 +++--
 sw/source/ui/sidebar/PagePropertyPanel.hxx                     |   18 
 sw/source/ui/sidebar/SwPanelFactory.cxx                        |    2 
 sw/source/ui/sidebar/WrapPropertyPanel.cxx                     |    6 
 sw/source/ui/uiview/viewtab.cxx                                |    7 
 31 files changed, 507 insertions(+), 291 deletions(-)

New commits:
commit 2d6fad788b694e0396d061a8a55b6127e788fdfa
Author: Pavel Janík <paveljanik at apache.org>
Date:   Tue Apr 23 18:04:52 2013 +0000

    Reorder initialization to prevent compiler warning.

diff --git a/sw/source/ui/sidebar/PagePropertyPanel.cxx b/sw/source/ui/sidebar/PagePropertyPanel.cxx
index b4b8b07..d3822d3 100644
--- a/sw/source/ui/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/ui/sidebar/PagePropertyPanel.cxx
@@ -197,9 +197,9 @@ PagePropertyPanel::PagePropertyPanel(
                      ::boost::bind( &PagePropertyPanel::CreatePageColumnControl, this, _1 ),
                      A2S("Page columns") )
 
-    , mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify( false )
-
     , mxUndoManager( getUndoManager( rxFrame ) )
+
+    , mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify( false )
 {
     Initialize();
     mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify = true;
commit 80b53edb04ed2d4b4f27f8256b754593902f0c23
Author: Andre Fischer <af at apache.org>
Date:   Tue Apr 23 14:08:04 2013 +0000

    122086: Show icons in decks and titles (optionally).

diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
index 462bc8b..c2b2d58 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
@@ -58,6 +58,20 @@
         </info>
         <value></value>
       </prop>
+      <prop oor:name="TitleBarIconURL" oor:type="xs:string">
+        <info>
+          <desc>This icon is displayed in the title bar of the deck.
+          Any URL scheme supported by the com.sun.star.graphic.GraphicProvider service is suitable here.</desc>
+        </info>
+        <value></value>
+      </prop>
+      <prop oor:name="HighContrastTitleBarIconURL" oor:type="xs:string">
+        <info>
+          <desc>This icon is displayed in the title bar of the deck when high contrast mode is active.
+          Any URL scheme supported by the com.sun.star.graphic.GraphicProvider service is suitable here.</desc>
+        </info>
+        <value></value>
+      </prop>
       <prop oor:name="HelpURL" oor:type="xs:string">
         <info>
           <desc>Help about the sidebar deck.</desc>
@@ -147,6 +161,20 @@
         </info>
         <value></value>
       </prop>
+      <prop oor:name="TitleBarIconURL" oor:type="xs:string">
+        <info>
+          <desc>This icon is displayed in the title bar of the panel.
+          Any URL scheme supported by the com.sun.star.graphic.GraphicProvider service is suitable here.</desc>
+        </info>
+        <value></value>
+      </prop>
+      <prop oor:name="HighContrastTitleBarIconURL" oor:type="xs:string">
+        <info>
+          <desc>This icon is displayed in the title bar of the panel when high contrast mode is active.
+          Any URL scheme supported by the com.sun.star.graphic.GraphicProvider service is suitable here.</desc>
+        </info>
+        <value></value>
+      </prop>
       <prop oor:name="HelpURL" oor:type="xs:string">
         <info>
           <desc>Help about the sidebar content panel.</desc>
diff --git a/sfx2/source/sidebar/Deck.hxx b/sfx2/source/sidebar/Deck.hxx
index a2dbff4..6767fd4 100644
--- a/sfx2/source/sidebar/Deck.hxx
+++ b/sfx2/source/sidebar/Deck.hxx
@@ -97,6 +97,8 @@ private:
     ::boost::scoped_ptr<ScrollBar> mpVerticalScrollBar;
 
     DECL_LINK(HandleVerticalScrollBarChange,void*);
+
+
 };
 
 
diff --git a/sfx2/source/sidebar/DeckDescriptor.hxx b/sfx2/source/sidebar/DeckDescriptor.hxx
index 263c09c..1b6b61f 100644
--- a/sfx2/source/sidebar/DeckDescriptor.hxx
+++ b/sfx2/source/sidebar/DeckDescriptor.hxx
@@ -36,6 +36,8 @@ public:
     ::rtl::OUString msId;
     ::rtl::OUString msIconURL;
     ::rtl::OUString msHighContrastIconURL;
+    ::rtl::OUString msTitleBarIconURL;
+    ::rtl::OUString msHighContrastTitleBarIconURL;
     ::rtl::OUString msHelpURL;
     ::rtl::OUString msHelpText;
     ContextList maContextList;
diff --git a/sfx2/source/sidebar/PanelDescriptor.hxx b/sfx2/source/sidebar/PanelDescriptor.hxx
index 9b54e99..ba83ba7 100644
--- a/sfx2/source/sidebar/PanelDescriptor.hxx
+++ b/sfx2/source/sidebar/PanelDescriptor.hxx
@@ -36,6 +36,8 @@ public:
     sal_Bool mbIsTitleBarOptional;
     ::rtl::OUString msId;
     ::rtl::OUString msDeckId;
+    ::rtl::OUString msTitleBarIconURL;
+    ::rtl::OUString msHighContrastTitleBarIconURL;
     ::rtl::OUString msHelpURL;
     ContextList maContextList;
     ::rtl::OUString msImplementationURL;
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index 1f3ce90..c3627e2 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -279,6 +279,10 @@ void ResourceManager::ReadDeckList (void)
             aDeckNode.getNodeValue("IconURL"));
         rDeckDescriptor.msHighContrastIconURL = ::comphelper::getString(
             aDeckNode.getNodeValue("HighContrastIconURL"));
+        rDeckDescriptor.msTitleBarIconURL = ::comphelper::getString(
+            aDeckNode.getNodeValue("TitleBarIconURL"));
+        rDeckDescriptor.msHighContrastTitleBarIconURL = ::comphelper::getString(
+            aDeckNode.getNodeValue("HighContrastTitleBarIconURL"));
         rDeckDescriptor.msHelpURL = ::comphelper::getString(
             aDeckNode.getNodeValue("HelpURL"));
         rDeckDescriptor.msHelpText = rDeckDescriptor.msTitle;
@@ -331,6 +335,10 @@ void ResourceManager::ReadPanelList (void)
             aPanelNode.getNodeValue("Id"));
         rPanelDescriptor.msDeckId = ::comphelper::getString(
             aPanelNode.getNodeValue("DeckId"));
+        rPanelDescriptor.msTitleBarIconURL = ::comphelper::getString(
+            aPanelNode.getNodeValue("TitleBarIconURL"));
+        rPanelDescriptor.msHighContrastTitleBarIconURL = ::comphelper::getString(
+            aPanelNode.getNodeValue("HighContrastTitleBarIconURL"));
         rPanelDescriptor.msHelpURL = ::comphelper::getString(
             aPanelNode.getNodeValue("HelpURL"));
         rPanelDescriptor.msImplementationURL = ::comphelper::getString(
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 9eda74e..da4ce2e 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -495,6 +495,7 @@ void SidebarController::SwitchToDeck (
     // buttons.
     maFocusManager.SetPanels(aNewPanels);
     mpTabBar->UpdateFocusManager(maFocusManager);
+    UpdateTitleBarIcons();
 }
 
 
@@ -650,6 +651,7 @@ IMPL_LINK(SidebarController, WindowEventHandler, VclWindowEvent*, pEvent)
                 // Force an update of deck and tab bar to reflect
                 // changes in theme (high contrast mode).
                 Theme::HandleDataChange();
+                UpdateTitleBarIcons();
                 mpParentWindow->Invalidate();
                 break;
 
@@ -939,4 +941,48 @@ void SidebarController::RestrictWidth (void)
 }
 
 
+
+
+void SidebarController::UpdateTitleBarIcons (void)
+{
+    if ( ! mpCurrentDeck)
+        return;
+
+    const bool bIsHighContrastModeActive (Theme::IsHighContrastMode());
+    const ResourceManager& rResourceManager (ResourceManager::Instance());
+
+    // Update the deck icon.
+    const DeckDescriptor* pDeckDescriptor = rResourceManager.GetDeckDescriptor(mpCurrentDeck->GetId());
+    if (pDeckDescriptor != NULL && mpCurrentDeck->GetTitleBar())
+    {
+        const OUString sIconURL(
+            bIsHighContrastModeActive
+                ? pDeckDescriptor->msHighContrastTitleBarIconURL
+                : pDeckDescriptor->msTitleBarIconURL);
+        mpCurrentDeck->GetTitleBar()->SetIcon(Tools::GetImage(sIconURL, mxFrame));
+    }
+
+    // Update the panel icons.
+    const SharedPanelContainer& rPanels (mpCurrentDeck->GetPanels());
+    for (SharedPanelContainer::const_iterator
+             iPanel(rPanels.begin()), iEnd(rPanels.end());
+             iPanel!=iEnd;
+             ++iPanel)
+    {
+        if ( ! *iPanel)
+            continue;
+        if ((*iPanel)->GetTitleBar() == NULL)
+            continue;
+        const PanelDescriptor* pPanelDescriptor = rResourceManager.GetPanelDescriptor((*iPanel)->GetId());
+        if (pPanelDescriptor == NULL)
+            continue;
+        const OUString sIconURL (
+            bIsHighContrastModeActive
+               ? pPanelDescriptor->msHighContrastTitleBarIconURL
+               : pPanelDescriptor->msTitleBarIconURL);
+        (*iPanel)->GetTitleBar()->SetIcon(Tools::GetImage(sIconURL, mxFrame));
+    }
+}
+
+
 } } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/sidebar/SidebarController.hxx b/sfx2/source/sidebar/SidebarController.hxx
index 622456e..49dbc97 100644
--- a/sfx2/source/sidebar/SidebarController.hxx
+++ b/sfx2/source/sidebar/SidebarController.hxx
@@ -165,6 +165,12 @@ private:
 
     void RestrictWidth (void);
 
+    /** Update the icons displayed in the title bars of the deck and
+        the panels.  This is called once when a deck is created and
+        every time when a data change event is processed.
+    */
+    void UpdateTitleBarIcons (void);
+
     virtual void SAL_CALL disposing (void);
 };
 
diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx
index b7f8c44..bd228a7 100644
--- a/sfx2/source/sidebar/TitleBar.cxx
+++ b/sfx2/source/sidebar/TitleBar.cxx
@@ -30,6 +30,11 @@
 
 ToolbarValue::~ToolbarValue (void) {}
 
+namespace
+{
+    const static sal_Int32 gnLeftIconSpace (3);
+    const static sal_Int32 gnRightIconSpace (3);
+}
 
 namespace sfx2 { namespace sidebar {
 
@@ -39,7 +44,8 @@ TitleBar::TitleBar (
     const sidebar::Paint& rInitialBackgroundPaint)
     : Window(pParentWindow),
       maToolBox(this),
-      msTitle(rsTitle)
+      msTitle(rsTitle),
+      maIcon()
 {
     SetBackground(rInitialBackgroundPaint.GetWallpaper());
 
@@ -65,6 +71,15 @@ void TitleBar::SetTitle (const ::rtl::OUString& rsTitle)
 
 
 
+void TitleBar::SetIcon (const Image& rIcon)
+{
+    maIcon = rIcon;
+    Invalidate();
+}
+
+
+
+
 void TitleBar::Paint (const Rectangle& rUpdateArea)
 {
     (void)rUpdateArea;
@@ -137,6 +152,20 @@ void TitleBar::PaintTitle (const Rectangle& rTitleBox)
 {
     Push(PUSH_FONT | PUSH_TEXTCOLOR);
 
+    Rectangle aTitleBox (rTitleBox);
+
+    // When there is an icon then paint it at the left of the given
+    // box.
+    if ( !! maIcon)
+    {
+        DrawImage(
+            Point(
+                aTitleBox.Left() + gnLeftIconSpace,
+                aTitleBox.Top() + (aTitleBox.GetHeight()-maIcon.GetSizePixel().Height())/2),
+            maIcon);
+        aTitleBox.Left() += gnLeftIconSpace + maIcon.GetSizePixel().Width() + gnRightIconSpace;
+    }
+
     Font aFont(GetFont());
     aFont.SetWeight(WEIGHT_BOLD);
     SetFont(aFont);
@@ -144,7 +173,7 @@ void TitleBar::PaintTitle (const Rectangle& rTitleBox)
     // Paint title bar text.
     SetTextColor(GetTextColor());
     DrawText(
-        rTitleBox,
+        aTitleBox,
         msTitle,
         TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER);
 
diff --git a/sfx2/source/sidebar/TitleBar.hxx b/sfx2/source/sidebar/TitleBar.hxx
index a113641..205bfca 100644
--- a/sfx2/source/sidebar/TitleBar.hxx
+++ b/sfx2/source/sidebar/TitleBar.hxx
@@ -41,6 +41,7 @@ public:
     virtual ~TitleBar (void);
 
     void SetTitle (const ::rtl::OUString& rsTitle);
+    void SetIcon (const Image& rIcon);
 
     virtual void Paint (const Rectangle& rUpdateArea);
     virtual void DataChanged (const DataChangedEvent& rEvent);
@@ -65,6 +66,7 @@ protected:
 
 private:
     ::rtl::OUString msTitle;
+    Image maIcon;
 
     void PaintTitle (const Rectangle& rTitleBox);
     DECL_LINK(SelectionHandler, ToolBox*);
commit 306b1c56dc88ac357093d1dc5eb8c8360f8f7100
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Tue Apr 23 13:56:58 2013 +0000

    121793: correction for page property panel:
    
    - show correct state in popups
    - aggregate multiple attribute changes into one undo action

diff --git a/svx/source/sidebar/tools/Popup.cxx b/svx/source/sidebar/tools/Popup.cxx
index f9d6661..44efdd3 100644
--- a/svx/source/sidebar/tools/Popup.cxx
+++ b/svx/source/sidebar/tools/Popup.cxx
@@ -126,8 +126,7 @@ void Popup::CreateContainerAndControl (void)
 {
     mpContainer.reset(new PopupContainer(mpParent));
     mpContainer->SetAccessibleName(msAccessibleName);
-    if (maPopupModeEndCallback)
-        mpContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler));
+    mpContainer->SetPopupModeEndHdl(LINK(this, Popup, PopupModeEndHandler));
     mpContainer->SetBorderStyle(mpContainer->GetBorderStyle() | WINDOW_BORDER_MENU);
 
     mpControl.reset(maControlCreator(mpContainer.get()));
@@ -140,6 +139,11 @@ IMPL_LINK(Popup, PopupModeEndHandler, void*, EMPTYARG)
 {
     if (maPopupModeEndCallback)
         maPopupModeEndCallback();
+
+    // Popup control is no longer needed and can be destroyed.
+    mpControl.reset();
+    mpContainer.reset();
+
     return 0;
 }
 
diff --git a/sw/source/ui/sidebar/PageMarginControl.cxx b/sw/source/ui/sidebar/PageMarginControl.cxx
index c0697b1..ebe5f75 100644
--- a/sw/source/ui/sidebar/PageMarginControl.cxx
+++ b/sw/source/ui/sidebar/PageMarginControl.cxx
@@ -364,6 +364,7 @@ IMPL_LINK(PageMarginControl, ImplMarginHdl, void *, pControl)
 
         if ( bApplyNewPageMargins )
         {
+            mrPagePropPanel.StartUndo();
             mpMarginValueSet->SetNoSelection();
             mrPagePropPanel.ExecuteMarginLRChange( mnPageLeftMargin, mnPageRightMargin );
             mrPagePropPanel.ExecuteMarginULChange( mnPageTopMargin, mnPageBottomMargin );
@@ -372,6 +373,7 @@ IMPL_LINK(PageMarginControl, ImplMarginHdl, void *, pControl)
                 mbMirrored = bMirrored;
                 mrPagePropPanel.ExecutePageLayoutChange( mbMirrored );
             }
+            mrPagePropPanel.EndUndo();
 
             mbCustomValuesUsed = false;
             mrPagePropPanel.ClosePageMarginPopup();
diff --git a/sw/source/ui/sidebar/PagePropertyPanel.cxx b/sw/source/ui/sidebar/PagePropertyPanel.cxx
index 81a7910..b4b8b07 100644
--- a/sw/source/ui/sidebar/PagePropertyPanel.cxx
+++ b/sw/source/ui/sidebar/PagePropertyPanel.cxx
@@ -51,29 +51,60 @@
 
 #include <boost/bind.hpp>
 
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/document/XUndoManagerSupplier.hpp>
+
 #define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
 
 #define SetFldVal(rField, lValue) (rField).SetValue((rField).Normalize(lValue), FUNIT_TWIP)
 
+namespace {
+    const cssu::Reference< css::document::XUndoManager > getUndoManager( const cssu::Reference< css::frame::XFrame >& rxFrame )
+    {
+        const cssu::Reference< css::frame::XController >& xController = rxFrame->getController();
+        if ( xController.is() )
+        {
+            const cssu::Reference< css::frame::XModel >& xModel = xController->getModel();
+            if ( xModel.is() )
+            {
+                const cssu::Reference< css::document::XUndoManagerSupplier > xSuppUndo( xModel, cssu::UNO_QUERY_THROW );
+                if ( xSuppUndo.is() )
+                {
+                    const cssu::Reference< css::document::XUndoManager > xUndoManager( xSuppUndo->getUndoManager(), cssu::UNO_QUERY_THROW );
+                    return xUndoManager;
+                }
+            }
+        }
+
+        return cssu::Reference< css::document::XUndoManager > ();
+    }
+}
+
 
 namespace sw { namespace sidebar {
 
 PagePropertyPanel* PagePropertyPanel::Create (
     Window* pParent,
+    const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame,
     SfxBindings* pBindings)
 {
     if (pParent == NULL)
         throw ::com::sun::star::lang::IllegalArgumentException(A2S("no parent Window given to PagePropertyPanel::Create"), NULL, 0);
+    if ( ! rxFrame.is())
+        throw ::com::sun::star::lang::IllegalArgumentException(A2S("no XFrame given to PagePropertyPanel::Create"), NULL, 1);
     if (pBindings == NULL)
         throw ::com::sun::star::lang::IllegalArgumentException(A2S("no SfxBindings given to PagePropertyPanel::Create"), NULL, 2);
 
     return new PagePropertyPanel(
         pParent,
+        rxFrame,
         pBindings);
 }
 
 PagePropertyPanel::PagePropertyPanel(
             Window* pParent,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame,
             SfxBindings* pBindings)
     : Control(pParent, SW_RES(RID_PROPERTYPANEL_SWPAGE))
     , mpBindings(pBindings)
@@ -153,12 +184,22 @@ PagePropertyPanel::PagePropertyPanel(
     , m_aSwPageColControl(SID_ATTR_PAGE_COLUMN, *pBindings, *this)
     , m_aSwPagePgMetricControl(SID_ATTR_METRIC, *pBindings, *this)
 
-    , mpOrientationPopup()
-    , mpMarginPopup()
-    , mpSizePopup()
-    , mpColumnPopup()
+    , maOrientationPopup( this,
+                          ::boost::bind( &PagePropertyPanel::CreatePageOrientationControl, this, _1 ),
+                          A2S("Page orientation") )
+    , maMarginPopup( this,
+                     ::boost::bind( &PagePropertyPanel::CreatePageMarginControl, this, _1 ),
+                     A2S("Page margins") )
+    , maSizePopup( this,
+                   ::boost::bind( &PagePropertyPanel::CreatePageSizeControl, this, _1 ),
+                   A2S("Page size") )
+    , maColumnPopup( this,
+                     ::boost::bind( &PagePropertyPanel::CreatePageColumnControl, this, _1 ),
+                     A2S("Page columns") )
 
     , mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify( false )
+
+    , mxUndoManager( getUndoManager( rxFrame ) )
 {
     Initialize();
     mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify = true;
@@ -271,15 +312,7 @@ void PagePropertyPanel::Initialize()
 
 IMPL_LINK( PagePropertyPanel, ClickOrientationHdl, ToolBox*, pToolBox )
 {
-    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 );
+    maOrientationPopup.Show( *pToolBox );
 
     return 0L;
 }
@@ -287,6 +320,8 @@ IMPL_LINK( PagePropertyPanel, ClickOrientationHdl, ToolBox*, pToolBox )
 
 void PagePropertyPanel::ExecuteOrientationChange( const sal_Bool bLandscape )
 {
+    StartUndo();
+
     {
         // set new page orientation
         mpPageItem->SetLandscape( bLandscape );
@@ -337,12 +372,14 @@ void PagePropertyPanel::ExecuteOrientationChange( const sal_Bool bLandscape )
             }
         }
     }
+
+    EndUndo();
 }
 
 
 void PagePropertyPanel::ClosePageOrientationPopup()
 {
-    mpOrientationPopup->Hide();
+    maOrientationPopup.Hide();
 }
 
 
@@ -391,13 +428,7 @@ void PagePropertyPanel::ExecutePageLayoutChange( const bool bMirrored )
 
 IMPL_LINK( PagePropertyPanel, ClickMarginHdl, ToolBox*, pToolBox )
 {
-    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 );
+    maMarginPopup.Show( *pToolBox );
 
     return 0L;
 }
@@ -405,7 +436,7 @@ IMPL_LINK( PagePropertyPanel, ClickMarginHdl, ToolBox*, pToolBox )
 
 void PagePropertyPanel::ClosePageMarginPopup()
 {
-    mpMarginPopup->Hide();
+    maMarginPopup.Hide();
 }
 
 
@@ -437,13 +468,7 @@ void PagePropertyPanel::ExecuteSizeChange( const Paper ePaper )
 
 IMPL_LINK( PagePropertyPanel, ClickSizeHdl, ToolBox*, pToolBox )
 {
-    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 );
+    maSizePopup.Show( *pToolBox );
 
     return 0L;
 }
@@ -451,7 +476,7 @@ IMPL_LINK( PagePropertyPanel, ClickSizeHdl, ToolBox*, pToolBox )
 
 void PagePropertyPanel::ClosePageSizePopup()
 {
-    mpSizePopup->Hide();
+    maSizePopup.Hide();
 }
 
 
@@ -476,13 +501,7 @@ void PagePropertyPanel::ExecuteColumnChange( const sal_uInt16 nColumnType )
 
 IMPL_LINK( PagePropertyPanel, ClickColumnHdl, ToolBox*, pToolBox )
 {
-    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 );
+    maColumnPopup.Show( *pToolBox );
 
     return 0L;
 }
@@ -490,7 +509,7 @@ IMPL_LINK( PagePropertyPanel, ClickColumnHdl, ToolBox*, pToolBox )
 
 void PagePropertyPanel::ClosePageColumnPopup()
 {
-    mpColumnPopup->Hide();
+    maColumnPopup.Hide();
 }
 
 
@@ -766,4 +785,22 @@ void PagePropertyPanel::ChangeColumnImage( const sal_uInt16 nColumnType )
     }
 }
 
+
+void PagePropertyPanel::StartUndo()
+{
+    if ( mxUndoManager.is() );
+    {
+        mxUndoManager->enterUndoContext( A2S("") );
+    }
+}
+
+
+void PagePropertyPanel::EndUndo()
+{
+    if ( mxUndoManager.is() );
+    {
+        mxUndoManager->leaveUndoContext();
+    }
+}
+
 } } // end of namespace ::sw::sidebar
diff --git a/sw/source/ui/sidebar/PagePropertyPanel.hxx b/sw/source/ui/sidebar/PagePropertyPanel.hxx
index 413f305..3a0b66b 100644
--- a/sw/source/ui/sidebar/PagePropertyPanel.hxx
+++ b/sw/source/ui/sidebar/PagePropertyPanel.hxx
@@ -22,6 +22,9 @@
 #ifndef SW_SIDEBAR_PAGE_PROPERTY_PANEL_HXX
 #define SW_SIDEBAR_PAGE_PROPERTY_PANEL_HXX
 
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/document/XUndoManager.hpp>
+
 #include <svx/sidebar/Popup.hxx>
 
 #include <sfx2/sidebar/ControllerItem.hxx>
@@ -59,6 +62,7 @@ namespace sw { namespace sidebar {
     public:
         static PagePropertyPanel* Create(
             Window* pParent,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame,
             SfxBindings* pBindings );
 
         // interface of ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
@@ -96,9 +100,13 @@ namespace sw { namespace sidebar {
         void ExecuteColumnChange( const sal_uInt16 nColumnType );
         void ClosePageColumnPopup();
 
+        void StartUndo();
+        void EndUndo();
+
     private:
         PagePropertyPanel(
             Window* pParent,
+            const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame,
             SfxBindings* pBindings );
         virtual ~PagePropertyPanel(void);
 
@@ -195,10 +203,12 @@ namespace sw { namespace sidebar {
         ::sfx2::sidebar::ControllerItem m_aSwPagePgMetricControl;
 
         // popups
-        ::boost::scoped_ptr< ::svx::sidebar::Popup > mpOrientationPopup;
-        ::boost::scoped_ptr< ::svx::sidebar::Popup > mpMarginPopup;
-        ::boost::scoped_ptr< ::svx::sidebar::Popup > mpSizePopup;
-        ::boost::scoped_ptr< ::svx::sidebar::Popup > mpColumnPopup;
+        ::svx::sidebar::Popup maOrientationPopup;
+        ::svx::sidebar::Popup maMarginPopup;
+        ::svx::sidebar::Popup maSizePopup;
+        ::svx::sidebar::Popup maColumnPopup;
+
+        const cssu::Reference< css::document::XUndoManager > mxUndoManager;
 
         bool mbInvalidateSIDAttrPageOnSIDAttrPageSizeNotify;
 
diff --git a/sw/source/ui/sidebar/SwPanelFactory.cxx b/sw/source/ui/sidebar/SwPanelFactory.cxx
index 9d5f043..ee1a1cd 100644
--- a/sw/source/ui/sidebar/SwPanelFactory.cxx
+++ b/sw/source/ui/sidebar/SwPanelFactory.cxx
@@ -117,7 +117,7 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement (
 #define DoesResourceEndWith(s) rsResourceURL.endsWithAsciiL(s,strlen(s))
     if (DoesResourceEndWith("/PagePropertyPanel"))
     {
-        PagePropertyPanel* pPanel = PagePropertyPanel::Create( pParentWindow, pBindings );
+        PagePropertyPanel* pPanel = PagePropertyPanel::Create( pParentWindow, xFrame, pBindings );
         xElement = sfx2::sidebar::SidebarPanelBase::Create(
             rsResourceURL,
             xFrame,
diff --git a/sw/source/ui/sidebar/WrapPropertyPanel.cxx b/sw/source/ui/sidebar/WrapPropertyPanel.cxx
index e6cc75b..a13b09c 100644
--- a/sw/source/ui/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/ui/sidebar/WrapPropertyPanel.cxx
@@ -48,11 +48,11 @@ WrapPropertyPanel* WrapPropertyPanel::Create (
     SfxBindings* pBindings)
 {
     if (pParent == NULL)
-        throw ::com::sun::star::lang::IllegalArgumentException(A2S("no parent Window given to PagePropertyPanel::Create"), NULL, 0);
+        throw ::com::sun::star::lang::IllegalArgumentException(A2S("no parent Window given to WrapPropertyPanel::Create"), NULL, 0);
     if ( ! rxFrame.is())
-        throw ::com::sun::star::lang::IllegalArgumentException(A2S("no XFrame given to PagePropertyPanel::Create"), NULL, 1);
+        throw ::com::sun::star::lang::IllegalArgumentException(A2S("no XFrame given to WrapPropertyPanel::Create"), NULL, 1);
     if (pBindings == NULL)
-        throw ::com::sun::star::lang::IllegalArgumentException(A2S("no SfxBindings given to PagePropertyPanel::Create"), NULL, 2);
+        throw ::com::sun::star::lang::IllegalArgumentException(A2S("no SfxBindings given to WrapPropertyPanel::Create"), NULL, 2);
 
     return new WrapPropertyPanel(
         pParent,
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index f70ae7c..4ff3171 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -1189,9 +1189,10 @@ void SwView::StateTabWin(SfxItemSet& rSet)
         // provide left and right margins of current page style
         case SID_ATTR_PAGE_LRSPACE:
             {
-                SvxLongLRSpaceItem aLongLR(
-                    (long)aPageLRSpace.GetLeft(),
-                    (long)aPageLRSpace.GetRight(),
+                const SvxLRSpaceItem aTmpPageLRSpace( rDesc.GetMaster().GetLRSpace() );
+                const SvxLongLRSpaceItem aLongLR(
+                    (long)aTmpPageLRSpace.GetLeft(),
+                    (long)aTmpPageLRSpace.GetRight(),
                     SID_ATTR_PAGE_LRSPACE );
                 rSet.Put( aLongLR );
             }
commit 0ba322a27a8d0651f410741d79bbb7125a8ec2b7
Author: Andre Fischer <af at apache.org>
Date:   Tue Apr 23 12:56:35 2013 +0000

    122085: Fixed over-painting of fixed text.

diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index ca68a13..a77ab2e 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1090,23 +1090,26 @@ void CustomAnimationPane::DataChanged (const DataChangedEvent& rEvent)
 
 void CustomAnimationPane::UpdateLook (void)
 {
-    SetBackground(::sfx2::sidebar::Theme::GetWallpaper(::sfx2::sidebar::Theme::Paint_PanelBackground));
+    const Wallpaper aBackground (
+        ::sfx2::sidebar::Theme::GetWallpaper(
+            ::sfx2::sidebar::Theme::Paint_PanelBackground));
+    SetBackground(aBackground);
     if (mpFLModify != NULL)
-        mpFLModify->SetBackground(Wallpaper());
+        mpFLModify->SetBackground(aBackground);
     if (mpFLEffect != NULL)
-        mpFLEffect->SetBackground(Wallpaper());
+        mpFLEffect->SetBackground(aBackground);
     if (mpFTStart != NULL)
-        mpFTStart->SetBackground(Wallpaper());
+        mpFTStart->SetBackground(aBackground);
     if (mpFTProperty != NULL)
-        mpFTProperty->SetBackground(Wallpaper());
+        mpFTProperty->SetBackground(aBackground);
     if (mpFTSpeed != NULL)
-        mpFTSpeed->SetBackground(Wallpaper());
+        mpFTSpeed->SetBackground(aBackground);
     if (mpFTChangeOrder != NULL)
-        mpFTChangeOrder->SetBackground(Wallpaper());
+        mpFTChangeOrder->SetBackground(aBackground);
     if (mpFLSeperator1 != NULL)
-        mpFLSeperator1->SetBackground(Wallpaper());
+        mpFLSeperator1->SetBackground(aBackground);
     if (mpFLSeperator2 != NULL)
-        mpFLSeperator2->SetBackground(Wallpaper());
+        mpFLSeperator2->SetBackground(aBackground);
 }
 
 
commit 12df8f6dd3ed9ea37d9d0dd61bc56ada3bc062b1
Author: Armin Le Grand <alg at apache.org>
Date:   Tue Apr 23 12:53:29 2013 +0000

    i122111 Corrected LinePropertyPanel::NotifyItemUpdate implementation to use pState with more care

diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index 7f0e52e..328b5aa 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -231,12 +231,7 @@ LinePropertyPanel::LinePropertyPanel(
     mxFrame(rxFrame),
     mpBindings(pBindings),
     mbColorAvailable(true),
-    mbStyleAvailable(false),
-    mbDashAvailable(false),
-    mbTransAvailable(true),
-    mbWidthValuable(true),
-    mbStartAvailable(true),
-    mbEndAvailable(true)
+    mbWidthValuable(true)
 {
     Initialize();
     FreeResource();
@@ -405,42 +400,43 @@ void LinePropertyPanel::NotifyItemUpdate(
     const bool bIsEnabled)
 {
     (void)bIsEnabled;
+    const bool bDisabled(SFX_ITEM_DISABLED == eState);
 
     switch(nSID)
     {
         case SID_ATTR_LINE_COLOR:
         {
-            if( eState == SFX_ITEM_DISABLED)
+            if(bDisabled)
             {
                 mpFTColor->Disable();
                 mpTBColor->Disable();
-                mbColorAvailable = false;
-                mpColorUpdater->Update(COL_WHITE);
             }
             else
             {
                 mpFTColor->Enable();
                 mpTBColor->Enable();
-                const XLineColorItem* pItem = dynamic_cast< const XLineColorItem* >(pState);
+            }
 
-                if(eState >= SFX_ITEM_DEFAULT && pItem)
+            if(eState >= SFX_ITEM_DEFAULT)
+            {
+                const XLineColorItem* pItem = dynamic_cast< const XLineColorItem* >(pState);
+                if(pItem)
                 {
                     maColor = pItem->GetColorValue();
                     mbColorAvailable = true;
                     mpColorUpdater->Update(maColor);
-                }
-                else
-                {
-                    mbColorAvailable = false;
-                    mpColorUpdater->Update(COL_WHITE);
+                    break;
                 }
             }
+
+            mbColorAvailable = false;
+            mpColorUpdater->Update(COL_WHITE);
             break;
         }
         case SID_ATTR_LINE_DASH:
         case SID_ATTR_LINE_STYLE:
         {
-            if( eState == SFX_ITEM_DISABLED)
+            if(bDisabled)
             {
                 mpFTStyle->Disable();
                 mpLBStyle->Disable();
@@ -449,140 +445,159 @@ void LinePropertyPanel::NotifyItemUpdate(
             {
                 mpFTStyle->Enable();
                 mpLBStyle->Enable();
-                if( eState  >= SFX_ITEM_DEFAULT )
+            }
+
+            if(eState  >= SFX_ITEM_DEFAULT)
+            {
+                if(nSID == SID_ATTR_LINE_STYLE)
                 {
-                    if(nSID == SID_ATTR_LINE_STYLE)
-                    {
-                        const XLineStyleItem* pItem = dynamic_cast< const XLineStyleItem* >(pState);
+                    const XLineStyleItem* pItem = dynamic_cast< const XLineStyleItem* >(pState);
 
-                        if(pItem)
-                        {
-                            mbStyleAvailable =true;
-                            mpStyleItem.reset(pState ? (XLineStyleItem*)pItem->Clone() : 0);
-                        }
-                    }
-                    else if(nSID == SID_ATTR_LINE_DASH)
+                    if(pItem)
                     {
-                        const XLineDashItem* pItem = dynamic_cast< const XLineDashItem* >(pState);
+                        mpStyleItem.reset(pState ? (XLineStyleItem*)pItem->Clone() : 0);
+                    }
+                }
+                else // if(nSID == SID_ATTR_LINE_DASH)
+                {
+                    const XLineDashItem* pItem = dynamic_cast< const XLineDashItem* >(pState);
 
-                        if(pItem)
-                        {
-                            mbDashAvailable = true;
-                            mpDashItem.reset(pState ? (XLineDashItem*)pItem->Clone() : 0);
-                        }
+                    if(pItem)
+                    {
+                        mpDashItem.reset(pState ? (XLineDashItem*)pItem->Clone() : 0);
                     }
                 }
+            }
+            else
+            {
+                if(nSID == SID_ATTR_LINE_STYLE)
+                {
+                    mpStyleItem.reset(0);
+                }
                 else
                 {
-                    if(nSID == SID_ATTR_LINE_STYLE)
-                        mbStyleAvailable = false;
-                    else
-                        mbDashAvailable = false;
+                    mpDashItem.reset(0);
                 }
-
-                SelectLineStyle();
             }
+
+            SelectLineStyle();
             break;
         }
         case SID_ATTR_LINE_TRANSPARENCE:
         {
-            if( eState == SFX_ITEM_DISABLED )
+            if(bDisabled)
             {
                 mpFTTrancparency->Disable();
                 mpMFTransparent->Disable();
-                mpMFTransparent->SetValue(0);//add
-                mpMFTransparent->SetText(String());
-                mbTransAvailable = false;
             }
             else
             {
                 mpFTTrancparency->Enable();
                 mpMFTransparent->Enable();
-                mbTransAvailable = true;
+            }
+
+            if(eState >= SFX_ITEM_DEFAULT)
+            {
                 const XLineTransparenceItem* pItem = dynamic_cast< const XLineTransparenceItem* >(pState);
 
-                if(eState != SFX_ITEM_DONTCARE && pItem)
+                if(pItem)
                 {
                     mnTrans = pItem->GetValue();
                     mpMFTransparent->SetValue(mnTrans);
-                }
-                else
-                {
-                    mpMFTransparent->SetValue(0);//add
-                    mpMFTransparent->SetText(String());
+                    break;
                 }
             }
+
+            mpMFTransparent->SetValue(0);//add
+            mpMFTransparent->SetText(String());
             break;
         }
         case SID_ATTR_LINE_WIDTH:
         {
-            if(eState == SFX_ITEM_DISABLED)
+            if(bDisabled)
             {
                 mpTBWidth->Disable();
                 mpFTWidth->Disable();
             }
             else
             {
-                //enable
                 mpTBWidth->Enable();
                 mpFTWidth->Enable();
+            }
+
+            if(eState >= SFX_ITEM_DEFAULT)
+            {
                 const XLineWidthItem* pItem = dynamic_cast< const XLineWidthItem* >(pState);
 
-                if(eState >= SFX_ITEM_AVAILABLE && pItem)
+                if(pItem)
                 {
                     mnWidthCoreValue = pItem->GetValue();
                     mbWidthValuable = true;
-                }
-                else
-                {
-                    mbWidthValuable = false;
+                    SetWidthIcon();
+                    break;
                 }
             }
+
+            mbWidthValuable = false;
             SetWidthIcon();
             break;
         }
         case SID_ATTR_LINE_START:
         {
-            mpFTArrow->Enable();
-            mpLBStart->Enable();
+            if(bDisabled)
+            {
+                mpFTArrow->Disable();
+                mpLBStart->Disable();
+            }
+            else
+            {
+                mpFTArrow->Enable();
+                mpLBStart->Enable();
+            }
 
-            if(eState != SFX_ITEM_DONTCARE)
+            if(eState >= SFX_ITEM_DEFAULT)
             {
                 const XLineStartItem* pItem = dynamic_cast< const XLineStartItem* >(pState);
 
                 if(pItem)
                 {
-                    mbStartAvailable = true;    //add
                     mpStartItem.reset(pItem ? (XLineStartItem*)pItem->Clone() : 0);
                     SelectEndStyle(true);
                     break;
                 }
             }
 
-            mpLBStart->SetNoSelection();
-            mbStartAvailable = false;   //add
+            mpStartItem.reset(0);
+            SelectEndStyle(true);
             break;
         }
         case SID_ATTR_LINE_END:
         {
-            mpFTArrow->Enable();
-            mpLBEnd->Enable();
+            if(bDisabled)
+            {
+                mpFTArrow->Disable();
+                mpLBEnd->Disable();
+            }
+            else
+            {
+                mpFTArrow->Enable();
+                mpLBEnd->Enable();
+            }
 
-            if(eState != SFX_ITEM_DONTCARE)
+            if(eState >= SFX_ITEM_DEFAULT)
             {
                 const XLineEndItem* pItem = dynamic_cast< const XLineEndItem* >(pState);
 
                 if(pItem)
                 {
-                    mbEndAvailable = true;      //add
                     mpEndItem.reset(pItem ? (XLineEndItem*)pItem->Clone() : 0);
                     SelectEndStyle(false);
                     break;
                 }
             }
 
-            mpLBEnd->SetNoSelection();
-            mbEndAvailable = false;     //add
+            mpEndItem.reset(0);
+            SelectEndStyle(false);
             break;
         }
         case SID_LINEEND_LIST:
@@ -600,18 +615,23 @@ void LinePropertyPanel::NotifyItemUpdate(
         }
         case SID_ATTR_LINE_JOINT:
         {
-            if(eState == SFX_ITEM_DISABLED)
+            if(bDisabled)
             {
                 mpLBEdgeStyle->Disable();
             }
             else
             {
                 mpLBEdgeStyle->Enable();
+            }
+
+            if(eState >= SFX_ITEM_DEFAULT)
+            {
                 const XLineJointItem* pItem = dynamic_cast< const XLineJointItem* >(pState);
-                sal_uInt16 nEntryPos(0);
 
-                if(eState >= SFX_ITEM_AVAILABLE && pItem)
+                if(pItem)
                 {
+                    sal_uInt16 nEntryPos(0);
+
                     switch(pItem->GetValue())
                     {
                         case com::sun::star::drawing::LineJoint_MIDDLE:
@@ -639,33 +659,37 @@ void LinePropertyPanel::NotifyItemUpdate(
                         default:
                             break;
                     }
-                }
 
-                if(nEntryPos)
-                {
-                    mpLBEdgeStyle->SelectEntryPos(nEntryPos - 1);
-                }
-                else
-                {
-                    mpLBEdgeStyle->SetNoSelection();
+                    if(nEntryPos)
+                    {
+                        mpLBEdgeStyle->SelectEntryPos(nEntryPos - 1);
+                        break;
+                    }
                 }
             }
+
+            mpLBEdgeStyle->SetNoSelection();
             break;
         }
         case SID_ATTR_LINE_CAP:
         {
-            if(eState == SFX_ITEM_DISABLED)
+            if(bDisabled)
             {
                 mpLBCapStyle->Disable();
             }
             else
             {
                 mpLBCapStyle->Enable();
+            }
+
+            if(eState >= SFX_ITEM_DEFAULT)
+            {
                 const XLineCapItem* pItem = dynamic_cast< const XLineCapItem* >(pState);
-                sal_uInt16 nEntryPos(0);
 
-                if(eState >= SFX_ITEM_AVAILABLE && pItem)
+                if(pItem)
                 {
+                    sal_uInt16 nEntryPos(0);
+
                     switch(pItem->GetValue())
                     {
                         case com::sun::star::drawing::LineCap_BUTT:
@@ -687,16 +711,15 @@ void LinePropertyPanel::NotifyItemUpdate(
                         default:
                             break;
                     }
-                }
 
-                if(nEntryPos)
-                {
-                    mpLBCapStyle->SelectEntryPos(nEntryPos - 1);
-                }
-                else
-                {
-                    mpLBCapStyle->SetNoSelection();
+                    if(nEntryPos)
+                    {
+                        mpLBCapStyle->SelectEntryPos(nEntryPos - 1);
+                        break;
+                    }
                 }
+
+                mpLBCapStyle->SetNoSelection();
             }
             break;
         }
@@ -1067,7 +1090,7 @@ void  LinePropertyPanel::FillLineStyleList()
 
 void LinePropertyPanel::SelectLineStyle()
 {
-    if( !mbStyleAvailable || !mbDashAvailable )
+    if( !mpStyleItem.get() || !mpDashItem.get() )
     {
         mpLBStyle->SetNoSelection();
         return;
@@ -1112,13 +1135,12 @@ void LinePropertyPanel::SelectEndStyle(bool bStart)
 
     if(bStart)
     {
-        //<<add
-        if( !mbStartAvailable )
+        if( !mpStartItem.get() )
         {
             mpLBStart->SetNoSelection();
             return;
         }
-        //add end>>
+
         if(mpStartItem && mpLineEndList)
         {
             const basegfx::B2DPolyPolygon& rItemPolygon = mpStartItem->GetLineStartValue();
@@ -1133,18 +1155,20 @@ void LinePropertyPanel::SelectEndStyle(bool bStart)
                 }
             }
         }
+
         if(!bSelected)
+        {
             mpLBStart->SelectEntryPos( 0 );
+        }
     }
     else
     {
-        //<<add
-        if( !mbEndAvailable )
+        if( !mpEndItem.get() )
         {
             mpLBEnd->SetNoSelection();
             return;
         }
-        //add end>>
+
         if(mpEndItem && mpLineEndList)
         {
             const basegfx::B2DPolyPolygon& rItemPolygon = mpEndItem->GetLineEndValue();
@@ -1159,8 +1183,11 @@ void LinePropertyPanel::SelectEndStyle(bool bStart)
                 }
             }
         }
+
         if(!bSelected)
+        {
             mpLBEnd->SelectEntryPos( 0 );
+        }
     }
 }
 
diff --git a/svx/source/sidebar/line/LinePropertyPanel.hxx b/svx/source/sidebar/line/LinePropertyPanel.hxx
index fe93d65..c6f207f 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.hxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.hxx
@@ -152,12 +152,7 @@ private:
 
     /// bitfield
     bool                mbColorAvailable : 1;
-    bool                mbStyleAvailable : 1;
-    bool                mbDashAvailable : 1;
-    bool                mbTransAvailable : 1;
     bool                mbWidthValuable : 1;
-    bool                mbStartAvailable : 1;
-    bool                mbEndAvailable : 1;
 
     void SetupIcons(void);
     void Initialize();
commit 4b7c52c48793d005d3bd618b025b890ff94e7774
Author: Andre Fischer <af at apache.org>
Date:   Tue Apr 23 12:49:57 2013 +0000

    122144: Paint titles of sidebar decks and titles bold.

diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx
index 9a94f20..b7f8c44 100644
--- a/sfx2/source/sidebar/TitleBar.cxx
+++ b/sfx2/source/sidebar/TitleBar.cxx
@@ -138,6 +138,7 @@ void TitleBar::PaintTitle (const Rectangle& rTitleBox)
     Push(PUSH_FONT | PUSH_TEXTCOLOR);
 
     Font aFont(GetFont());
+    aFont.SetWeight(WEIGHT_BOLD);
     SetFont(aFont);
 
     // Paint title bar text.
commit eac056c47b2bf233ff36436136463cb3f3eb9e23
Author: Andre Fischer <af at apache.org>
Date:   Tue Apr 23 12:20:01 2013 +0000

    121960: Fixed typo that made the superscript button look like the subscript button.

diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 1c5c375..4536336 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -588,7 +588,7 @@ void TextPropertyPanel::SetupToolboxItems (void)
     maSuperScriptControl.SetupToolBoxItem(*mpToolBoxScriptSw, TBI_SUPER_SW);
     maSubScriptControl.SetupToolBoxItem(*mpToolBoxScriptSw, TBI_SUB_SW);
     //for sc and sd
-    maSubScriptControl.SetupToolBoxItem(*mpToolBoxScript, TBI_SUPER);
+    maSuperScriptControl.SetupToolBoxItem(*mpToolBoxScript, TBI_SUPER);
     maSubScriptControl.SetupToolBoxItem(*mpToolBoxScript, TBI_SUB);
     maSpacingControl.SetupToolBoxItem(*mpToolBoxSpacing, TBI_SPACING);
     maHighlightControl.SetupToolBoxItem(*mpToolBoxHighlight, TBI_HIGHLIGHT);
commit c9fe5d026f2081d493a198a33cf3b1d558166965
Author: Herbert Dürr <hdu at apache.org>
Date:   Tue Apr 23 12:12:50 2013 +0000

    add some documentation links to the assembler needed for the infamous UNO bridges
    
    ceterum censeo: good old C-linkage interoperability would be much more robust,
    reliable and easier to maintain compared to the current UNO-bridges approach
    of emulating the behaviour of the individual compiler, linker, dylib, unwind, etc.
    environments and thus being extremely platform specific. What an incredible waste
    of energy for little (if any) gain. SCNR.

diff --git a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s
index d107706..4801a94 100644
--- a/bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s
+++ b/bridges/source/cpp_uno/gcc3_freebsd_x86-64/call.s
@@ -76,6 +76,9 @@ privateSnippetExecutor:
 	ret
 .LFE3:
 	.size	privateSnippetExecutor, .-privateSnippetExecutor
+	# see http://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
+	# for details of the .eh_frame, the "Common Information Entry" and "Frame Description Entry" formats
+	# and http://mentorembedded.github.io/cxx-abi/exceptions.pdf for more info
 	.section	.eh_frame,"a", at progbits
 .Lframe1:
 	.long	.LECIE1-.LSCIE1
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
index d107706..4801a94 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
@@ -76,6 +76,9 @@ privateSnippetExecutor:
 	ret
 .LFE3:
 	.size	privateSnippetExecutor, .-privateSnippetExecutor
+	# see http://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
+	# for details of the .eh_frame, the "Common Information Entry" and "Frame Description Entry" formats
+	# and http://mentorembedded.github.io/cxx-abi/exceptions.pdf for more info
 	.section	.eh_frame,"a", at progbits
 .Lframe1:
 	.long	.LECIE1-.LSCIE1
commit dc36f82362dc1fb159668937cde7cedbc3fad503
Author: Andre Fischer <af at apache.org>
Date:   Tue Apr 23 11:33:28 2013 +0000

    122051: Sidebar handles more Writer variants.

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index bee0941..c483ba2 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -240,11 +240,11 @@
             DrawImpress,      OutlineText,        visible                    ;
             DrawImpress,      Table,              visible                    ;
             DrawImpress,      TextObject,         visible                    ;
-            WriterAndWeb,     Annotation,         visible                    ;
-            WriterAndWeb,     DrawText,           visible                    ;
-            WriterAndWeb,     Table,              visible                    ;
-            WriterAndWeb,     Text,               visible                    ;
-            WriterAndWeb,     default,            visible                    ;
+            WriterVariants,   Annotation,         visible                    ;
+            WriterVariants,   DrawText,           visible                    ;
+            WriterVariants,   Table,              visible                    ;
+            WriterVariants,   Text,               visible                    ;
+            WriterVariants,   default,            visible                    ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
@@ -344,11 +344,11 @@
         </prop>
         <prop oor:name="ContextList">
           <value oor:separator=";">
-            Calc,         Draw,       visible ;
-            DrawImpress,  3DObject,   visible ;
-            DrawImpress,  Draw,       visible ;
-            DrawImpress,  TextObject, hidden  ;
-            WriterAndWeb, Draw,       visible ;
+            Calc,           Draw,       visible ;
+            DrawImpress,    3DObject,   visible ;
+            DrawImpress,    Draw,       visible ;
+            DrawImpress,    TextObject, hidden  ;
+            WriterVariants, Draw,       visible ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
@@ -374,13 +374,13 @@
         </prop>
         <prop oor:name="ContextList">
           <value oor:separator=";">
-            Calc,         Draw,       visible ;
-            Calc,         Graphic,    visible ;
-            DrawImpress,  3DObject,   visible ;
-            DrawImpress,  Draw,       visible ;
-            DrawImpress,  Graphic,    visible ;
-            DrawImpress,  TextObject, hidden  ;
-            WriterAndWeb, Draw,       visible ;
+            Calc,           Draw,       visible ;
+            Calc,           Graphic,    visible ;
+            DrawImpress,    3DObject,   visible ;
+            DrawImpress,    Draw,       visible ;
+            DrawImpress,    Graphic,    visible ;
+            DrawImpress,    TextObject, hidden  ;
+            WriterVariants, Draw,       visible ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
@@ -432,26 +432,26 @@
         </prop>
         <prop oor:name="ContextList">
           <value oor:separator=";">
-            Calc,         Chart,       visible                       ;
-            Calc,         Draw,        hidden                        ;
-            Calc,         Form,        visible                       ;
-            Calc,         Graphic,     hidden                        ;
-            Calc,         Media,       visible                       ;
-            Calc,         MultiObject, visible                       ;
-            Calc,         OLE,         visible                       ;
-            DrawImpress,  3DObject,    visible                       ;
-            DrawImpress,  Draw,        hidden                        ;
-            DrawImpress,  Form,        visible                       ;
-            DrawImpress,  Graphic,     hidden                        ;
-            DrawImpress,  Media,       visible                       ;
-            DrawImpress,  MultiObject, visible                       ;
-            DrawImpress,  OLE,         visible                       ;
-            DrawImpress,  TextObject,  hidden                        ;
-            WriterAndWeb, Draw,        hidden                        ;
-            WriterAndWeb, Form,        visible                       ;
-            WriterAndWeb, Graphic,     visible, .uno:GraphicDialog   ;
-            WriterAndWeb, Media,       visible                       ;
-            WriterAndWeb, OLE,         visible, .uno:FrameDialog     ;
+            Calc,           Chart,       visible                       ;
+            Calc,           Draw,        hidden                        ;
+            Calc,           Form,        visible                       ;
+            Calc,           Graphic,     hidden                        ;
+            Calc,           Media,       visible                       ;
+            Calc,           MultiObject, visible                       ;
+            Calc,           OLE,         visible                       ;
+            DrawImpress,    3DObject,    visible                       ;
+            DrawImpress,    Draw,        hidden                        ;
+            DrawImpress,    Form,        visible                       ;
+            DrawImpress,    Graphic,     hidden                        ;
+            DrawImpress,    Media,       visible                       ;
+            DrawImpress,    MultiObject, visible                       ;
+            DrawImpress,    OLE,         visible                       ;
+            DrawImpress,    TextObject,  hidden                        ;
+            WriterVariants, Draw,        hidden                        ;
+            WriterVariants, Form,        visible                       ;
+            WriterVariants, Graphic,     visible, .uno:GraphicDialog   ;
+            WriterVariants, Media,       visible                       ;
+            WriterVariants, OLE,         visible, .uno:FrameDialog     ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
@@ -476,7 +476,7 @@
           <value oor:separator=";">
             Calc,         Graphic,     visible   ;
             DrawImpress,  Graphic,     visible   ;
-            WriterAndWeb, Graphic,     visible   ;
+            WriterVariants, Graphic,     visible   ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
@@ -802,18 +802,18 @@
         </prop>
         <prop oor:name="ContextList">
           <value oor:separator=";">
-            Calc,         DrawText,   visible ;
-            DrawImpress,  3DObject,   hidden  ;
-            DrawImpress,  Draw,       hidden  ;
-            DrawImpress,  DrawText,   visible ;
-            DrawImpress,  Graphic,    hidden  ;
-            DrawImpress,  Table,      visible ;
-            DrawImpress,  TextObject, visible ;
-            WriterAndWeb, Annotation, visible ;
-            WriterAndWeb, DrawText,   visible ;
-            WriterAndWeb, Table,      visible ;
-            WriterAndWeb, Text,       visible ;
-            WriterAndWeb, default,    visible ;
+            Calc,           DrawText,   visible ;
+            DrawImpress,    3DObject,   hidden  ;
+            DrawImpress,    Draw,       hidden  ;
+            DrawImpress,    DrawText,   visible ;
+            DrawImpress,    Graphic,    hidden  ;
+            DrawImpress,    Table,      visible ;
+            DrawImpress,    TextObject, visible ;
+            WriterVariants, Annotation, visible ;
+            WriterVariants, DrawText,   visible ;
+            WriterVariants, Table,      visible ;
+            WriterVariants, Text,       visible ;
+            WriterVariants, default,    visible ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
@@ -867,7 +867,7 @@
         </prop>
         <prop oor:name="ContextList">
           <value oor:separator=";">
-            WriterAndWeb, any, visible ;
+            WriterVariants, any, visible ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
index 28c1491..462bc8b 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
@@ -70,6 +70,9 @@
           separated values (note that values are case sensitive):
           1  Application name. Valid values are
                  com.sun.star.text.TextDocument
+                 com.sun.star.text.GlobalDocument
+                 com.sun.star.text.WebDocument
+                 com.sun.star.xforms.XMLFormDocument
                  com.sun.star.sheet.SpreadsheetDocument
                  com.sun.star.presentation.PresentationDocument
                  com.sun.star.drawing.DrawingDocument
@@ -82,9 +85,10 @@
 
              Shortcuts for multiple applications:
                  DrawImpress
-                 WriterAndWeb
+                 WriterVariants
              These shortcuts exist for even more convenience and handle the frequent case of Draw
-	     and Impress as well as Writer and WriterWeb having otherwise identical context descriptions.
+	     and Impress as well as different variants of the Writer where they have otherwise 
+	     identical context descriptions.
              
              Special values:
                  any
diff --git a/sfx2/inc/sfx2/sidebar/EnumContext.hxx b/sfx2/inc/sfx2/sidebar/EnumContext.hxx
index ad436d8..53146d4 100644
--- a/sfx2/inc/sfx2/sidebar/EnumContext.hxx
+++ b/sfx2/inc/sfx2/sidebar/EnumContext.hxx
@@ -37,7 +37,9 @@ public:
     enum Application
     {
         Application_Writer,
+        Application_WriterGlobal,
         Application_WriterWeb,
+        Application_WriterXML,
         Application_Calc,
         Application_Draw,
         Application_Impress,
@@ -46,8 +48,8 @@ public:
         // case that Draw and Impress use identical context configurations.
         Application_DrawImpress,
 
-        // Also for your convenience for either Writer or WriterWeb.
-        Application_WriterAndWeb,
+        // Also for your convenience for the different variants of Writer documents.
+        Application_WriterVariants,
 
         // Used only by deck or panel descriptors.  Matches any
         // application.
diff --git a/sfx2/source/sidebar/EnumContext.cxx b/sfx2/source/sidebar/EnumContext.cxx
index 8ee46dc..76eda92 100644
--- a/sfx2/source/sidebar/EnumContext.cxx
+++ b/sfx2/source/sidebar/EnumContext.cxx
@@ -95,8 +95,10 @@ sal_Int32 EnumContext::GetCombinedContext_DI (void) const
             return CombinedEnumContext(Application_DrawImpress, meContext);
 
         case Application_Writer:
+        case Application_WriterGlobal:
         case Application_WriterWeb:
-            return CombinedEnumContext(Application_WriterAndWeb, meContext);
+        case Application_WriterXML:
+            return CombinedEnumContext(Application_WriterVariants, meContext);
 
         default:
             return CombinedEnumContext(meApplication, meContext);
@@ -158,7 +160,9 @@ void EnumContext::ProvideApplicationContainers (void)
     {
         maApplicationVector.resize(static_cast<size_t>(EnumContext::__LastApplicationEnum)+1);
         AddEntry(A2S("com.sun.star.text.TextDocument"), EnumContext::Application_Writer);
+        AddEntry(A2S("com.sun.star.text.GlobalDocument"), EnumContext::Application_WriterGlobal);
         AddEntry(A2S("com.sun.star.text.WebDocument"), EnumContext::Application_WriterWeb);
+        AddEntry(A2S("com.sun.star.xforms.XMLFormDocument"), EnumContext::Application_WriterXML);
         AddEntry(A2S("com.sun.star.sheet.SpreadsheetDocument"), EnumContext::Application_Calc);
         AddEntry(A2S("com.sun.star.drawing.DrawingDocument"), EnumContext::Application_Draw);
         AddEntry(A2S("com.sun.star.presentation.PresentationDocument"), EnumContext::Application_Impress);
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index 5f253a6..1f3ce90 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -412,35 +412,41 @@ void ResourceManager::ReadContextList (
                     : sMenuCommandOverride)
                 : rsDefaultMenuCommand);
 
+        // Setup a list of application enums.  Note that the
+        // application name may result in more than one value (eg
+        // DrawImpress will result in two enums, one for Draw and one
+        // for Impress).
+        ::std::vector<EnumContext::Application> aApplications;
         EnumContext::Application eApplication (EnumContext::GetApplicationEnum(sApplicationName));
-        EnumContext::Application eApplication2 (EnumContext::Application_None);
         if (eApplication == EnumContext::Application_None
             && !sApplicationName.equals(EnumContext::GetApplicationName(EnumContext::Application_None)))
         {
             // Handle some special names: abbreviations that make
             // context descriptions more readable.
             if (sApplicationName.equalsAscii("Writer"))
-                eApplication = EnumContext::Application_Writer;
+                aApplications.push_back(EnumContext::Application_Writer);
             else if (sApplicationName.equalsAscii("Calc"))
-                eApplication = EnumContext::Application_Calc;
+                aApplications.push_back(EnumContext::Application_Calc);
             else if (sApplicationName.equalsAscii("Draw"))
-                eApplication = EnumContext::Application_Draw;
+                aApplications.push_back(EnumContext::Application_Draw);
             else if (sApplicationName.equalsAscii("Impress"))
-                eApplication = EnumContext::Application_Impress;
+                aApplications.push_back(EnumContext::Application_Impress);
             else if (sApplicationName.equalsAscii("DrawImpress"))
             {
                 // A special case among the special names:  it is
                 // common to use the same context descriptions for
                 // both Draw and Impress.  This special case helps to
                 // avoid duplication in the .xcu file.
-                eApplication = EnumContext::Application_Draw;
-                eApplication2 = EnumContext::Application_Impress;
+                aApplications.push_back(EnumContext::Application_Draw);
+                aApplications.push_back(EnumContext::Application_Impress);
             }
-            else if (sApplicationName.equalsAscii("WriterAndWeb"))
+            else if (sApplicationName.equalsAscii("WriterVariants"))
             {
-                // Another special case for Writer and WriterWeb.
-                eApplication = EnumContext::Application_Writer;
-                eApplication2 = EnumContext::Application_WriterWeb;
+                // Another special case for all Writer variants.
+                aApplications.push_back(EnumContext::Application_Writer);
+                aApplications.push_back(EnumContext::Application_WriterGlobal);
+                aApplications.push_back(EnumContext::Application_WriterWeb);
+                aApplications.push_back(EnumContext::Application_WriterXML);
             }
             else
             {
@@ -448,7 +454,13 @@ void ResourceManager::ReadContextList (
                 continue;
             }
         }
+        else
+        {
+            // No conversion of the application name necessary.
+            aApplications.push_back(eApplication);
+        }
 
+        // Setup the actual context enum.
         const EnumContext::Context eContext (EnumContext::GetContextEnum(sContextName));
         if (eContext == EnumContext::Context_Unknown)
         {
@@ -456,6 +468,8 @@ void ResourceManager::ReadContextList (
             continue;
         }
 
+        // Setup the flag that controls whether a deck/pane is
+        // initially visible/expanded.
         bool bIsInitiallyVisible;
         if (sInitialState.equalsAscii("visible"))
             bIsInitiallyVisible = true;
@@ -467,20 +481,21 @@ void ResourceManager::ReadContextList (
             continue;
         }
 
-        if (eApplication != EnumContext::Application_None)
-            rContextList.AddContextDescription(
-                Context(
-                    EnumContext::GetApplicationName(eApplication),
-                    EnumContext::GetContextName(eContext)),
-                bIsInitiallyVisible,
-                sMenuCommand);
-        if (eApplication2 != EnumContext::Application_None)
-            rContextList.AddContextDescription(
-                Context(
-                    EnumContext::GetApplicationName(eApplication2),
-                    EnumContext::GetContextName(eContext)),
-                bIsInitiallyVisible,
-                sMenuCommand);
+        // Add context descriptors.
+        for (::std::vector<EnumContext::Application>::const_iterator
+                 iApplication(aApplications.begin()),
+                 iEnd(aApplications.end());
+             iApplication!=iEnd;
+             ++iApplication)
+        {
+            if (*iApplication != EnumContext::Application_None)
+                rContextList.AddContextDescription(
+                    Context(
+                        EnumContext::GetApplicationName(*iApplication),
+                        EnumContext::GetContextName(eContext)),
+                    bIsInitiallyVisible,
+                    sMenuCommand);
+        }
     }
 }
 
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index cbcc216..f587a2f 100755
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -205,8 +205,8 @@ void ParaPropertyPanel::HandleContextChange (
             maTbxProDemoteBackground->Show();
             break;
 
-        case CombinedEnumContext(Application_WriterAndWeb, Context_Default):
-        case CombinedEnumContext(Application_WriterAndWeb, Context_Text):
+        case CombinedEnumContext(Application_WriterVariants, Context_Default):
+        case CombinedEnumContext(Application_WriterVariants, Context_Text):
             maTBxVertAlign->Hide();
             maTBxVertAlignBackground->Hide();
             maTBxBackColor->Show();
@@ -221,7 +221,7 @@ void ParaPropertyPanel::HandleContextChange (
             maTbxProDemoteBackground->Hide();
             break;
 
-        case CombinedEnumContext(Application_WriterAndWeb, Context_Table):
+        case CombinedEnumContext(Application_WriterVariants, Context_Table):
             maTBxVertAlign->Show();
             maTBxVertAlignBackground->Show();
             maTBxBackColor->Show();
@@ -235,7 +235,7 @@ void ParaPropertyPanel::HandleContextChange (
             maTbxProDemoteBackground->Hide();
             break;
 
-        case CombinedEnumContext(Application_WriterAndWeb, Context_DrawText):
+        case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
             maTBxVertAlign->Show();
             maTBxVertAlignBackground->Show();
             maTBxBackColor->Hide();
@@ -249,7 +249,7 @@ void ParaPropertyPanel::HandleContextChange (
             maTbxProDemoteBackground->Hide();
             break;
 
-        case CombinedEnumContext(Application_WriterAndWeb, Context_Annotation):
+        case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
             maTBxVertAlign->Hide();
             maTBxVertAlignBackground->Hide();
             maTBxBackColor->Hide();
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 7ad85ee..2bafcee 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -305,15 +305,15 @@ void PosSizePropertyPanel::HandleContextChange(
     sal_Int32 nLayoutMode (0);
     switch (maContext.GetCombinedContext_DI())
     {
-        case CombinedEnumContext(Application_WriterAndWeb, Context_Draw):
+        case CombinedEnumContext(Application_WriterVariants, Context_Draw):
             nLayoutMode = 0;
             break;
 
-        case CombinedEnumContext(Application_WriterAndWeb, Context_Graphic):
-        case CombinedEnumContext(Application_WriterAndWeb, Context_Media):
-        case CombinedEnumContext(Application_WriterAndWeb, Context_Frame):
-        case CombinedEnumContext(Application_WriterAndWeb, Context_OLE):
-        case CombinedEnumContext(Application_WriterAndWeb, Context_Form):
+        case CombinedEnumContext(Application_WriterVariants, Context_Graphic):
+        case CombinedEnumContext(Application_WriterVariants, Context_Media):
+        case CombinedEnumContext(Application_WriterVariants, Context_Frame):
+        case CombinedEnumContext(Application_WriterVariants, Context_OLE):
+        case CombinedEnumContext(Application_WriterVariants, Context_Form):
             nLayoutMode = 1;
             break;
 
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 92cf44c..1c5c375 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -286,7 +286,7 @@ void TextPropertyPanel::HandleContextChange (
     }
 
     maContext = aContext;
-    switch (maContext.GetCombinedContext_DI())
+    switch (maContext.GetCombinedContext_DI()) //
     {
         case CombinedEnumContext(Application_Calc, Context_Cell):
         case CombinedEnumContext(Application_Calc, Context_Pivot):
@@ -305,8 +305,8 @@ void TextPropertyPanel::HandleContextChange (
             break;
         }
 
-        case CombinedEnumContext(Application_WriterAndWeb, Context_Text):
-        case CombinedEnumContext(Application_WriterAndWeb, Context_Table):
+        case CombinedEnumContext(Application_WriterVariants, Context_Text):
+        case CombinedEnumContext(Application_WriterVariants, Context_Table):
         {
             mpToolBoxScriptSw->Show();
             mpToolBoxScript->Hide();
@@ -322,8 +322,8 @@ void TextPropertyPanel::HandleContextChange (
             break;
         }
 
-        case CombinedEnumContext(Application_Writer, Context_DrawText):
-        case CombinedEnumContext(Application_Writer, Context_Annotation):
+        case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
+        case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
         {
             mpToolBoxScriptSw->Show();
             mpToolBoxScript->Hide();
commit 52450684d9c02f0d6d96bff731c348d85ca4ced1
Author: Andre Fischer <af at apache.org>
Date:   Tue Apr 23 10:41:58 2013 +0000

    122144: Use AOO icons for flipping shapes.

diff --git a/default_images/svx/res/symphony/FlipHorizontally_16x16.png b/default_images/svx/res/symphony/FlipHorizontally_16x16.png
deleted file mode 100755
index 281ee46..0000000
Binary files a/default_images/svx/res/symphony/FlipHorizontally_16x16.png and /dev/null differ
diff --git a/default_images/svx/res/symphony/FlipVertically_16x16.png b/default_images/svx/res/symphony/FlipVertically_16x16.png
deleted file mode 100755
index 7c9c4c4..0000000
Binary files a/default_images/svx/res/symphony/FlipVertically_16x16.png and /dev/null differ
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 2266692..7ad85ee 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -31,6 +31,7 @@
 #include <sfx2/bindings.hxx>
 #include <sfx2/viewsh.hxx>
 #include <sfx2/objsh.hxx>
+#include <sfx2/imagemgr.hxx>
 #include <svx/dlgutil.hxx>
 #include <unotools/viewoptions.hxx>
 #include <vcl/virdev.hxx>
@@ -101,8 +102,6 @@ PosSizePropertyPanel::PosSizePropertyPanel(
     maAutoWidthControl(SID_ATTR_TRANSFORM_AUTOWIDTH, *pBindings, *this),
     maAutoHeightControl(SID_ATTR_TRANSFORM_AUTOHEIGHT, *pBindings, *this),
     m_aMetricCtl(SID_ATTR_METRIC, *pBindings, *this),
-    maImgFlipHori(SVX_RES(IMG_HORI_FLIP)),
-    maImgFlipVert(SVX_RES(IMG_VERT_FLIP)),
     mxFrame(rxFrame),
     maContext(),
     mpBindings(pBindings),
@@ -184,8 +183,12 @@ void PosSizePropertyPanel::Initialize()
 
     //flip:
     mpFlipTbx->SetSelectHdl( LINK( this, PosSizePropertyPanel, FlipHdl) );
-    mpFlipTbx->SetItemImage(FLIP_HORIZONTAL,maImgFlipHori);
-    mpFlipTbx->SetItemImage(FLIP_VERTICAL,maImgFlipVert);
+    mpFlipTbx->SetItemImage(
+        FLIP_HORIZONTAL,
+        GetImage(mxFrame, A2S(".uno:FlipHorizontal"), sal_False, Theme::IsHighContrastMode()));
+    mpFlipTbx->SetItemImage(
+        FLIP_VERTICAL,
+        GetImage(mxFrame, A2S(".uno:FlipVertical"), sal_False, Theme::IsHighContrastMode()));
     mpFlipTbx->SetQuickHelpText(FLIP_HORIZONTAL,String(SVX_RES(STR_QH_HORI_FLIP))); //Add
     mpFlipTbx->SetQuickHelpText(FLIP_VERTICAL,String(SVX_RES(STR_QH_VERT_FLIP))); //Add
 
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hrc b/svx/source/sidebar/possize/PosSizePropertyPanel.hrc
index eb08468..92bb134 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hrc
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hrc
@@ -37,8 +37,6 @@
 #define DIAL_CONTROL                                        17
 #define FLIP_HORIZONTAL                                     18
 #define FLIP_VERTICAL                                       19
-#define IMG_HORI_FLIP                                       20
-#define IMG_VERT_FLIP                                       21
 #define FT_FLIP                                             22
 #define STR_QH_HORI_FLIP                                    23
 #define STR_QH_VERT_FLIP                                    24
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index aa2c42a..5e865d7 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -125,10 +125,6 @@ private:
     ::sfx2::sidebar::ControllerItem         maAutoHeightControl;
     ::sfx2::sidebar::ControllerItem         m_aMetricCtl;
 
-    // images from ressource
-    Image                                   maImgFlipHori;
-    Image                                   maImgFlipVert;
-
     cssu::Reference< css::frame::XFrame >   mxFrame;
     ::sfx2::sidebar::EnumContext            maContext;
     SfxBindings*                            mpBindings;
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.src b/svx/source/sidebar/possize/PosSizePropertyPanel.src
index a6b0621..ad3b948 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.src
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.src
@@ -180,20 +180,12 @@ Control RID_SIDEBAR_POSSIZE_PANEL
                 Identifier = FLIP_VERTICAL ;
                 Text [ en-US ] = "Flip Vertically" ;
                 HelpID = HID_PROPERTY_PANEL_POSIZE_FLIP_VERTICAL;
-                ItemBitmap = Bitmap
-                {
-                    File = "symphony/FlipVertically_16x16.png";
-                };
             };
             ToolBoxItem
             {
                 Identifier = FLIP_HORIZONTAL ;
                 Text [ en-US ] = "Flip Horizontally" ;
                 HelpID = HID_PROPERTY_PANEL_POSIZE_FLIP_HORIZONTAL;
-                ItemBitmap = Bitmap
-                {
-                    File = "symphony/FlipHorizontally_16x16.png";
-                };
             };
         };
     };
@@ -207,15 +199,6 @@ Control RID_SIDEBAR_POSSIZE_PANEL
         Text [ en-US ] = "Flip the selected object vertically.";
     };
 
-    Image IMG_HORI_FLIP
-    {
-        ImageBitmap = Bitmap{File = "symphony/FlipHorizontally_16x16.png";};
-    };
-    Image IMG_VERT_FLIP
-    {
-        ImageBitmap = Bitmap{File = "symphony/FlipVertically_16x16.png";};
-    };
-
     Control DIAL_CONTROL
     {
         Pos = MAP_APPFONT ( ROTATE_CONTROL_X , ROTATE_CONTROL_Y );


More information about the Libreoffice-commits mailing list