[Libreoffice-commits] core.git: 3 commits - sw/AllLangResTarget_sw.mk sw/source sw/uiconfig sw/UIConfig_swriter.mk

Jan Holesovsky kendy at suse.cz
Sun Jul 28 06:58:16 PDT 2013


 sw/AllLangResTarget_sw.mk                  |    1 
 sw/UIConfig_swriter.mk                     |    1 
 sw/source/ui/sidebar/WrapPropertyPanel.cxx |   74 ++++++-------
 sw/source/ui/sidebar/WrapPropertyPanel.hrc |   38 ------
 sw/source/ui/sidebar/WrapPropertyPanel.hxx |   16 +-
 sw/source/ui/sidebar/WrapPropertyPanel.src |   86 ---------------
 sw/uiconfig/swriter/ui/sidebarwrap.ui      |  158 +++++++++++++++++++++++++++++
 7 files changed, 205 insertions(+), 169 deletions(-)

New commits:
commit b5e3929a35965f32638a80c3627b98f4fa306875
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Sun Jul 28 15:53:47 2013 +0200

    sidebar: Make WrapPropertyPanel .ui resizable.
    
    Change-Id: I75b7a9e42f937528897114b1d056716ebdce697d

diff --git a/sw/uiconfig/swriter/ui/sidebarwrap.ui b/sw/uiconfig/swriter/ui/sidebarwrap.ui
index 1f04ff3..d964341 100644
--- a/sw/uiconfig/swriter/ui/sidebarwrap.ui
+++ b/sw/uiconfig/swriter/ui/sidebarwrap.ui
@@ -17,16 +17,18 @@
           <object class="GtkBox" id="box2">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="spacing">6</property>
+            <property name="homogeneous">True</property>
             <child>
               <object class="GtkRadioButton" id="buttonnone">
-                <property name="width_request">30</property>
-                <property name="height_request">30</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <property name="tooltip_markup" translatable="yes">None</property>
                 <property name="tooltip_text" translatable="yes">None</property>
                 <property name="action_name">.uno:WrapOff</property>
+                <property name="use_action_appearance">False</property>
                 <property name="xalign">0</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
@@ -34,20 +36,19 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="padding">10</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <object class="GtkRadioButton" id="buttonbefore">
-                <property name="width_request">30</property>
-                <property name="height_request">30</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <property name="tooltip_markup" translatable="yes">Before</property>
                 <property name="tooltip_text" translatable="yes">Before</property>
                 <property name="action_name">.uno:WrapLeft</property>
+                <property name="use_action_appearance">False</property>
                 <property name="xalign">0</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
@@ -55,20 +56,19 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="padding">10</property>
                 <property name="position">1</property>
               </packing>
             </child>
             <child>
               <object class="GtkRadioButton" id="buttonafter">
-                <property name="width_request">30</property>
-                <property name="height_request">30</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <property name="tooltip_markup" translatable="yes">After</property>
                 <property name="tooltip_text" translatable="yes">After</property>
                 <property name="action_name">.uno:WrapRight</property>
+                <property name="use_action_appearance">False</property>
                 <property name="xalign">0</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
@@ -76,20 +76,19 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="padding">10</property>
                 <property name="position">2</property>
               </packing>
             </child>
             <child>
               <object class="GtkRadioButton" id="buttonparallel">
-                <property name="width_request">30</property>
-                <property name="height_request">30</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <property name="tooltip_markup" translatable="yes">Parallel</property>
                 <property name="tooltip_text" translatable="yes">Parallel</property>
                 <property name="action_name">.uno:WrapOn</property>
+                <property name="use_action_appearance">False</property>
                 <property name="xalign">0</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
@@ -97,20 +96,19 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="padding">10</property>
                 <property name="position">3</property>
               </packing>
             </child>
             <child>
               <object class="GtkRadioButton" id="buttonthrough">
-                <property name="width_request">30</property>
-                <property name="height_request">30</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <property name="tooltip_markup" translatable="yes">Through</property>
                 <property name="tooltip_text" translatable="yes">Through</property>
                 <property name="action_name">.uno:WrapThrough</property>
+                <property name="use_action_appearance">False</property>
                 <property name="xalign">0</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
@@ -118,20 +116,19 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="padding">10</property>
                 <property name="position">4</property>
               </packing>
             </child>
             <child>
               <object class="GtkRadioButton" id="buttonoptimal">
