ooo-build r12275 - in trunk: . patches/dev300
- From: jannieuw svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12275 - in trunk: . patches/dev300
- Date: Tue, 22 Apr 2008 09:54:24 +0100 (BST)
Author: jannieuw
Date: Tue Apr 22 08:54:24 2008
New Revision: 12275
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12275&view=rev
Log:
2008-04-22 Jan Nieuwenhuizen <janneke gnu org>
* patches/dev300/layout-plugin-toolkit.diff: New file.
* patches/dev300/apply(LayoutDialogs): Add it.
Added:
trunk/patches/dev300/layout-plugin-toolkit.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Tue Apr 22 08:54:24 2008
@@ -1869,6 +1869,8 @@
cws-layoutdialogs-toolkit.diff
cws-layoutdialogs-transex3.diff
+layout-plugin-toolkit.diff
+
[ LocalizeLayout ]
cws-layoutdialogs-toolkit-localize.diff
Added: trunk/patches/dev300/layout-plugin-toolkit.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/layout-plugin-toolkit.diff Tue Apr 22 08:54:24 2008
@@ -0,0 +1,932 @@
+diff --git a/inc/layout/layout-post.hxx b/inc/layout/layout-post.hxx
+index 3501e15..25e1cfc 100644
+--- a/inc/layout/layout-post.hxx
++++ toolkit/inc/layout/layout-post.hxx
+@@ -39,33 +39,55 @@
+ #if ENABLE_LAYOUT
+
+ #undef AdvancedButton
++#undef ApplyButton
+ #undef Box
+ #undef Button
+ #undef CancelButton
+ #undef CheckBox
++#undef ComboBox
+ #undef Container
++#undef Control
++#undef Dialog
++#undef Edit
+ #undef FixedImage
+ #undef FixedInfo
+ #undef FixedLine
+ #undef FixedText
+-#undef HelpButton
+ #undef HBox
++#undef HelpButton
++#undef IgnoreButton
++#undef ListBox
+ #undef MetricField
++#undef MetricFormatter
+ #undef MoreButton
+ #undef MultiLineEdit
++#undef NoButton
++#undef NumericField
++#undef NumericFormatter
+ #undef OKButton
++#undef Plugin
+ #undef ProgressBar
+ #undef PushButton
+ #undef RadioButton
+-#undef SfxModalDialog
++#undef ResetButton
++#undef RetryButton
++#undef SpinField
+ #undef Table
+ #undef VBox
++#undef YesButton
++
++#undef ModalDialog
++#undef ModelessDialog
++#undef SfxModalDialog
+
+ #undef Window
+
++
+ #undef SVX_RES
+ #define SVX_RES(i) ResId(i,DIALOG_MGR())
+
++#undef SvtResId
++
+ #undef SW_RES
+ #define SW_RES(i) ResId(i,SWDIALOG_MGR())
+
+diff --git a/inc/layout/layout-pre.hxx b/inc/layout/layout-pre.hxx
+index 8d4983c..11a6b13 100644
+--- a/inc/layout/layout-pre.hxx
++++ toolkit/inc/layout/layout-pre.hxx
+@@ -49,63 +49,78 @@
+ //typedef layout::FixedLine FixedLine;
+
+ #define AdvancedButton layout::AdvancedButton
++#define ApplyButton layout::ApplyButton
+ #define Box layout::Box
+ #define Button layout::Button
+ #define CancelButton layout::CancelButton
+ #define CheckBox layout::CheckBox
++#define ComboBox layout::ComboBox
+ #define Container layout::Container
++#define Control layout::Control
++#define Dialog layout::Dialog
++#define Edit layout::Edit
+ #define FixedImage layout::FixedImage
+ #define FixedInfo layout::FixedInfo
+ #define FixedLine layout::FixedLine
+ #define FixedText layout::FixedText
+ #define HBox layout::HBox
+ #define HelpButton layout::HelpButton
++#define IgnoreButton layout::IgnoreButton
++#define ListBox layout::ListBox
+ #define MetricField layout::MetricField
++#define MetricFormatter layout::MetricFormatter
+ #define MoreButton layout::MoreButton
+ #define MultiLineEdit layout::MultiLineEdit
++#define NoButton layout::NoButton
++#define NumericField layout::NumericField
++#define NumericFormatter layout::NumericFormatter
+ #define OKButton layout::OKButton
++#define Plugin layout::Plugin
+ #define ProgressBar layout::ProgressBar
+ #define PushButton layout::PushButton
+ #define RadioButton layout::RadioButton
+-#define SfxModalDialog layout::Dialog
++#define ResetButton layout::ResetButton
++#define RetryButton layout::RetryButton
++#define SpinField layout::SpinField
+ #define Table layout::Table
+ #define VBox layout::VBox
++#define YesButton layout::YesButton
+
+-/* FIXME: why are we defaulting to layout::Window?
+- /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])'
+- ../../../../layout/inc/layout/layout.hxx:304: note: candidates are: layout::Dialog::Dialog(layout::Window*, const char*, const char*, sal_uInt32)
+- ../../../../layout/inc/layout/layout.hxx:300: note: layout::Dialog::Dialog(const layout::Dialog&)
+-*/
++#define ModalDialog Dialog
++#define ModelessDialog Dialog
++#define SfxModalDialog Dialog
+
+ #define Window ::Window
+
++
+ #undef SVX_RES
+ #define SVX_RES(x) #x
++#undef SvtResId
++#define SvtResId(x) #x
+ #undef SW_RES
+ #define SW_RES(x) #x
+
+-/* Hmm. This hack makes zoom.cxx, wordcountdialog.cxx diffs smaller
+- * but is not scalable. */
++/* Hmm. These hacks make zoom.cxx, wordcountdialog.cxx, ... diffs
++ * smaller but 'tis not really scalable. */
+ #ifdef _LAYOUT_POST_HXX
+
+ #ifdef _SVX_RECOVER_CXX
+ #undef SfxModalDialog
+ // 3rd parameter must match ID in <modaldialog> "RID_SVXDLG_RECOVER", localize.sdf
+-#define SfxModalDialog( pParent, SVX_RES_RID ) layout::Dialog( pParent, "recover.xml", "RID_SVXDLG_RECOVER" )
+-//#define _SVX_RECOVER_HRC
++#define SfxModalDialog( pParent, SVX_RES_RID ) Dialog( pParent, "recover.xml", "RID_SVXDLG_RECOVER" )
+ #endif /* _SVX_RECOVER_CXX */
+
+ #ifdef SW_WORDCOUNTDIALOG_HXX
+ #undef SfxModalDialog
+ // 3rd parameter must match ID in <modaldialog> "DLG_WORDCOUNT", localize.sdf
+-#define SfxModalDialog( pParent, SW_RES_RID ) layout::Dialog( pParent, "wordcount.xml", "DLG_WORDCOUNT" )
++#define SfxModalDialog( pParent, SW_RES_RID ) Dialog( pParent, "wordcount.xml", "DLG_WORDCOUNT" )
+ #define SW_WORDCOUNTDIALOG_HRC
+ #endif /* SW_WORDCOUNTDIALOG_HXX */
+
+ #ifdef _SVX_ZOOM_CXX
+ #undef SfxModalDialog
+ // 3rd parameter must match ID in <modaldialog> "RID_SVXDLG_ZOOM", localize.sdf
+-#define SfxModalDialog( pParent, SVX_RES_RID ) layout::Dialog( pParent, "zoom.xml", "RID_SVXDLG_ZOOM" )
++#define SfxModalDialog( pParent, SVX_RES_RID ) Dialog( pParent, "zoom.xml", "RID_SVXDLG_ZOOM" )
+ #define _SVX_ZOOM_HRC
+ #endif /* _SVX_ZOOM_CXX */
+
+@@ -113,7 +128,7 @@
+
+ #else /* !ENABLE_LAYOUT */
+
+-#define LAYOUT_PRE_POST
++#define LAYOUT_PRE_POST 1
+
+ #endif /* !ENABLE_LAYOUT */
+
+diff --git a/inc/layout/layout.hxx b/inc/layout/layout.hxx
+index e2d0403..c308387 100644
+--- a/inc/layout/layout.hxx
++++ toolkit/inc/layout/layout.hxx
+@@ -49,8 +49,9 @@
+
+ #include <toolkit/dllapi.h>
+
+-class Window;
++class Control;
+ class Image;
++class Window;
+
+ namespace layout
+ {
+@@ -516,6 +517,16 @@ public:
+ VBox( sal_Int32 nBorder, bool bHomogeneous );
+ };
+
++class PluginImpl;
++class TOOLKIT_DLLPUBLIC Plugin : public Control
++{
++ friend class PluginImpl;
++ DECL_GET_IMPL( Plugin );
++ //DECL_CONSTRUCTORS( Plugin, Control, 0 );
++public:
++ Plugin( Context *pCtx, char const* pId, ::Control *plugin );
++};
++
+ } // end namespace layout
+
+ #endif /* _LAYOUT_HXX */
+diff --git a/source/awt/makefile.mk b/source/awt/makefile.mk
+index 6b54bbb..f750218 100644
+--- a/source/awt/makefile.mk
++++ toolkit/source/awt/makefile.mk
+@@ -79,6 +79,7 @@ SLOFILES= \
+ $(SLO)/vclxbutton.obj\
+ $(SLO)/vclxdialog.obj\
+ $(SLO)/vclxfixedline.obj\
++ $(SLO)/vclxplugin.obj\
+ $(SLO)/vclxscroller.obj\
+ $(SLO)/vclxsplitter.obj\
+ $(SLO)/vclxtabcontrol.obj
+diff --git a/source/awt/vclxplugin.cxx b/source/awt/vclxplugin.cxx
+new file mode 100644
+index 0000000..1506828
+--- /dev/null
++++ toolkit/source/awt/vclxplugin.cxx
+@@ -0,0 +1,78 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston,
++ * MA 02110-1301 USA
++ *
++ ************************************************************************/
++
++#include "vclxplugin.hxx"
++
++#include <com/sun/star/awt/PosSize.hpp>
++
++#include "forward.hxx"
++
++namespace layoutimpl
++{
++
++using namespace ::com::sun::star;
++
++VCLXPlugin::VCLXPlugin( Window *p, WinBits b )
++ : VCLXWindow()
++ , mpWindow( p )
++ , mStyle( b )
++ , mSize()
++{
++}
++
++VCLXPlugin::~VCLXPlugin()
++{
++}
++
++void SAL_CALL VCLXPlugin::dispose() throw(uno::RuntimeException)
++{
++ {
++ ::vos::OGuard aGuard( GetMutex() );
++
++ lang::EventObject aDisposeEvent;
++ aDisposeEvent.Source = *this;
++ }
++
++ VCLXWindow::dispose();
++}
++
++awt::Size SAL_CALL VCLXPlugin::getMinimumSize()
++ throw(::com::sun::star::uno::RuntimeException)
++{
++ ::vos::OClearableGuard aGuard( GetMutex() );
++ return mSize;
++}
++
++} // namespace layoutimpl
+diff --git a/source/awt/vclxplugin.hxx b/source/awt/vclxplugin.hxx
+new file mode 100644
+index 0000000..81e5bcb
+--- /dev/null
++++ toolkit/source/awt/vclxplugin.hxx
+@@ -0,0 +1,77 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston,
++ * MA 02110-1301 USA
++ *
++ ************************************************************************/
++
++#ifndef LAYOUT_AWT_VCLXPLUGIN_HXX
++#define LAYOUT_AWT_VCLXPLUGIN_HXX
++
++#include <toolkit/awt/vclxwindow.hxx>
++#include <vcl/wintypes.hxx>
++
++namespace layoutimpl
++{
++
++namespace css = ::com::sun::star;
++
++class VCLXPlugin : public VCLXWindow
++{
++public:
++ Window *mpWindow;
++ WinBits mStyle;
++
++ //Rectangle mPosSize; // Rectangle as member: BOOM
++ css::awt::Size mSize;
++
++ VCLXPlugin( Window *p, WinBits b );
++
++ //void SetPosSize( Rectangle const& r ) { mPosSize = r; }
++ void SetSize( css::awt::Size const& s ) { mSize = s; }
++
++protected:
++ ~VCLXPlugin();
++
++ // XComponent
++ void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
++
++ virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize()
++ throw(::com::sun::star::uno::RuntimeException);
++
++private:
++ VCLXPlugin( VCLXPlugin const & );
++ VCLXPlugin& operator=( VCLXPlugin const & );
++};
++
++} // namespace layoutimpl
++
++#endif /* LAYOUT_AWT_VCLXPLUGIN_HXX */
+diff --git a/source/layout/helper.cxx b/source/layout/helper.cxx
+index 5cfddf6..b40f7dd 100644
+--- a/source/layout/helper.cxx
++++ toolkit/source/layout/helper.cxx
+@@ -352,6 +352,7 @@ PropHelper::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::
+ #include <awt/vclxscroller.hxx>
+ #include <awt/vclxsplitter.hxx>
+ #include <awt/vclxtabcontrol.hxx>
++#include <awt/vclxplugin.hxx>
+ #include <toolkit/awt/vclxtoolkit.hxx>
+ #include <toolkit/awt/vclxwindow.hxx>
+ #include <vcl/button.hxx>
+@@ -360,8 +361,7 @@ PropHelper::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::
+ #include <vcl/tabctrl.hxx>
+ #include <vcl/tabpage.hxx>
+
+-
+-///#include <svtools/prgsbar.hxx>
++#include <typeinfo>
+
+ namespace layoutimpl
+ {
+@@ -482,12 +482,19 @@ uno::Reference< awt::XLayoutConstrains > ImplCreateWindow(
+ pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+ pNewComp = new layoutimpl::VCLXAdvancedButton( pNewWindow );
+ }
++ else if ( aName.equalsAscii( "plugin" ) )
++ {
++ pNewWindow = new Control( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
++ printf( "%s: parent=%p (%s)\n", __FUNCTION__, pParent, typeid( *pParent ).name() );
++ pNewComp = new layoutimpl::VCLXPlugin( pNewWindow, ImplGetWinBits( WindowAttributes, 0 ) );
++ }
+
+ if ( !pNewWindow )
+ return xRef;
+
+ pNewWindow->SetCreatedWithToolkit( sal_True );
+- pNewComp->SetCreatedWithToolkit( TRUE );
++ if ( pNewComp )
++ pNewComp->SetCreatedWithToolkit( TRUE );
+ xRef = pNewComp;
+ pNewWindow->SetComponentInterface( pNewComp );
+ if ( WindowAttributes & awt::WindowAttribute::SHOW )
+diff --git a/source/layout/import.cxx b/source/layout/import.cxx
+index f177596..71e5a16 100644
+--- a/source/layout/import.cxx
++++ toolkit/source/layout/import.cxx
+@@ -123,7 +123,7 @@ SAL_THROW (())
+
+ OUString aOrdering;
+ if ( findAndRemove( "ordering", aProps, aOrdering ) )
+- if ( DialogButtonHBox *b = dynamic_cast<DialogButtonHBox *> ( mpWidget->getPeer().get() ) )
++ if ( DialogButtonHBox *b = dynamic_cast<DialogButtonHBox *> ( mpWidget->getPeer().get() ) )
+ b->setOrdering ( aOrdering );
+
+ #ifdef IMPORT_RADIOGROUP
+diff --git a/source/layout/root.cxx b/source/layout/root.cxx
+index 25c4463..48f72ed 100644
+--- a/source/layout/root.cxx
++++ toolkit/source/layout/root.cxx
+@@ -191,8 +191,8 @@ void SAL_CALL LayoutRoot::initialize( const uno::Sequence< uno::Any >& aArgument
+
+ try
+ {
+- xParser->parseStream( source );
+-}
++ xParser->parseStream( source );
++ }
+ catch ( xml::sax::SAXParseException& e )
+ {
+ OUString c = OUString::createFromAscii( ":" );
+diff --git a/source/layout/root.hxx b/source/layout/root.hxx
+index e385256..9946956 100644
+--- a/source/layout/root.hxx
++++ toolkit/source/layout/root.hxx
+@@ -46,6 +46,7 @@
+ #include <com/sun/star/lang/XInitialization.hpp>
+ #include <cppuhelper/implbase3.hxx>
+ #include <cppuhelper/interfacecontainer.h>
++#include <toolkit/dllapi.h>
+
+ #include "proplist.hxx"
+
+@@ -70,7 +71,7 @@ css::uno::Reference< css::io::XInputStream > getFileAsStream( const rtl::OUStrin
+
+ class LayoutWidget;
+
+-class LayoutRoot : public ::cppu::WeakImplHelper3<
++class TOOLKIT_DLLPUBLIC LayoutRoot : public ::cppu::WeakImplHelper3<
+ css::awt::XLayoutRoot,
+ css::lang::XInitialization,
+ css::lang::XComponent>
+@@ -130,7 +131,7 @@ public:
+ virtual LayoutWidget *create( rtl::OUString id, const rtl::OUString unoName, long attrbs, css::uno::Reference< css::awt::XLayoutContainer > xParent );
+ };
+
+-class LayoutWidget
++class TOOLKIT_DLLPUBLIC LayoutWidget
+ {
+ friend class LayoutRoot;
+
+diff --git a/source/vclcompat/wbutton.cxx b/source/vclcompat/wbutton.cxx
+index 5757ebc..17c2142 100644
+--- a/source/vclcompat/wbutton.cxx
++++ toolkit/source/vclcompat/wbutton.cxx
+@@ -452,7 +452,7 @@ protected:
+ parent->Invalidate( r, INVALIDATE_CHILDREN | INVALIDATE_NOCHILDREN );
+ parent->SetPosSizePixel( 0, 0, r.nRight - r.nLeft, r.nBottom - r.nTop,
+ awt::PosSize::SIZE );
+-}
++ }
+
+ public:
+ AdvancedButtonImpl( Context *pCtx, PeerHandle const& xPeer, Window *pWindow )
+diff --git a/source/vclcompat/wrapper.cxx b/source/vclcompat/wrapper.cxx
+index 20f961c..67d6cf5 100644
+--- a/source/vclcompat/wrapper.cxx
++++ toolkit/source/vclcompat/wrapper.cxx
+@@ -50,6 +50,11 @@
+ #include <layout/root.hxx>
+ #include <vcl/image.hxx>
+
++#include <vcl/ctrl.hxx>
++#include <awt/vclxplugin.hxx>
++#include <com/sun/star/awt/PosSize.hpp>
++#include <typeinfo>
++
+ using namespace ::com::sun::star;
+
+ namespace layout
+@@ -570,4 +575,61 @@ sal_Int32 ProgressBar::GetValue()
+ return getImpl().mxProgressBar->getValue();
+ }
+
++
++class PluginImpl: public ControlImpl
++{
++public:
++ ::Control *mpPlugin;
++
++ PluginImpl( Context *pCtx, const PeerHandle &xPeer, Window *pWindow, :: Control *plugin )
++ : ControlImpl( pCtx, xPeer, pWindow )
++ , mpPlugin( plugin )
++ {
++ uno::Reference<lang::XUnoTunnel> unoTunnel( mxWindow, uno::UNO_QUERY );
++ if ( unoTunnel.is() )
++ {
++ layoutimpl::VCLXPlugin *vcl
++ = reinterpret_cast<layoutimpl::VCLXPlugin*>
++ ( unoTunnel->getSomething( VCLXWindow::GetUnoTunnelId() ) );
++ if ( vcl )
++ {
++
++ ::Window *parent = vcl->mpWindow->GetParent();
++
++ printf( "\n\n***********************\n" );
++ printf( "\n%s: plugin=%p (%s)\n", __FUNCTION__, plugin, typeid( *plugin ).name() );
++ printf( "%s: vcl=%p (%s)\n", __FUNCTION__, vcl, typeid( *vcl ).name() );
++
++ printf( "%s: parent=%p (%s)\n", __FUNCTION__, parent, typeid( *parent ).name() );
++
++ vcl->SetWindow( plugin );
++ plugin->SetStyle( vcl->mStyle );
++ plugin->SetCreatedWithToolkit( TRUE );
++ plugin->SetComponentInterface( vcl );
++ plugin->SetParent( parent );
++ plugin->Show();
++
++ Size s = plugin->GetSizePixel();
++ vcl->SetSize( awt::Size( s.Width(), s.Height() ) );
++ vcl->setPosSize( 0, 0, s.Width(), s.Height(), awt::PosSize::SIZE );
++ printf( "\n***********************\n\n" );
++ }
++ }
++ }
++};
++
++//DECL_CONSTRUCTOR_IMPLS( Plugin, Control, "plugin" );
++
++//Plugin::Plugin( Context *pCtx, char const *pId, sal_uInt32 nId )
++Plugin::Plugin( Context *pCtx, char const *pId, ::Control *plugin )
++ : Control( new PluginImpl( pCtx, pCtx->GetPeerHandle( pId, 0 ), this, plugin ) )
++{
++ (void) plugin;
++ printf( "%s: name=%s\n", __PRETTY_FUNCTION__, pId );
++ printf( "%s: context=%p\n", __PRETTY_FUNCTION__, pCtx );
++}
++
++DECL_GET_IMPL_IMPL( Plugin )
++
++
+ } // namespace layout
+diff --git a/source/vclcompat/wrapper.hxx b/source/vclcompat/wrapper.hxx
+index b7569c7..f56bc0a 100644
+--- a/source/vclcompat/wrapper.hxx
++++ toolkit/source/vclcompat/wrapper.hxx
+@@ -43,23 +43,23 @@
+
+ #include <cstring>
+
+-namespace css = com::sun::star;
+-
+ namespace layout
+ {
+
++namespace css = com::sun::star;
++
+ class WindowImpl
+ {
+ public:
+- Window *mpWindow;
++ Window *mpWindow;
+ Context *mpCtx;
+- css::uno::Reference< css::awt::XWindow > mxWindow;
++ css::uno::Reference< css::awt::XWindow > mxWindow;
+ css::uno::Reference< css::awt::XVclWindowPeer > mxVclPeer;
+
+ WindowImpl( Context *pCtx, const PeerHandle &xPeer, Window *pWindow )
+- : mpWindow ( pWindow )
+- , mpCtx ( pCtx )
+- , mxWindow ( xPeer, css::uno::UNO_QUERY )
++ : mpWindow( pWindow )
++ , mpCtx( pCtx )
++ , mxWindow( xPeer, css::uno::UNO_QUERY )
+ , mxVclPeer( xPeer, css::uno::UNO_QUERY )
+ {
+ }
+@@ -101,7 +101,9 @@ class ControlImpl : public WindowImpl
+ {
+ public:
+ ControlImpl( Context *pCtx, const PeerHandle &xPeer, Window *pWindow )
+- : WindowImpl( pCtx, xPeer, pWindow ) {}
++ : WindowImpl( pCtx, xPeer, pWindow )
++ {
++ }
+ };
+
+ inline WindowImpl &Window::getImpl() const
+diff --git a/workben/layout/makefile.mk b/workben/layout/makefile.mk
+index fc8fb2c..d7303af 100644
+--- a/workben/layout/makefile.mk
++++ toolkit/workben/layout/makefile.mk
+@@ -59,6 +59,7 @@ CFLAGS+=-Wall -Wno-non-virtual-dtor
+
+ CXXFILES=\
+ editor.cxx \
++ plugin.cxx \
+ recover.cxx \
+ wordcountdialog.cxx \
+ test.cxx \
+@@ -66,6 +67,7 @@ CXXFILES=\
+
+ OBJFILES=\
+ $(OBJ)$/editor.obj \
++ $(OBJ)$/plugin.obj \
+ $(OBJ)$/recover.obj \
+ $(OBJ)$/test.obj \
+ $(OBJ)$/wordcountdialog.obj \
+@@ -81,7 +83,8 @@ APP1STDLIBS= \
+ $(CPPUHELPERLIB) \
+ $(SALLIB) \
+ $(XMLSCRIPTLIB) \
+- $(TKLIB)
++ $(TKLIB) \
++ $(SVXLIB)
+
+ svtools = $(INCCOM)/svtools
+ all: $(svtools) ALLTAR
+diff --git a/workben/layout/plugin.cxx b/workben/layout/plugin.cxx
+new file mode 100644
+index 0000000..4a8c859
+--- /dev/null
++++ toolkit/workben/layout/plugin.cxx
+@@ -0,0 +1,67 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++
++#include <com/sun/star/awt/XDialog2.hpp>
++
++#include "dialcontrol.hxx"
++
++#define _LAYOUT_PLUGIN_CXX
++
++#include "plugin.hxx"
++
++#include <layout/layout-pre.hxx>
++
++#define LAYOUT_RES(x) #x
++
++#undef ModalDialog
++#define ModalDialog( pParent, LAYOUT_RES_RID ) Dialog( pParent, "plugin.xml", "RID_DLG_PLUGIN" )
++
++
++PluginDialog::PluginDialog( Window* pParent )
++ : ModalDialog( pParent, LAYOUT_RES( RID_DLG_PLUGIN ) )
++ , aHeaderImage( this, SVX_RES( FI_HEADER ) )
++ , aHeaderText( this, LAYOUT_RES( FT_HEADER ) )
++ , aHeaderLine( this, LAYOUT_RES( FL_HEADER ) )
++ , aPlugin( this, LAYOUT_RES( PL_DIAL ),
++ new svx::DialControl( pParent, Size( 80, 80 ), 0 ) )
++ , aOKBtn( this, LAYOUT_RES( BTN_OK ) )
++ , aCancelBtn( this, LAYOUT_RES( BTN_CANCEL ) )
++ , aHelpBtn( this, LAYOUT_RES( BTN_HELP ) )
++{
++}
++
++PluginDialog::~PluginDialog()
++{
++}
+diff --git a/workben/layout/plugin.hxx b/workben/layout/plugin.hxx
+new file mode 100644
+index 0000000..9f1350f
+--- /dev/null
++++ toolkit/workben/layout/plugin.hxx
+@@ -0,0 +1,60 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * last change: $Author$ $Date$
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++#ifndef _LAYOUT_PLUGIN_HXX
++#define _LAYOUT_PLUGIN_HXX
++
++#include <layout/layout.hxx>
++#include <layout/layout-pre.hxx>
++
++class PluginDialog : public ModalDialog
++{
++private:
++ FixedImage aHeaderImage;
++ FixedText aHeaderText;
++ FixedLine aHeaderLine;
++ Plugin aPlugin;
++ OKButton aOKBtn;
++ CancelButton aCancelBtn;
++ HelpButton aHelpBtn;
++
++public:
++ PluginDialog( Window* pParent );
++ ~PluginDialog();
++};
++
++#include <layout/layout-post.hxx>
++
++#endif /* _LAYOUT_PLUGIN_HXX */
++
+diff --git a/workben/layout/plugin.xml b/workben/layout/plugin.xml
+new file mode 100644
+index 0000000..96baa96
+--- /dev/null
++++ toolkit/workben/layout/plugin.xml
+@@ -0,0 +1,26 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!-- This is a template. i18n translation is not performed in-place;
++ i18n translated xml files are generated from this template by
++ transex3/layout/tralay. !-->
++
++<modaldialog xmlns="http://openoffice.org/2007/layout"
++ xmlns:cnt="http://openoffice.org/2007/layout/container"
++ id="RID_DLG_PLUGIN" _title="Plugin Test" optimumsize="true"
++ help-id="SID_ATTR_PLUGIN"
++ has_border="true" sizeable="true" moveable="true">
++ <vbox spacing="5" border="5">
++ <hbox spacing="5" cnt:expand="false">
++ <fixedimage id="FI_HEADER" cnt:expand="false" graphic="res/commandimagelist/sc_apply.png" />
++ <fixedtext id="FT_HEADER" _label="Plugin Test"/>
++ </hbox>
++ <fixedline id="FL_HEADER"/>
++ <plugin id="PL_DIAL" width="80" height="80"/>
++ <dialogbuttonhbox border="5" spacing="5">
++ <flow/>
++ <okbutton id="BTN_OK"/>
++ <cancelbutton id="BTN_CANCEL" />
++ <helpbutton id="BTN_HELP"/>
++ </dialogbuttonhbox>
++ </vbox>
++</modaldialog>
++
+diff --git a/workben/layout/test.cxx b/workben/layout/test.cxx
+index 5a059ee..4049e60 100644
+--- a/workben/layout/test.cxx
++++ toolkit/workben/layout/test.cxx
+@@ -60,6 +60,9 @@
+ #include "zoom.hxx"
+ #undef _LAYOUT_POST_HXX
+
++#include "plugin.hxx"
++#undef _LAYOUT_POST_HXX
++
+ #include "recover.hxx"
+ #undef _LAYOUT_POST_HXX
+
+@@ -237,7 +240,7 @@ void LayoutTest::RunEditor()
+ editor.Execute();
+ }
+
+-void RunDialog( layout::Dialog& dialog )
++void RunDialog( Dialog& dialog )
+ {
+ dialog.Show();
+ dialog.Execute();
+@@ -258,6 +261,11 @@ void TestDialog( OUString const& name )
+ SwWordCountDialog words ( 0 );
+ RunDialog( words );
+ }
++ else if ( name.equalsAscii( "plugin" ) )
++ {
++ PluginDialog plugin ( 0 );
++ RunDialog( plugin );
++ }
+ else if ( name.equalsAscii( "recover" ) )
+ {
+ SvxRecoverDialog recover ( 0 );
+diff --git a/workben/layout/zoom.cxx b/workben/layout/zoom.cxx
+index b3c8344..0ac57f2 100644
+--- a/workben/layout/zoom.cxx
++++ toolkit/workben/layout/zoom.cxx
+@@ -66,9 +66,7 @@
+ #define _SVX_ZOOM_CXX
+
+ #include <svx/dialogs.hrc>
+-#if !ENABLE_LAYOUT
+ #include "zoom.hrc"
+-#endif /* !ENABLE_LAYOUT */
+
+ #include "zoom.hxx"
+ #if TEST_LAYOUT
+diff --git a/workben/layout/zoom.hrc b/workben/layout/zoom.hrc
+new file mode 100644
+index 0000000..3f0f979
+--- /dev/null
++++ toolkit/workben/layout/zoom.hrc
+@@ -0,0 +1,61 @@
++/*************************************************************************
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: zoom.hrc,v $
++ *
++ * $Revision: 1.4 $
++ *
++ * last change: $Author: kz $ $Date: 2008/03/07 15:16:57 $
++ *
++ * The Contents of this file are made available subject to
++ * the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ * GNU Lesser General Public License Version 2.1
++ * =============================================
++ * Copyright 2005 by Sun Microsystems, Inc.
++ * 901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License version 2.1, as published by the Free Software Foundation.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ ************************************************************************/
++#ifndef _SVX_ZOOM_HRC
++#define _SVX_ZOOM_HRC
++
++// defines ------------------------------------------------------------------
++
++#define FL_ZOOM 14
++#define BTN_OPTIMAL 15
++#define BTN_WHOLE_PAGE 16
++#define BTN_PAGE_WIDTH 17
++#define BTN_100 18
++#define BTN_USER 19
++#define ED_USER 20
++
++#define FL_VIEWLAYOUT 21
++#define BTN_AUTOMATIC 22
++#define BTN_SINGLE 23
++#define BTN_COLUMNS 24
++#define ED_COLUMNS 25
++#define CHK_BOOK 26
++
++#define FL_BOTTOM 27
++#define BTN_ZOOM_OK 28
++#define BTN_ZOOM_CANCEL 29
++#define BTN_ZOOM_HELP 30
++
++#endif
++
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]