[Libreoffice-commits] core.git: 2 commits - dbaccess/source include/svx svx/AllLangResTarget_svx.mk svx/source

Caolán McNamara caolanm at redhat.com
Wed Oct 12 14:26:41 UTC 2016


 dbaccess/source/ui/inc/dbu_resource.hrc               |    4 --
 dbaccess/source/ui/tabledesign/TableDesignControl.cxx |   16 +++++----
 dbaccess/source/ui/tabledesign/table.src              |   10 -----
 include/svx/dialogs.hrc                               |    4 --
 svx/AllLangResTarget_svx.mk                           |    1 
 svx/source/sidebar/EmptyPanel.cxx                     |   17 +++------
 svx/source/sidebar/EmptyPanel.hrc                     |   25 --------------
 svx/source/sidebar/EmptyPanel.src                     |   32 ------------------
 svx/source/stbctrls/stbctrls.src                      |    5 ++
 9 files changed, 21 insertions(+), 93 deletions(-)

New commits:
commit 8215167bac4f34a2f1432ab247c8984d8f448372
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 12 15:23:00 2016 +0100

    de-src RID_DB_TAB_EDITOR control
    
    Change-Id: Idba73ea9bf2486d40b24e59bf6f1f5092ec70558

diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index cfe1de2..01c1c78 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -141,10 +141,6 @@
 #define RID_MENU_JOINVIEW_CONNECTION    RID_MENU_START + 16
 #define RID_MENU_JOINVIEW_TABLE         RID_MENU_START + 17
 
-// controls
-
-#define RID_DB_TAB_EDITOR               RID_CONTROL_START +  0
-
 // strings
 #define STR_TBL_TITLE                       RID_STR_GEN_START
 #define STR_ERROR_DURING_CREATION           RID_STR_GEN_START + 1
diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
index 62dc378..a774f58 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
@@ -35,14 +35,16 @@ using namespace ::com::sun::star::util;
 #define HANDLE_ID 0
 
 OTableRowView::OTableRowView(vcl::Window* pParent)
-    :EditBrowseBox(pParent, ModuleRes(RID_DB_TAB_EDITOR),EditBrowseBoxFlags::NONE,
-                    BrowserMode::COLUMNSELECTION | BrowserMode::MULTISELECTION | BrowserMode::AUTOSIZE_LASTCOL |
-                    BrowserMode::KEEPHIGHLIGHT | BrowserMode::HLINES | BrowserMode::VLINES)
-    ,m_nDataPos(-1)
-    ,m_nCurrentPos(-1)
-    ,m_nCurUndoActId(0)
+    : EditBrowseBox(pParent, EditBrowseBoxFlags::NONE, WB_TABSTOP|WB_HIDE|WB_3DLOOK,
+                    BrowserMode::COLUMNSELECTION | BrowserMode::MULTISELECTION |
+                    BrowserMode::AUTOSIZE_LASTCOL | BrowserMode::KEEPHIGHLIGHT |
+                    BrowserMode::HLINES | BrowserMode::VLINES)
+    , m_nDataPos(-1)
+    , m_nCurrentPos(-1)
+    , m_nCurUndoActId(0)
 {
-
+    SetHelpId(HID_TABDESIGN_BACKGROUND);
+    SetSizePixel(LogicToPixel(Size(40, 12), MapUnit::MapAppFont));
 }
 
 void OTableRowView::Init()
diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src
index 1bcbf34..d0dc8ee 100644
--- a/dbaccess/source/ui/tabledesign/table.src
+++ b/dbaccess/source/ui/tabledesign/table.src
@@ -123,16 +123,6 @@ String STR_TAB_TABLE_PROPERTIES
     Text [ en-US ] = "Table properties";
 };
 
