changeset 26568:73654374b86f

maint: merge stable to default.
author Rik <rik@octave.org>
date Thu, 17 Jan 2019 08:28:52 -0800
parents 8bed6950ddde (current diff) bf05a7c16e9e (diff)
children 14cc8f61eba0
files libinterp/octave-value/ov-java.cc
diffstat 10 files changed, 126 insertions(+), 90 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/languages/ja_JP.ts	Wed Jan 16 11:56:09 2019 -0800
+++ b/libgui/languages/ja_JP.ts	Thu Jan 17 08:28:52 2019 -0800
@@ -102,7 +102,7 @@
     <message>
         <location line="+3"/>
         <source>Run Selection</source>
-        <translation type="unfinished">選択部を実行</translation>
+        <translation>選択部を実行</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -374,12 +374,12 @@
     <message>
         <location line="+3"/>
         <source>C# verbatim string</source>
-        <translation type="unfinished"></translation>
+        <translation>C# verbatim 文字列</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Inactive C# verbatim string</source>
-        <translation type="unfinished"></translation>
+        <translation>C# verbatim 文字列をインアクティブ</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -608,7 +608,7 @@
     <message>
         <location line="+3"/>
         <source>Hash</source>
-        <translation>ハッシ</translation>
+        <translation>ハッシュ</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1045,36 +1045,39 @@
         <source>Could not copy help collection to temporary
 file. Search capabilities may be affected.
 %1</source>
-        <translation type="unfinished"></translation>
+        <translation>ヘルプコレクション一時ファイルびコピーできませんでした.
+検索機能に影響があるかもしれません.
+%1</translation>
     </message>
     <message>
         <location line="+12"/>
         <source>Could not setup the data required for the
 documentation viewer. Only help texts in
 the Command Window will be available.</source>
-        <translation type="unfinished"></translation>
+        <translation>ドキュメントビューワーに必要なデータを
+設定できませんでした.コマンドウィンドウのヘルプテキストのみが使用可能です.</translation>
     </message>
     <message>
         <location line="+21"/>
         <source>Find:</source>
-        <translation type="unfinished"></translation>
+        <translation>検索:</translation>
     </message>
     <message>
         <location line="+7"/>
         <location line="+1"/>
         <source>Search forward</source>
-        <translation type="unfinished"></translation>
+        <translation>前方検索</translation>
     </message>
     <message>
         <location line="+5"/>
         <location line="+1"/>
         <source>Search backward</source>
-        <translation type="unfinished"></translation>
+        <translation>後方検索</translation>
     </message>
     <message>
         <location line="+74"/>
         <source>Function Index</source>
-        <translation type="unfinished"></translation>
+        <translation>関数インデックス</translation>
     </message>
     <message>
         <location line="+98"/>
@@ -1094,17 +1097,17 @@
     <message>
         <location line="+43"/>
         <source>Find</source>
-        <translation type="unfinished">検索</translation>
+        <translation>検索</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Zoom in</source>
-        <translation type="unfinished"></translation>
+        <translation>ズームイン</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Zoom out</source>
-        <translation type="unfinished"></translation>
+        <translation>ズームアウト</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1130,17 +1133,17 @@
     <message>
         <location line="+84"/>
         <source>Previous pages</source>
-        <translation type="unfinished"></translation>
+        <translation>前のページ</translation>
     </message>
     <message>
         <location line="+14"/>
         <source>Next pages</source>
-        <translation type="unfinished"></translation>
+        <translation>次のページ</translation>
     </message>
     <message>
         <location line="+383"/>
         <source>Unable to register help file %1.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">ヘルプファイル %1 を登録できません.</translation>
     </message>
 </context>
 <context>
@@ -1161,17 +1164,17 @@
     <message>
         <location filename="../src/dw-main-window.cc" line="+49"/>
         <source>&amp;Close</source>
-        <translation type="unfinished">閉じる (&amp;C)</translation>
+        <translation>閉じる (&amp;C)</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Close &amp;All</source>
-        <translation type="unfinished"></translation>
+        <translation>全てを閉じる (&amp;A)</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Close &amp;Other</source>
-        <translation type="unfinished"></translation>
+        <translation>他を閉じる (&amp;O)</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -1735,29 +1738,32 @@
 with the selected encoding %2.
 
 Modifying and saving the file might cause data loss!</source>
-        <translation type="unfinished"></translation>
+        <translation>選択されたエンコード %2 でファイル %1 を読み込む時に
+問題が生じました.
+
+修正して保存するをデータが失われるかもしれません !</translation>
     </message>
     <message>
         <location line="+10"/>
         <source>&amp;Edit anyway</source>
