[Libreoffice-commits] core.git: 2 commits - include/svx sc/source svx/source svx/uiconfig sw/source

Caolán McNamara caolanm at redhat.com
Tue Feb 7 15:41:34 UTC 2017


 include/svx/srchdlg.hxx                 |    3 
 include/svx/swframeposstrings.hxx       |    6 
 sc/source/core/data/funcdesc.cxx        |    8 
 sc/source/core/src/compiler.src         |   58 +------
 svx/source/dialog/srchdlg.cxx           |   12 -
 svx/source/dialog/swframeposstrings.cxx |   27 ---
 svx/source/dialog/swframeposstrings.src |  259 +++++---------------------------
 svx/uiconfig/ui/findreplacedialog.ui    |    4 
 sw/source/ui/utlui/utlui.src            |  114 ++------------
 sw/source/uibase/utlui/initui.cxx       |   22 --
 10 files changed, 107 insertions(+), 406 deletions(-)

New commits:
commit 66849453041de0369dc8abe8f172dce2bf4cdaab
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 7 13:11:12 2017 +0000

    convert resources containing strings to stringarray resources
    
    Change-Id: I61e815a9545f55a3b886322e7d2c0d50040584bd

diff --git a/include/svx/swframeposstrings.hxx b/include/svx/swframeposstrings.hxx
index b81765a..e04522e 100644
--- a/include/svx/swframeposstrings.hxx
+++ b/include/svx/swframeposstrings.hxx
@@ -27,7 +27,7 @@
     contains strings needed for positioning dialogs
     of frames and drawing in Writer
  */
-class SvxSwFramePosString_Impl;
+class ResStringArray;
 class SVX_DLLPUBLIC SvxSwFramePosString
 {
 public:
@@ -80,10 +80,10 @@ public:
 
         STR_MAX
     };
-    const OUString& GetString(StringId eId);
+    OUString GetString(StringId eId) const;
 
 private:
-    std::unique_ptr<SvxSwFramePosString_Impl> pImpl;
+    std::unique_ptr<ResStringArray> pImpl;
 };
 #endif
 
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 56288b9..b0c2671 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -629,7 +629,7 @@ sal_uInt32 ScFunctionCategory::getCount() const
 OUString ScFunctionCategory::getName() const
 {
     if ( m_sName.isEmpty() )
-        m_sName = ScFunctionMgr::GetCategoryName(m_nCategory+1);
+        m_sName = ScFunctionMgr::GetCategoryName(m_nCategory);
     return m_sName;
 }
 
