Quantcast

fdo#46808, Adapt UNO services to new style, Part 7, updating ::create

classic Classic list List threaded Threaded
10 messages Options
Noel Grandin Noel Grandin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

fdo#46808, Adapt UNO services to new style, Part 7, updating ::create

Hi

This is part of the ongoing quest to reach the wondrous land of the
shiny new UNO framework.

This patch series updates tons of places to use the new factory ::create
methods .

Unfortunately, it does not come with my usual guarantees - it compiles
and links, but the unit tests generate a bunch of errors.

I'm hoping Stephan can either patch up the problems or point me in the
right direction - build error log attached.

Regards, Noel Grandin



Disclaimer: http://www.peralex.com/disclaimer.html



_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

build_error.log (34K) Download Attachment
Miklos Vajna-2 Miklos Vajna-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: fdo#46808, Adapt UNO services to new style, Part 7, updating ::create

On Fri, Jun 01, 2012 at 03:27:40PM +0200, Noel Grandin <[hidden email]> wrote:
> This patch series updates tons of places to use the new factory
> ::create methods .

Forgot to attach it? :-)
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Stephan Bergmann-2 Stephan Bergmann-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: fdo#46808, Adapt UNO services to new style, Part 7, updating ::create

In reply to this post by Noel Grandin
On 06/01/2012 03:27 PM, Noel Grandin wrote:
> I'm hoping Stephan can either patch up the problems or point me in the
> right direction - build error log attached.

Will take a look.

Stephan

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Noel Grandin Noel Grandin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: fdo#46808, Adapt UNO services to new style, Part 7, updating ::create

In reply to this post by Miklos Vajna-2


On 2012-06-01 16:14, Miklos Vajna wrote:
> On Fri, Jun 01, 2012 at 03:27:40PM +0200, Noel Grandin<[hidden email]>  wrote:
>> This patch series updates tons of places to use the new factory
>> ::create methods .
> Forgot to attach it? :-)
> _______________________________________________

It's inside the zip file. Maybe your email firewall dropped it? Some of
them do that.

Disclaimer: http://www.peralex.com/disclaimer.html


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Riccardo Magliocchetti Riccardo Magliocchetti
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: fdo#46808, Adapt UNO services to new style, Part 7, updating ::create

Hello,

Il 01/06/2012 16:35, Noel Grandin ha scritto:

>
>
> On 2012-06-01 16:14, Miklos Vajna wrote:
>> On Fri, Jun 01, 2012 at 03:27:40PM +0200, Noel
>> Grandin<[hidden email]> wrote:
>>> This patch series updates tons of places to use the new factory
>>> ::create methods .
>> Forgot to attach it? :-)
>> _______________________________________________
>
> It's inside the zip file. Maybe your email firewall dropped it? Some of
> them do that.

I see only the build error log attached

thanks,
riccardo
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Stephan Bergmann-2 Stephan Bergmann-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: fdo#46808, Adapt UNO services to new style, Part 7, updating ::create

On 06/01/2012 04:53 PM, Riccardo Magliocchetti wrote:
>> It's inside the zip file. Maybe your email firewall dropped it? Some of
>> them do that.
>
> I see only the build error log attached

Yep, patches.zip apparently got stripped from the mail as circulated via
the mailing list (it is intact in the copy I got directly from Noel).

Stephan
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Stephan Bergmann-2 Stephan Bergmann-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: fdo#46808, Adapt UNO services to new style, Part 7, updating ::create

In reply to this post by Noel Grandin
On 06/01/2012 03:27 PM, Noel Grandin wrote:

> This is part of the ongoing quest to reach the wondrous land of the
> shiny new UNO framework.
>
> This patch series updates tons of places to use the new factory ::create
> methods .
>
> Unfortunately, it does not come with my usual guarantees - it compiles
> and links, but the unit tests generate a bunch of errors.
>
> I'm hoping Stephan can either patch up the problems or point me in the
> right direction - build error log attached.
Pushed the first of your five patches now, as
<http://cgit.freedesktop.org/libreoffice/core/commit/?id=b3c76dee6d44d07eae404b8d7341e6c88e6c4429>
"fdo#46808, Adapt UNO services to new style, Part 7, updating ::create."
  It needed some trivial merge fixes; and I added a number of tweaks,
esp. inclusion of svtools/util/svt.component in some tests (see attached
fixes-0001.patch for reference).

Will look at the other four patches later.

Thanks,
Stephan

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

fixes-0001.patch (7K) Download Attachment
Stephan Bergmann-2 Stephan Bergmann-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[PUSHED] Re: fdo#46808, Adapt UNO services to new style, Part 7, updating ::create