-        <translation type="unfinished"></translation>
+        <translation>編集を強行 (&amp;E)</translation>
     </message>
     <message>
         <location line="+1"/>
         <location line="+57"/>
         <source>Chan&amp;ge encoding</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">エンコードの変更 (&amp;g)</translation>
     </message>
     <message>
         <location line="-56"/>
         <location line="+49"/>
         <source>&amp;Close</source>
-        <translation type="unfinished">閉じる (&amp;C)</translation>
+        <translation>閉じる (&amp;C)</translation>
     </message>
     <message>
         <location line="+11"/>
         <source>Select new default encoding</source>
-        <translation type="unfinished"></translation>
+        <translation>新しい既定を選択</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1766,7 +1772,10 @@
 
 This does not change the default encoding.
 </source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">現在のファイルをリロードするための新しいエンコード
+選択してください.
+
+これは既定のエンコードに影響を与えません.</translation>
     </message>
     <message>
         <location line="+212"/>
@@ -1792,7 +1801,10 @@
 can not be applied.
 
 Please select another one!</source>
-        <translation type="unfinished"></translation>
+        <translation>現在のエンコード %1
+は適用できません.
+
+他のエンコードを選択してください !</translation>
     </message>
     <message>
         <location line="+11"/>
@@ -1801,7 +1813,9 @@
 Using it would result in data loss!
 
 Please select another one!</source>
-        <translation type="unfinished"></translation>
+        <translation>現在のエディタの内容は選択されたエンコード %1 ではエンコードできません.
+このままではデータが消失します !
+他のエンコードを選択してください !</translation>
     </message>
     <message>
         <location line="-115"/>
@@ -1822,7 +1836,13 @@
 call your script using its name as an Octave command.
 
 Do you want to choose another name?</source>
-        <translation type="unfinished"></translation>
+        <translation>&quot;%1&quot;
+は正しい identifier ではありません.
+
+もしこのファイル名のままにすれば, スクリプトをこの名前で
+Octave のコマンドとしてコールできません..
+
+他の名前を選択しますか ?</translation>
     </message>
     <message>
         <location line="+135"/>
@@ -1951,7 +1971,7 @@
     <message>
         <location line="-329"/>
         <source>Double-click to open file/folder, right click for alternatives</source>
-        <translation type="unfinished"></translation>
+        <translation>ダブルクリックでファイル / フォルダを開く,右クリックでオルタナティブ</translation>
     </message>
     <message>
         <location line="+282"/>
@@ -2444,7 +2464,7 @@
     <message>
         <location line="+121"/>
         <source>Double-click a command to transfer it to the Command Window.</source>
-        <translation type="unfinished"></translation>
+        <translation>ダブルクリックでコマンドをコマンドウィンドウに移します.</translation>
     </message>
     <message>
         <location line="+8"/>
@@ -2581,7 +2601,8 @@
         <location line="+44"/>
         <source>%1 is a built-in, compiled or inline
 function and can not be edited.</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 は組み込み, コンパイルされた, またはインライン関数であり,
+編集できません.</translation>
     </message>
     <message>
         <location line="+40"/>
@@ -3124,7 +3145,7 @@
     <message>
         <location line="+3"/>
         <source>Hide tools tips</source>
-        <translation type="unfinished"></translation>
+        <translation>ツールのティップスを隠す</translation>
     </message>
 </context>
 <context>
@@ -3137,7 +3158,7 @@
     <message>
         <location line="+5"/>
         <source>Previous</source>
-        <translation></translation>
+        <translation>前</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -3461,12 +3482,12 @@
     <message>
         <location line="+2"/>
         <source>Move Tab Left</source>
-        <translation type="unfinished"></translation>
+        <translation>左タブに移動</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Move Tab Right</source>
-        <translation type="unfinished"></translation>
+        <translation>右タブに移動</translation>
     </message>
     <message>
         <location line="+17"/>
@@ -3703,22 +3724,22 @@
     <message>
         <location line="+154"/>
         <source>Documentation Viewer</source>
-        <translation type="unfinished"></translation>
+        <translation>ドキュメントビューワー</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Browser</source>
-        <translation type="unfinished"></translation>
+        <translation>ブラウザ</translation>
     </message>
     <message>
         <location line="+79"/>
         <source>Import shortcuts from file...</source>
-        <translation type="unfinished"></translation>
+        <translation>ファイルからショートカットをインポート</translation>
     </message>
     <message>
         <location line="+5"/>
