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


The first thing I'd check is : Is IllegalIdentifierException defined
in this context ?, try adding ucb:: in front of it, if that doesn't
work then try adding #include
"com/sun/start/ucb/IllegalIdentifierException.hpp"

Norbert



On Thu, Oct 21, 2010 at 12:11 AM, Kevin Hunter <hunteke@earlham.edu> wrote:
On 10/20/2010 04:58 PM, Thomas Klausner wrote:

On Tue, Oct 19, 2010 at 02:44:17PM +0200, Thomas Klausner wrote:

With up-to-date git, I now see:
..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx: In member
function 'virtual
com::sun::star::uno::Reference<com::sun::star::ucb::XContent>
 fileaccess::FileProvider::queryContent(const
com::sun::star::uno::Reference<com::sun::star::ucb::XContentIdentifier>&)':
..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx:342: error:
expected primary-expression before '(' token
..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx:342: error:
expected primary-expression before '(' token
..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx:342: error:
expected `)' before '__PRETTY_FUNCTION__'
..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx:342: error:
expected primary-expression before ')' token
..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx:342: error:
expected `)' before '__PRETTY_FUNCTION__'
..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx:342: error:
expected `)' before ';' token
..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx:342: error:
expected `)' before ';' token

Line 342 is:
    throw IllegalIdentifierException( ::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference<
 uno::XInterface>() );

Looking with g++ -E, this expands to:
        throw IllegalIdentifierException( ::rtl::OUString(
"..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx" ":"
__PRETTY_FUNCTION__ ":" "342" "; ",
((sal_Int32)(sizeof("..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx"
":" __PRETTY_FUNCTION__ ":" "342" "; ")-1)), (((rtl_TextEncoding) 11)) ),
uno::Reference<  uno::XInterface>() );

I can't finish a compile, or get your error right now, but I've three
thoughts:

1. Macro use?
============
LibreOffice is using macros.  They aren't bad per se, but can lead to
/really/ obscure (difficult!) to find errors.  In this case, I don't think
the macro is the problem; however, since the bug is in a line that contains
a one, my "spidey sense" went all haywire.  There went 10 minutes.

2. Extra parentheses?
=====================
I'm grasping at straws here, but I broke the long line into parts:

throw IllegalIdentifierException(
 ::rtl::OUString(
   "..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx" ":"
__PRETTY_FUNCTION__ ":" "342" "; ",
   (   // <--- 1

(sal_Int32)(sizeof("..../build/libreoffice-3.2.99.2/ucb/source/ucp/file/prov.cxx"
":" __PRETTY_FUNCTION__ ":" "342" "; ") -1)
   ),  // <--- 1
   (   // <--- 2
     ( // <--- 3
       (rtl_TextEncoding) 11
     ) // <--- 3
   )   // <--- 2
 ),
 uno::Reference< uno::XInterface >()
);

Are any of those parenthesis pairs a problem?  (1, 2, or 3)

3. Misinterpretation of __PRETTY_FUNCTION__?
============================================
What is __PRETTY_FUNCTION__?  It changed in GCC 3.4, I believe.  Now,
contrary to the implicit understanding from its all caps nature, it is *not*
a macro; it's a language identifier:

http://gcc.gnu.org/onlinedocs/gcc/Function-Names.html

The clue that it's not a macro (aside from reading the documentation) is
that it does not get processed out by the -E flag to g++.  Thus, the trip up
is that it can't be concatenated as if it were an inline string.  See the
attached example CPP code.  Note that to make it compile, you'll need to
comment out line 37.

So, I believe the issue *is* with the macro definition, but, as is usual
with macros, not where one expects.

Cheers,

Kevin

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice



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.