-                <property name="width_request">30</property>
-                <property name="height_request">30</property>
+                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
                 <property name="tooltip_markup" translatable="yes">Optimal</property>
                 <property name="tooltip_text" translatable="yes">Optimal</property>
                 <property name="action_name">.uno:WrapIdeal</property>
+                <property name="use_action_appearance">False</property>
                 <property name="xalign">0</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
@@ -139,7 +136,6 @@
               <packing>
                 <property name="expand">False</property>
                 <property name="fill">True</property>
-                <property name="padding">10</property>
                 <property name="position">5</property>
               </packing>
             </child>
commit 9c3191bf0ecf42f4ce96a10aa2e3be4faa851557
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Sun Jul 28 15:43:00 2013 +0200

    sidebar: Small cleanup in WrapPropertyPanel.
    
    Change-Id: Ie751dfef7ce48942a51577979e16b88a52919f56

diff --git a/sw/source/ui/sidebar/WrapPropertyPanel.cxx b/sw/source/ui/sidebar/WrapPropertyPanel.cxx
index a07be42..ada6e72 100644
--- a/sw/source/ui/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/ui/sidebar/WrapPropertyPanel.cxx
@@ -38,9 +38,6 @@ const char UNO_WRAPON[] = ".uno:WrapOn";
 const char UNO_WRAPTHROUGH[] = ".uno:WrapThrough";
 const char UNO_WRAPIDEAL[] = ".uno:WrapIdeal";
 
-#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
-
-
 namespace sw { namespace sidebar {
 
 WrapPropertyPanel* WrapPropertyPanel::Create (
@@ -49,11 +46,11 @@ WrapPropertyPanel* WrapPropertyPanel::Create (
     SfxBindings* pBindings)
 {
     if (pParent == NULL)
-        throw ::com::sun::star::lang::IllegalArgumentException(A2S("no parent Window given to WrapPropertyPanel::Create"), NULL, 0);
+        throw ::com::sun::star::lang::IllegalArgumentException("no parent Window given to WrapPropertyPanel::Create", NULL, 0);
     if ( ! rxFrame.is())
-        throw ::com::sun::star::lang::IllegalArgumentException(A2S("no XFrame given to WrapPropertyPanel::Create"), NULL, 1);
+        throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to WrapPropertyPanel::Create", NULL, 1);
     if (pBindings == NULL)
-        throw ::com::sun::star::lang::IllegalArgumentException(A2S("no SfxBindings given to WrapPropertyPanel::Create"), NULL, 2);
+        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to WrapPropertyPanel::Create", NULL, 2);
 
     return new WrapPropertyPanel(
         pParent,
@@ -106,17 +103,17 @@ void WrapPropertyPanel::Initialize()
     mpRBIdealWrap->SetClickHdl(aLink);
 
     aWrapIL.AddImage( UNO_WRAPOFF,
-                      ::GetImage( mxFrame, A2S(".uno:WrapOff"), sal_False ) );
+                      ::GetImage( mxFrame, UNO_WRAPOFF, sal_False ) );
     aWrapIL.AddImage( UNO_WRAPLEFT,
-                      ::GetImage( mxFrame, A2S(".uno:WrapLeft"), sal_False ) );
+                      ::GetImage( mxFrame, UNO_WRAPLEFT, sal_False ) );
     aWrapIL.AddImage( UNO_WRAPRIGHT,
-                      ::GetImage( mxFrame, A2S(".uno:WrapRight"), sal_False ) );
+                      ::GetImage( mxFrame, UNO_WRAPRIGHT, sal_False ) );
     aWrapIL.AddImage( UNO_WRAPON,
-                      ::GetImage( mxFrame, A2S(".uno:WrapOn"), sal_False ) );
+                      ::GetImage( mxFrame, UNO_WRAPON, sal_False ) );
     aWrapIL.AddImage( UNO_WRAPTHROUGH,
-                      ::GetImage( mxFrame, A2S(".uno:WrapThrough"), sal_False ) );
+                      ::GetImage( mxFrame, UNO_WRAPTHROUGH, sal_False ) );
     aWrapIL.AddImage( UNO_WRAPIDEAL,
-                      ::GetImage( mxFrame, A2S(".uno:WrapIdeal"), sal_False ) );
+                      ::GetImage( mxFrame, UNO_WRAPIDEAL, sal_False ) );
 
     mpRBNoWrap->SetModeRadioImage( aWrapIL.GetImage(UNO_WRAPOFF) );
     if ( Application::GetSettings().GetLayoutRTL() )
