Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello Markus,

On Mon, 2011-03-21 at 19:33 +0100, Markus Mohrhard wrote:

this patch allows one anonymous db range per sheet instead of one per
document. There are still some places the old anonymous db range is
used, but I#m not quite sure whether i should change these.

Probably yes.  The idea is to replace the concept of one global
anonymous DB name with one anonymous name per sheet *across the calc
code*, so we need to make changes in every place where the global
anonymous name is used currently.  After this change, we will no longer
have a global anonymous name anymore (except for backward compatibility
handling in the import code, perhaps).

With that in mind, let's create a central method that generates
sheet-local anonymous names, and use it everywhere.  If I were you I
would create a static method inside ScDPCollection class for that.

Additionally it allows one autofilter per sheet.

Nice!  This is what people have been asking for.

I'd appreciate a better solution for generating strDBNoName, but i
have found no way to append an integer to String.

We tend to use rtl::OUStringBuffer for appending integers to string.
So, for instance, you could do

rtl::OUStringBuffer aBuf;
aBuf.append(ScGlobal::GetRscString(STR_DB_NONAME));
aBuf.append(nTab);
aBuf.makeStringAndClear() // <= to get rtl::OUString instance.

to generate sheet local anonymous names.

BTW, how does this handle sheet position changes?  For example, let's
assume you have two sheets with auto filter applied (hence two
sheet-local anonymous DBs), and you swap their position.  Would the DB
ranges be still valid?

Kohei




Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.