Hi all,<br><br>If you now give for &quot;Sheet1&quot; a new name, e.g.&quot;SheetA&quot; and that name exists, the new name will become &quot;SheetA_2&quot; without a question for the user.<br><br>Joost<br><br><div class="gmail_quote">
2010/12/22 Kohei Yoshida <span dir="ltr">&lt;<a href="mailto:kyoshida@novell.com">kyoshida@novell.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Wed, 2010-12-22 at 12:48 +0100, Joost Eekhoorn wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; The proposed layout change of Bernhard looks good to me, but there are<br>
&gt; some pitfalls.<br>
&gt;<br>
&gt; &gt; Christoph wrote:<br>
&gt; &gt; [...]<br>
&gt; &gt;     * If the user copies a sheet (several sheets) within the same<br>
&gt; &gt;       file, then the new sheets will be renamed anyway. Right?<br>
&gt; &gt;       Although the user did not check the &quot;Rename&quot; checkbox ... --&gt;<br>
&gt; As<br>
&gt; &gt;       far as I understand, we require unique sheet names. The<br>
&gt; checkbox<br>
&gt; &gt;       refers to a user intended name change.<br>
&gt;<br>
&gt; That is just the problem for the programmer, that he does know what<br>
&gt; the user is going to do, and the user can change his mind.<br>
&gt;<br>
&gt; + use case mc01: The user copies &quot;SheetA&quot; in the same document. The<br>
&gt; proposed new name becomes &quot;SheetA_1&quot;. Now the user decides to copy the<br>
&gt; sheet to another document, where &quot;SheetA&quot; does not exist, the proposed<br>
&gt; new name should be &quot;SheetA&quot;,<br>
&gt; but only if the user did not rename the new name!<br>
&gt; I do not known if that is possible, with keeping the code transparant.<br>
<br>
</div>Well, this is not that big of an issue since we do have access to the<br>
ScDocument instance of the destination document.  When the user switches<br>
the destination document, we can ask the new ScDocument instance whether<br>
there is a name clash.  I already put some code to handle some aspect of<br>
that.<br>
<div class="im"><br>
&gt;<br>
&gt; &gt; Bernhard wrote:<br>
&gt; &gt; [...]<br>
&gt; &gt; |    Place to insert<br>
&gt;    |<br>
&gt; &gt; |<br>
&gt;  +-------------------------------------------------------------+  |<br>
&gt; &gt; | /\ | Sheet 1<br>
&gt; |  |<br>
&gt; &gt; | || |  $sheetname 2<br>
&gt; |  |<br>
&gt; &gt; | \/ | Sheet 2<br>
&gt; |  |<br>
&gt; &gt; |    | Sheet 3<br>
&gt; |  |<br>
&gt; &gt; |<br>
&gt;  +-------------------------------------------------------------+  |<br>
&gt;<br>
&gt; That is an challenge for the programmer, because the content of the<br>
&gt; list must change on the fly.Thus make the challenge not too big:<br>
&gt; display &quot;- position -&quot; instand of &quot;$sheetname 2&quot;.<br>
<br>
</div>Yup, I agree.  Displaying the &#39;- position -&#39; or something like that<br>
would make more sense, especially when the user is trying to move or<br>
copy multiple sheets.<br>
<br>
Changing the content of the list is, although it requires some code to<br>
write, can be doable.  This just means we need to re-populate the list<br>
content every time the insertion point moves, but it can be done.<br>
<div class="im"><br>
&gt; What to do when the user clicks &quot;Sheet 3&quot;?<br>
&gt;<br>
&gt; Drag-and-drop of &quot;- position -&quot; must be implemented, but not for the<br>
&gt; existing sheets!<br>
<br>
</div>My preferred approach is to create two buttons to move the insertion<br>
position up or down, instead of relying on the user clicking on the<br>
sheet name in the list.  To me 1) that makes more sense, and 2) is<br>
easier to implement than handling mouse click events on the list<br>
control.<br>
<div class="im"><br>
Kohei<br>
<br>
--<br>
Kohei Yoshida, LibreOffice hacker, Calc<br>
&lt;<a href="mailto:kyoshida@novell.com">kyoshida@novell.com</a>&gt;<br>
<br>
</div>_______________________________________________<br>
LibreOffice mailing list<br>
<a href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/libreoffice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a><br>
</blockquote></div><br>