ooo-build r13197 - in trunk: . patches/dev300



Author: jannieuw
Date: Mon Jul 14 15:13:47 2008
New Revision: 13197
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13197&view=rev

Log:
2008-07-14  Jan Nieuwenhuizen  <janneke gnu org>

	* patches/dev300/layout-simple-dialogs-toolkit.diff:
	* patches/dev300/layout-simple-dialogs-sc.diff: New file.  Convert
	sc stringdlg to layout.

	* patches/dev300/apply: Add them.


Added:
   trunk/patches/dev300/layout-simple-dialogs-sc.diff
   trunk/patches/dev300/layout-simple-dialogs-toolkit.diff
Modified:
   trunk/ChangeLog

Added: trunk/patches/dev300/layout-simple-dialogs-sc.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/layout-simple-dialogs-sc.diff	Mon Jul 14 15:13:47 2008
@@ -0,0 +1,95 @@
+diff --git a/sc/source/ui/inc/strindlg.hxx b/sc/source/ui/inc/strindlg.hxx
+index 7ec9bc1..defc5ba 100644
+--- sc/source/ui/inc/strindlg.hxx
++++ sc/source/ui/inc/strindlg.hxx
+@@ -39,6 +39,9 @@
+ 
+ //------------------------------------------------------------------------
+ 
++#include <layout/layout.hxx>
++#include <layout/layout-pre.hxx>
++
+ class ScStringInputDlg : public ModalDialog
+ {
+ public:
+@@ -59,6 +62,7 @@ private:
+ 	HelpButton		aBtnHelp;
+ };
+ 
++#include <layout/layout-post.hxx>
+ 
+ #endif // SC_STRINDLG_HXX
+ 
+diff --git a/sc/source/ui/miscdlgs/makefile.mk b/sc/source/ui/miscdlgs/makefile.mk
+index aac2608..588b38b 100644
+--- sc/source/ui/miscdlgs/makefile.mk
++++ sc/source/ui/miscdlgs/makefile.mk
+@@ -42,6 +42,10 @@ LIBTARGET=no
+ .INCLUDE :  sc.mk
+ .INCLUDE :  $(PRJ)$/util$/makefile.pmk
+ 
++.IF "$(ENABLE_LAYOUT)" == "TRUE"
++CFLAGS+= -DENABLE_LAYOUT=1
++.ENDIF # ENABLE_LAYOUT == TRUE
++
+ # --- Files --------------------------------------------------------
+ 
+ SLOFILES =  \
+diff --git a/sc/source/ui/miscdlgs/strindlg.cxx b/sc/source/ui/miscdlgs/strindlg.cxx
+index 8056bbb..46e40d4 100644
+--- sc/source/ui/miscdlgs/strindlg.cxx
++++ sc/source/ui/miscdlgs/strindlg.cxx
+@@ -43,6 +43,14 @@
+ #include "scresid.hxx"
+ #include "miscdlgs.hrc"
+ 
++#include <layout/layout-pre.hxx>
++
++#if ENABLE_LAYOUT
++#undef ScResId
++#define ScResId(x) #x
++#undef ModalDialog
++#define ModalDialog( parent, id ) Dialog( parent, "string-input.xml", id )
++#endif /* ENABLE_LAYOUT */
+ 
+ //==================================================================
+ 
+diff --git a/sc/uiconfig/layout/makefile.mk b/sc/uiconfig/layout/makefile.mk
+index 274d9a9..64c8026 100644
+--- sc/uiconfig/layout/makefile.mk
++++ sc/uiconfig/layout/makefile.mk
+@@ -43,7 +43,11 @@ TARGET=layout
+ 
+ all: ALLTAR
+ 
+-XML_FILES=sort-options.xml
++XML_FILES=\
++  sort-options.xml\
++  string-input.xml\
++
++#
+ 
+ .INCLUDE : layout.mk
+ 
+diff --git a/sc/uiconfig/layout/string-input.xml b/sc/uiconfig/layout/string-input.xml
+new file mode 100644
+index 0000000..6718fcf
+--- /dev/null
++++ sc/uiconfig/layout/string-input.xml
+@@ -0,0 +1,16 @@
++<?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 sizeable="true" closeable="false" moveable="true" output-size="true" id="RID_SCDLG_STRINPUT" sv-look="true" xmlns="http://openoffice.org/2007/layout"; xmlns:cnt="http://openoffice.org/2007/layout/container";>
++    <vbox spacing="5" border="5">
++        <fixedtext id="FT_LABEL"/>
++        <edit has_border="true" id="ED_INPUT" tabstop="true"/>
++	<dialogbuttonhbox border="5" spacing="5">
++            <okbutton default="true" id="BTN_OK" tabstop="true"/>
++            <cancelbutton id="BTN_CANCEL" tabstop="true"/>
++            <helpbutton id="BTN_HELP" tabstop="true"/>
++	</dialogbuttonhbox>
++    </vbox>
++</modaldialog>