-Control RID_DB_TAB_EDITOR
-{
-    Pos = MAP_APPFONT ( 0 , 0 ) ;
-    Size = MAP_APPFONT ( 40 , 12 ) ;
-    TabStop = TRUE ;
-    SvLook = TRUE ;
-    Hide = TRUE ;
-    HelpId = HID_TABDESIGN_BACKGROUND ;
-};
-
 Menu RID_TABLEDESIGNROWPOPUPMENU
 {
     ItemList =
commit d1a6aea1dab9b0b5bf914dd3644e5279598c1f10
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Oct 12 15:06:53 2016 +0100

    de-src empty panel placeholder widgetry
    
    Change-Id: I99a292cd76f40159f12cb98b362559e4109121c3

diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index c44b6c5..aba0095 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -196,9 +196,7 @@
 #define RID_SVXIMG_NOTCHECKED               (RID_SVX_START + 243)
 #define RID_SVXIMG_CHECKED                  (RID_SVX_START + 244)
 
-#define RID_SIDEBAR_LINE_PANEL              (RID_SVX_START + 321)
-
-#define RID_SIDEBAR_EMPTY_PANEL             (RID_SVX_START + 327)
+#define RID_SIDEBAR_EMPTY_PANEL_TEXT        (RID_SVX_START + 321)
 
 // !!! IMPORTANT: consider and update RID_SVX_FIRSTFREE when introducing new RIDs !!! (see above)
 
diff --git a/svx/AllLangResTarget_svx.mk b/svx/AllLangResTarget_svx.mk
index c56a5ce..3a98734 100644
--- a/svx/AllLangResTarget_svx.mk
+++ b/svx/AllLangResTarget_svx.mk
@@ -66,7 +66,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
     svx/source/form/fmstring.src \
     svx/source/items/svxerr.src \
     svx/source/items/svxitems.src \
-    svx/source/sidebar/EmptyPanel.src \
     svx/source/sidebar/area/AreaPropertyPanel.src \
     svx/source/sidebar/line/LinePropertyPanel.src \
     svx/source/sidebar/paragraph/ParaPropertyPanel.src \
diff --git a/svx/source/sidebar/EmptyPanel.cxx b/svx/source/sidebar/EmptyPanel.cxx
index e436ba8..00579c3 100644
--- a/svx/source/sidebar/EmptyPanel.cxx
+++ b/svx/source/sidebar/EmptyPanel.cxx
@@ -18,23 +18,19 @@
  */
 
 #include "EmptyPanel.hxx"
-#include "EmptyPanel.hrc"
 #include "svx/dialogs.hrc"
 #include "svx/dialmgr.hxx"
 
-
 namespace svx { namespace sidebar {
 
 EmptyPanel::EmptyPanel (vcl::Window* pParent)
-    : Control(pParent, SVX_RES(RID_SIDEBAR_EMPTY_PANEL)),
-      maMessageControl(VclPtr<FixedText>::Create(this, SVX_RES(FT_MESSAGE)))
+    : Control(pParent)
+    , maMessageControl(VclPtr<FixedText>::Create(this))
 {
-    maMessageControl->setPosSizePixel(5,5, 250,15);
-    maMessageControl->SetStyle(WB_WORDBREAK);// | WB_NOMNEMONICS);
-    //maMessageControl.GetStyle()
-    //        & ~(WB_NOMULTILINE | WB_PATHELLIPSIS)
-    //        | WB_WORDBREAK | WB_NOMNEMONICS);
-    FreeResource();
+    maMessageControl->SetText(SVX_RES(RID_SIDEBAR_EMPTY_PANEL_TEXT));
+    maMessageControl->setPosSizePixel(5, 5, 250, 15);
+    maMessageControl->SetStyle(WB_WORDBREAK);
+    maMessageControl->Show();
 
     SetBackground(Wallpaper());
 
@@ -42,7 +38,6 @@ EmptyPanel::EmptyPanel (vcl::Window* pParent)
     Show();
 }
 
-
 EmptyPanel::~EmptyPanel()
 {
     disposeOnce();
diff --git a/svx/source/sidebar/EmptyPanel.hrc b/svx/source/sidebar/EmptyPanel.hrc
deleted file mode 100644
index 26f5def..0000000
--- a/svx/source/sidebar/EmptyPanel.hrc
+++ /dev/null
@@ -1,25 +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 <svx/dialogs.hrc>
-
-// For RID_SIDEBAR_EMPTY_PANEL
-
-#define FT_MESSAGE 1
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/EmptyPanel.src b/svx/source/sidebar/EmptyPanel.src
deleted file mode 100644
index 2611a6b..0000000
--- a/svx/source/sidebar/EmptyPanel.src
+++ /dev/null
@@ -1,32 +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 "EmptyPanel.hrc"
-#include <svx/dialogs.hrc>
-
-Control RID_SIDEBAR_EMPTY_PANEL
-{
-    FixedText FT_MESSAGE
-    {
-        Pos = MAP_APPFONT(2,2);
-        Size = MAP_APPFONT(100,24);
-        Text [en-US] = "Properties for the task that you are performing are not available for the current selection";
-    };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src
index bc0d332..259bc8e 100644
--- a/svx/source/stbctrls/stbctrls.src
+++ b/svx/source/stbctrls/stbctrls.src
@@ -181,6 +181,11 @@ String RID_SVXSTR_ZOOM_OPTIMAL_VIEW
     Text [ en-US ] = "Optimal View" ;
 };
 
+String RID_SIDEBAR_EMPTY_PANEL_TEXT
+{
+    Text [ en-US ] = "Properties for the task that you are performing are not available for the current selection" ;
+};
+
  // PopupMenu -------------------------------------------------------------
 Menu RID_SVXMNU_ZOOM
 {


More information about the Libreoffice-commits mailing list