Hi all,<br><br>If you now give for "Sheet1" a new name, e.g."SheetA" and that name exists, the new name will become "SheetA_2" without a question for the user.<br><br>Joost<br><br><div class="gmail_quote">
2010/12/22 Kohei Yoshida <span dir="ltr"><<a href="mailto:kyoshida@novell.com">kyoshida@novell.com</a>></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>
> Hi all,<br>
><br>
> The proposed layout change of Bernhard looks good to me, but there are<br>
> some pitfalls.<br>
><br>
> > Christoph wrote:<br>
> > [...]<br>
> > * If the user copies a sheet (several sheets) within the same<br>
> > file, then the new sheets will be renamed anyway. Right?<br>
> > Although the user did not check the "Rename" checkbox ... --><br>
> As<br>
> > far as I understand, we require unique sheet names. The<br>
> checkbox<br>
> > refers to a user intended name change.<br>
><br>
> That is just the problem for the programmer, that he does know what<br>
> the user is going to do, and the user can change his mind.<br>
><br>
> + use case mc01: The user copies "SheetA" in the same document. The<br>
> proposed new name becomes "SheetA_1". Now the user decides to copy the<br>
> sheet to another document, where "SheetA" does not exist, the proposed<br>
> new name should be "SheetA",<br>
> but only if the user did not rename the new name!<br>
> 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>
><br>
> > Bernhard wrote:<br>
> > [...]<br>
> > | Place to insert<br>
> |<br>
> > |<br>
> +-------------------------------------------------------------+ |<br>
> > | /\ | Sheet 1<br>
> | |<br>
> > | || | $sheetname 2<br>
> | |<br>
> > | \/ | Sheet 2<br>
> | |<br>
> > | | Sheet 3<br>
> | |<br>
> > |<br>
> +-------------------------------------------------------------+ |<br>
><br>
> That is an challenge for the programmer, because the content of the<br>
> list must change on the fly.Thus make the challenge not too big:<br>
> display "- position -" instand of "$sheetname 2".<br>
<br>
</div>Yup, I agree. Displaying the '- position -' 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>
> What to do when the user clicks "Sheet 3"?<br>
><br>
> Drag-and-drop of "- position -" must be implemented, but not for the<br>
> 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>
<<a href="mailto:kyoshida@novell.com">kyoshida@novell.com</a>><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>