[Libreoffice-commits] core.git: basctl/inc basctl/source

Muhammet Kara muhammet.kara at pardus.org.tr
Mon Aug 1 06:22:57 UTC 2016


 basctl/inc/basidesh.hrc                    |   14 +++++++++-----
 basctl/source/basicide/basicprint.src      |   17 ++++++++++-------
 basctl/source/basicide/basicrenderable.cxx |   11 +++--------
 3 files changed, 22 insertions(+), 20 deletions(-)

New commits:
commit 3e79c2f8c274c906d8ac259b4984b9637498e87b
Author: Muhammet Kara <muhammet.kara at pardus.org.tr>
Date:   Thu Jul 28 17:50:07 2016 +0300

    tdf#91665 l10n: replace string lists - by separate strings
    
    Convert the stingarray to resource strings.
    
    Change-Id: Iae9c52c21fd004c052fa78d959dfa92ad1d16a7d
    Reviewed-on: https://gerrit.libreoffice.org/27641
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc
index 22288cb..36b09dd 100644
--- a/basctl/inc/basidesh.hrc
+++ b/basctl/inc/basidesh.hrc
@@ -27,7 +27,6 @@
 #define RID_POPUP_BRKDLG                ( RID_BASICIDE_START + 10 )
 #define RID_POPUP_BRKPROPS              ( RID_BASICIDE_START + 11 )
 #define RID_POPUP_TABBAR                ( RID_BASICIDE_START + 12 )
-#define RID_PRINTDLG_STRLIST            ( RID_BASICIDE_START + 78 )
 
 #define RID_IMGBTN_REMOVEWATCH          ( RID_BASICIDE_START +  8 )
 #define RID_IMG_INSTALLATION            ( RID_BASICIDE_START + 20 )
@@ -90,14 +89,14 @@
 #define RID_STR_NEWDLG                  ( RID_BASICIDE_START + 59 )
 #define RID_STR_LIBNAMETOLONG           ( RID_BASICIDE_START + 60 )
 #define RID_STR_ERRORCHOOSEMACRO        ( RID_BASICIDE_START + 61 )
-// free
+//free slot
 #define RID_STR_LIBISREADONLY           ( RID_BASICIDE_START + 63 )
 #define RID_STR_REPLACELIB              ( RID_BASICIDE_START + 64 )
 // free
 #define RID_STR_IMPORTNOTPOSSIBLE       ( RID_BASICIDE_START + 67 )
 #define RID_STR_NOIMPORT                ( RID_BASICIDE_START + 68 )
 #define RID_STR_ENTERPASSWORD           ( RID_BASICIDE_START + 69 )
-// free
+
 #define RID_STR_NEWMETH                 ( RID_BASICIDE_START + 71 )
 #define RID_STR_USERMACROS              ( RID_BASICIDE_START + 72 )
 #define RID_STR_USERDIALOGS             ( RID_BASICIDE_START + 73 )
@@ -105,7 +104,7 @@
 #define RID_STR_SHAREMACROS             ( RID_BASICIDE_START + 75 )
 #define RID_STR_SHAREDIALOGS            ( RID_BASICIDE_START + 76 )
 #define RID_STR_SHAREMACROSDIALOGS      ( RID_BASICIDE_START + 77 )
-// free
+//free slots
 #define RID_STR_QUERYREPLACEMACRO       ( RID_BASICIDE_START + 80 )
 #define RID_STR_FILENAME                ( RID_BASICIDE_START + 81 )
 #define RID_STR_APPENDLIBS              ( RID_BASICIDE_START + 82 )
@@ -142,7 +141,12 @@
 #define RID_STR_USERFORMS               ( RID_BASICIDE_START + 119 )
 #define RID_STR_NORMAL_MODULES          ( RID_BASICIDE_START + 120 )
 #define RID_STR_CLASS_MODULES           ( RID_BASICIDE_START + 121 )
+//free slots
+
+#define RID_STR_PRINTDLG_RANGE          ( RID_BASICIDE_START + 130 )
+#define RID_STR_PRINTDLG_ALLPAGES       ( RID_BASICIDE_START + 131 )
+#define RID_STR_PRINTDLG_PAGES          ( RID_BASICIDE_START + 132 )
 
 #endif
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/basctl/source/basicide/basicprint.src b/basctl/source/basicide/basicprint.src
index 1e2ba17..7eb01d2 100644
--- a/basctl/source/basicide/basicprint.src
+++ b/basctl/source/basicide/basicprint.src
@@ -19,14 +19,17 @@
 
 #include <basidesh.hrc>
 
-StringArray RID_PRINTDLG_STRLIST
+String RID_STR_PRINTDLG_RANGE
 {
-    ItemList [en-US] =
-    {
-        < "Print range"; >;
-        < "All ~Pages"; >;
-        < "Pa~ges"; >;
-    };
+    Text [ en-US ] = "Print range";
+};
+String RID_STR_PRINTDLG_ALLPAGES
+{
+    Text [ en-US ] = "All ~Pages";
+};
+String RID_STR_PRINTDLG_PAGES
+{
+    Text [ en-US ] = "Pa~ges";
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx
index 86afd20..6983244 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -37,11 +37,6 @@ Renderable::Renderable (BaseWindow* pWin)
 : cppu::WeakComponentImplHelper< css::view::XRenderable >( maMutex )
 , mpWindow( pWin )
 {
-    ResStringArray aStrings( IDEResId( RID_PRINTDLG_STRLIST )  );
-    DBG_ASSERT( aStrings.Count() >= 3, "resource incomplete" );
-    if( aStrings.Count() < 3 ) // bad resource ?
-        return;
-
     m_aUIProperties.resize( 3 );
 
     // show Subgroup for print range
@@ -49,16 +44,16 @@ Renderable::Renderable (BaseWindow* pWin)
     aPrintRangeOpt.maGroupHint = "PrintRange" ;
     aPrintRangeOpt.mbInternalOnly = true;
     m_aUIProperties[0].Value = setSubgroupControlOpt("printrange",
-        OUString(aStrings.GetString(0)), OUString(), aPrintRangeOpt);
+        IDE_RESSTR( RID_STR_PRINTDLG_RANGE ), OUString(), aPrintRangeOpt);
 
     // create a choice for the range to print
     OUString aPrintContentName( "PrintContent" );
     Sequence< OUString > aChoices( 2 );
     Sequence< OUString > aHelpIds( 2 );
     Sequence< OUString > aWidgetIds( 2 );
-    aChoices[0] = aStrings.GetString( 1 );
+    aChoices[0] = IDE_RESSTR( RID_STR_PRINTDLG_ALLPAGES );
     aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ;
-    aChoices[1] = aStrings.GetString( 2 );
+    aChoices[1] = IDE_RESSTR( RID_STR_PRINTDLG_PAGES );
     aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ;
     aWidgetIds[0] = "printallpages" ;
     aWidgetIds[1] = "printpages" ;


More information about the Libreoffice-commits mailing list