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

Manal Alhassoun malhassoun at kacst.edu.sa
Wed Nov 27 03:23:19 PST 2013


 sw/UIConfig_swriter.mk                                  |    1 
 sw/source/ui/app/app.src                                |    4 -
 sw/source/ui/dochdl/swdtflvr.cxx                        |    2 
 sw/source/ui/inc/app.hrc                                |    1 
 sw/source/ui/uiview/view2.cxx                           |    2 
 sw/uiconfig/swriter/ui/queryrotateintostandarddialog.ui |   34 ++++++++++++++++
 6 files changed, 37 insertions(+), 7 deletions(-)

New commits:
commit b5fced896632a3c07586702b461545667b33966e
Author: Manal Alhassoun <malhassoun at kacst.edu.sa>
Date:   Wed Nov 27 13:33:09 2013 +0300

    convert Rotate into standard orientation querybox to .ui
    
    Change-Id: Id85362c0930a4156e569bd4c6b13aa94213f09c7
    Reviewed-on: https://gerrit.libreoffice.org/6826
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 5b3a755..441cc43 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -159,6 +159,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/querycontinuebegindialog \
 	sw/uiconfig/swriter/ui/querycontinueenddialog \
 	sw/uiconfig/swriter/ui/querydefaultcompatdialog \
+	sw/uiconfig/swriter/ui/queryrotateintostandarddialog \
 	sw/uiconfig/swriter/ui/querysavelabeldialog \
 	sw/uiconfig/swriter/ui/queryshowchangesdialog \
 	sw/uiconfig/swriter/ui/mmcreatingdialog \
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index bc8cd0e..a7863ce 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -708,10 +708,6 @@ ToolBox RID_MODULE_TOOLBOX
     Scroll = TRUE ;
 };
 
-String STR_ROTATE_TO_STANDARD_ORIENTATION
-{
-    Text [ en-US ] = "This image is rotated. Would you like to rotate it into standard orientation?";
-};
 
 String STR_CAPTION_TABLE
 {
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 045cf6c..98e9d1d 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -381,7 +381,7 @@ namespace
             sal_uInt16 aRotation = aMetadata.getRotation();
             if (aRotation != 0)
             {
-                QueryBox aQueryBox(0, WB_YES_NO | WB_DEF_YES, SW_RES(STR_ROTATE_TO_STANDARD_ORIENTATION) );
+                MessageDialog aQueryBox( 0,"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui");
                 if (aQueryBox.Execute() == RET_YES)
                 {
                     GraphicNativeTransform aTransform( aGraphic );
diff --git a/sw/source/ui/inc/app.hrc b/sw/source/ui/inc/app.hrc
index 3734788..c5ac3f5 100644
--- a/sw/source/ui/inc/app.hrc
+++ b/sw/source/ui/inc/app.hrc
@@ -101,7 +101,6 @@
 #define STR_SIMPLE                      (RC_APP_BEGIN + 129)
 #define STR_AUTHMRK_EDIT                (RC_APP_BEGIN + 130)
 #define STR_AUTHMRK_INSERT              (RC_APP_BEGIN + 131)
-#define STR_ROTATE_TO_STANDARD_ORIENTATION  (RC_APP_BEGIN + 132)
 #define STR_CAPTION_TABLE               (RC_APP_BEGIN + 133)
 #define STR_CAPTION_FRAME               (RC_APP_BEGIN + 134)
 #define STR_CAPTION_GRAPHIC             (RC_APP_BEGIN + 135)
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 7c9aa10..9c04f53 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -225,7 +225,7 @@ int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter,
             sal_uInt16 aRotation = aMetadata.getRotation();
             if (aRotation != 0)
             {
-                QueryBox aQueryBox(GetWindow(), WB_YES_NO | WB_DEF_YES, SW_RES(STR_ROTATE_TO_STANDARD_ORIENTATION) );
+                MessageDialog aQueryBox( GetWindow(),"QueryRotateIntoStandardOrientationDialog","modules/swriter/ui/queryrotateintostandarddialog.ui");
                 if (aQueryBox.Execute() == RET_YES)
                 {
                     GraphicNativeTransform aTransform( aGraphic );
diff --git a/sw/uiconfig/swriter/ui/queryrotateintostandarddialog.ui b/sw/uiconfig/swriter/ui/queryrotateintostandarddialog.ui
new file mode 100644
index 0000000..b50cdd9
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/queryrotateintostandarddialog.ui
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkMessageDialog" id="QueryRotateIntoStandardOrientationDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">12</property>
+    <property name="title" translatable="yes">Rotate into standard orientation?</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <property name="skip_taskbar_hint">True</property>
+    <property name="message_type">question</property>
+    <property name="buttons">yes-no</property>
+    <property name="text" translatable="yes">This image is rotated. Would you like to rotate it into standard orientation?</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="messagedialog-vbox4">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">24</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="messagedialog-action_area4">
+            <property name="can_focus">False</property>
+            <property name="layout_style">center</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list