[Libreoffice-commits] core.git: sd/AllLangResTarget_sd.mk sd/inc sd/source sd/uiconfig sd/UIConfig_simpress.mk

Faisal M. Al-Otaibi fmalotaibi at kacst.edu.sa
Thu Jun 6 02:39:49 PDT 2013


 sd/AllLangResTarget_sd.mk             |    1 
 sd/UIConfig_simpress.mk               |    1 
 sd/inc/helpids.h                      |    1 
 sd/source/ui/dlg/tpoption.cxx         |   44 +++++++-------
 sd/source/ui/dlg/tpoption.src         |   75 -------------------------
 sd/source/ui/inc/tpoption.hrc         |    6 --
 sd/source/ui/inc/tpoption.hxx         |    9 +--
 sd/uiconfig/simpress/ui/sdviewpage.ui |  101 ++++++++++++++++++++++++++++++++++
 8 files changed, 127 insertions(+), 111 deletions(-)

New commits:
commit a638554c02871005e3741ea71ecd59b5fd340809
Author: Faisal M. Al-Otaibi <fmalotaibi at kacst.edu.sa>
Date:   Thu Jun 6 11:31:34 2013 +0200

    Convert sd view page to .ui
    
    Change-Id: If199b877b762780e4c18b15025454f0dc7912dcd

diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk
index dca617e..5466ad3 100644
--- a/sd/AllLangResTarget_sd.mk
+++ b/sd/AllLangResTarget_sd.mk
@@ -66,7 +66,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\
     sd/source/ui/dlg/sdpreslt.src \
     sd/source/ui/dlg/tabtempl.src \
     sd/source/ui/dlg/tpaction.src \
-    sd/source/ui/dlg/tpoption.src \
     sd/source/ui/dlg/vectdlg.src \
     sd/source/ui/slideshow/slideshow.src \
     sd/source/ui/table/TableDesignPane.src \
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index b9cb37e..db9f2c5 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -72,6 +72,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/simpress,\
 $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
 	sd/uiconfig/simpress/ui/definecustomslideshow \
 	sd/uiconfig/simpress/ui/masterlayoutdlg \
+	sd/uiconfig/simpress/ui/sdviewpage \
 	sd/uiconfig/simpress/ui/presentationdialog \
 	sd/uiconfig/simpress/ui/printeroptions \
 	sd/uiconfig/simpress/ui/photoalbum \
diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h
index f85f603..b9ba1cb 100644
--- a/sd/inc/helpids.h
+++ b/sd/inc/helpids.h
@@ -44,7 +44,6 @@
 #define HID_SD_BTN_HANDOUT                                      "SD_HID_SD_BTN_HANDOUT"
 #define HID_SD_WIN_DOCUMENT                                     "SD_HID_SD_WIN_DOCUMENT"
 #define HID_SD_OPTIONS_LAYOUT                                   "SD_HID_SD_OPTIONS_LAYOUT"
