update ooo310-m15
[ooovba.git] / applied_patches / 0626-layout-plugin-toolkit.diff
blob86fea9e03ba0f921b4c058e340fb06024c07c72b
1 --- toolkit/inc/layout/layout-post.hxx.old 2009-04-02 10:49:37.000000000 +0000
2 +++ toolkit/inc/layout/layout-post.hxx 2009-04-06 16:42:11.000000000 +0000
3 @@ -35,33 +35,55 @@
4 #if ENABLE_LAYOUT
6 #undef AdvancedButton
7 +#undef ApplyButton
8 #undef Box
9 #undef Button
10 #undef CancelButton
11 #undef CheckBox
12 +#undef ComboBox
13 #undef Container
14 +#undef Control
15 +#undef Dialog
16 +#undef Edit
17 #undef FixedImage
18 #undef FixedInfo
19 #undef FixedLine
20 #undef FixedText
21 -#undef HelpButton
22 #undef HBox
23 +#undef HelpButton
24 +#undef IgnoreButton
25 +#undef ListBox
26 #undef MetricField
27 +#undef MetricFormatter
28 #undef MoreButton
29 #undef MultiLineEdit
30 +#undef NoButton
31 +#undef NumericField
32 +#undef NumericFormatter
33 #undef OKButton
34 +#undef Plugin
35 #undef ProgressBar
36 #undef PushButton
37 #undef RadioButton
38 -#undef SfxModalDialog
39 +#undef ResetButton
40 +#undef RetryButton
41 +#undef SpinField
42 #undef Table
43 #undef VBox
44 +#undef YesButton
46 +#undef ModalDialog
47 +#undef ModelessDialog
48 +#undef SfxModalDialog
50 #undef Window
53 #undef SVX_RES
54 #define SVX_RES(i) ResId(i,DIALOG_MGR())
56 +#undef SvtResId
58 #undef SW_RES
59 #define SW_RES(i) ResId(i,SWDIALOG_MGR())
61 --- toolkit/inc/layout/layout-pre.hxx.old 2009-04-02 10:49:37.000000000 +0000
62 +++ toolkit/inc/layout/layout-pre.hxx 2009-04-06 16:42:11.000000000 +0000
63 @@ -45,63 +45,80 @@
64 //typedef layout::FixedLine FixedLine;
66 #define AdvancedButton layout::AdvancedButton
67 +#define ApplyButton layout::ApplyButton
68 #define Box layout::Box
69 #define Button layout::Button
70 #define CancelButton layout::CancelButton
71 #define CheckBox layout::CheckBox
72 +#define ComboBox layout::ComboBox
73 #define Container layout::Container
74 +#define Control layout::Control
75 +#define Dialog layout::Dialog
76 +#define Edit layout::Edit
77 #define FixedImage layout::FixedImage
78 #define FixedInfo layout::FixedInfo
79 #define FixedLine layout::FixedLine
80 #define FixedText layout::FixedText
81 #define HBox layout::HBox
82 #define HelpButton layout::HelpButton
83 +#define IgnoreButton layout::IgnoreButton
84 +#define ListBox layout::ListBox
85 #define MetricField layout::MetricField
86 +#define MetricFormatter layout::MetricFormatter
87 #define MoreButton layout::MoreButton
88 #define MultiLineEdit layout::MultiLineEdit
89 +#define NoButton layout::NoButton
90 +#define NumericField layout::NumericField
91 +#define NumericFormatter layout::NumericFormatter
92 #define OKButton layout::OKButton
93 +#define Plugin layout::Plugin
94 #define ProgressBar layout::ProgressBar
95 #define PushButton layout::PushButton
96 #define RadioButton layout::RadioButton
97 -#define SfxModalDialog layout::Dialog
98 +#define ResetButton layout::ResetButton
99 +#define RetryButton layout::RetryButton
100 +#define SpinField layout::SpinField
101 #define Table layout::Table
102 #define VBox layout::VBox
103 +#define YesButton layout::YesButton
105 -/* FIXME: why are we defaulting to layout::Window?
106 - /home/janneke/vc/ooo-build/build/hack/sw/source/ui/dialog/wordcountdialog.cxx:87: error: no matching function for call to 'layout::Dialog::Dialog(Window*&, const char [14], const char [7])'
107 - ../../../../layout/inc/layout/layout.hxx:304: note: candidates are: layout::Dialog::Dialog(layout::Window*, const char*, const char*, sal_uInt32)
108 - ../../../../layout/inc/layout/layout.hxx:300: note: layout::Dialog::Dialog(const layout::Dialog&)
110 +#define ModalDialog Dialog
111 +#define ModelessDialog Dialog
112 +#define SfxModalDialog Dialog
114 #define Window ::Window
116 +#define LAYOUT_DIALOG_PARENT\
117 + VCLXWindow::GetImplementation( uno::Reference <awt::XWindow> ( GetPeer(), uno::UNO_QUERY ) )->GetWindow()
119 #undef SVX_RES
120 #define SVX_RES(x) #x
121 +#undef SvtResId
122 +#define SvtResId(x) #x
123 #undef SW_RES
124 #define SW_RES(x) #x
126 -/* Hmm. This hack makes zoom.cxx, wordcountdialog.cxx diffs smaller
127 - * but is not scalable. */
128 +/* Hmm. These hacks make zoom.cxx, wordcountdialog.cxx, ... diffs
129 + * smaller but 'tis not really scalable. */
130 #ifdef _LAYOUT_POST_HXX
132 #ifdef _SVX_RECOVER_CXX
133 #undef SfxModalDialog
134 // 3rd parameter must match ID in <modaldialog> "RID_SVXDLG_RECOVER", localize.sdf
135 -#define SfxModalDialog( pParent, SVX_RES_RID ) layout::Dialog( pParent, "recover.xml", "RID_SVXDLG_RECOVER" )
136 -//#define _SVX_RECOVER_HRC
137 +#define SfxModalDialog( pParent, SVX_RES_RID ) Dialog( pParent, "recover.xml", "RID_SVXDLG_RECOVER" )
138 #endif /* _SVX_RECOVER_CXX */
140 #ifdef SW_WORDCOUNTDIALOG_HXX
141 #undef SfxModalDialog
142 // 3rd parameter must match ID in <modaldialog> "DLG_WORDCOUNT", localize.sdf
143 -#define SfxModalDialog( pParent, SW_RES_RID ) layout::Dialog( pParent, "wordcount.xml", "DLG_WORDCOUNT" )
144 +#define SfxModalDialog( pParent, SW_RES_RID ) Dialog( pParent, "wordcount.xml", "DLG_WORDCOUNT" )
145 #define SW_WORDCOUNTDIALOG_HRC
146 #endif /* SW_WORDCOUNTDIALOG_HXX */
148 #ifdef _SVX_ZOOM_CXX
149 #undef SfxModalDialog
150 // 3rd parameter must match ID in <modaldialog> "RID_SVXDLG_ZOOM", localize.sdf
151 -#define SfxModalDialog( pParent, SVX_RES_RID ) layout::Dialog( pParent, "zoom.xml", "RID_SVXDLG_ZOOM" )
152 +#define SfxModalDialog( pParent, SVX_RES_RID ) Dialog( pParent, "zoom.xml", "RID_SVXDLG_ZOOM" )
153 #define _SVX_ZOOM_HRC
154 #endif /* _SVX_ZOOM_CXX */
156 @@ -109,7 +126,7 @@
158 #else /* !ENABLE_LAYOUT */
160 -#define LAYOUT_PRE_POST
161 +#define LAYOUT_PRE_POST 1
163 #endif /* !ENABLE_LAYOUT */
165 --- toolkit/inc/layout/layout.hxx.old 2009-04-02 10:49:37.000000000 +0000
166 +++ toolkit/inc/layout/layout.hxx 2009-04-06 16:42:11.000000000 +0000
167 @@ -45,8 +45,9 @@
169 #include <toolkit/dllapi.h>
171 -class Window;
172 +class Control;
173 class Image;
174 +class Window;
176 namespace layout
178 @@ -512,6 +513,17 @@ public:
179 VBox( sal_Int32 nBorder, bool bHomogeneous );
182 +class PluginImpl;
183 +class TOOLKIT_DLLPUBLIC Plugin : public Control
185 + friend class PluginImpl;
186 + DECL_GET_IMPL( Plugin );
187 + //DECL_CONSTRUCTORS( Plugin, Control, 0 );
188 +public:
189 + ::Control *mpPlugin;
190 + Plugin( Context *pCtx, char const* pId, ::Control *plugin );
193 } // end namespace layout
195 #endif /* _LAYOUT_HXX */
196 --- toolkit/source/awt/makefile.mk.old 2009-04-02 10:49:36.000000000 +0000
197 +++ toolkit/source/awt/makefile.mk 2009-04-06 16:42:11.000000000 +0000
198 @@ -75,6 +75,7 @@ SLOFILES= \
199 $(SLO)/vclxbutton.obj\
200 $(SLO)/vclxdialog.obj\
201 $(SLO)/vclxfixedline.obj\
202 + $(SLO)/vclxplugin.obj\
203 $(SLO)/vclxscroller.obj\
204 $(SLO)/vclxsplitter.obj\
205 $(SLO)/vclxtabcontrol.obj
206 --- toolkit/source/awt/vclxplugin.cxx.old 1970-01-01 00:00:00.000000000 +0000
207 +++ toolkit/source/awt/vclxplugin.cxx 2009-04-06 16:42:11.000000000 +0000
208 @@ -0,0 +1,91 @@
209 +/*************************************************************************
211 + * OpenOffice.org - a multi-platform office productivity suite
213 + * $RCSfile$
215 + * $Revision$
217 + * last change: $Author$ $Date$
219 + * The Contents of this file are made available subject to
220 + * the terms of GNU Lesser General Public License Version 2.1.
223 + * GNU Lesser General Public License Version 2.1
224 + * =============================================
225 + * Copyright 2005 by Sun Microsystems, Inc.
226 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
228 + * This library is free software; you can redistribute it and/or
229 + * modify it under the terms of the GNU Lesser General Public
230 + * License version 2.1, as published by the Free Software Foundation.
232 + * This library is distributed in the hope that it will be useful,
233 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
234 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
235 + * Lesser General Public License for more details.
237 + * You should have received a copy of the GNU Lesser General Public
238 + * License along with this library; if not, write to the Free Software
239 + * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston,
240 + * MA 02110-1301 USA
242 + ************************************************************************/
244 +#include "vclxplugin.hxx"
246 +#include <com/sun/star/awt/PosSize.hpp>
247 +#include <toolkit/helper/property.hxx>
249 +#include "forward.hxx"
251 +#include <vcl/ctrl.hxx>
253 +namespace layoutimpl
256 +using namespace ::com::sun::star;
258 +VCLXPlugin::VCLXPlugin( Window *p, WinBits b )
259 + : VCLXWindow()
260 + , mpWindow( p )
261 + , mpPlugin( 0 )
262 + , mStyle( b )
266 +VCLXPlugin::~VCLXPlugin()
270 +void SAL_CALL VCLXPlugin::dispose() throw(uno::RuntimeException)
273 + ::vos::OGuard aGuard( GetMutex() );
275 + lang::EventObject aDisposeEvent;
276 + aDisposeEvent.Source = *this;
279 + VCLXWindow::dispose();
282 +void VCLXPlugin::SetPlugin( ::Control *p )
284 + mpPlugin = p;
287 +awt::Size SAL_CALL VCLXPlugin::getMinimumSize()
288 + throw(::com::sun::star::uno::RuntimeException)
290 + ::vos::OClearableGuard aGuard( GetMutex() );
291 + if ( mpPlugin )
293 + Size s = mpPlugin->GetSizePixel();
294 + return awt::Size( s.Width(), s.Height() );
296 + return awt::Size();
299 +} // namespace layoutimpl
300 --- toolkit/source/awt/vclxplugin.hxx.old 1970-01-01 00:00:00.000000000 +0000
301 +++ toolkit/source/awt/vclxplugin.hxx 2009-04-06 16:42:11.000000000 +0000
302 @@ -0,0 +1,75 @@
303 +/*************************************************************************
305 + * OpenOffice.org - a multi-platform office productivity suite
307 + * $RCSfile$
309 + * $Revision$
311 + * last change: $Author$ $Date$
313 + * The Contents of this file are made available subject to
314 + * the terms of GNU Lesser General Public License Version 2.1.
317 + * GNU Lesser General Public License Version 2.1
318 + * =============================================
319 + * Copyright 2005 by Sun Microsystems, Inc.
320 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
322 + * This library is free software; you can redistribute it and/or
323 + * modify it under the terms of the GNU Lesser General Public
324 + * License version 2.1, as published by the Free Software Foundation.
326 + * This library is distributed in the hope that it will be useful,
327 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
328 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
329 + * Lesser General Public License for more details.
331 + * You should have received a copy of the GNU Lesser General Public
332 + * License along with this library; if not, write to the Free Software
333 + * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston,
334 + * MA 02110-1301 USA
336 + ************************************************************************/
338 +#ifndef LAYOUT_AWT_VCLXPLUGIN_HXX
339 +#define LAYOUT_AWT_VCLXPLUGIN_HXX
341 +#include <toolkit/awt/vclxwindow.hxx>
342 +#include <vcl/wintypes.hxx>
344 +class Control;
345 +namespace layoutimpl
348 +namespace css = ::com::sun::star;
350 +class VCLXPlugin : public VCLXWindow
352 +public:
353 + Window *mpWindow;
354 + ::Control *mpPlugin;
355 + WinBits mStyle;
357 + VCLXPlugin( Window *p, WinBits b );
359 + void SetPlugin( ::Control *p );
361 +protected:
362 + ~VCLXPlugin();
364 + // XComponent
365 + void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
367 + virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize()
368 + throw(::com::sun::star::uno::RuntimeException);
370 +private:
371 + VCLXPlugin( VCLXPlugin const & );
372 + VCLXPlugin& operator=( VCLXPlugin const & );
375 +} // namespace layoutimpl
377 +#endif /* LAYOUT_AWT_VCLXPLUGIN_HXX */
378 --- toolkit/source/layout/dialogbuttonhbox.cxx.old 2009-04-02 10:49:36.000000000 +0000
379 +++ toolkit/source/layout/dialogbuttonhbox.cxx 2009-04-06 16:42:11.000000000 +0000
380 @@ -39,7 +39,7 @@
381 #include "proplist.hxx"
383 #if TEST_LAYOUT && !defined( DBG_UTIL )
384 -#include <stdio.h>
385 +#include <cstdio>
386 #undef DBG_ERROR
387 #define DBG_ERROR printf
388 #undef DBG_ERROR1
389 --- toolkit/source/layout/helper.cxx.old 2009-04-02 10:49:36.000000000 +0000
390 +++ toolkit/source/layout/helper.cxx 2009-04-06 16:42:11.000000000 +0000
391 @@ -42,7 +42,7 @@
392 #include "layout/layoutcore.hxx"
394 #if TEST_LAYOUT && !defined( DBG_UTIL )
395 -#include <stdio.h>
396 +#include <cstdio>
397 #undef DBG_ERROR
398 #define DBG_ERROR printf
399 #undef DBG_ERROR1
400 @@ -174,7 +174,7 @@ createToolkitWidget( uno::Reference< awt
401 uno::Reference< awt::XWindowPeer > xWinPeer;
404 -// DBG_ERROR1("Asking toolkit: %s\n", OUSTRING_CSTR( desc.WindowServiceName ) );
405 + OSL_TRACE("Asking toolkit: %s", OUSTRING_CSTR( desc.WindowServiceName ) );
406 xWinPeer = xToolkit->createWindow( desc );
407 if ( !xWinPeer.is() )
408 throw uno::RuntimeException(
409 @@ -348,6 +348,7 @@ PropHelper::queryInterface( const ::com:
410 #include <awt/vclxscroller.hxx>
411 #include <awt/vclxsplitter.hxx>
412 #include <awt/vclxtabcontrol.hxx>
413 +#include <awt/vclxplugin.hxx>
414 #include <toolkit/awt/vclxtoolkit.hxx>
415 #include <toolkit/awt/vclxwindow.hxx>
416 #include <vcl/button.hxx>
417 @@ -356,8 +357,7 @@ PropHelper::queryInterface( const ::com:
418 #include <vcl/tabctrl.hxx>
419 #include <vcl/tabpage.hxx>
422 -///#include <svtools/prgsbar.hxx>
423 +#include <typeinfo>
425 namespace layoutimpl
427 @@ -478,12 +478,19 @@ uno::Reference< awt::XLayoutConstrains >
428 pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
429 pNewComp = new layoutimpl::VCLXAdvancedButton( pNewWindow );
431 + else if ( aName.equalsAscii( "plugin" ) )
433 + pNewWindow = new Control( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
434 + OSL_TRACE( "%s: parent=%p (%s)\n", __FUNCTION__, pParent, typeid( *pParent ).name() );
435 + pNewComp = new layoutimpl::VCLXPlugin( pNewWindow, ImplGetWinBits( WindowAttributes, 0 ) );
438 if ( !pNewWindow )
439 return xRef;
441 pNewWindow->SetCreatedWithToolkit( sal_True );
442 - pNewComp->SetCreatedWithToolkit( TRUE );
443 + if ( pNewComp )
444 + pNewComp->SetCreatedWithToolkit( TRUE );
445 xRef = pNewComp;
446 pNewWindow->SetComponentInterface( pNewComp );
447 if ( WindowAttributes & awt::WindowAttribute::SHOW )
448 --- toolkit/source/layout/import.hxx.old 2009-04-02 10:49:36.000000000 +0000
449 +++ toolkit/source/layout/import.hxx 2009-04-06 16:42:11.000000000 +0000
450 @@ -34,6 +34,7 @@
452 #include <map>
453 #include <list>
454 +#define _BACKWARD_BACKWARD_WARNING_H 1
455 #include <hash_map>
457 #include <com/sun/star/xml/input/XRoot.hpp>
458 --- toolkit/source/layout/proplist.cxx.old 2009-04-02 10:49:36.000000000 +0000
459 +++ toolkit/source/layout/proplist.cxx 2009-04-06 16:42:11.000000000 +0000
460 @@ -42,7 +42,7 @@
461 #include "layout/layoutcore.hxx"
463 #if TEST_LAYOUT && !defined( DBG_UTIL )
464 -#include <stdio.h>
465 +#include <cstdio>
466 #undef DBG_ERROR
467 #define DBG_ERROR printf
468 #undef DBG_ERROR1
469 @@ -254,8 +254,7 @@ setProperties( uno::Reference< uno::XInt
470 PropList::const_iterator cur;
471 for ( cur = rProps.begin(); cur != rProps.end(); cur++ )
473 - OString attr = OUStringToOString( cur->first, RTL_TEXTENCODING_UTF8 );
474 - OString value = OUStringToOString( cur->second, RTL_TEXTENCODING_UTF8 );
475 + DBG_ERROR1( "%s=%s\n", OUSTRING_CSTR( cur->first ), OUSTRING_CSTR( cur->second ) );
477 return;
479 @@ -271,7 +270,7 @@ setProperty( uno::Reference< uno::XInter
481 OUString unoAttr = toUnoNaming( attr );
483 - OSL_TRACE( "setting %s=%s\n", OUSTRING_CSTR( attr ), OUSTRING_CSTR( value ) );
484 + OSL_TRACE( "setting %s=%s", OUSTRING_CSTR( attr ), OUSTRING_CSTR( value ) );
485 // get a Property object
486 beans::Property prop;
488 --- toolkit/source/layout/root.cxx.old 2009-04-02 10:49:36.000000000 +0000
489 +++ toolkit/source/layout/root.cxx 2009-04-06 16:42:11.000000000 +0000
490 @@ -31,8 +31,8 @@
492 #include "root.hxx"
494 -#include <assert.h>
495 -#include <stdio.h>
496 +#include <cassert>
497 +#include <cstdio>
499 #include <com/sun/star/awt/WindowAttribute.hpp>
500 #include <com/sun/star/awt/XMessageBox.hpp>
501 --- toolkit/source/layout/root.hxx.old 2009-04-02 10:49:36.000000000 +0000
502 +++ toolkit/source/layout/root.hxx 2009-04-06 16:42:11.000000000 +0000
503 @@ -32,6 +32,7 @@
504 #ifndef CORE_ROOT_HXX
505 #define CORE_ROOT_HXX
507 +#define _BACKWARD_BACKWARD_WARNING_H 1
508 #include <hash_map>
510 #include <com/sun/star/awt/XLayoutRoot.hpp>
511 --- toolkit/source/layout/translate.cxx.old 2009-04-02 10:49:36.000000000 +0000
512 +++ toolkit/source/layout/translate.cxx 2009-04-06 16:42:11.000000000 +0000
513 @@ -33,7 +33,7 @@
515 #include <list>
516 #if TEST_LAYOUT
517 -#include <stdio.h>
518 +#include <cstdio>
519 #include "tools/getprocessworkingdir.hxx"
520 #endif
522 @@ -93,9 +93,7 @@ getFirstExisting( OUString const& aDir,
523 i != aSubDirs.end(); i++ )
525 String aFile = aDir + aSlash + *i + aSlash + aXMLName;
526 -#if TEST_LAYOUT
527 - printf( "testing: %s\n", OUSTRING_CSTR( aFile ) );
528 -#endif
529 + OSL_TRACE( "testing: %s", OUSTRING_CSTR( aFile ) );
530 if ( fileExists( aFile ) )
531 return aFile;
533 @@ -129,9 +127,7 @@ readRightTranslation( OUString const& aX
534 aXMLFile = getFirstExisting( aXMLDir, aSubdirs, aXMLName );
537 -#if TEST_LAYOUT
538 - printf( "FOUND:%s\n", OUSTRING_CSTR ( OUString (aXMLFile) ) );
539 -#endif /* TEST_LAYOUT */
540 + OSL_TRACE( "FOUND:%s", OUSTRING_CSTR ( OUString (aXMLFile) ) );
541 return aXMLFile;
544 --- toolkit/source/vclcompat/wrapper.cxx.old 2009-04-02 10:49:35.000000000 +0000
545 +++ toolkit/source/vclcompat/wrapper.cxx 2009-04-06 16:42:11.000000000 +0000
546 @@ -31,20 +31,21 @@
548 #include "wrapper.hxx"
550 -#include <com/sun/star/graphic/XGraphic.hpp>
551 -#include <com/sun/star/awt/XFixedText.hpp>
552 +#include <awt/vclxplugin.hxx>
553 +#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
554 +#include <com/sun/star/awt/WindowAttribute.hpp>
555 #include <com/sun/star/awt/XDialog2.hpp>
556 +#include <com/sun/star/awt/XFixedText.hpp>
557 #include <com/sun/star/awt/XProgressBar.hpp>
558 -#include <com/sun/star/awt/WindowAttribute.hpp>
559 -#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
560 +#include <com/sun/star/graphic/XGraphic.hpp>
561 #include <comphelper/processfactory.hxx>
562 -#include <vcl/window.hxx>
563 -#include <toolkit/awt/vclxwindow.hxx>
565 -#include <layout/layoutcore.hxx>
566 #include <layout/factory.hxx>
567 +#include <layout/layoutcore.hxx>
568 #include <layout/root.hxx>
569 +#include <toolkit/awt/vclxwindow.hxx>
570 +#include <vcl/ctrl.hxx>
571 #include <vcl/image.hxx>
572 +#include <vcl/window.hxx>
574 using namespace ::com::sun::star;
576 @@ -566,4 +567,36 @@ sal_Int32 ProgressBar::GetValue()
577 return getImpl().mxProgressBar->getValue();
580 +class PluginImpl: public ControlImpl
582 +public:
583 + ::Control *mpPlugin;
585 + PluginImpl( Context *pCtx, const PeerHandle &xPeer, Window *pWindow, :: Control *plugin )
586 + : ControlImpl( pCtx, xPeer, pWindow )
587 + , mpPlugin( plugin )
589 + uno::Reference <awt::XWindow> ref( mxWindow, uno::UNO_QUERY );
590 + layoutimpl::VCLXPlugin *vcl
591 + = static_cast<layoutimpl::VCLXPlugin*>( VCLXWindow::GetImplementation( ref ) );
592 + ::Window *parent = vcl->mpWindow->GetParent();
593 + vcl->SetWindow( plugin );
594 + vcl->SetPlugin( mpPlugin );
595 + plugin->SetParent( parent );
596 + plugin->SetStyle( vcl->mStyle );
597 + plugin->SetCreatedWithToolkit( TRUE );
598 + plugin->SetComponentInterface( vcl );
599 + plugin->Show();
603 +Plugin::Plugin( Context *pCtx, char const *pId, ::Control *plugin )
604 + : Control( new PluginImpl( pCtx, pCtx->GetPeerHandle( pId, 0 ), this, plugin ) )
605 + , mpPlugin( plugin )
609 +DECL_GET_IMPL_IMPL( Plugin )
612 } // namespace layout
613 --- toolkit/source/vclcompat/wrapper.hxx.old 2009-04-02 10:49:35.000000000 +0000
614 +++ toolkit/source/vclcompat/wrapper.hxx 2009-04-06 16:42:11.000000000 +0000
615 @@ -39,23 +39,23 @@
617 #include <cstring>
619 -namespace css = com::sun::star;
621 namespace layout
624 +namespace css = com::sun::star;
626 class WindowImpl
628 public:
629 - Window *mpWindow;
630 + Window *mpWindow;
631 Context *mpCtx;
632 - css::uno::Reference< css::awt::XWindow > mxWindow;
633 + css::uno::Reference< css::awt::XWindow > mxWindow;
634 css::uno::Reference< css::awt::XVclWindowPeer > mxVclPeer;
636 WindowImpl( Context *pCtx, const PeerHandle &xPeer, Window *pWindow )
637 - : mpWindow ( pWindow )
638 - , mpCtx ( pCtx )
639 - , mxWindow ( xPeer, css::uno::UNO_QUERY )
640 + : mpWindow( pWindow )
641 + , mpCtx( pCtx )
642 + , mxWindow( xPeer, css::uno::UNO_QUERY )
643 , mxVclPeer( xPeer, css::uno::UNO_QUERY )
646 @@ -97,7 +97,9 @@ class ControlImpl : public WindowImpl
648 public:
649 ControlImpl( Context *pCtx, const PeerHandle &xPeer, Window *pWindow )
650 - : WindowImpl( pCtx, xPeer, pWindow ) {}
651 + : WindowImpl( pCtx, xPeer, pWindow )
656 inline WindowImpl &Window::getImpl() const
657 --- toolkit/workben/layout/editor.cxx.old 2009-04-02 10:49:37.000000000 +0000
658 +++ toolkit/workben/layout/editor.cxx 2009-04-06 16:42:11.000000000 +0000
659 @@ -32,30 +32,28 @@
660 #include "editor.hxx"
662 #undef NDEBUG
663 -#include <assert.h>
664 -#include <stdio.h>
666 -#include <vector>
667 +#include <cassert>
668 +#include <cstdio>
669 +#include <cstring>
670 #include <list>
671 -#include <rtl/strbuf.hxx>
672 -#include <rtl/ustrbuf.hxx>
674 -using namespace layout::css;
676 -using rtl::OUString;
677 +#include <vector>
679 -#include <com/sun/star/awt/XWindow.hpp>
680 -#include <com/sun/star/awt/XWindowPeer.hpp>
681 -#include <com/sun/star/awt/XVclWindowPeer.hpp>
682 +#include <com/sun/star/awt/WindowAttribute.hpp>
683 #include <com/sun/star/awt/XLayoutConstrains.hpp>
684 #include <com/sun/star/awt/XLayoutContainer.hpp>
685 -#include <com/sun/star/awt/WindowAttribute.hpp>
687 #include <com/sun/star/awt/XToolkit.hpp>
688 +#include <com/sun/star/awt/XVclWindowPeer.hpp>
689 +#include <com/sun/star/awt/XWindow.hpp>
690 +#include <com/sun/star/awt/XWindowPeer.hpp>
691 +#include <rtl/strbuf.hxx>
692 +#include <rtl/ustrbuf.hxx>
693 #include <toolkit/helper/property.hxx>
695 #include <vcl/lstbox.h>
697 +using namespace layout::css;
699 +using rtl::OUString;
701 // FIXME:
702 //#define FILEDLG
704 --- toolkit/workben/layout/makefile.mk.old 2009-04-02 10:49:37.000000000 +0000
705 +++ toolkit/workben/layout/makefile.mk 2009-04-06 16:42:11.000000000 +0000
706 @@ -43,7 +43,7 @@ ENABLE_EXCEPTIONS=TRUE
707 CFLAGS += -I$(PRJ)/source/layout
709 # Allow zoom and wordcount to be built without depending on svx,sv,sfx2
710 -CFLAGS += -I../$(PRJ)/svx/inc -I../$(PRJ)/svtools/inc -I../$(PRJ)/sfx2/inc
711 +CFLAGS += -I../$(PRJ)/svx/inc -I../$(PRJ)/svtools/inc
713 .INCLUDE : $(PRJ)$/util$/makefile.pmk
715 @@ -55,6 +55,7 @@ CFLAGS+=-Wall -Wno-non-virtual-dtor
717 CXXFILES=\
718 editor.cxx \
719 + plugin.cxx \
720 recover.cxx \
721 wordcountdialog.cxx \
722 test.cxx \
723 @@ -62,6 +63,7 @@ CXXFILES=\
725 OBJFILES=\
726 $(OBJ)$/editor.obj \
727 + $(OBJ)$/plugin.obj \
728 $(OBJ)$/recover.obj \
729 $(OBJ)$/test.obj \
730 $(OBJ)$/wordcountdialog.obj \
731 @@ -77,12 +79,15 @@ APP1STDLIBS= \
732 $(CPPUHELPERLIB) \
733 $(SALLIB) \
734 $(XMLSCRIPTLIB) \
735 - $(TKLIB)
736 + $(TKLIB) \
737 + $(SVXLIB) \
738 + $(ISCLIB) \
741 svtools = $(INCCOM)/svtools
742 -all: $(svtools) ALLTAR
743 +default: ALLTAR
745 -.INCLUDE : target.mk
746 +.INCLUDE : target.mk
748 XML_FILES=\
749 recover.xml\
750 @@ -92,13 +97,15 @@ XML_FILES=\
751 TRALAY=tralay
752 XML_LANGS=$(alllangiso)
754 -#ALL_XMLS=$(foreach,i,$(XML_LANGS) $(foreach,j,$(XML_FILES) $i/$j))
755 -ALLTAR: $(foreach,i,$(XML_FILES) en-US/$i)
756 +ALLTAR: $(BIN)/testrc $(svtools) $(foreach,i,$(XML_FILES) en-US/$i)
758 $(XML_LANGS:f:t"/%.xml ")/%.xml: %.xml
759 $(TRALAY) -m localize.sdf -o . -l $(XML_LANGS:f:t" -l ") $<
760 rm -rf en-US
762 +$(BIN)/%: %.in
763 + cp $< $@
765 $(svtools):
766 # FIXME: there's a bug in svtools layout or usage
767 # Include files are in svtools/inc, but are referenced as <svtools/..>
768 --- toolkit/workben/layout/plugin.cxx.old 1970-01-01 00:00:00.000000000 +0000
769 +++ toolkit/workben/layout/plugin.cxx 2009-04-06 16:42:11.000000000 +0000
770 @@ -0,0 +1,73 @@
771 +/*************************************************************************
773 + * OpenOffice.org - a multi-platform office productivity suite
775 + * $RCSfile$
777 + * $Revision$
779 + * last change: $Author$ $Date$
781 + * The Contents of this file are made available subject to
782 + * the terms of GNU Lesser General Public License Version 2.1.
785 + * GNU Lesser General Public License Version 2.1
786 + * =============================================
787 + * Copyright 2005 by Sun Microsystems, Inc.
788 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
790 + * This library is free software; you can redistribute it and/or
791 + * modify it under the terms of the GNU Lesser General Public
792 + * License version 2.1, as published by the Free Software Foundation.
794 + * This library is distributed in the hope that it will be useful,
795 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
796 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
797 + * Lesser General Public License for more details.
799 + * You should have received a copy of the GNU Lesser General Public
800 + * License along with this library; if not, write to the Free Software
801 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
802 + * MA 02111-1307 USA
804 + ************************************************************************/
806 +#define _LAYOUT_PLUGIN_CXX
808 +#include "plugin.hxx"
810 +#include <com/sun/star/awt/XDialog2.hpp>
811 +#include <dialcontrol.hxx>
812 +#include <toolkit/awt/vclxwindow.hxx>
814 +#include <layout/layout-pre.hxx>
816 +using namespace com::sun::star;
818 +#define LAYOUT_RES(x) #x
820 +#undef ModalDialog
821 +#define ModalDialog( parent, id ) Dialog( parent, "plugin.xml", id )
823 +PluginDialog::PluginDialog( Window* pParent )
824 + : ModalDialog( pParent, LAYOUT_RES( RID_DLG_PLUGIN ) )
825 + , aHeaderImage( this, LAYOUT_RES( FI_HEADER ) )
826 + , aHeaderText( this, LAYOUT_RES( FT_HEADER ) )
827 + , aHeaderLine( this, LAYOUT_RES( FL_HEADER ) )
828 + , aPlugin( this, LAYOUT_RES( PL_DIAL ),
829 +// FIXME: width=, height=, are not recognized as properties.
830 +// new svx::DialControl( LAYOUT_DIALOG_PARENT, Size( 0, 0 ), 0 ) )
831 + new svx::DialControl( LAYOUT_DIALOG_PARENT, Size( 80, 80 ), 0 ) )
832 + //, aDialControl( static_cast<svx::DialControl&> ( aPlugin.GetPlugin() ) )
833 + , aDialControl( static_cast<svx::DialControl&> ( *aPlugin.mpPlugin ) )
834 + , aOKBtn( this, LAYOUT_RES( BTN_OK ) )
835 + , aCancelBtn( this, LAYOUT_RES( BTN_CANCEL ) )
836 + , aHelpBtn( this, LAYOUT_RES( BTN_HELP ) )
838 + aDialControl.SetRotation( 425 );
841 +PluginDialog::~PluginDialog()
844 --- toolkit/workben/layout/plugin.hxx.old 1970-01-01 00:00:00.000000000 +0000
845 +++ toolkit/workben/layout/plugin.hxx 2009-04-06 16:42:11.000000000 +0000
846 @@ -0,0 +1,65 @@
847 +/*************************************************************************
849 + * OpenOffice.org - a multi-platform office productivity suite
851 + * $RCSfile$
853 + * $Revision$
855 + * last change: $Author$ $Date$
857 + * The Contents of this file are made available subject to
858 + * the terms of GNU Lesser General Public License Version 2.1.
861 + * GNU Lesser General Public License Version 2.1
862 + * =============================================
863 + * Copyright 2005 by Sun Microsystems, Inc.
864 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
866 + * This library is free software; you can redistribute it and/or
867 + * modify it under the terms of the GNU Lesser General Public
868 + * License version 2.1, as published by the Free Software Foundation.
870 + * This library is distributed in the hope that it will be useful,
871 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
872 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
873 + * Lesser General Public License for more details.
875 + * You should have received a copy of the GNU Lesser General Public
876 + * License along with this library; if not, write to the Free Software
877 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
878 + * MA 02111-1307 USA
880 + ************************************************************************/
881 +#ifndef _LAYOUT_PLUGIN_HXX
882 +#define _LAYOUT_PLUGIN_HXX
884 +#include <layout/layout.hxx>
885 +#include <layout/layout-pre.hxx>
887 +namespace svx {
888 +class DialControl;
891 +class PluginDialog : public ModalDialog
893 +private:
894 + FixedImage aHeaderImage;
895 + FixedText aHeaderText;
896 + FixedLine aHeaderLine;
897 + Plugin aPlugin;
898 + svx::DialControl& aDialControl;
899 + OKButton aOKBtn;
900 + CancelButton aCancelBtn;
901 + HelpButton aHelpBtn;
903 +public:
904 + PluginDialog( Window* pParent );
905 + ~PluginDialog();
908 +#include <layout/layout-post.hxx>
910 +#endif /* _LAYOUT_PLUGIN_HXX */
912 --- toolkit/workben/layout/plugin.xml.old 1970-01-01 00:00:00.000000000 +0000
913 +++ toolkit/workben/layout/plugin.xml 2009-04-06 16:42:11.000000000 +0000
914 @@ -0,0 +1,29 @@
915 +<?xml version="1.0" encoding="UTF-8"?>
916 +<!-- This is a template. i18n translation is not performed in-place;
917 + i18n translated xml files are generated from this template by
918 + transex3/layout/tralay. !-->
920 +<modaldialog xmlns="http://openoffice.org/2007/layout"
921 + xmlns:cnt="http://openoffice.org/2007/layout/container"
922 + id="RID_DLG_PLUGIN" _title="Plugin Test" optimumsize="true"
923 + help-id="SID_ATTR_PLUGIN"
924 + has_border="true" sizeable="true" moveable="true">
925 + <vbox spacing="5" border="5">
926 + <hbox spacing="5" cnt:expand="false">
927 + <fixedimage id="FI_HEADER" cnt:expand="false" graphic="res/commandimagelist/sc_apply.png" />
928 + <fixedtext id="FT_HEADER" _label="Plugin Test"/>
929 + </hbox>
930 + <fixedline id="FL_HEADER"/>
931 + <hbox>
932 + <flow cnt:padding="80"/>
933 + <plugin id="PL_DIAL" width="80" height="80"/>
934 + </hbox>
935 + <dialogbuttonhbox border="5" spacing="5">
936 + <flow/>
937 + <okbutton id="BTN_OK"/>
938 + <cancelbutton id="BTN_CANCEL" />
939 + <helpbutton id="BTN_HELP"/>
940 + </dialogbuttonhbox>
941 + </vbox>
942 +</modaldialog>
944 --- toolkit/workben/layout/simple-paragraph.cxx.old 2009-04-02 10:49:37.000000000 +0000
945 +++ toolkit/workben/layout/simple-paragraph.cxx 2009-04-06 16:42:11.000000000 +0000
946 @@ -37,12 +37,12 @@
948 // include ---------------------------------------------------------------
950 -#include <stdio.h>
951 +#include <cstdio>
952 #include <tools/shl.hxx>
953 #include <sfx2/objsh.hxx>
954 #include <vcl/msgbox.hxx>
956 -#include <stdio.h>
957 +#include <cstdio>
959 namespace SVX {
960 #include <svx/paraprev.hxx> // Preview
961 --- toolkit/workben/layout/test.cxx.old 2009-04-02 10:49:37.000000000 +0000
962 +++ toolkit/workben/layout/test.cxx 2009-04-06 16:42:11.000000000 +0000
963 @@ -30,7 +30,6 @@
964 ************************************************************************/
966 #include <vcl/svapp.hxx>
967 -//#include <transex3/vosapp.hxx>
969 // This works and was used before for standalone test, not sure why
970 // we'd want it.
971 @@ -38,29 +37,30 @@
972 #include "uno.hxx"
974 #include <cstdio>
975 -#include <osl/file.h>
976 +#include <cstdlib>
978 -#include <rtl/ustring.hxx>
979 +#include <com/sun/star/xml/sax/SAXException.hpp>
980 +#include <comphelper/processfactory.hxx>
981 #include <cppuhelper/bootstrap.hxx>
983 -#include <ucbhelper/contentbroker.hxx>
984 +#include <rtl/ustring.hxx>
985 #include <ucbhelper/configurationkeys.hxx>
987 -#include <comphelper/processfactory.hxx>
988 -#include <com/sun/star/xml/sax/SAXException.hpp>
989 +#include <ucbhelper/contentbroker.hxx>
991 #include "editor.hxx"
993 -#include "wordcountdialog.hxx"
994 -#undef _LAYOUT_POST_HXX
996 -#include "zoom.hxx"
997 +#include "plugin.hxx"
998 #undef _LAYOUT_POST_HXX
1000 #include "recover.hxx"
1001 #undef _LAYOUT_POST_HXX
1003 -//#undef SW_WORDCOUNTDIALOG_HXX
1004 +#include "wordcountdialog.hxx"
1005 +#undef _LAYOUT_POST_HXX
1007 +#include "zoom.hxx"
1008 +#undef _LAYOUT_POST_HXX
1010 #include <layout/layout-pre.hxx>
1012 using namespace ::rtl;
1013 @@ -68,38 +68,6 @@ using namespace ::cppu;
1014 using namespace ::com::sun::star;
1015 using namespace ::com::sun::star::uno;
1017 -Reference< XComponentContext > createInitialComponentContext(
1018 - OUString const & inst_dir )
1020 - Reference< XComponentContext > xContext;
1022 - try
1024 - OUString file_url;
1025 - oslFileError rc = osl_getFileURLFromSystemPath(
1026 - inst_dir.pData, &file_url.pData );
1027 - OSL_ASSERT( osl_File_E_None == rc );
1028 - (void) rc; // quiet warning
1030 - OUString unorc = file_url + OUString(
1031 - OUString::createFromAscii( "/program/" SAL_CONFIGFILE( "uno" )) );
1033 - return defaultBootstrap_InitialComponentContext( unorc );
1036 - catch( Exception& rExc )
1038 - OString aStr( OUStringToOString( rExc.Message,
1039 - RTL_TEXTENCODING_ASCII_US ) );
1040 - OSL_ENSURE( 0, aStr.getStr() );
1043 - return xContext;
1047 -// -----------------------------------------------------------------------
1049 class LayoutTest : public Application
1051 Reference< XComponentContext > mxContext;
1052 @@ -115,7 +83,7 @@ public:
1053 void RunEditor();
1054 void RunFiles();
1055 void ExceptionalMain();
1056 - void IInit();
1057 + void Init();
1058 void InitUCB();
1059 void LoadFile( OUString const &aName );
1060 void Main();
1061 @@ -124,18 +92,29 @@ public:
1063 static void usage()
1065 - fprintf (stderr, "usage: test [--inst inst_dir] [DIALOG.XML]... | --test [DIALOG.XML]\n" );
1066 + fprintf (stderr, "usage: test [--inst OOO_INSTALL_PREFIX] [DIALOG.XML]... | --test [DIALOG.XML]\n" );
1067 exit( 2 );
1070 +static uno::Reference< lang::XSingleServiceFactory > get_factory( char const *service )
1072 + uno::Reference< lang::XSingleServiceFactory > xFactory(
1073 + comphelper::createProcessComponent(
1074 + rtl::OUString::createFromAscii( service ) ), uno::UNO_QUERY );
1076 + if ( !xFactory.is() )
1077 + fprintf( stderr, "error loading: %s\n", service );
1078 + return xFactory;
1081 +#define GET_FACTORY(x) get_factory( #x )
1083 void LayoutTest::LoadFile( const OUString &aTestFile )
1085 fprintf( stderr, "TEST: layout instance\n" );
1087 - uno::Reference< lang::XSingleServiceFactory > xFactory(
1088 - comphelper::createProcessComponent(
1089 - rtl::OUString::createFromAscii( "com.sun.star.awt.Layout" ) ),
1090 - uno::UNO_QUERY );
1091 + uno::Reference< lang::XSingleServiceFactory > xFactory
1092 + = GET_FACTORY( com.sun.star.awt.Layout );
1093 if ( !xFactory.is() )
1095 fprintf( stderr, "Layout engine not installed\n" );
1096 @@ -155,40 +134,34 @@ void LayoutTest::LoadFile( const OUStrin
1097 fprintf( stderr, "TEST: file loaded\n" );
1100 -// Nurgh ...
1101 void LayoutTest::InitUCB()
1103 OUString aEmpty;
1104 - Sequence< Any > aArgs(6);
1105 + Sequence< Any > aArgs( 6 );
1106 aArgs[0]
1107 - <<= OUString::createFromAscii(UCB_CONFIGURATION_KEY1_LOCAL);
1108 + <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY1_LOCAL );
1109 aArgs[1]
1110 - <<= OUString::createFromAscii(UCB_CONFIGURATION_KEY2_OFFICE);
1111 + <<= OUString::createFromAscii( UCB_CONFIGURATION_KEY2_OFFICE );
1112 aArgs[2] <<= OUString::createFromAscii( "PIPE" );
1113 aArgs[3] <<= aEmpty;
1114 aArgs[4] <<= OUString::createFromAscii( "PORTAL" );
1115 aArgs[5] <<= aEmpty;
1117 - if (! ::ucbhelper::ContentBroker::initialize( mxMSF, aArgs ) )
1118 + if ( !::ucbhelper::ContentBroker::initialize( mxMSF, aArgs ) )
1120 fprintf( stderr, "Failed to init content broker\n" );
1121 + fprintf( stderr, "arg[0]: %s\n", UCB_CONFIGURATION_KEY1_LOCAL );
1122 + fprintf( stderr, "arg[1]: %s\n", UCB_CONFIGURATION_KEY2_OFFICE );
1126 -#define INIT_ENV_VOODOO( installDir ) \
1127 - /* Unless you do this, obviously you don't deserve to have anything work */ \
1128 - OString aCfg = "CFG_INIFILE=file://" \
1129 - + OUStringToOString( installDir, RTL_TEXTENCODING_UTF8 ) \
1130 - + "/program/configmgrrc"; \
1131 - putenv( (char *)aCfg.getStr() ); \
1132 - /* Unless you do this, obviously you don't want your paths to be correct & \
1133 - hence no images.zip location is possible. */ \
1134 - OString aBaseInst = "BaseInstallation=file://" \
1135 - + OUStringToOString( installDir, RTL_TEXTENCODING_UTF8 ); \
1136 - putenv( (char *)aBaseInst.getStr() ); \
1138 -void LayoutTest::IInit()
1139 +void LayoutTest::Init()
1141 - INIT_ENV_VOODOO( mInstallDir );
1142 - mxContext = createInitialComponentContext( mInstallDir );
1143 + ParseCommandLine();
1144 + if (!getenv ("OOO_INSTALL_PREFIX") )
1145 + setenv( "OOO_INSTALL_PREFIX", OUSTRING_CSTR( mInstallDir ), 1 );
1146 + OSL_TRACE( "OOO_INSTALL_PREFIX=%s\n", getenv( "OOO_INSTALL_PREFIX" ) );
1147 + mxContext = defaultBootstrap_InitialComponentContext();
1148 mxMSF = new UnoBootstrapLayout( Reference< lang::XMultiServiceFactory >( mxContext->getServiceManager(), UNO_QUERY ) );
1149 ::comphelper::setProcessServiceFactory( mxMSF );
1150 InitUCB();
1151 @@ -196,6 +169,7 @@ void LayoutTest::IInit()
1153 void LayoutTest::ParseCommandLine()
1155 + printf ("%s\n", __PRETTY_FUNCTION__);
1156 for ( sal_uInt16 i = 0; i < GetCommandLineParamCount(); i++ )
1158 OUString aParam = OUString( GetCommandLineParam( i ) );
1159 @@ -206,6 +180,7 @@ void LayoutTest::ParseCommandLine()
1160 if ( i >= GetCommandLineParamCount() - 1)
1161 usage();
1162 mInstallDir = GetCommandLineParam( ++i );
1163 + setenv( "OOO_INSTALL_PREFIX", OUSTRING_CSTR( mInstallDir ), 1 );
1165 else if ( aParam.equalsAscii( "--test" ) )
1167 @@ -234,7 +209,17 @@ void LayoutTest::RunEditor()
1168 editor.Execute();
1171 -void RunDialog( layout::Dialog& dialog )
1172 +void RunDialog( Dialog& dialog )
1174 + dialog.Show();
1175 + dialog.Execute();
1176 + fprintf( stderr, "1st execute exited" );
1177 + dialog.Execute();
1178 + fprintf( stderr, "2nd execute exited" );
1181 +#undef Dialog
1182 +void RunDialog( ::Dialog& dialog )
1184 dialog.Show();
1185 dialog.Execute();
1186 @@ -245,20 +230,27 @@ void RunDialog( layout::Dialog& dialog )
1188 void TestDialog( OUString const& name )
1190 - if ( name.equalsAscii( "zoom" ) )
1191 + if ( 0 )
1193 + else if ( name.equalsAscii( "plugin" ) )
1195 - SvxZoomDialog zoom( 0 );
1196 - RunDialog( zoom );
1197 + PluginDialog plugin ( 0 );
1198 + RunDialog( plugin );
1200 + else if ( name.equalsAscii( "recover" ) )
1202 + SvxRecoverDialog recover ( 0 );
1203 + RunDialog( recover );
1205 else if ( name.equalsAscii( "wordcount" ) )
1207 SwWordCountDialog words ( 0 );
1208 RunDialog( words );
1210 - else if ( name.equalsAscii( "recover" ) )
1211 + else if ( name.equalsAscii( "zoom" ) )
1213 - SvxRecoverDialog recover ( 0 );
1214 - RunDialog( recover );
1215 + SvxZoomDialog zoom( 0 );
1216 + RunDialog( zoom );
1220 @@ -274,10 +266,6 @@ void LayoutTest::RunFiles()
1222 void LayoutTest::ExceptionalMain()
1224 - ParseCommandLine();
1225 - IInit();
1226 - INIT_ENV_VOODOO( mInstallDir );
1228 if ( mTestDialog.getLength() )
1229 TestDialog( mTestDialog );
1230 else if ( mEditMode )
1231 @@ -323,4 +311,4 @@ LayoutTest::LayoutTest( char const* inst
1235 -LayoutTest lt( "/usr/local/lib/ooo" );
1236 +LayoutTest layout_test( "/usr/local/lib/ooo" );
1237 --- toolkit/workben/layout/testrc.in.old 1970-01-01 00:00:00.000000000 +0000
1238 +++ toolkit/workben/layout/testrc.in 2009-04-06 16:42:11.000000000 +0000
1239 @@ -0,0 +1,12 @@
1240 +OOO_INSTALL_PREFIX_URL=file://${OOO_INSTALL_PREFIX}
1241 +OOO_BASIS_URL=${OOO_INSTALL_PREFIX_URL}/openoffice.org/basis3.0
1242 +OOO_BASIS_BIN_URL=${OOO_INSTALL_PREFIX_URL}/openoffice.org/basis3.0/program
1243 +OOO_URE_URL=${OOO_INSTALL_PREFIX_URL}/openoffice.org/ure
1245 +#CFG_INIFILE=${OOO_BASIS_BIN_URL}/configmgrrc
1246 +#BaseInstallation=${OOO_BASIS_URL}
1247 +BRAND_BASE_DIR=${OOO_INSTALL_PREFIX_URL}/openoffice.org3
1248 +OOO_BASE_DIR=${OOO_BASIS_URL}
1250 +UNO_TYPES=${OOO_URE_URL}/share/misc/types.rdb ${OOO_BASIS_BIN_URL}/offapi.rdb
1251 +UNO_SERVICES=${OOO_URE_URL}/share/misc/services.rdb ${OOO_BASIS_BIN_URL}/services.rdb
1252 --- toolkit/workben/layout/uno.hxx.old 2009-04-02 10:49:37.000000000 +0000
1253 +++ toolkit/workben/layout/uno.hxx 2009-04-06 16:42:11.000000000 +0000
1254 @@ -32,7 +32,7 @@
1255 #ifndef _LAYOUT_UNO_HXX
1256 #define _LAYOUT_UNO_HXX
1258 -#include <stdio.h>
1259 +#include <cstdio>
1260 #include <com/sun/star/lang/XComponent.hpp>
1261 #include <com/sun/star/lang/XInitialization.hpp>
1262 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
1263 --- toolkit/workben/layout/zoom.cxx.old 2009-04-02 10:49:37.000000000 +0000
1264 +++ toolkit/workben/layout/zoom.cxx 2009-04-06 16:42:11.000000000 +0000
1265 @@ -51,9 +51,7 @@
1266 #define _SVX_ZOOM_CXX
1268 #include <svx/dialogs.hrc>
1269 -#if !ENABLE_LAYOUT
1270 #include "zoom.hrc"
1271 -#endif /* !ENABLE_LAYOUT */
1273 #include "zoom.hxx"
1274 #if TEST_LAYOUT
1275 --- toolkit/workben/layout/zoom.hrc.old 1970-01-01 00:00:00.000000000 +0000
1276 +++ toolkit/workben/layout/zoom.hrc 2009-04-06 16:42:11.000000000 +0000
1277 @@ -0,0 +1,61 @@
1278 +/*************************************************************************
1280 + * OpenOffice.org - a multi-platform office productivity suite
1282 + * $RCSfile: zoom.hrc,v $
1284 + * $Revision: 1.4 $
1286 + * last change: $Author: kz $ $Date: 2008/03/07 15:16:57 $
1288 + * The Contents of this file are made available subject to
1289 + * the terms of GNU Lesser General Public License Version 2.1.
1292 + * GNU Lesser General Public License Version 2.1
1293 + * =============================================
1294 + * Copyright 2005 by Sun Microsystems, Inc.
1295 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
1297 + * This library is free software; you can redistribute it and/or
1298 + * modify it under the terms of the GNU Lesser General Public
1299 + * License version 2.1, as published by the Free Software Foundation.
1301 + * This library is distributed in the hope that it will be useful,
1302 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1303 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1304 + * Lesser General Public License for more details.
1306 + * You should have received a copy of the GNU Lesser General Public
1307 + * License along with this library; if not, write to the Free Software
1308 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1309 + * MA 02111-1307 USA
1311 + ************************************************************************/
1312 +#ifndef _SVX_ZOOM_HRC
1313 +#define _SVX_ZOOM_HRC
1315 +// defines ------------------------------------------------------------------
1317 +#define FL_ZOOM 14
1318 +#define BTN_OPTIMAL 15
1319 +#define BTN_WHOLE_PAGE 16
1320 +#define BTN_PAGE_WIDTH 17
1321 +#define BTN_100 18
1322 +#define BTN_USER 19
1323 +#define ED_USER 20
1325 +#define FL_VIEWLAYOUT 21
1326 +#define BTN_AUTOMATIC 22
1327 +#define BTN_SINGLE 23
1328 +#define BTN_COLUMNS 24
1329 +#define ED_COLUMNS 25
1330 +#define CHK_BOOK 26
1332 +#define FL_BOTTOM 27
1333 +#define BTN_ZOOM_OK 28
1334 +#define BTN_ZOOM_CANCEL 29
1335 +#define BTN_ZOOM_HELP 30
1337 +#endif