@@ -770,14 +770,14 @@ void ScFunctionMgr::fillLastRecentlyUsedFunctions(::std::vector< const formula::
 
 OUString ScFunctionMgr::GetCategoryName(sal_uInt32 _nCategoryNumber )
 {
-    if ( _nCategoryNumber > SC_FUNCGROUP_COUNT )
+    if (_nCategoryNumber >= SC_FUNCGROUP_COUNT)
     {
         OSL_FAIL("Invalid category number!");
         return OUString();
     }
 
-    std::unique_ptr<ScResourcePublisher> pCategories( new ScResourcePublisher( ScResId( RID_FUNCTION_CATEGORIES ) ) );
-    return SC_RESSTR(static_cast<sal_uInt16>(_nCategoryNumber));
+    ResStringArray aStringArray(ScResId(RID_FUNCTION_CATEGORIES));
+    return aStringArray.GetString(_nCategoryNumber);
 }
 
 sal_Unicode ScFunctionMgr::getSingleToken(const formula::IFunctionManager::EToken _eToken) const
diff --git a/sc/source/core/src/compiler.src b/sc/source/core/src/compiler.src
index d89ad70..dd3199e 100644
--- a/sc/source/core/src/compiler.src
+++ b/sc/source/core/src/compiler.src
@@ -20,51 +20,21 @@
 #include "sc.hrc"
 #include <formula/compiler.hrc>
 
-Resource RID_FUNCTION_CATEGORIES
+StringArray RID_FUNCTION_CATEGORIES
 {
-    String 1
-    {
-        Text[ en-US ] =  "Database" ;
-    };
-    String 2
-    {
-        Text[ en-US ] =  "Date&Time" ;
-    };
-    String 3
-    {
-        Text[ en-US ] =  "Financial" ;
-    };
-    String 4
-    {
-        Text[ en-US ] =  "Information" ;
-    };
-    String 5
-    {
-        Text[ en-US ] =  "Logical" ;
-    };
-    String 6
-    {
-        Text[ en-US ] =  "Mathematical" ;
-    };
-    String 7
-    {
-        Text[ en-US ] =  "Array" ;
-    };
-    String 8
-    {
-        Text[ en-US ] =  "Statistical" ;
-    };
-    String 9
-    {
-        Text[ en-US ] =  "Spreadsheet" ;
-    };
-    String 10
-    {
-        Text[ en-US ] =  "Text" ;
-    };
-    String 11
-    {
-        Text[ en-US ] =  "Add-in" ;
+    ItemList [ en-US ] =
+    {
+        < "Database" ; >;
+        < "Date&Time" ; >;
+        < "Financial" ; >;
+        < "Information" ; >;
+        < "Logical" ; >;
+        < "Mathematical" ; >;
+        < "Array" ; >;
+        < "Statistical" ; >;
+        < "Spreadsheet" ; >;
+        < "Text" ; >;
+        < "Add-in" ; >;
     };
 };
 
diff --git a/svx/source/dialog/swframeposstrings.cxx b/svx/source/dialog/swframeposstrings.cxx
index a055b77..731b17d 100644
--- a/svx/source/dialog/swframeposstrings.cxx
+++ b/svx/source/dialog/swframeposstrings.cxx
@@ -18,44 +18,27 @@
  */
 
 #include <svx/swframeposstrings.hxx>
-#include <tools/rc.hxx>
+#include <tools/resary.hxx>
 #include <tools/debug.hxx>
 #include <svx/dialmgr.hxx>
 #include <svx/dialogs.hrc>
 
-class SvxSwFramePosString_Impl : public Resource
-{
-    friend class SvxSwFramePosString;
-    OUString aStrings[SvxSwFramePosString::STR_MAX];
-public:
-    SvxSwFramePosString_Impl();
-};
-SvxSwFramePosString_Impl::SvxSwFramePosString_Impl() :
-    Resource(SVX_RES(RID_SVXSW_FRAMEPOSITIONS))
-{
-    for(sal_uInt16 i = 0; i < SvxSwFramePosString::STR_MAX; i++)
-    {
-        //string ids have to start at 1
-        aStrings[i] = SVX_RESSTR(i + 1);
-    }
-    FreeResource();
-}
-
 SvxSwFramePosString::SvxSwFramePosString() :
-    pImpl(new SvxSwFramePosString_Impl)
+    pImpl(new ResStringArray(SVX_RES(RID_SVXSW_FRAMEPOSITIONS)))
 {
+    assert(pImpl->Count() == SvxSwFramePosString::STR_MAX);
 }
 
 SvxSwFramePosString::~SvxSwFramePosString()
 {
 }
 
-const OUString& SvxSwFramePosString::GetString(StringId eId)
+OUString SvxSwFramePosString::GetString(StringId eId) const
 {
     DBG_ASSERT(eId >= 0 && eId < STR_MAX, "invalid StringId");
     if(!(eId >= 0 && eId < STR_MAX))
         eId = LEFT;
-    return pImpl->aStrings[eId];
+    return pImpl->GetString(eId);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/swframeposstrings.src b/svx/source/dialog/swframeposstrings.src
index 6ba0bbd..c36efbf 100644
--- a/svx/source/dialog/swframeposstrings.src
+++ b/svx/source/dialog/swframeposstrings.src
@@ -18,220 +18,53 @@
  */
 #include <svx/dialogs.hrc>
 
-//the following defines have to match the (enum values + 1) in svx/swframeposstrings.hxx!
-#define STR_LEFT                                1
-#define STR_RIGHT                               2
-#define STR_FROMLEFT                            3
-#define STR_MIR_LEFT                            4
-#define STR_MIR_RIGHT                           5
-#define STR_MIR_FROMLEFT                        6
-#define STR_FRAME                               7
-#define STR_PRTAREA                             8
-#define STR_REL_PG_LEFT                         9
-#define STR_REL_PG_RIGHT                        10
-#define STR_REL_FRM_LEFT                        11
-#define STR_REL_FRM_RIGHT                       12
-#define STR_MIR_REL_PG_LEFT                     13
-#define STR_MIR_REL_PG_RIGHT                    14
-#define STR_MIR_REL_FRM_LEFT                    15
-#define STR_MIR_REL_FRM_RIGHT                   16
-#define STR_REL_PG_FRAME                        17
-#define STR_REL_PG_PRTAREA                      18
-#define STR_REL_BASE                            19
-#define STR_REL_CHAR                            20
-#define STR_REL_ROW                             21
-#define STR_REL_BORDER                          22
-#define STR_REL_PRTAREA                         23
-#define STR_FLY_REL_PG_LEFT                     24
-#define STR_FLY_REL_PG_RIGHT                    25
-#define STR_FLY_REL_PG_FRAME                    26
-#define STR_FLY_REL_PG_PRTAREA                  27
-#define STR_FLY_MIR_REL_PG_LEFT                 28
-#define STR_FLY_MIR_REL_PG_RIGHT                29
-#define STR_TOP                                 30
-#define STR_BOTTOM                              31
-#define STR_CENTER_HORI                         32
-#define STR_CENTER_VERT                         33
-#define STR_FROMTOP                             34
-#define STR_FROMBOTTOM                          35
-#define STR_BELOW                               36
-#define STR_FROMRIGHT                           37
-#define STR_REL_PG_TOP                          38
-#define STR_REL_PG_BOTTOM                       39
-#define STR_REL_FRM_TOP                         40
-#define STR_REL_FRM_BOTTOM                      41
-#define STR_REL_LINE                            42
-
-Resource RID_SVXSW_FRAMEPOSITIONS
+//the following string have to match the (enum values) positions in svx/swframeposstrings.hxx!
+StringArray RID_SVXSW_FRAMEPOSITIONS
 {
-    String STR_LEFT
-    {
-        Text [ en-US ] = "Left" ;
-    };
-    String STR_MIR_LEFT
-    {
-        Text [ en-US ] = "Inside" ;
-    };
-    String STR_RIGHT
-    {
-        Text [ en-US ] = "Right" ;
-    };
-    String STR_MIR_RIGHT
-    {
-        Text [ en-US ] = "Outside" ;
-    };
-    String STR_CENTER_VERT
-    {
-        Text [ en-US ] = "Center" ;
-    };
-    String STR_FROMLEFT
-    {
-        Text [ en-US ] = "From left" ;
-    };
-    String STR_MIR_FROMLEFT
-    {
-        Text [ en-US ] = "From inside" ;
-    };
-    String STR_FRAME
-    {
-        Text [ en-US ] = "Paragraph area" ;
-    };
-    String STR_PRTAREA
-    {
-        Text [ en-US ] = "Paragraph text area" ;
-    };
-    String STR_REL_PG_LEFT
-    {
-        Text [ en-US ] = "Left page border" ;
-    };
-    String STR_MIR_REL_PG_LEFT
-    {
-        Text [ en-US ] = "Inner page border" ;
-    };
-    String STR_REL_PG_RIGHT
-    {
-        Text [ en-US ] = "Right page border" ;
-    };
-    String STR_MIR_REL_PG_RIGHT
-    {
-        Text [ en-US ] = "Outer page border" ;
-    };
-    String STR_REL_FRM_LEFT
-    {
-        Text [ en-US ] = "Left paragraph border" ;
-    };
-    String STR_MIR_REL_FRM_LEFT
-    {
-        Text [ en-US ] = "Inner paragraph border" ;
-    };
-    String STR_REL_FRM_RIGHT
-    {
-        Text [ en-US ] = "Right paragraph border" ;
-    };
-    String STR_MIR_REL_FRM_RIGHT
-    {
-        Text [ en-US ] = "Outer paragraph border" ;
-    };
-    String STR_REL_PG_FRAME
-    {
-        Text [ en-US ] = "Entire page" ;
-    };
-    String STR_REL_PG_PRTAREA
-    {
-        Text [ en-US ] = "Page text area" ;
-    };
-    String STR_TOP
-    {
-        Text [ en-US ] = "Top" ;
-    };
-    String STR_BOTTOM
-    {
-        Text [ en-US ] = "Bottom" ;
-    };
-    String STR_CENTER_HORI
-    {
-        Text [ en-US ] = "Center" ;
-    };
-    String STR_FROMTOP
-    {
-        Text [ en-US ] = "From top" ;
-    };
-    String STR_FROMBOTTOM
-    {
-        Text [ en-US ] = "From bottom" ;
-    };
-    String STR_BELOW
-    {
-        Text [ en-US ] = "Below" ;
-    };
-    String STR_FROMRIGHT
-    {
-        Text [ en-US ] = "From right" ;
-    };
-    String STR_REL_PG_TOP
-    {
-        Text [ en-US ] = "Top page border" ;
-    };
-    String STR_REL_PG_BOTTOM
-    {
-        Text [ en-US ] = "Bottom page border" ;
-    };
-    String STR_REL_FRM_TOP
-    {
-        Text [ en-US ] = "Top paragraph border" ;
-    };
-    String STR_REL_FRM_BOTTOM
-    {
-        Text [ en-US ] = "Bottom paragraph border" ;
-    };
-    String STR_REL_BORDER
-    {
-        Text [ en-US ] = "Margin" ;
-    };
-    String STR_REL_PRTAREA
-    {
-        Text [ en-US ] = "Paragraph text area" ;
-    };
-    String STR_FLY_REL_PG_LEFT
-    {
-        Text [ en-US ] = "Left frame border" ;
-    };
-    String STR_FLY_MIR_REL_PG_LEFT
-    {
-        Text [ en-US ] = "Inner frame border" ;
-    };
-    String STR_FLY_REL_PG_RIGHT
-    {
-        Text [ en-US ] = "Right frame border" ;
-    };
-    String STR_FLY_MIR_REL_PG_RIGHT
-    {
-        Text [ en-US ] = "Outer frame border" ;
-    };
-    String STR_FLY_REL_PG_FRAME
-    {
-        Text [ en-US ] = "Entire frame" ;
-    };
-    String STR_FLY_REL_PG_PRTAREA
-    {
-        Text [ en-US ] = "Frame text area" ;
-    };
-    String STR_REL_BASE
-    {
-        Text [ en-US ] = "Base line" ;
-    };
-    String STR_REL_CHAR
-    {
-        Text [ en-US ] = "Character" ;
-    };
-    String STR_REL_ROW
-    {
-        Text [ en-US ] = "Row" ;
-    };
-    // #i22341#
-    String STR_REL_LINE
-    {
-        Text [ en-US ] = "Line of text" ;
+    ItemList [ en-US ] =
+    {
+        < "Left" ; > ;
+        < "Inside" ; > ;
+        < "Right" ; > ;
+        < "Outside" ; > ;
+        < "Center" ; > ;
+        < "From left" ; > ;
+        < "From inside" ; > ;
+        < "Paragraph area" ; > ;
+        < "Paragraph text area" ; > ;
+        < "Left page border" ; > ;
+        < "Inner page border" ; > ;
+        < "Right page border" ; > ;
+        < "Outer page border" ; > ;
+        < "Left paragraph border" ; > ;
+        < "Inner paragraph border" ; > ;
+        < "Right paragraph border" ; > ;
+        < "Outer paragraph border" ; > ;
+        < "Entire page" ; > ;
+        < "Page text area" ; > ;
+        < "Top" ; > ;
+        < "Bottom" ; > ;
+        < "Center" ; > ;
+        < "From top" ; > ;
+        < "From bottom" ; > ;
+        < "Below" ; > ;
+        < "From right" ; > ;
+        < "Top page border" ; > ;
+        < "Bottom page border" ; > ;
+        < "Top paragraph border" ; > ;
+        < "Bottom paragraph border" ; > ;
+        < "Margin" ; > ;
+        < "Paragraph text area" ; > ;
+        < "Left frame border" ; > ;
+        < "Inner frame border" ; > ;
+        < "Right frame border" ; > ;
+        < "Outer frame border" ; > ;
+        < "Entire frame" ; > ;
+        < "Frame text area" ; > ;
+        < "Base line" ; > ;
+        < "Character" ; > ;
+        < "Row" ; > ;
+        < "Line of text" ; > ;
     };
 };
 
diff --git a/sw/source/ui/utlui/utlui.src b/sw/source/ui/utlui/utlui.src
index 61f4653..574f52e 100644
--- a/sw/source/ui/utlui/utlui.src
+++ b/sw/source/ui/utlui/utlui.src
@@ -22,99 +22,33 @@
 #include "helpid.h"
 #include "comcore.hrc"
 
-Resource RID_SHELLRES_AUTOFMTSTRS
+StringArray RID_SHELLRES_AUTOFMTSTRS
 {
-    String STR_AUTOFMTREDL_DEL_EMPTY_PARA+1
+    ItemList [ en-US ] =
     {
-        Text [ en-US ] = "Remove empty paragraphs" ;
+        < "Remove empty paragraphs" ; > ;
+        < "Use replacement table" ; > ;
+        < "Correct TWo INitial CApitals" ; > ;
+        < "Capitalize first letter of sentences" ; > ;
+        < "Replace \"standard\" quotes with %1 \bcustom%2 quotes" ; > ;
+        < "Replace Custom Styles" ; > ;
+        < "Bullets replaced"; > ;
+        < "Automatic _underline_"; > ;
+        < "Automatic *bold*"; > ;
+        < "Replace 1/2 ... with ½ ..." ; > ;
+        < "URL recognition" ; > ;
+        < "Replace dashes" ; > ;
+        < "Replace 1st... with 1^st..." ; > ;
+        < "Combine single line paragraphs"; > ;
+        < "Set \"Text body\" Style"; > ;
+        < "Set \"Text body indent\" Style"; > ;
+        < "Set \"Hanging indent\" Style"; > ;
+        < "Set \"Text body indent\" Style"; > ;
+        < "Set \"Heading $(ARG1)\" Style"; > ;
+        < "Set \"Bullet\" or \"Numbering\" Style"; > ;
+        < "Combine paragraphs"; > ;
+        < "Add non breaking space"; > ;
     };
-    String STR_AUTOFMTREDL_USE_REPLACE+1
-    {
-        Text [ en-US ] = "Use replacement table" ;
-    };
-    String STR_AUTOFMTREDL_CPTL_STT_WORD+1
-    {
-        Text [ en-US ] = "Correct TWo INitial CApitals" ;
-    };
-    String STR_AUTOFMTREDL_CPTL_STT_SENT+1
-    {
-        Text [ en-US ] = "Capitalize first letter of sentences" ;
-    };
-    String STR_AUTOFMTREDL_TYPO+1
-    {
-        Text [ en-US ] = "Replace \"standard\" quotes with %1 \bcustom%2 quotes" ;
-    };
-    String STR_AUTOFMTREDL_USER_STYLE+1
-    {
-        Text [ en-US ] = "Replace Custom Styles" ;
-    };
-    String STR_AUTOFMTREDL_BULLET+1
-    {
-        Text [ en-US ] = "Bullets replaced";
-    };
-    String STR_AUTOFMTREDL_UNDER+1
-    {
-        Text [ en-US ] = "Automatic _underline_";
-    };
-    String STR_AUTOFMTREDL_BOLD+1
-    {
-        Text [ en-US ] = "Automatic *bold*";
-    };
-    String STR_AUTOFMTREDL_FRACTION+1
-    {
-        Text [ en-US ] = "Replace 1/2 ... with ½ ..." ;
-    };
-    String STR_AUTOFMTREDL_DETECT_URL+1
-    {
-        Text [ en-US ] = "URL recognition" ;
-    };
-    String STR_AUTOFMTREDL_DASH+1
-    {
-        Text [ en-US ] = "Replace dashes" ;
-    };
-    String STR_AUTOFMTREDL_ORDINAL+1
-    {
-        Text [ en-US ] = "Replace 1st... with 1^st..." ;
-    };
-    String STR_AUTOFMTREDL_RIGHT_MARGIN+1
-    {
-        Text [ en-US ] = "Combine single line paragraphs";
-    };
-
-    String STR_AUTOFMTREDL_SET_TMPL_TEXT +1
-    {
-        Text [ en-US ] = "Set \"Text body\" Style";
-    };
-    String STR_AUTOFMTREDL_SET_TMPL_INDENT  +1
-    {
-        Text [ en-US ] = "Set \"Text body indent\" Style";
-    };
-    String STR_AUTOFMTREDL_SET_TMPL_NEG_INDENT  +1
-    {
-        Text [ en-US ] = "Set \"Hanging indent\" Style";
-    };
-    String STR_AUTOFMTREDL_SET_TMPL_TEXT_INDENT +1
-    {
-        Text [ en-US ] = "Set \"Text body indent\" Style";
-    };
-    String STR_AUTOFMTREDL_SET_TMPL_HEADLINE +1
-    {
-        Text [ en-US ] = "Set \"Heading $(ARG1)\" Style";
-    };
-    String STR_AUTOFMTREDL_SET_NUMBULET +1
-    {
-        Text [ en-US ] = "Set \"Bullet\" or \"Numbering\" Style";
-    };
-
-    String STR_AUTOFMTREDL_DEL_MORELINES +1
-    {
-        Text [ en-US ] = "Combine paragraphs";
-    };
-    String STR_AUTOFMTREDL_NON_BREAK_SPACE +1
-    {
-        Text [ en-US ] = "Add non breaking space";
-    };
-
 };
 
 // Miscellaneous
diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx
index ab67b03..0172542 100644
--- a/sw/source/uibase/utlui/initui.cxx
+++ b/sw/source/uibase/utlui/initui.cxx
@@ -19,6 +19,7 @@
 
 #include <config_features.h>
 
+#include <tools/resary.hxx>
 #include <unotools/localedatawrapper.hxx>
 #include <viewsh.hxx>
 #include <initui.hxx>
@@ -269,35 +270,26 @@ SwGlossaryList* GetGlossaryList()
     return pGlossaryList;
 }
 
-struct ImpAutoFormatNameListLoader : public Resource
-{
-    explicit ImpAutoFormatNameListLoader( std::vector<OUString>& rLst );
-};
-
 void ShellResource::GetAutoFormatNameLst_() const
 {
     assert(!pAutoFormatNameLst);
     pAutoFormatNameLst.reset( new std::vector<OUString> );
     pAutoFormatNameLst->reserve(STR_AUTOFMTREDL_END);
-    ImpAutoFormatNameListLoader aTmp(*pAutoFormatNameLst);
-}
 
-ImpAutoFormatNameListLoader::ImpAutoFormatNameListLoader( std::vector<OUString>& rLst )
-    : Resource( ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr) )
-{
-    for( sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n )
+    ResStringArray aStringArray(ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr));
+    assert(aStringArray.Count() == STR_AUTOFMTREDL_END);
+    for (sal_uInt16 n = 0; n < STR_AUTOFMTREDL_END; ++n)
     {
-        OUString p(ResId(n + 1, *pSwResMgr));
-        if(STR_AUTOFMTREDL_TYPO == n)
+        OUString p(aStringArray.GetString(n));
+        if (STR_AUTOFMTREDL_TYPO == n)
         {
             const SvtSysLocale aSysLocale;
             const LocaleDataWrapper& rLclD = aSysLocale.GetLocaleData();
             p = p.replaceFirst("%1", rLclD.getDoubleQuotationMarkStart());
             p = p.replaceFirst("%2", rLclD.getDoubleQuotationMarkEnd());
         }
-        rLst.insert(rLst.begin() + n, p);
+        pAutoFormatNameLst->push_back(p);
     }
-    FreeResource();
 }
 
 OUString SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
commit 6efdd843c831527b2880959746c302fca87c40db
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 7 13:18:22 2017 +0000

    Related: tdf#105371 we can do this with a sizegroup
    
    Change-Id: Ie37a3d960ec244033f2b05e7a902c7a23ba9b94d

diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 154e201..25798fd 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -202,9 +202,6 @@ private:
     VclPtr<RadioButton>    m_pColumnsBtn;
     VclPtr<CheckBox>       m_pAllSheetsCB;
 
-    VclPtr<FixedText>       m_pFindLabel;
-    VclPtr<FixedText>       m_pReplaceLabel;
-
     SfxBindings&    rBindings;
     bool            bWriter;
     bool            bSearch;
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index b2ca9e0..2b9f124 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -333,16 +333,6 @@ SvxSearchDialog::SvxSearchDialog( vcl::Window* pParent, SfxChildWindow* pChildWi
     get(m_pColumnsBtn, "cols");
     get(m_pAllSheetsCB, "allsheets");
 
-    //align find and replace inputs without a predefined with for the labels
-    get(m_pFindLabel, "label4"); //"Find:"
-    get(m_pReplaceLabel, "label5"); //"Replace:"
-    long nFindWidth = m_pFindLabel->get_preferred_size().Width();
-    long nReplaceWidth = m_pReplaceLabel->get_preferred_size().Width();
-    if ( nFindWidth > nReplaceWidth)
-       m_pReplaceLabel->set_width_request(nFindWidth);
-    else
-       m_pFindLabel->set_width_request(nReplaceWidth);
-
     // m_pSimilarityBtn->set_height_request(m_pSimilarityBox->get_preferred_size().Height());
     // m_pJapOptionsBtn->set_height_request(m_pJapOptionsCB->get_preferred_size().Height());
 
@@ -422,8 +412,6 @@ void SvxSearchDialog::dispose()
     m_pRowsBtn.clear();
     m_pColumnsBtn.clear();
     m_pAllSheetsCB.clear();
-    m_pFindLabel.clear();
-    m_pReplaceLabel.clear();
     SfxModelessDialog::dispose();
 }
 
diff --git a/svx/uiconfig/ui/findreplacedialog.ui b/svx/uiconfig/ui/findreplacedialog.ui
index 358848d..8a21d44 100644
--- a/svx/uiconfig/ui/findreplacedialog.ui
+++ b/svx/uiconfig/ui/findreplacedialog.ui
@@ -1101,5 +1101,9 @@
   </object>
   <object class="GtkSizeGroup" id="sizegroup2">
     <property name="ignore_hidden">True</property>
+    <widgets>
+      <widget name="label4"/>
+      <widget name="label5"/>
+    </widgets>
   </object>
 </interface>


More information about the Libreoffice-commits mailing list