commit d2f063d52191bd6912e0ae049e45a371ddbc548c
Author: Prashant Pandey <prashant3.yishu at gmail.com>
Date:   Wed Jul 17 20:28:56 2013 +0530

    sidebar: WrapPropertyPanel conversion to .ui
    
    Change-Id: I06e8c0928d6e6357c99bf5f6c7cbf9cc338dd1c1

diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index 71f541f..e3af1f2 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -131,7 +131,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
     sw/source/ui/ribbar/workctrl.src \
     sw/source/ui/shells/shells.src \
     sw/source/ui/sidebar/PagePropertyPanel.src \
-    sw/source/ui/sidebar/WrapPropertyPanel.src \
     sw/source/ui/smartmenu/stmenu.src \
     sw/source/ui/table/table.src \
     sw/source/ui/table/tabledlg.src \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 9a770d3..c56a343 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -124,6 +124,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/rowheight \
 	sw/uiconfig/swriter/ui/saveashtmldialog \
 	sw/uiconfig/swriter/ui/sidebarpage \
+	sw/uiconfig/swriter/ui/sidebarwrap \
 	sw/uiconfig/swriter/ui/sortdialog \
 	sw/uiconfig/swriter/ui/splittable \
 	sw/uiconfig/swriter/ui/statisticsinfopage \
diff --git a/sw/source/ui/sidebar/WrapPropertyPanel.cxx b/sw/source/ui/sidebar/WrapPropertyPanel.cxx
index c9ee61e..a07be42 100644
--- a/sw/source/ui/sidebar/WrapPropertyPanel.cxx
+++ b/sw/source/ui/sidebar/WrapPropertyPanel.cxx
@@ -17,7 +17,6 @@
  */
 
 #include "WrapPropertyPanel.hxx"
-#include "WrapPropertyPanel.hrc"
 #include "PropertyPanel.hrc"
 
 #include <cmdid.h>
@@ -32,6 +31,13 @@
 
 #include "com/sun/star/lang/IllegalArgumentException.hpp"
 
+const char UNO_WRAPOFF[] = ".uno:WrapOff";
+const char UNO_WRAPLEFT[] = ".uno:WrapLeft";
+const char UNO_WRAPRIGHT[] = ".uno:WrapRight";
+const char UNO_WRAPON[] = ".uno:WrapOn";
+const char UNO_WRAPTHROUGH[] = ".uno:WrapThrough";
+const char UNO_WRAPIDEAL[] = ".uno:WrapIdeal";
+
 #define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
 
 
@@ -60,16 +66,9 @@ WrapPropertyPanel::WrapPropertyPanel(
     Window* pParent,
     const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
     SfxBindings* pBindings )
-    : Control(pParent, SW_RES(RID_PROPERTYPANEL_SWOBJWRAP_PAGE))
+    : PanelLayout(pParent, "WrapPropertyPanel", "modules/swriter/ui/sidebarwrap.ui", rxFrame)
     , mxFrame( rxFrame )
     , mpBindings(pBindings)
-    // visible controls
-    , mpRBNoWrap( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_NO_WRAP) ) )
-    , mpRBWrapLeft( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_WRAP_LEFT) ) )
-    , mpRBWrapRight( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_WRAP_RIGHT) ) )
-    , mpRBWrapParallel( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_WRAP_PARALLEL) ) )
-    , mpRBWrapThrough( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_WRAP_THROUGH) ) )
-    , mpRBIdealWrap( ::sfx2::sidebar::ControlFactory::CreateCustomImageRadionButton( this, SW_RES(RB_WRAP_IDEAL) ) )
     // resources
     , aWrapIL(6,2)
     // controller items