Added: trunk/patches/dev300/layout-simple-dialogs-toolkit.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/layout-simple-dialogs-toolkit.diff	Mon Jul 14 15:13:47 2008
@@ -0,0 +1,107 @@
+diff --git a/toolkit/inc/layout/layout.hxx b/toolkit/inc/layout/layout.hxx
+index ff223e7..37e77a4 100644
+--- toolkit/inc/layout/layout.hxx
++++ toolkit/inc/layout/layout.hxx
+@@ -46,6 +46,7 @@
+ 
+ // FIXME: eventually wrap FieldUnit
+ #include <vcl/fldunit.hxx>
++#include <vcl/smartid.hxx>
+ // FIXME: eventually wrap this too ...
+ #include <vcl/wintypes.hxx>
+ 
+@@ -106,7 +107,7 @@ public:
+     explicit Window( WindowImpl *pImpl );
+     virtual ~Window();
+ 
+-    PeerHandle GetPeer();
++    PeerHandle GetPeer() const;
+     Context *getContext();
+ 
+     void Enable( bool bEnable = true );
+@@ -119,14 +120,18 @@ public:
+     void SetParent( Window *pParent );
+     void SetParent( ::Window *pParent );
+ 
+-    css::uno::Reference<css::awt::XWindow> GetRef();
+-    VCLXWindow* GetVCLXWindow();
+-    ::Window* GetWindow();
+-    ::Window* GetParent();
++    css::uno::Reference<css::awt::XWindow> GetRef() const;
++    VCLXWindow* GetVCLXWindow() const;
++    ::Window* GetWindow() const;
++    ::Window* GetParent() const;
+ 
+     WinBits GetStyle();
+     void SetStyle( WinBits nStyle );
+     void SetUpdateMode( bool /*bUpdate*/ ) { }
++    void SetHelpId( ULONG id );
++    ULONG GetHelpId() const;
++    void SetSmartHelpId( SmartId const&, SmartIdUpdateMode mode=SMART_SET_SMART );
++    SmartId GetSmartHelpId() const;
+ };
+ 
+ class ControlImpl;
+diff --git a/toolkit/source/vclcompat/wrapper.cxx b/toolkit/source/vclcompat/wrapper.cxx
+index 95bc106..ee526d2 100644
+--- toolkit/source/vclcompat/wrapper.cxx
++++ toolkit/source/vclcompat/wrapper.cxx
+@@ -188,33 +188,53 @@ Context *Window::getContext()
+     return this && mpImpl ? mpImpl->mpCtx : NULL;
+ }
+ 
+-PeerHandle Window::GetPeer()
++PeerHandle Window::GetPeer() const
+ {
+     if ( !mpImpl )
+         return PeerHandle();
+     return mpImpl->mxWindow;
+ }
+ 
+-uno::Reference<awt::XWindow> Window::GetRef()
++uno::Reference<awt::XWindow> Window::GetRef() const
+ {
+     return uno::Reference <awt::XWindow> ( GetPeer(), uno::UNO_QUERY );
+ }
+ 
+-VCLXWindow* Window::GetVCLXWindow()
++VCLXWindow* Window::GetVCLXWindow() const
+ {
+     return VCLXWindow::GetImplementation( GetRef() );
+ }
+ 
+-::Window* Window::GetWindow()
++::Window* Window::GetWindow() const
+ {
+     return GetVCLXWindow()->GetWindow();
+ }
+ 
+-::Window* Window::GetParent()
++::Window* Window::GetParent() const
+ {
+     return GetWindow()->GetParent();
+ }
+ 
++void Window::SetHelpId( ULONG id )
++{
++    GetWindow()->SetHelpId( id );
++}
++
++ULONG Window::GetHelpId() const
++{
++    return GetWindow()->GetHelpId();
++}
++
++void Window::SetSmartHelpId( SmartId const& id, SmartIdUpdateMode mode )
++{
++    GetWindow()->SetSmartHelpId( id, mode );
++}
++
++SmartId Window::GetSmartHelpId() const
++{
++    return GetWindow()->GetSmartHelpId();
++}
++
+ struct ToolkitVclPropsMap
+ {
+     WinBits vclStyle;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]