-        <source>Export shortcuts to file...</source>
-        <translation type="unfinished"></translation>
+        <source>ファイルへショートカットをエキスポート</source>
+        <translation></translation>
     </message>
     <message>
         <location line="+11"/>
@@ -3784,17 +3805,17 @@
     <message>
         <location line="+5"/>
         <source>Go to Homepage</source>
-        <translation type="unfinished"></translation>
+        <translation>ホームページへ</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Go Back one Page</source>
-        <translation type="unfinished"></translation>
+        <translation>1 ページ戻る</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Go Forward one Page</source>
-        <translation type="unfinished"></translation>
+        <translation>1 ページ進む</translation>
     </message>
     <message>
         <location line="+68"/>
@@ -3843,12 +3864,12 @@
     <message>
         <location line="+2"/>
         <source>Find &amp; Replace in Dock Widgets</source>
-        <translation type="unfinished"></translation>
+        <translation>ドックウィジェットで検索と置換</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Zooming in Editor and Documentation</source>
-        <translation type="unfinished"></translation>
+        <translation>エディタとドキュメントでズーム</translation>
     </message>
     <message>
         <location line="+21"/>
@@ -3970,17 +3991,17 @@
     <message>
         <location line="+1"/>
         <source>Selected Foreground</source>
-        <translation type="unfinished"></translation>
+        <translation>選択された前景</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Selected Background</source>
-        <translation type="unfinished"></translation>
+        <translation>選択された後景</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Alternate Background</source>
-        <translation type="unfinished"></translation>
+        <translation>後景をオルタネート</translation>
     </message>
     <message>
         <location line="+273"/>
@@ -4577,7 +4598,7 @@
     <message>
         <location line="+57"/>
         <source>(requires restart)</source>
-        <translation type="unfinished"></translation>
+        <translation>(要再起動)</translation>
     </message>
     <message>
         <location line="+32"/>
@@ -4587,52 +4608,52 @@
     <message>
         <location line="+53"/>
         <source>Use system icon theme if available (requires restart)</source>
-        <translation type="unfinished"></translation>
+        <translation>使用可能ならシステムのアイコンテーマを使用</translation>
     </message>
     <message>
         <location line="+70"/>
         <source>Toolbar Icons</source>
-        <translation type="unfinished"></translation>
+        <translation>ツールバーアイコン</translation>
     </message>
     <message>
         <location line="+186"/>
         <source>Language</source>
-        <translation type="unfinished"></translation>
+        <translation>言語</translation>
     </message>
     <message>
         <location line="+27"/>
         <source>Style</source>
-        <translation type="unfinished"></translation>
+        <translation>スタイル</translation>
     </message>
     <message>
         <location line="+27"/>
         <source>Initial working directory of Octave interpreter</source>
-        <translation type="unfinished"></translation>
+        <translation>Octave インタープリタの初期された作業ディレクトリ</translation>
     </message>
     <message>
         <location line="+18"/>
         <source>Restore last working directory of previous session</source>
-        <translation type="unfinished"></translation>
+        <translation >前のセッションの作業ディレクトリをリストア</translation>
     </message>
     <message>
         <location line="+45"/>
         <source>Command</source>
-        <translation type="unfinished">コマンド</translation>
+        <translation>コマンド</translation>
     </message>
     <message>
         <location line="+208"/>
         <source>Set focus to Command Window when running a command from within another widget</source>
-        <translation type="unfinished"></translation>
+        <translation>他のウィジェットからコマンドが操作中のコマンドウィンドウにフォーカスをセット</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>Print debug location in Command Window in addition to the marker in the editor</source>
-        <translation type="unfinished"></translation>
+        <translation>エディタ中のマーカーに加えたコマンドウィンドウ中にデバッグの位置を表示</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>Command Window Colors</source>
-        <translation type="unfinished"></translation>
+        <translation>コマンドウィンドウのカラー</translation>
     </message>
     <message>
         <location line="+172"/>
@@ -4722,7 +4743,7 @@
     <message>
         <location line="+238"/>
         <source>Debugging</source>
-        <translation type="unfinished"></translation>
+        <translation>デバッグ</translation>
     </message>
     <message>
         <location line="+8"/>
@@ -4758,7 +4779,7 @@
     <message>
         <location line="+75"/>
         <source>Initial file browser directory (only if not synchronized with initial working directory of Octave)</source>
-        <translation type="unfinished"></translation>
+        <translation>初期のファイルブラウザのディレクトリ(Octave の初期作業ディレクトリとシンクロしないとき)</translation>
     </message>
     <message>
         <location line="+75"/>
