Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2052

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/52/2052/1

resolve fdo#60450 - Printer list is missing its border in Print dialog

Reviewed-on: https://gerrit.libreoffice.org/2043
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit f10ba07935951e6c74663a35de9a79b7d66beb37)

Conflicts:
        vcl/source/window/builder.cxx

allow a custom border property for drawing areas

(cherry picked from commit e258b760563dc2a69a1cc8b0c8b7b4c15a2774ad)

Change-Id: I2e28b9f9d52bcb01b04f98d39d12b6d8a627bec5
1e5777e5dcc04d0aa53d1ac4b9091f310ae59035
---
M vcl/source/window/builder.cxx
M vcl/uiconfig/ui/printdialog.ui
2 files changed, 21 insertions(+), 14 deletions(-)



diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 68bc434..355b28f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -307,16 +307,16 @@
 
 namespace
 {
-    OString extractPattern(VclBuilder::stringmap &rMap)
+    OString extractCustomProperty(VclBuilder::stringmap &rMap)
     {
-        OString sPattern;
-        VclBuilder::stringmap::iterator aFind = rMap.find(OString("pattern"));
+        OString sCustomProperty;
+        VclBuilder::stringmap::iterator aFind = rMap.find(OString("customproperty"));
         if (aFind != rMap.end())
         {
-            sPattern = aFind->second;
+            sCustomProperty = aFind->second;
             rMap.erase(aFind);
         }
-        return sPattern;
+        return sCustomProperty;
     }
 
     bool extractResizable(VclBuilder::stringmap &rMap)
@@ -688,7 +688,7 @@
     else if (name == "GtkSpinButton")
     {
         extractSpinAdjustment(id, rMap);
-        OString sPattern = extractPattern(rMap);
+        OString sPattern = extractCustomProperty(rMap);
         OString sUnit = sPattern;
 
         for (sal_Int32 i = 0; i < sPattern.getLength(); ++i)
@@ -755,7 +755,11 @@
         //   everything over to SvTreeViewBox
         //d) remove the users of makeSvTreeViewBox
         extractModel(id, rMap);
-        pWindow = new ListBox(pParent, WB_LEFT|WB_VCENTER|WB_3DLOOK);
+        WinBits nWinStyle = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+        OString sBorder = extractCustomProperty(rMap);
+        if (!sBorder.isEmpty())
+            nWinStyle |= WB_BORDER;
+        pWindow = new ListBox(pParent, nWinStyle);
     }
     else if (name == "GtkLabel")
         pWindow = new FixedText(pParent, WB_CENTER|WB_VCENTER|WB_3DLOOK);
@@ -802,7 +806,10 @@
     else if (name == "GtkNotebook")
         pWindow = new TabControl(pParent, WB_STDTABCONTROL|WB_3DLOOK);
     else if (name == "GtkDrawingArea")
-        pWindow = new Window(pParent);
+    {
+        OString sBorder = extractCustomProperty(rMap);
+        pWindow = new Window(pParent, sBorder.isEmpty() ? 0 : WB_BORDER);
+    }
     else if (name == "GtkTextView")
     {
         extractBuffer(id, rMap);
@@ -1013,7 +1020,7 @@
                         if (nDelim != -1)
                         {
                             OString sPattern = sID.copy(nDelim+1);
-                            aProperties[OString("pattern")] = sPattern;
+                            aProperties[OString("customproperty")] = sPattern;
                             sID = sID.copy(0, nDelim);
                         }
                     }
@@ -1340,7 +1347,7 @@
 {
     OString sClass;
     OString sID;
-    OString sPattern;
+    OString sCustomProperty;
 
     xmlreader::Span name;
     int nsId;
@@ -1359,7 +1366,7 @@
             sal_Int32 nDelim = sID.indexOf(':');
             if (nDelim != -1)
             {
-                sPattern = sID.copy(nDelim+1);
+                sCustomProperty = sID.copy(nDelim+1);
                 sID = sID.copy(0, nDelim);
             }
         }
@@ -1375,8 +1382,8 @@
 
     stringmap aProperties, aPangoAttributes;
 
-    if (!sPattern.isEmpty())
-        aProperties[OString("pattern")] = sPattern;
+    if (!sCustomProperty.isEmpty())
+        aProperties[OString("customproperty")] = sCustomProperty;
 
     Window *pCurrentChild = NULL;
     while(1)
diff --git a/vcl/uiconfig/ui/printdialog.ui b/vcl/uiconfig/ui/printdialog.ui
index a0204b5..575eda9 100644
--- a/vcl/uiconfig/ui/printdialog.ui
+++ b/vcl/uiconfig/ui/printdialog.ui
@@ -350,7 +350,7 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkTreeView" id="printers">
+                                  <object class="GtkTreeView" id="printers:border">
                                     <property name="height_request">100</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>

-- 
To view, visit https://gerrit.libreoffice.org/2052
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e28b9f9d52bcb01b04f98d39d12b6d8a627bec5
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Caolán McNamara <caolanm@redhat.com>

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.