On 06/04/2012 05:12 PM, Stephan Bergmann wrote:
> Will look at the other four patches later.

And now also pushed the other four.  Again, they needed some trivial
merge fixes, and I added a number of tweaks to patches 2, 3, and 5 (see
attachments for reference).

Thanks again,
Stephan

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

fixes-0002.patch (8K) Download Attachment
fixes-0003.patch (831 bytes) Download Attachment
fixes-0005.patch (3K) Download Attachment
Noel Grandin Noel Grandin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: [PUSHED] Re: fdo#46808, Adapt UNO services to new style, Part 7, updating ::create

In this patch, shouldn't it be 
    uno::Reference< frame::XDispatchProvider > xDispatchProvider(rFrame, 
        uno::UNO_QUERY_THROW ); <<<<<<<<<<<

because you are not confirming the result with an is() call.

diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx
index c105204..541b3c9 100644
--- a/svtools/source/uno/contextmenuhelper.cxx
+++ b/svtools/source/uno/contextmenuhelper.cxx
@@ -346,27 +346,24 @@ ContextMenuHelper::dispatchCommand(
     }
 
     util::URL aTargetURL;
+    aTargetURL.Complete = aCommandURL;
+    m_xURLTransformer->parseStrict( aTargetURL );
+
     uno::Reference< frame::XDispatch > xDispatch;
-    if ( m_xURLTransformer.is() )
+    uno::Reference< frame::XDispatchProvider > xDispatchProvider(
+        rFrame, uno::UNO_QUERY );
+    if ( xDispatchProvider.is() )
     {
-        aTargetURL.Complete = aCommandURL;
-        m_xURLTransformer->parseStrict( aTargetURL );
-
-        uno::Reference< frame::XDispatchProvider > xDispatchProvider(
-            rFrame, uno::UNO_QUERY );
-        if ( xDispatchProvider.is() )
+        try
+        {
+            xDispatch = xDispatchProvider->queryDispatch( aTargetURL, m_aSelf, 0 );
+        }
+        catch ( uno::RuntimeException& )
+        {
+            throw;
+        }
+        catch ( uno::Exception& )
         {
-            try
-            {
-                xDispatch = xDispatchProvider->queryDispatch( aTargetURL, m_aSelf, 0 );
-            }
-            catch ( uno::RuntimeException& )
-            {
-                throw;
-            }
-            catch ( uno::Exception& )
-            {
-            }
         }
     }


On 2012-06-06 11:02, Stephan Bergmann wrote:
On 06/04/2012 05:12 PM, Stephan Bergmann wrote:
Will look at the other four patches later.

And now also pushed the other four.  Again, they needed some trivial merge fixes, and I added a number of tweaks to patches 2, 3, and 5 (see attachments for reference).

Thanks again,
Stephan


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice




Disclaimer: http://www.peralex.com/disclaimer.html


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Stephan Bergmann-2 Stephan Bergmann-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: [PUSHED] Re: fdo#46808, Adapt UNO services to new style, Part 7, updating ::create

On 06/06/2012 11:28 AM, Noel Grandin wrote:

> In this patch, shouldn't it be
>      uno::Reference<  frame::XDispatchProvider>  xDispatchProvider(rFrame,
>          uno::UNO_QUERY_THROW );<<<<<<<<<<<
>
> because you are not confirming the result with an is() call.
>
> diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx
> index c105204..541b3c9 100644
> --- a/svtools/source/uno/contextmenuhelper.cxx
> +++ b/svtools/source/uno/contextmenuhelper.cxx
> @@ -346,27 +346,24 @@ ContextMenuHelper::dispatchCommand(
>       }
>
>       util::URL aTargetURL;
> +    aTargetURL.Complete = aCommandURL;
> +    m_xURLTransformer->parseStrict( aTargetURL );
> +
>       uno::Reference<  frame::XDispatch>  xDispatch;
> -    if ( m_xURLTransformer.is() )
> +    uno::Reference<  frame::XDispatchProvider>  xDispatchProvider(
> +        rFrame, uno::UNO_QUERY );
> +    if ( xDispatchProvider.is() )

^^^ the is() call is still there (this patch just removed the outer "if
( m_xURLTransformer.is() )" and looks bigger than it actually is due to
the consequential indentation changes)

Stephan

>       {
> -        aTargetURL.Complete = aCommandURL;
> -        m_xURLTransformer->parseStrict( aTargetURL );
> -
> -        uno::Reference<  frame::XDispatchProvider>  xDispatchProvider(
> -            rFrame, uno::UNO_QUERY );
> -        if ( xDispatchProvider.is() )
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Loading...