@@ -80,8 +79,14 @@ WrapPropertyPanel::WrapPropertyPanel(
     , maSwWrapThroughControl(FN_FRAME_WRAPTHRU, *pBindings, *this)
     , maSwWrapIdealControl(FN_FRAME_WRAP_IDEAL, *pBindings, *this)
 {
+    get(mpRBNoWrap, "buttonnone");
+    get(mpRBWrapLeft, "buttonbefore");
+    get(mpRBWrapRight, "buttonafter");
+    get(mpRBWrapParallel, "buttonparallel");
+    get(mpRBWrapThrough, "buttonthrough");
+    get(mpRBIdealWrap, "buttonoptimal");
+
     Initialize();
-    FreeResource();
 }
 
 
@@ -100,33 +105,33 @@ void WrapPropertyPanel::Initialize()
     mpRBWrapThrough->SetClickHdl(aLink);
     mpRBIdealWrap->SetClickHdl(aLink);
 
-    aWrapIL.AddImage( IMG_NONE,
+    aWrapIL.AddImage( UNO_WRAPOFF,
                       ::GetImage( mxFrame, A2S(".uno:WrapOff"), sal_False ) );
-    aWrapIL.AddImage( IMG_LEFT,
+    aWrapIL.AddImage( UNO_WRAPLEFT,
                       ::GetImage( mxFrame, A2S(".uno:WrapLeft"), sal_False ) );
-    aWrapIL.AddImage( IMG_RIGHT,
+    aWrapIL.AddImage( UNO_WRAPRIGHT,
                       ::GetImage( mxFrame, A2S(".uno:WrapRight"), sal_False ) );
-    aWrapIL.AddImage( IMG_PARALLEL,
+    aWrapIL.AddImage( UNO_WRAPON,
                       ::GetImage( mxFrame, A2S(".uno:WrapOn"), sal_False ) );
-    aWrapIL.AddImage( IMG_THROUGH,
+    aWrapIL.AddImage( UNO_WRAPTHROUGH,
                       ::GetImage( mxFrame, A2S(".uno:WrapThrough"), sal_False ) );
-    aWrapIL.AddImage( IMG_IDEAL,
+    aWrapIL.AddImage( UNO_WRAPIDEAL,
                       ::GetImage( mxFrame, A2S(".uno:WrapIdeal"), sal_False ) );
 
-    mpRBNoWrap->SetModeRadioImage( aWrapIL.GetImage(IMG_NONE) );
+    mpRBNoWrap->SetModeRadioImage( aWrapIL.GetImage(UNO_WRAPOFF) );
     if ( Application::GetSettings().GetLayoutRTL() )
     {
-        mpRBWrapLeft->SetModeRadioImage( aWrapIL.GetImage(IMG_RIGHT) );
-        mpRBWrapRight->SetModeRadioImage( aWrapIL.GetImage(IMG_LEFT) );
+        mpRBWrapLeft->SetModeRadioImage( aWrapIL.GetImage(UNO_WRAPRIGHT) );
+        mpRBWrapRight->SetModeRadioImage( aWrapIL.GetImage(UNO_WRAPLEFT) );
     }
     else
     {
-        mpRBWrapLeft->SetModeRadioImage( aWrapIL.GetImage(IMG_LEFT) );
-        mpRBWrapRight->SetModeRadioImage( aWrapIL.GetImage(IMG_RIGHT) );
+        mpRBWrapLeft->SetModeRadioImage( aWrapIL.GetImage(UNO_WRAPLEFT) );
+        mpRBWrapRight->SetModeRadioImage( aWrapIL.GetImage(UNO_WRAPRIGHT) );
     }
-    mpRBWrapParallel->SetModeRadioImage( aWrapIL.GetImage(IMG_PARALLEL) );
-    mpRBWrapThrough->SetModeRadioImage( aWrapIL.GetImage(IMG_THROUGH) );
-    mpRBIdealWrap->SetModeRadioImage( aWrapIL.GetImage(IMG_IDEAL) );
+    mpRBWrapParallel->SetModeRadioImage( aWrapIL.GetImage(UNO_WRAPON) );
+    mpRBWrapThrough->SetModeRadioImage( aWrapIL.GetImage(UNO_WRAPTHROUGH) );
+    mpRBIdealWrap->SetModeRadioImage( aWrapIL.GetImage(UNO_WRAPIDEAL) );
 
     mpRBNoWrap->SetAccessibleName(mpRBNoWrap->GetQuickHelpText());
     mpRBWrapLeft->SetAccessibleName(mpRBWrapLeft->GetQuickHelpText());
diff --git a/sw/source/ui/sidebar/WrapPropertyPanel.hrc b/sw/source/ui/sidebar/WrapPropertyPanel.hrc
deleted file mode 100644
index 0f578c7..0000000
--- a/sw/source/ui/sidebar/WrapPropertyPanel.hrc
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _SW_WRAPPROPERTYPANEL_HRC
-#define _SW_WRAPPROPERTYPANEL_HRC
-
-// RID_PROPERTYPANEL_SWOBJWRAP_PAGE
-#define RB_NO_WRAP                  1
-#define RB_WRAP_LEFT                2
-#define RB_WRAP_RIGHT               3
-#define RB_WRAP_PARALLEL            4
-#define RB_WRAP_THROUGH             5
-#define RB_WRAP_IDEAL               6
-
-// only for the ImageLists
-#define IMG_BEGIN       1
-#define IMG_NONE        (IMG_BEGIN)
-#define IMG_LEFT        (IMG_BEGIN + 1)
-#define IMG_RIGHT       (IMG_BEGIN + 2)
-#define IMG_PARALLEL    (IMG_BEGIN + 3)
-#define IMG_THROUGH     (IMG_BEGIN + 4)
-#define IMG_IDEAL       (IMG_BEGIN + 5)
-
-#endif
\ No newline at end of file
diff --git a/sw/source/ui/sidebar/WrapPropertyPanel.hxx b/sw/source/ui/sidebar/WrapPropertyPanel.hxx
index 415e880..9e18372 100644
--- a/sw/source/ui/sidebar/WrapPropertyPanel.hxx
+++ b/sw/source/ui/sidebar/WrapPropertyPanel.hxx
@@ -18,6 +18,7 @@
 #ifndef SW_SIDEBAR_WRAP_PROPERTY_PANEL_HXX
 #define SW_SIDEBAR_WRAP_PROPERTY_PANEL_HXX
 
+#include <svx/sidebar/PanelLayout.hxx>
 #include <vcl/button.hxx>
 #include <vcl/image.hxx>
 
@@ -26,11 +27,10 @@
 
 #include <boost/scoped_ptr.hpp>
 
-
 namespace sw { namespace sidebar {
 
     class WrapPropertyPanel
-        : public Control
+        : public PanelLayout
         , public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
     {
     public:
@@ -57,12 +57,12 @@ namespace sw { namespace sidebar {
         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame;
         SfxBindings* mpBindings;
 
-        ::boost::scoped_ptr<ImageRadioButton> mpRBNoWrap;
-        ::boost::scoped_ptr<ImageRadioButton> mpRBWrapLeft;
-        ::boost::scoped_ptr<ImageRadioButton> mpRBWrapRight;
-        ::boost::scoped_ptr<ImageRadioButton> mpRBWrapParallel;
-        ::boost::scoped_ptr<ImageRadioButton> mpRBWrapThrough;
-        ::boost::scoped_ptr<ImageRadioButton> mpRBIdealWrap;
+        RadioButton* mpRBNoWrap;
+        RadioButton* mpRBWrapLeft;
+        RadioButton* mpRBWrapRight;
+        RadioButton* mpRBWrapParallel;
+        RadioButton* mpRBWrapThrough;
+        RadioButton* mpRBIdealWrap;
 
         //Image resource.
         ImageList aWrapIL;
diff --git a/sw/source/ui/sidebar/WrapPropertyPanel.src b/sw/source/ui/sidebar/WrapPropertyPanel.src
deleted file mode 100644
index 2a7178c..0000000
--- a/sw/source/ui/sidebar/WrapPropertyPanel.src
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include <sfx2/sidebar/ResourceDefinitions.hrc>
-#include "PropertyPanel.hrc"
-#include "WrapPropertyPanel.hrc"
-#include "helpid.h"
-
-#define IMAGEBUTTON_WIDTH 16
-#define IMAGEBUTTON_HEIGH 18
-#define IMAGEBUTTON_GAP 1
-
-Control RID_PROPERTYPANEL_SWOBJWRAP_PAGE
-{
-    OutputSize = TRUE;
-    DialogControl = TRUE;
-    Border = FALSE;
-
-    Size = MAP_APPFONT( PROPERTYPAGE_WIDTH, SECTIONPAGE_MARGIN_VERTICAL_BOT + SECTIONPAGE_MARGIN_VERTICAL_TOP +  IMAGEBUTTON_HEIGH );
-    HelpID = HID_PROPERTYPANEL_WRAP_SECTION ;
-    Text [ en-US ] = "Wrap";
-
-
-    ImageRadioButton RB_NO_WRAP
-    {
-        Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL, SECTIONPAGE_MARGIN_VERTICAL_TOP );
-        Size = MAP_APPFONT ( IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
-        TopImage = True;
-        HelpID = HID_PROPERTYPANEL_WRAP_RB_NO_WRAP ;
-        QuickHelpText [ en-US ] = "None";
-    };
-    ImageRadioButton RB_WRAP_LEFT
-    {
-        Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + IMAGEBUTTON_WIDTH + IMAGEBUTTON_GAP, SECTIONPAGE_MARGIN_VERTICAL_TOP );
-        Size = MAP_APPFONT ( IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
-        TopImage = True;
-        HelpID = HID_PROPERTYPANEL_WRAP_RB_WRAP_LEFT ;
-        QuickHelpText [ en-US ] = "Before";
-    };
-    ImageRadioButton RB_WRAP_RIGHT
-    {
-        Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + (IMAGEBUTTON_WIDTH + IMAGEBUTTON_GAP)*2 , SECTIONPAGE_MARGIN_VERTICAL_TOP );
-        Size = MAP_APPFONT ( IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
-        TopImage = True;
-        HelpID = HID_PROPERTYPANEL_WRAP_RB_WRAP_RIGHT ;
-        QuickHelpText [ en-US ] = "After";
-    };
-    ImageRadioButton RB_WRAP_PARALLEL
-    {
-        Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + (IMAGEBUTTON_WIDTH + IMAGEBUTTON_GAP)*3  , SECTIONPAGE_MARGIN_VERTICAL_TOP );
-        Size = MAP_APPFONT (IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
-        TopImage = True;
-        HelpID = HID_PROPERTYPANEL_WRAP_RB_WRAP_PARALLEL ;
-        QuickHelpText [ en-US ] = "Parallel";
-    };
-    ImageRadioButton RB_WRAP_THROUGH
-    {
-        Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + (IMAGEBUTTON_WIDTH + IMAGEBUTTON_GAP)*4   , SECTIONPAGE_MARGIN_VERTICAL_TOP );
-        Size = MAP_APPFONT (IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
-        TopImage = True;
-        HelpID = HID_PROPERTYPANEL_WRAP_RB_WRAP_THROUGH ;
-        QuickHelpText [ en-US ] = "Through";
-    };
-    ImageRadioButton RB_WRAP_IDEAL
-    {
-        Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL + (IMAGEBUTTON_WIDTH + IMAGEBUTTON_GAP)*5   , SECTIONPAGE_MARGIN_VERTICAL_TOP );
-        Size = MAP_APPFONT (IMAGEBUTTON_WIDTH , IMAGEBUTTON_HEIGH );
-        TopImage = True;
-        HelpID = HID_PROPERTYPANEL_WRAP_RB_WRAP_IDEAL ;
-        QuickHelpText [ en-US ] = "Optimal";
-    };
-};
diff --git a/sw/uiconfig/swriter/ui/sidebarwrap.ui b/sw/uiconfig/swriter/ui/sidebarwrap.ui
new file mode 100644
index 0000000..1f04ff3
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/sidebarwrap.ui
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkGrid" id="WrapPropertyPanel">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="row_homogeneous">True</property>
+    <property name="column_homogeneous">True</property>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="border_width">6</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkBox" id="box2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkRadioButton" id="buttonnone">
+                <property name="width_request">30</property>
+                <property name="height_request">30</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_markup" translatable="yes">None</property>
+                <property name="tooltip_text" translatable="yes">None</property>
+                <property name="action_name">.uno:WrapOff</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">10</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="buttonbefore">
+                <property name="width_request">30</property>
+                <property name="height_request">30</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_markup" translatable="yes">Before</property>
+                <property name="tooltip_text" translatable="yes">Before</property>
+                <property name="action_name">.uno:WrapLeft</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">10</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="buttonafter">
+                <property name="width_request">30</property>
+                <property name="height_request">30</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_markup" translatable="yes">After</property>
+                <property name="tooltip_text" translatable="yes">After</property>
+                <property name="action_name">.uno:WrapRight</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">10</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="buttonparallel">
+                <property name="width_request">30</property>
+                <property name="height_request">30</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_markup" translatable="yes">Parallel</property>
+                <property name="tooltip_text" translatable="yes">Parallel</property>
+                <property name="action_name">.uno:WrapOn</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">10</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="buttonthrough">
+                <property name="width_request">30</property>
+                <property name="height_request">30</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_markup" translatable="yes">Through</property>
+                <property name="tooltip_text" translatable="yes">Through</property>
+                <property name="action_name">.uno:WrapThrough</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">10</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="buttonoptimal">
+                <property name="width_request">30</property>
+                <property name="height_request">30</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_markup" translatable="yes">Optimal</property>
+                <property name="tooltip_text" translatable="yes">Optimal</property>
+                <property name="action_name">.uno:WrapIdeal</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="padding">10</property>
+                <property name="position">5</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list