[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - tools/inc vcl/inc vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 18 02:36:26 PDT 2012


 tools/inc/tools/wintypes.hxx  |    3 ++-
 vcl/inc/svids.hrc             |    3 ++-
 vcl/source/control/button.cxx |    3 ++-
 vcl/source/src/btntext.src    |    5 +++++
 vcl/source/window/builder.cxx |    6 ++++++
 5 files changed, 17 insertions(+), 3 deletions(-)

New commits:
commit 49307674275bb1c17d4278e12f20d1d529ac68b9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 18 10:35:46 2012 +0100

    add a new stock reset/revert button
    
    Change-Id: Ie854c063856eb8ed7401162ed60114d7cc904d26

diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx
index 2e1b38c..2d1927c 100644
--- a/tools/inc/tools/wintypes.hxx
+++ b/tools/inc/tools/wintypes.hxx
@@ -326,7 +326,8 @@ typedef sal_uInt16 StandardButtonType;
 #define BUTTON_IGNORE       ((StandardButtonType)8)
 #define BUTTON_ABORT        ((StandardButtonType)9)
 #define BUTTON_LESS         ((StandardButtonType)10)
-#define BUTTON_COUNT        11
+#define BUTTON_RESET        ((StandardButtonType)11)
+#define BUTTON_COUNT        12
 
 // --------------------------------------------
 // - prominent place for ListBox window types -
diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc
index 502e8ef..57e3d3a 100644
--- a/vcl/inc/svids.hrc
+++ b/vcl/inc/svids.hrc
@@ -145,8 +145,9 @@
 #define SV_BUTTONTEXT_CLOSE                 SV_HELPTEXT_CLOSE
 #define SV_BUTTONTEXT_MORE                  10107
 #define SV_BUTTONTEXT_IGNORE                10108
-#define SV_BUTTONTEXT_ABORT             10109
+#define SV_BUTTONTEXT_ABORT                 10109
 #define SV_BUTTONTEXT_LESS                  10110
+#define SV_BUTTONTEXT_RESET                 10111
 
 #define SV_STDTEXT_FIRST                    SV_STDTEXT_SERVICENOTAVAILABLE
 #define SV_STDTEXT_SERVICENOTAVAILABLE      10200
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index abe52a3..3e54e84 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -143,7 +143,8 @@ XubString Button::GetStandardText( StandardButtonType eButton )
         { SV_BUTTONTEXT_MORE, "~More" },
         { SV_BUTTONTEXT_IGNORE, "~Ignore" },
         { SV_BUTTONTEXT_ABORT, "~Abort" },
-        { SV_BUTTONTEXT_LESS, "~Less" }
+        { SV_BUTTONTEXT_LESS, "~Less" },
+        { SV_BUTTONTEXT_RESET, "R~eset" }
     };
 
     String aText;
diff --git a/vcl/source/src/btntext.src b/vcl/source/src/btntext.src
index c0303aa..6d0bb15 100644
--- a/vcl/source/src/btntext.src
+++ b/vcl/source/src/btntext.src
@@ -78,3 +78,8 @@ String SV_BUTTONTEXT_ABORT
 {
     Text [ en-US ] = "~Abort";
 };
+
+String SV_BUTTONTEXT_RESET
+{
+    Text [ en-US ] = "R~eset";
+};
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index d463f48..2d2405d 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -262,6 +262,12 @@ namespace
                 pBtn->SetText(VclResId(SV_BUTTONTEXT_CLOSE).toString());
                 pWindow = pBtn;
             }
+            else if (sType.equalsL(RTL_CONSTASCII_STRINGPARAM("gtk-revert-to-saved")))
+            {
+                PushButton *pBtn = new PushButton(pParent, nBits);
+                pBtn->SetText(VclResId(SV_BUTTONTEXT_RESET).toString());
+                pWindow = pBtn;
+            }
             else
                 fprintf(stderr, "unknown stock type %s\n", sType.getStr());
         }


More information about the Libreoffice-commits mailing list