diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-02-03 15:30:56 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-02-03 15:30:56 +0100 |
commit | 0bfb7ed1d3050c827a37f7431cf4c05efeb536cb (patch) | |
tree | 968b724f23866609ff76a0a6e301f3f1b8a42c03 | |
parent | 7dbf8384a9fb41743f4729ad1482a0d343e86fec (diff) |
Avoid downcast
Change-Id: I0170c1ecd7f6f037640eaa26f5477fdf4852c54f
-rw-r--r-- | svtools/source/uno/unoiface.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index d59d92bb9fb1..e9bf072fe318 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -112,8 +112,9 @@ SAL_DLLPUBLIC_EXPORT vcl::Window* CreateWindow( VCLXWindow** ppNewComp, const :: static_cast<CalendarField*>(pWindow)->EnableToday(); static_cast<CalendarField*>(pWindow)->EnableNone(); static_cast<CalendarField*>(pWindow)->EnableEmptyFieldValue( true ); - *ppNewComp = new SVTXDateField; - static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( (FormatterBase*)static_cast<DateField*>(pWindow) ); + SVTXDateField * newComp = new SVTXDateField; + *ppNewComp = newComp; + newComp->SetFormatter( (FormatterBase*)static_cast<DateField*>(pWindow) ); } else if (aServiceName.equalsIgnoreAsciiCase("roadmap") ) { |