@@ -4869,7 +4890,7 @@
     <message>
         <location line="+59"/>
         <source>Disable global shortcuts when Command Window has focus</source>
-        <translation type="unfinished"></translation>
+        <translation>コマンドウィンドウフォーカス時大域的なショートカットを使用しない</translation>
     </message>
     <message>
         <location line="+211"/>
--- a/libinterp/corefcn/find.cc	Wed Jan 16 11:56:09 2019 -0800
+++ b/libinterp/corefcn/find.cc	Thu Jan 17 08:28:52 2019 -0800
@@ -408,8 +408,6 @@
   int direction = 1;
   if (nargin > 2)
     {
-      direction = 0;
-
       std::string s_arg = args(2).string_value ();
 
       if (s_arg == "first")
--- a/libinterp/corefcn/gl-render.cc	Wed Jan 16 11:56:09 2019 -0800
+++ b/libinterp/corefcn/gl-render.cc	Thu Jan 17 08:28:52 2019 -0800
@@ -3875,10 +3875,10 @@
 
     if (vp_lim_min(0) > vp_lim_max(0))
       std::swap (vp_lim_min(0), vp_lim_max(0));
-        
+
     if (vp_lim_min(1) > vp_lim_max(1))
       std::swap (vp_lim_min(1), vp_lim_max(1));
-        
+
     float clip_xmin =
       (do_clip ? (vp_lim_min(0) > xmin ? vp_lim_min(0) : xmin) : vp_lim_min(0));
     float clip_ymin =
@@ -4246,21 +4246,26 @@
   {
 #if defined (HAVE_OPENGL)
 
+    int factor = math::round (linewidth * m_devpixratio);
+    if (factor < 1)
+      factor = 1;
+
+    uint16_t pattern = 0xFFFF;
+
     bool solid = false;
 
     if (s == "-")
-      {
-        m_glfcns.glLineStipple (1, static_cast<unsigned short> (0xFFFF));
-        solid = true;
-      }
+      solid = true;
     else if (s == ":")
-      m_glfcns.glLineStipple (linewidth, static_cast<unsigned short> (0x5555));
+      pattern = 0x5555;
     else if (s == "--")
-      m_glfcns.glLineStipple (linewidth, static_cast<unsigned short> (0x0F0F));
+      pattern = 0x0F0F;
     else if (s == "-.")
-      m_glfcns.glLineStipple (linewidth, static_cast<unsigned short> (0x6F6F));
+      pattern = 0x6F6F;
     else
-      m_glfcns.glLineStipple (1, static_cast<unsigned short> (0x0000));
+      pattern = 0x0000;
+
+    m_glfcns.glLineStipple (factor, pattern);
 
     if (solid && ! use_stipple)
       m_glfcns.glDisable (GL_LINE_STIPPLE);
--- a/libinterp/corefcn/oct-map.cc	Wed Jan 16 11:56:09 2019 -0800
+++ b/libinterp/corefcn/oct-map.cc	Thu Jan 17 08:28:52 2019 -0800
@@ -124,7 +124,7 @@
 octave_fields::equal_up_to_order (const octave_fields& other,
                                   octave_idx_type *perm) const
 {
-  bool retval = true;
+  bool retval;
 
   auto p = begin ();
   auto q = other.begin ();
@@ -133,10 +133,7 @@
       if (p->first == q->first)
         perm[p->second] = q->second;
       else
-        {
-          retval = false;
-          break;
-        }
+        return false;
     }
 
   retval = (p == end () && q == other.end ());
--- a/libinterp/corefcn/oct-stream.cc	Wed Jan 16 11:56:09 2019 -0800
+++ b/libinterp/corefcn/oct-stream.cc	Thu Jan 17 08:28:52 2019 -0800
@@ -914,7 +914,6 @@
                   modifier = '\0';
                   type = '\0';
                   buf << s[i++];
-                  empty_buf = false;
                 }
                 break;
               }