-#define HID_SD_OPTIONS_CONTENTS                                 "SD_HID_SD_OPTIONS_CONTENTS"
 #define HID_SD_EFFECT_PREVIEW                                   "SD_HID_SD_EFFECT_PREVIEW"
 #define HID_SD_CTL_NEWFOIL                                      "SD_HID_SD_CTL_NEWFOIL"
 #define HID_SD_NAVIGATOR_TLB                                    "SD_HID_SD_NAVIGATOR_TLB"
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index b3084b4..da1321a 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -135,14 +135,12 @@ SfxTabPage* SdTpOptionsSnap::Create( Window* pWindow,
 \************************************************************************/
 
 SdTpOptionsContents::SdTpOptionsContents( Window* pParent, const SfxItemSet& rInAttrs  ) :
-        SfxTabPage          ( pParent, SdResId( TP_OPTIONS_CONTENTS ), rInAttrs ),
-        aGrpDisplay         ( this, SdResId( GRP_DISPLAY ) ),
-        aCbxRuler           ( this, SdResId( CBX_RULER ) ),
-        aCbxDragStripes     ( this, SdResId( CBX_HELPLINES ) ),
-        aCbxHandlesBezier   ( this, SdResId( CBX_HANDLES_BEZIER ) ),
-        aCbxMoveOutline     ( this, SdResId( CBX_MOVE_OUTLINE ) )
+    SfxTabPage ( pParent, "SdViewPage", "modules/simpress/ui/sdviewpage.ui", rInAttrs )
 {
-    FreeResource();
+    get( m_pCbxRuler, "ruler");
+    get( m_pCbxDragStripes, "dragstripes");
+    get( m_pCbxHandlesBezier, "handlesbezier");
+    get( m_pCbxMoveOutline, "moveoutline");
 }
 
 // -----------------------------------------------------------------------
@@ -157,17 +155,17 @@ sal_Bool SdTpOptionsContents::FillItemSet( SfxItemSet& rAttrs )
 {
     sal_Bool bModified = sal_False;
 
-    if( aCbxRuler.GetSavedValue()           != aCbxRuler.IsChecked() ||
-        aCbxMoveOutline.GetSavedValue()     != aCbxMoveOutline.IsChecked() ||
-        aCbxDragStripes.GetSavedValue()     != aCbxDragStripes.IsChecked() ||
-        aCbxHandlesBezier.GetSavedValue()   != aCbxHandlesBezier.IsChecked() )
+    if( m_pCbxRuler->GetSavedValue()           != m_pCbxRuler->IsChecked() ||
+        m_pCbxMoveOutline->GetSavedValue()     != m_pCbxMoveOutline->IsChecked() ||
+        m_pCbxDragStripes->GetSavedValue()     != m_pCbxDragStripes->IsChecked() ||
+        m_pCbxHandlesBezier->GetSavedValue()   != m_pCbxHandlesBezier->IsChecked() )
     {
         SdOptionsLayoutItem aOptsItem( ATTR_OPTIONS_LAYOUT );
 
-        aOptsItem.GetOptionsLayout().SetRulerVisible( aCbxRuler.IsChecked() );
-        aOptsItem.GetOptionsLayout().SetMoveOutline( aCbxMoveOutline.IsChecked() );
-        aOptsItem.GetOptionsLayout().SetDragStripes( aCbxDragStripes.IsChecked() );
-        aOptsItem.GetOptionsLayout().SetHandlesBezier( aCbxHandlesBezier.IsChecked() );
+        aOptsItem.GetOptionsLayout().SetRulerVisible( m_pCbxRuler->IsChecked() );
+        aOptsItem.GetOptionsLayout().SetMoveOutline( m_pCbxMoveOutline->IsChecked() );
+        aOptsItem.GetOptionsLayout().SetDragStripes( m_pCbxDragStripes->IsChecked() );
+        aOptsItem.GetOptionsLayout().SetHandlesBezier( m_pCbxHandlesBezier->IsChecked() );
 
         rAttrs.Put( aOptsItem );
         bModified = sal_True;
@@ -185,15 +183,15 @@ void SdTpOptionsContents::Reset( const SfxItemSet& rAttrs )
     SdOptionsLayoutItem aLayoutItem( (const SdOptionsLayoutItem&) rAttrs.
                         Get( ATTR_OPTIONS_LAYOUT ) );
 
-    aCbxRuler.Check( aLayoutItem.GetOptionsLayout().IsRulerVisible() );
-    aCbxMoveOutline.Check( aLayoutItem.GetOptionsLayout().IsMoveOutline() );
-    aCbxDragStripes.Check( aLayoutItem.GetOptionsLayout().IsDragStripes() );
-    aCbxHandlesBezier.Check( aLayoutItem.GetOptionsLayout().IsHandlesBezier() );
+    m_pCbxRuler->Check( aLayoutItem.GetOptionsLayout().IsRulerVisible() );
+    m_pCbxMoveOutline->Check( aLayoutItem.GetOptionsLayout().IsMoveOutline() );
+    m_pCbxDragStripes->Check( aLayoutItem.GetOptionsLayout().IsDragStripes() );
+    m_pCbxHandlesBezier->Check( aLayoutItem.GetOptionsLayout().IsHandlesBezier() );
 
-    aCbxRuler.SaveValue();
-    aCbxMoveOutline.SaveValue();
-    aCbxDragStripes.SaveValue();
-    aCbxHandlesBezier.SaveValue();
+    m_pCbxRuler->SaveValue();
+    m_pCbxMoveOutline->SaveValue();
+    m_pCbxDragStripes->SaveValue();
+    m_pCbxHandlesBezier->SaveValue();
 }
 
 // -----------------------------------------------------------------------
diff --git a/sd/source/ui/dlg/tpoption.src b/sd/source/ui/dlg/tpoption.src
deleted file mode 100644
index ad2be1e..0000000
--- a/sd/source/ui/dlg/tpoption.src
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/tabpage.hrc>
-
-#include "tpoption.hrc"
-#include "helpids.h"
-
-#define SCALE_TEXT \
-        Text [ en-US ] = "Scale" ;                 \
-
- // Contents
-TabPage TP_OPTIONS_CONTENTS
-{
-    HelpID = HID_SD_OPTIONS_CONTENTS ;
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-    Hide = TRUE;
-    Text [ en-US ] = "Contents" ;
-    FixedLine GRP_DISPLAY
-    {
-        Pos = MAP_APPFONT ( 6 , 72 - 69 ) ;
-        Size = MAP_APPFONT ( 248 , 8 ) ;
-        Text [ en-US ] = "Display" ;
-    };
-    CheckBox CBX_RULER
-    {
-        HelpID = "sd:CheckBox:TP_OPTIONS_CONTENTS:CBX_RULER";
-        Pos = MAP_APPFONT ( 12 , 83 - 69 ) ;
-        Size = MAP_APPFONT ( 160 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Rulers visible" ;
-    };
-    CheckBox CBX_HELPLINES
-    {
-        HelpID = "sd:CheckBox:TP_OPTIONS_CONTENTS:CBX_HELPLINES";
-        Pos = MAP_APPFONT ( 12 , 97 - 69 ) ;
-        Size = MAP_APPFONT ( 160 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Snap Lines when moving" ;
-    };
-    CheckBox CBX_HANDLES_BEZIER
-    {
-        HelpID = "sd:CheckBox:TP_OPTIONS_CONTENTS:CBX_HANDLES_BEZIER";
-        Pos = MAP_APPFONT ( 12 , 111 - 69 ) ;
-        Size = MAP_APPFONT ( 160 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~All control points in Bézier editor" ;
-    };
-    CheckBox CBX_MOVE_OUTLINE
-    {
-        HelpID = "sd:CheckBox:TP_OPTIONS_CONTENTS:CBX_MOVE_OUTLINE";
-        Pos = MAP_APPFONT ( 12 , 125 - 69 ) ;
-        Size = MAP_APPFONT ( 160 , 10 ) ;
-        TabStop = TRUE ;
-        Text [ en-US ] = "~Contour of each individual object" ;
-    };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/tpoption.hrc b/sd/source/ui/inc/tpoption.hrc
index f33f757..e93b380 100644
--- a/sd/source/ui/inc/tpoption.hrc
+++ b/sd/source/ui/inc/tpoption.hrc
@@ -17,13 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 #define TP_OPTIONS_LAYOUT 596
-#define TP_OPTIONS_CONTENTS 597
 #define TP_OPTIONS_SNAP 598
-#define GRP_DISPLAY 4
-#define CBX_RULER 14
-#define CBX_HELPLINES 1
-#define CBX_MOVE_OUTLINE 15
-#define CBX_HANDLES_BEZIER 2
 #define GRP_SNAP 1
 #define GRP_ORTHO 2
 #define FT_SNAP_AREA 1
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index f914686..b8e0a72 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -51,11 +51,10 @@ public:
 class SdTpOptionsContents : public SfxTabPage
 {
 private:
-    FixedLine    aGrpDisplay;
-    CheckBox    aCbxRuler;
-    CheckBox    aCbxDragStripes;
-    CheckBox    aCbxHandlesBezier;
-    CheckBox    aCbxMoveOutline;
+    CheckBox*    m_pCbxRuler;
+    CheckBox*    m_pCbxDragStripes;
+    CheckBox*    m_pCbxHandlesBezier;
+    CheckBox*    m_pCbxMoveOutline;
 
 
 public:
diff --git a/sd/uiconfig/simpress/ui/sdviewpage.ui b/sd/uiconfig/simpress/ui/sdviewpage.ui
new file mode 100644
index 0000000..25d5d5c
--- /dev/null
+++ b/sd/uiconfig/simpress/ui/sdviewpage.ui
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkFrame" id="SdViewPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="border_width">6</property>
+    <property name="label_xalign">0</property>
+    <property name="shadow_type">none</property>
+    <child>
+      <object class="GtkAlignment" id="alignment1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="top_padding">6</property>
+        <property name="left_padding">12</property>
+        <child>
+          <object class="GtkBox" id="box1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkCheckButton" id="ruler">
+                <property name="label" translatable="yes">Rulers _visible</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="dragstripes">
+                <property name="label" translatable="yes">_Snap Lines when moving</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="handlesbezier">
+                <property name="label" translatable="yes">_All control points in Bezier editor</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="moveoutline">
+                <property name="label" translatable="yes">Co_ntour of each individual object</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child type="label">
+      <object class="GtkLabel" id="label1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Display</property>
+        <attributes>
+          <attribute name="weight" value="bold"/>
+        </attributes>
+      </object>
+    </child>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list