@@ -2993,8 +2992,8 @@
 
         if (! is.eof () && ! as_empty)
           {
-            state = is.rdstate ();        // before tellg, since that fails at EOF
-            pos = is.tellg ();
+            state = is.rdstate ();   // before tellg, since that fails at EOF
+
             ch = is.peek ();   // ch == EOF if read failed; no need to chk fail
             if (ch == 'i' || ch == 'j')           // pure imaginary
               {
--- a/libinterp/corefcn/regexp.cc	Wed Jan 16 11:56:09 2019 -0800
+++ b/libinterp/corefcn/regexp.cc	Thu Jan 17 08:28:52 2019 -0800
@@ -107,7 +107,6 @@
                 }
               if (bad_esc_seq || (brace && s[k++] != '}'))
                 {
-                  bad_esc_seq = true;
                   tmpi = 0;
                   warning (R"(malformed octal escape sequence '\o' -- converting to '\0')");
                 }
--- a/libinterp/octave-value/ov-java.cc	Wed Jan 16 11:56:09 2019 -0800
+++ b/libinterp/octave-value/ov-java.cc	Thu Jan 17 08:28:52 2019 -0800
@@ -1811,7 +1811,6 @@
         }
       else
         {
-          found = false;
           error ("cannot convert matrix of type '%s'",
                  val.class_name ().c_str ());
         }
--- a/liboctave/array/dSparse.cc	Wed Jan 16 11:56:09 2019 -0800
+++ b/liboctave/array/dSparse.cc	Thu Jan 17 08:28:52 2019 -0800
@@ -4717,9 +4717,10 @@
           double anorm;
           if (calc_cond)
             {
+              anorm = 0.0;
               for (octave_idx_type j = 0; j < nr; j++)
                 {
-                  double atmp = 0.;
+                  double atmp = 0.0;
                   for (octave_idx_type i = cidx (j); i < cidx (j+1); i++)
                     atmp += fabs (data (i));
                   if (atmp > anorm)
@@ -5056,9 +5057,10 @@
           double anorm;
           if (calc_cond)
             {
+              anorm = 0.0;
               for (octave_idx_type j = 0; j < nr; j++)
                 {
-                  double atmp = 0.;
+                  double atmp = 0.0;
                   for (octave_idx_type i = cidx (j); i < cidx (j+1); i++)
                     atmp += fabs (data (i));
                   if (atmp > anorm)
@@ -5410,9 +5412,10 @@
           double anorm;
           if (calc_cond)
             {
+              anorm = 0.0;
               for (octave_idx_type j = 0; j < nr; j++)
                 {
-                  double atmp = 0.;
+                  double atmp = 0.0;
                   for (octave_idx_type i = cidx (j); i < cidx (j+1); i++)
                     atmp += fabs (data (i));
                   if (atmp > anorm)
--- a/scripts/plot/util/print.m	Wed Jan 16 11:56:09 2019 -0800
+++ b/scripts/plot/util/print.m	Thu Jan 17 08:28:52 2019 -0800
@@ -116,6 +116,7 @@
 ## @qcode{"Renderer"} property.  When the figure @code{RendererMode} property
 ## is @qcode{"auto"} Octave will use the @qcode{"opengl"} renderer for raster
 ## formats (e.g., JPEG) and @qcode{"painters"} for vector formats (e.g., PDF).
+## Those options are only supported for the "qt" graphics tookit.
 ##
 ## @item -svgconvert
 ##   For OpenGL-based graphic toolkits, this enables a different backend
--- a/scripts/plot/util/private/__print_parse_opts__.m	Wed Jan 16 11:56:09 2019 -0800
+++ b/scripts/plot/util/private/__print_parse_opts__.m	Thu Jan 17 08:28:52 2019 -0800
@@ -229,14 +229,28 @@
 
   if (strcmp (arg_st.renderer, "auto"))
     if (opengl_ok && strcmp (graphics_toolkit (arg_st.figure), "qt"))
-      arg_st.renderer = "opengl";
+      ## "opengl" renderer only does text rotations of 0°, 90°, 180°, 270°, ...
+      ht = findall (arg_st.figure, "type", "text");
+      angles = [get(ht, "rotation"){:}];
+      if (any (mod (angles, 90)))
+        arg_st.renderer = "painters";
+      else
+        arg_st.renderer = "opengl";
+      endif
     else
       arg_st.renderer = "painters";
     endif
   elseif (strcmp (arg_st.renderer, "opengl") && ! opengl_ok)
     arg_st.renderer = "painters";
-    warning (["print: unsupported output format \"%s\" for renderer ", ...
-              "\"opengl\"."], arg_st.devopt);
+    warning (['print: unsupported output format "%s" for renderer ', ...
+              '"opengl".'], arg_st.devopt);
+  elseif (! strcmp (graphics_toolkit (arg_st.figure), "qt")
+          && strcmp (arg_st.renderer, "opengl"))
+    ## The opengl renderer only works with the "qt" toolkit
+    arg_st.renderer = "painters";
+    warning ('Octave:print:unsupported-renderer',
+             'print: "opengl" renderer unsupported for "%s" toolkit',
+             graphics_toolkit (arg_st.figure));
   endif