ooo-build r14058 - in trunk: . patches/dev300
- From: jannieuw svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r14058 - in trunk: . patches/dev300
- Date: Wed, 24 Sep 2008 12:49:35 +0000 (UTC)
Author: jannieuw
Date: Wed Sep 24 12:49:35 2008
New Revision: 14058
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14058&view=rev
Log:
2008-09-24 Jan Nieuwenhuizen <janneke gnu org>
* patches/dev300/layout-simple-dialogs-sc.diff:
* patches/dev300/layout-simple-dialogs-sfx2.diff:
* patches/dev300/layout-simple-dialogs-solenv.diff:
* patches/dev300/layout-simple-dialogs-svx.diff:
* patches/dev300/layout-simple-dialogs-sw.diff:
* patches/dev300/layout-simple-dialogs-toolkit.diff: Make all
dialogs closeable with ESC. Find&Replace: fix Whole words/Entire
cells checkbox text, add localization. Add rules to generate
localize.sdf files, removing the need to provide and update them
until upstream recognises translatable strings in .XML dialogs.
* patches/dev300/apply:
* patches/dev300/cws-layoutdialogs-toolkit-localize.diff:
* patches/dev300/layout-tab-sc-localize.diff:
* patches/dev300/layout-tab-toolkit-localize.diff: Remove patches.
Removed:
trunk/patches/dev300/cws-layoutdialogs-toolkit-localize.diff
trunk/patches/dev300/layout-tab-sc-localize.diff
trunk/patches/dev300/layout-tab-toolkit-localize.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/dev300/layout-simple-dialogs-sc.diff
trunk/patches/dev300/layout-simple-dialogs-sfx2.diff
trunk/patches/dev300/layout-simple-dialogs-solenv.diff
trunk/patches/dev300/layout-simple-dialogs-svx.diff
trunk/patches/dev300/layout-simple-dialogs-sw.diff
trunk/patches/dev300/layout-simple-dialogs-toolkit.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Wed Sep 24 12:49:35 2008
@@ -44,7 +44,7 @@
# special fragmented build patch distro
Piece : PieceBits
#Localize
-Localize : LocalizeLayout, LocalizeFixes
+Localize : LocalizeFixes
# patches touching swext which is not in the OpenOffice2 alias yet.
# FIXME: Get this cleaned up
swext : swextFixes
@@ -2084,14 +2084,12 @@
# use one or more layout tabpages in old .src tabbed dialog
layout-tab-toolkit.diff
layout-tab-sfx2.diff
-layout-tab-sc-localize.diff
layout-tab-sc.diff
layout-tab-scp2.diff
layout-tab-svx.diff
# convert some simple dialogs to layout engine
layout-simple-dialogs-offapi.diff
-layout-simple-dialogs-sc-localize.diff
layout-simple-dialogs-sc.diff
layout-simple-dialogs-scp2.diff
layout-simple-dialogs-scripting.diff
@@ -2109,11 +2107,6 @@
# on openSUSE-11.1-alpha0; pmladek is discussing it with the gcc team
toolkit-layout-gcc-4.3.2-hack.diff, pmladek
-[ LocalizeLayout ]
-# These can be enabled once remove-paragraph is upstreamed
-# FIXME dev300 cws-layoutdialogs-toolkit-localize.diff
-# FIXME dev300 layout-tab-toolkit-localize.diff
-
[ AutoCorrectCapsLock ]
SectionOwner => kohei
SectionIssue => i#62234
Modified: trunk/patches/dev300/layout-simple-dialogs-sc.diff
==============================================================================
--- trunk/patches/dev300/layout-simple-dialogs-sc.diff (original)
+++ trunk/patches/dev300/layout-simple-dialogs-sc.diff Wed Sep 24 12:49:35 2008
@@ -588,7 +588,7 @@
-template.sdf:
- $(foreach,i,$(XML_FILES) $(TRALAY) -l en-US $i) > $@
diff --git a/sc/uiconfig/layout/makefile.mk b/sc/uiconfig/layout/makefile.mk
-index 274d9a9..6392427 100644
+index 274d9a9..4688e04 100644
--- sc/uiconfig/layout/makefile.mk
+++ sc/uiconfig/layout/makefile.mk
@@ -43,7 +43,13 @@ TARGET=layout
@@ -606,6 +606,17 @@
.INCLUDE : layout.mk
+@@ -52,3 +58,10 @@ all .PHONY:
+ .ENDIF # ENABLE_LAYOUT != TRUE
+
+ .INCLUDE : target.mk
++
++localize.sdf: $(PRJ)/source/ui/miscdlgs/localize.sdf $(PRJ)/source/ui/src/localize.sdf
++ grep instbdlg.src $(PRJ)/source/ui/miscdlgs/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\insert-sheet.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SCDLG_INSERT_TABLE_title/' > insert-sheet-$@
++ grep -E 'miscdlgs.src.*(FT_DEST|FT_INSERT|STR_NEWDOC|RID_SCDLG_MOVETAB|BTN_COPY)' $(PRJ)/source/ui/src/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\move-copy-sheet.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SCDLG_MOVETAB_title/' > move-copy-sheet-$@
++ grep sortdlg.src $(PRJ)/source/ui/src/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\sort-options.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SCDLG_SORT_title/' > sort-options-$@
++ echo '#empty' | cat - insert-sheet-$@ move-copy-sheet-$@ sort-options-$@ > $@
++ rm -f *-$@
diff --git a/sc/uiconfig/layout/move-copy-sheet.xml b/sc/uiconfig/layout/move-copy-sheet.xml
new file mode 100644
index 0000000..79720df
Modified: trunk/patches/dev300/layout-simple-dialogs-sfx2.diff
==============================================================================
--- trunk/patches/dev300/layout-simple-dialogs-sfx2.diff (original)
+++ trunk/patches/dev300/layout-simple-dialogs-sfx2.diff Wed Sep 24 12:49:35 2008
@@ -1,3 +1,112 @@
+diff --git a/sfx2/inc/sfx2/layout-post.hxx b/sfx2/inc/sfx2/layout-post.hxx
+new file mode 100644
+index 0000000..0eab118
+--- /dev/null
++++ sfx2/inc/sfx2/layout-post.hxx
+@@ -0,0 +1,44 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org 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 version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org. If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++#ifndef _SFX2_LAYOUT_POST_HXX
++#define _SFX2_LAYOUT_POST_HXX
++
++#include <layout/layout-post.hxx>
++
++#if ENABLE_LAYOUT
++
++/* Allow re-inclusion for cxx file. */
++#undef _SFX2_LAYOUT_PRE_HXX
++
++#endif /* ENABLE_LAYOUT */
++
++#endif /* _SFX2_LAYOUT_POST_HXX */
+diff --git a/sfx2/inc/sfx2/layout-pre.hxx b/sfx2/inc/sfx2/layout-pre.hxx
+new file mode 100644
+index 0000000..bb8935c
+--- /dev/null
++++ sfx2/inc/sfx2/layout-pre.hxx
+@@ -0,0 +1,53 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org 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 version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org. If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++#ifndef _SFX2_LAYOUT_PRE_HXX
++#define _SFX2_LAYOUT_PRE_HXX
++
++#include <layout/layout-pre.hxx>
++
++#if ENABLE_LAYOUT
++
++///* Allow re-inclusion for next hxx file. */
++#undef _SFX2_LAYOUT_POST_HXX
++
++#undef SfxDialog
++#undef SfxModalDialog
++#undef SfxModelessDialog
++
++#define SfxDialog layout::SfxDialog
++
++#define SfxModalDialog SfxDialog
++#define SfxModelessDialog SfxDialog
++
++#endif /* ENABLE_LAYOUT */
++
++#endif /* _SFX2_LAYOUT_PRE_HXX */
diff --git a/sfx2/inc/sfx2/layout-tabdlg.hxx b/sfx2/inc/sfx2/layout-tabdlg.hxx
new file mode 100644
index 0000000..4b84083
@@ -55,10 +164,10 @@
+
diff --git a/sfx2/inc/sfx2/layout.hxx b/sfx2/inc/sfx2/layout.hxx
new file mode 100644
-index 0000000..a279656
+index 0000000..1807213
--- /dev/null
+++ sfx2/inc/sfx2/layout.hxx
-@@ -0,0 +1,68 @@
+@@ -0,0 +1,79 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
@@ -97,10 +206,21 @@
+#define ENABLE_LAYOUT_SFX_TABDIALOG 1
+#include <sfx2/layout-tabdlg.hxx>
+
++class SfxChildWindow;
++
+namespace layout
+{
+
+namespace css = ::com::sun::star;
++
++
++class SFX2_DLLPUBLIC SfxDialog
++ : public Dialog
++{
++public:
++ SfxDialog (::Window* parent, char const* xml_file, char const* id, SfxBindings* bindings=0, SfxChildWindow* child=0);
++};
++
+#if 0
+class SFX2_DLLPUBLIC SfxTabDialog
+ : public ::SfxTabDialog
@@ -284,15 +404,17 @@
-sf sfx2\util nmake - all sf_util sf_appl sf_bast sf_cnfg sf_ctrl sf_dlg sf_doc sf_expl sf_inet sf_menu sf_noti sf_sbar sf_tbox sf_view NULL
+sf sfx2\util nmake - all sf_util sf_appl sf_bast sf_cnfg sf_ctrl sf_dlg sf_doc sf_expl sf_inet sf_menu sf_layout sf_noti sf_sbar sf_tbox sf_view NULL
diff --git a/sfx2/prj/d.lst b/sfx2/prj/d.lst
-index 03d2c01..692b8e3 100644
+index 03d2c01..53ed0df 100644
--- sfx2/prj/d.lst
+++ sfx2/prj/d.lst
-@@ -126,3 +126,5 @@ mkdir: %_DEST%\inc%_EXT%\sfx2
+@@ -126,3 +126,7 @@ mkdir: %_DEST%\inc%_EXT%\sfx2
..\inc\QuerySaveDocument.hxx %_DEST%\inc%_EXT%\sfx2\QuerySaveDocument.hxx
..\inc\mailmodelapi.hxx %_DEST%\inc%_EXT%\sfx2\mailmodelapi.hxx
..\inc\docinsert.hxx %_DEST%\inc%_EXT%\sfx2\docinsert.hxx
+..\inc\sfx2\layout.hxx %_DEST%\inc%_EXT%\sfx2\layout.hxx
+..\inc\sfx2\layout-tabdlg.hxx %_DEST%\inc%_EXT%\sfx2\layout-tabdlg.hxx
++..\inc\sfx2\layout-post.hxx %_DEST%\inc%_EXT%\sfx2\layout-post.hxx
++..\inc\sfx2\layout-pre.hxx %_DEST%\inc%_EXT%\sfx2\layout-pre.hxx
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index d3254ed..fb35c4f 100644
--- sfx2/source/dialog/tabdlg.cxx
@@ -764,12 +886,89 @@
}
+END_NAMESPACE_LAYOUT_SFX_TABDIALOG
+diff --git a/sfx2/source/layout/factory.cxx b/sfx2/source/layout/factory.cxx
+new file mode 100644
+index 0000000..407e626
+--- /dev/null
++++ sfx2/source/layout/factory.cxx
+@@ -0,0 +1,71 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: tabdlg.cxx,v $
++ * $Revision: 1.38 $
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org 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 version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org. If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++#include <com/sun/star/awt/WindowAttribute.hpp>
++#include <sal/types.h>
++#include <sfx2/basedlgs.hxx>
++#include <toolkit/awt/vclxtoolkit.hxx>
++#include <toolkit/awt/vclxdialog.hxx>
++
++using rtl::OUString;
++
++class SfxModelessDialog_unprotect : public SfxModelessDialog
++{
++public:
++ SfxModelessDialog_unprotect (Window *parent, WinBits attributes);
++};
++
++SFX2_DLLPUBLIC SfxBindings* sfx2_global_bindings;
++SFX2_DLLPUBLIC SfxChildWindow* sfx2_global_child;
++
++SfxModelessDialog_unprotect::SfxModelessDialog_unprotect (Window *parent, WinBits bits)
++ : SfxModelessDialog (sfx2_global_bindings, sfx2_global_child, parent, bits)
++{
++}
++
++extern "C"
++{
++
++SAL_DLLPUBLIC_EXPORT Window* CreateWindow (VCLXWindow** vcl, OUString const& name, Window* parent, long& attributes)
++{
++ Window* window = 0;
++ if (0)
++ {
++ ;
++ }
++ else if (name.equalsAscii ("sfxmodelessdialog"))
++ {
++ window = new SfxModelessDialog_unprotect (parent, ImplGetWinBits (attributes, 0));
++ *vcl = new layoutimpl::VCLXDialog ();
++ }
++ return window;
++}
++
++}
diff --git a/sfx2/source/layout/makefile.mk b/sfx2/source/layout/makefile.mk
new file mode 100644
-index 0000000..eedce24
+index 0000000..ebcde8a
--- /dev/null
+++ sfx2/source/layout/makefile.mk
-@@ -0,0 +1,59 @@
+@@ -0,0 +1,61 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -812,13 +1011,15 @@
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
-+CFLAGS += -I../$(PRJ)/toolkit/source/vclcompat
++CFLAGS += -I../$(PRJ)/toolkit/source/vclcompat -I../$(PRJ)/toolkit/source
+
+# --- Files --------------------------------------------------------
+
+.IF "$(ENABLE_LAYOUT)" == "TRUE"
+
+SLOFILES = \
++ $(SLO)$/factory.obj \
++ $(SLO)$/sfxdialog.obj \
+ $(SLO)$/sfxtabpage.obj \
+ $(SLO)$/sfxtabdialog.obj \
+#
@@ -829,6 +1030,53 @@
+
+.INCLUDE : target.mk
+
+diff --git a/sfx2/source/layout/sfxdialog.cxx b/sfx2/source/layout/sfxdialog.cxx
+new file mode 100644
+index 0000000..32e11c9
+--- /dev/null
++++ sfx2/source/layout/sfxdialog.cxx
+@@ -0,0 +1,41 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile: tabdlg.cxx,v $
++ * $Revision: 1.38 $
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org 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 version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org. If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++#include <sfx2/layout.hxx>
++
++namespace layout
++{
++
++SfxDialog::SfxDialog(::Window* parent, char const* xml_file, char const* id, SfxBindings*, SfxChildWindow*)
++ : Dialog (parent, xml_file, id)
++{
++}
++
++} // end namespace layout
diff --git a/sfx2/source/layout/sfxtabdialog.cxx b/sfx2/source/layout/sfxtabdialog.cxx
new file mode 100644
index 0000000..bf7c521
Modified: trunk/patches/dev300/layout-simple-dialogs-solenv.diff
==============================================================================
--- trunk/patches/dev300/layout-simple-dialogs-solenv.diff (original)
+++ trunk/patches/dev300/layout-simple-dialogs-solenv.diff Wed Sep 24 12:49:35 2008
@@ -13,7 +13,7 @@
chmod (oct($unixrights), "$destdir$destination") || die "Can't change permissions: $!";
diff --git a/solenv/inc/layout.mk b/solenv/inc/layout.mk
new file mode 100644
-index 0000000..28e6cc0
+index 0000000..e8d15f0
--- /dev/null
+++ solenv/inc/layout.mk
@@ -0,0 +1,30 @@
@@ -27,7 +27,7 @@
+ZIPUPDATE=-u
+XML_ZIP = $(PRJNAME)-layout
+
-+ALLTAR: $(XML_ZIP)
++ALLTAR: localize.sdf $(XML_ZIP)
+
+$(XML_ZIP): $(ALL_XMLS)
+
Modified: trunk/patches/dev300/layout-simple-dialogs-svx.diff
==============================================================================
--- trunk/patches/dev300/layout-simple-dialogs-svx.diff (original)
+++ trunk/patches/dev300/layout-simple-dialogs-svx.diff Wed Sep 24 12:49:35 2008
@@ -1,13 +1,13 @@
diff --git a/svx/inc/srchdlg.hxx b/svx/inc/srchdlg.hxx
-index a62b23d..f39441e 100644
+index a62b23d..b63e1de 100644
--- svx/inc/srchdlg.hxx
+++ svx/inc/srchdlg.hxx
@@ -116,12 +116,19 @@ public:
// class SvxSearchDialogWrapper ------------------------------------------
-+#include <layout/layout.hxx>
-+#include <layout/layout-pre.hxx>
++#include <sfx2/layout.hxx>
++#include <sfx2/layout-pre.hxx>
+
+class SvxSearchDialog;
class SVX_DLLPUBLIC SvxSearchDialogWrapper : public SfxChildWindow
@@ -22,11 +22,20 @@
SFX_DECL_CHILDWINDOW(SvxSearchDialogWrapper);
};
+@@ -233,7 +240,7 @@ private:
+ ULONG nModifyFlag;
+ String aStylesStr;
+ String aLayoutStr;
+- String aCalcStr;
++ LocalizedString aCalcStr;
+
+ SvStringsDtor aSearchStrings;
+ SvStringsDtor aReplaceStrings;
@@ -285,6 +292,8 @@ private:
#endif
};
-+#include <layout/layout-post.hxx>
++#include <sfx2/layout-post.hxx>
+
inline BOOL SvxSearchDialog::HasSearchAttributes() const
{
@@ -47,14 +56,14 @@
.IF "$(ENABLE_GTK)" != ""
CFLAGS+=-DENABLE_GTK
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
-index 4e9d1ca..b1dc3fe 100644
+index 4e9d1ca..52c98e2 100644
--- svx/source/dialog/srchdlg.cxx
+++ svx/source/dialog/srchdlg.cxx
@@ -78,6 +78,8 @@
#include <svx/svxdlg.hxx> //CHINA001
-+#include <layout/layout-pre.hxx>
++#include <sfx2/layout-pre.hxx>
+
using namespace com::sun::star::i18n;
using namespace com::sun::star;
@@ -84,7 +93,7 @@
aSearchFormats ( pParent, SVX_RES( FT_SEARCH_FORMATS ) ),
aReplaceFormats ( pParent, SVX_RES( FT_REPLACE_FORMATS ) ),
bMultiLineEdit ( FALSE ),
-@@ -316,9 +327,16 @@ void SvxJSearchOptionsDialog::SetTransliterationFlags( INT32 nSettings )
+@@ -316,9 +327,18 @@ void SvxJSearchOptionsDialog::SetTransliterationFlags( INT32 nSettings )
pPage->SetTransliterationFlags( nSettings );
}
*/ //CHINA001
@@ -92,10 +101,12 @@
+
+#if ENABLE_LAYOUT
+#undef SfxModelessDialog
-+#define SfxModelessDialog(sfx_bindings, child, parent, id) Dialog( parent, "find-and-replace.xml", id )
++#define SfxModelessDialog(bindings, child, parent, id) SfxDialog (parent, "find-and-replace.xml", id, bindings, child)
+#define SVX_RES_PLAIN(x) ResId (x, DIALOG_MGR ())
++#define THIS_SVX_RES(x) this, #x
+#else /* !ENABLE_LAYOUT */
+#define SVX_RES_PLAIN SVX_RES
++#define THIS_SVX_RES SVX_RES
+#endif /* !ENABLE_LAYOUT */
+
#undef INI_LIST
@@ -103,16 +114,16 @@
#define INI_LIST() \
aSearchText ( this, SVX_RES( FT_SEARCH ) ), \
aSearchLB ( this, SVX_RES( ED_SEARCH ) ), \
-@@ -371,7 +389,7 @@ void SvxJSearchOptionsDialog::SetTransliterationFlags( INT32 nSettings )
+@@ -371,7 +391,7 @@ void SvxJSearchOptionsDialog::SetTransliterationFlags( INT32 nSettings )
bReadOnly ( FALSE ), \
bConstruct ( TRUE ), \
nModifyFlag ( 0 ), \
- aCalcStr ( SVX_RES( STR_WORDCALC ) ), \
-+ aCalcStr ( SVX_RES_PLAIN( STR_WORDCALC ) ), \
++ aCalcStr ( THIS_SVX_RES( STR_WORDCALC ) ), \
pImpl ( NULL ), \
pSearchList ( NULL ), \
pReplaceList ( NULL ), \
-@@ -408,6 +426,10 @@ SvxSearchDialog::SvxSearchDialog( Window* pParent, SfxChildWindow* pChildWin, Sf
+@@ -408,6 +428,10 @@ SvxSearchDialog::SvxSearchDialog( Window* pParent, SfxChildWindow* pChildWin, Sf
}
#undef INI_LIST
@@ -123,7 +134,7 @@
// -----------------------------------------------------------------------
-@@ -431,6 +453,11 @@ SvxSearchDialog::~SvxSearchDialog()
+@@ -431,6 +455,11 @@ SvxSearchDialog::~SvxSearchDialog()
}
// -----------------------------------------------------------------------
@@ -135,7 +146,7 @@
void lcl_MoveDown( Window& rWindow, sal_Int32 nOffset )
{
Point aPos(rWindow.GetPosPixel());
-@@ -440,12 +467,17 @@ void lcl_MoveDown( Window& rWindow, sal_Int32 nOffset )
+@@ -440,16 +469,22 @@ void lcl_MoveDown( Window& rWindow, sal_Int32 nOffset )
void SvxSearchDialog::Construct_Impl()
{
@@ -154,23 +165,13 @@
EnableControls_Impl( 0 );
// alten Text des aWordBtn's merken
-@@ -572,6 +604,7 @@ void SvxSearchDialog::Construct_Impl()
- aSearchComponentFL.Show();
- aSearchComponent2PB.Show();
- }
-+#if 1// !ENABLE_LAYOUT
- if( aSearchComponentFL.IsVisible() && aSearchComponent1PB.IsVisible() )
- {
-
-@@ -618,6 +651,7 @@ void SvxSearchDialog::Construct_Impl()
-
- SetSizePixel(aDlgSize);
- }
-+#endif /* !ENABLE_LAYOUT */
- }
- }
-
-@@ -715,6 +749,7 @@ void SvxSearchDialog::InitControls_Impl()
+- ( aCalcStr += sal_Unicode('#') ) += aWordBtn.GetText();
++ aCalcStr += sal_Unicode('#');
++ aCalcStr += aWordBtn.GetText();
+
+ aLayoutStr = SVX_RESSTR( RID_SVXSTR_SEARCH_STYLES );
+ aStylesStr = aLayoutBtn.GetText();
+@@ -715,6 +750,7 @@ void SvxSearchDialog::InitControls_Impl()
aLink = LINK( this, SvxSearchDialog, LoseFocusHdl_Impl );
aSearchLB.SetLoseFocusHdl( aLink );
aReplaceLB.SetLoseFocusHdl( aLink );
@@ -178,7 +179,7 @@
aSearchTmplLB.SetLoseFocusHdl( aLink );
aReplaceTmplLB.SetLoseFocusHdl( aLink );
-@@ -886,6 +921,8 @@ void SvxSearchDialog::CalculateDelta_Impl()
+@@ -886,6 +922,8 @@ void SvxSearchDialog::CalculateDelta_Impl()
pMoreBtn->Enable();
}
@@ -187,31 +188,7 @@
// -----------------------------------------------------------------------
void SvxSearchDialog::Init_Impl( int bSearchPattern )
-@@ -893,6 +930,11 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern )
- DBG_ASSERT( pSearchItem, "SearchItem == 0" );
- bWriter = ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_WRITER );
-
-+#if 0 //ENABLE_LAYOUT
-+ if (!pImpl)
-+ pImpl = new SearchDlg_Impl( this );
-+#endif /* ENABLE_LAYOUT */
-+
- pImpl->bMultiLineEdit = FALSE;
-
- if ( !pImpl->bMultiLineEdit )
-@@ -1456,6 +1498,11 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn )
- Remember_Impl( aStr, FALSE );
- }
- SaveToModule_Impl();
-+#if 0 //ENABLE_LAYOUT
-+ aJapOptionsCB.Show ();
-+ delete pImpl;
-+ pImpl = 0;
-+#endif /* ENABLE_LAYOUT */
- Close();
- }
- else if ( pBtn == &aSimilarityBtn )
-@@ -1469,7 +1516,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn )
+@@ -1469,7 +1507,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
@@ -220,7 +197,7 @@
pSearchItem->IsLEVRelaxed(),
pSearchItem->GetLEVOther(),
pSearchItem->GetLEVShorter(),
-@@ -1495,7 +1542,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn )
+@@ -1495,7 +1533,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
@@ -229,7 +206,7 @@
DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001
int nRet = aDlg->Execute(); //CHINA001 int nRet = aDlg.Execute();
if (RET_OK == nRet) //! true only if FillItemSet of SvxJSearchOptionsPage returns true
-@@ -1514,7 +1561,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn )
+@@ -1514,7 +1552,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn )
pArgs[0].Name = ::rtl::OUString::createFromAscii("SearchString");
pArgs[0].Value <<= ::rtl::OUString(aSearchLB.GetText());
pArgs[1].Name = ::rtl::OUString::createFromAscii("ParentWindow");
@@ -238,7 +215,7 @@
if(pBtn == &aSearchComponent1PB)
{
if ( pImpl->xCommand1Dispatch.is() )
-@@ -2018,6 +2065,7 @@ IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl )
+@@ -2018,6 +2056,7 @@ IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl )
aSearchLB.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
ModifyHdl_Impl( (ComboBox*)pCtrl );
@@ -246,7 +223,7 @@
aLayoutBtn.SetText( bFormat && nTxtLen ? aLayoutStr : aStylesStr );
return 0;
}
-@@ -2091,7 +2139,7 @@ IMPL_LINK( SvxSearchDialog, FormatHdl_Impl, Button *, EMPTYARG )
+@@ -2091,7 +2130,7 @@ IMPL_LINK( SvxSearchDialog, FormatHdl_Impl, Button *, EMPTYARG )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
@@ -255,7 +232,7 @@
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
aTxt.Insert( pDlg->GetText(), 0 );
pDlg->SetText( aTxt );
-@@ -2168,7 +2216,7 @@ IMPL_LINK( SvxSearchDialog, AttributeHdl_Impl, Button *, EMPTYARG )
+@@ -2168,7 +2207,7 @@ IMPL_LINK( SvxSearchDialog, AttributeHdl_Impl, Button *, EMPTYARG )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
@@ -264,7 +241,7 @@
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
pDlg->Execute();
delete pDlg;
-@@ -2327,7 +2375,9 @@ void SvxSearchDialog::PaintAttrText_Impl()
+@@ -2327,7 +2366,9 @@ void SvxSearchDialog::PaintAttrText_Impl()
void SvxSearchDialog::SetModifyFlag_Impl( const Control* pCtrl )
{
@@ -275,7 +252,7 @@
nModifyFlag |= MODIFY_SEARCH;
else if ( &aReplaceLB == (ComboBox*)pCtrl )
nModifyFlag |= MODIFY_REPLACE;
-@@ -2414,25 +2464,38 @@ void SvxSearchDialog::SaveToModule_Impl()
+@@ -2414,25 +2455,38 @@ void SvxSearchDialog::SaveToModule_Impl()
// class SvxSearchDialogWrapper ------------------------------------------
@@ -349,16 +326,9 @@
Link aLink = LINK( this, SvxZoomDialog, UserHdl );
a100Btn.SetClickHdl( aLink );
aOptimalBtn.SetClickHdl( aLink );
-diff --git a/svx/source/table/localize.sdf b/svx/source/table/localize.sdf
-new file mode 100644
-index 0000000..8b13789
---- /dev/null
-+++ svx/source/table/localize.sdf
-@@ -0,0 +1 @@
-+
diff --git a/svx/uiconfig/layout/find-and-replace.xml b/svx/uiconfig/layout/find-and-replace.xml
new file mode 100644
-index 0000000..0a2e5c7
+index 0000000..ad5af2b
--- /dev/null
+++ svx/uiconfig/layout/find-and-replace.xml
@@ -0,0 +1,111 @@
@@ -367,7 +337,7 @@
+ i18n translated XML files are generated from this template by
+ transex3/layout/tralay. !-->
+
-+<modelessdialog _title="Find & Replace" help-id="SID_SEARCH_DLG" closable="true" closeable="true" sizeable="true" moveable="true" output-size="true" id="RID_SVXDLG_SEARCH" sv-look="true" _text="Find & Replace" xmlns="http://openoffice.org/2007/layout" xmlns:cnt="http://openoffice.org/2007/layout/container">
++<sfxmodelessdialog _title="Find & Replace" help-id="SID_SEARCH_DLG" closeable="true" sizeable="true" moveable="true" output-size="true" id="RID_SVXDLG_SEARCH" sv-look="true" xmlns="http://openoffice.org/2007/layout" xmlns:cnt="http://openoffice.org/2007/layout/container">
+ <vbox spacing="5" border="5">
+ <string id="RID_SVXSTR_SEARCH_STYLES" _text="Including Styles"/>
+ <string id="RID_SVXSTR_SEARCH" _text="(Search)"/>
@@ -472,7 +442,7 @@
+ </vbox>
+ </hbox>
+ </vbox>
-+</modelessdialog>
++</sfxmodelessdialog>
diff --git a/svx/uiconfig/layout/layout.mk b/svx/uiconfig/layout/layout.mk
deleted file mode 100644
index 8c939b0..0000000
@@ -513,7 +483,7 @@
-template.sdf:
- $(foreach,i,$(XML_FILES) $(TRALAY) -l en-US $i) > $@
diff --git a/svx/uiconfig/layout/makefile.mk b/svx/uiconfig/layout/makefile.mk
-index 2c8ccc8..685c82a 100644
+index 2c8ccc8..d7c3ed9 100644
--- svx/uiconfig/layout/makefile.mk
+++ svx/uiconfig/layout/makefile.mk
@@ -39,7 +39,10 @@ TARGET=layout
@@ -528,6 +498,16 @@
.INCLUDE : layout.mk
+@@ -48,3 +51,9 @@ all .PHONY:
+ .ENDIF # ENABLE_LAYOUT != TRUE
+
+ .INCLUDE : target.mk
++
++localize.sdf: $(PRJ)/source/dialog/localize.sdf
++ grep srchdlg.src $(PRJ)/source/dialog/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "svx\\uiconfig\\layout\\find-and-replace.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SVXDLG_SEARCH_title/' > find-and-replace-$@
++ grep zoom.src $(PRJ)/source/dialog/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "svx\\uiconfig\\layout\\zoom.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SVXDLG_ZOOM_title/' > zoom-$@
++ echo '#empty' | cat - find-and-replace-$@ zoom-$@ > $@
++ rm -f *-$@
diff --git a/svx/uiconfig/layout/zoom.xml b/svx/uiconfig/layout/zoom.xml
index abed333..5938643 100644
--- svx/uiconfig/layout/zoom.xml
Modified: trunk/patches/dev300/layout-simple-dialogs-sw.diff
==============================================================================
--- trunk/patches/dev300/layout-simple-dialogs-sw.diff (original)
+++ trunk/patches/dev300/layout-simple-dialogs-sw.diff Wed Sep 24 12:49:35 2008
@@ -243,6 +243,22 @@
-# Don't want to overwrite filled localize.sdf with empty template
-template.sdf:
- $(foreach,i,$(XML_FILES) $(TRALAY) -l en-US $i) > $@
+diff --git a/sw/uiconfig/layout/localize.sdf b/sw/uiconfig/layout/localize.sdf
+deleted file mode 100644
+index 78d502d..0000000
+diff --git a/sw/uiconfig/layout/makefile.mk b/sw/uiconfig/layout/makefile.mk
+index e951307..7ca393c 100644
+--- sw/uiconfig/layout/makefile.mk
++++ sw/uiconfig/layout/makefile.mk
+@@ -48,3 +48,8 @@ all .PHONY:
+ .ENDIF # ENABLE_LAYOUT != TRUE
+
+ .INCLUDE : target.mk
++
++localize.sdf: $(PRJ)/source/ui/dialog/localize.sdf
++ grep wordcountdialog.src $(PRJ)/source/ui/dialog/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sw\\uiconfig\\layout\\wordcount.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tDLG_WORDCOUNT_title/' > wordcount-$@
++ echo '#empty' | cat - wordcount-$@ > $@
++ rm -f *-$@
diff --git a/sw/uiconfig/layout/wordcount.xml b/sw/uiconfig/layout/wordcount.xml
index ae33571..e922294 100644
--- sw/uiconfig/layout/wordcount.xml
Modified: trunk/patches/dev300/layout-simple-dialogs-toolkit.diff
==============================================================================
--- trunk/patches/dev300/layout-simple-dialogs-toolkit.diff (original)
+++ trunk/patches/dev300/layout-simple-dialogs-toolkit.diff Wed Sep 24 12:49:35 2008
@@ -1,5 +1,5 @@
diff --git a/toolkit/doc/layout/TODO b/toolkit/doc/layout/TODO
-index abd717c..fbc2c85 100644
+index abd717c..31ec597 100644
--- toolkit/doc/layout/TODO
+++ toolkit/doc/layout/TODO
@@ -4,6 +4,11 @@
@@ -22,20 +22,31 @@
*** missing properties
'title' -> 'Set Zoom'
Missing prop Title
-@@ -109,6 +113,11 @@ grep zoom.src svx/source/dialog/localize.sdf | awk -F'\t' '{printf "%s\t%s\t%s\t
+@@ -102,14 +106,18 @@ fHorAlign = fVerAlign = 0.5; --> float const [CENTER?] = 0.5;
+
+ ** include full translations
+ *** zoom
+-grep zoom.src svx/source/dialog/localize.sdf | awk -F'\t' '{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "janneke\\vc\\layout-cws\\toolkit\\workben\\layout\\zoom.xml", $3, "layout", $6 "_label", "", "", $8, "0", $10, $11, $12, "", $14, $15}' | sed -e 's/FL_\(ZOOM\)_label/FL_\1_text/' -e 's/\t_label/\tRID_SVXDLG_ZOOM_title/'
+-**** done, except for View Layout update: no strings in localize.sdf yet,
+- must redo.
++grep zoom.src svx/source/dialog/localize.sdf | awk -F'\t' '{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "janneke\\vc\\layout-cws\\toolkit\\workben\\layout\\zoom.xml", $3, "layout", $6 "_label", "", "", $8, "0", $10, $11, $12, "", $14, $15}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SVXDLG_ZOOM_title/'
+ *** wordcount
grep wordcountdialog.src sw/source/ui/dialog/localize.sdf | awk -F'\t' '{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "janneke\\vc\\layout-cws\\toolkit\\workben\\layout\\workben.xml", $3, "layout", $6 "_label", "", "", $8, "0", $10, $11, $12, "", $14, $15}' | sed -e 's/FL_\([A-Z]*\)_label/FL_\1_text/' -e 's/\t_label/\tDLG_WORDCOUNT_title/'s
*** sortdlg
grep sortdlg.src ../../../sc/source/ui/src/localize.sdf | awk -F'\t' '{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "janneke\\vc\\layout-cws\\toolkit\\workben\\layout\\sort-options.xml", $3, "layout", $6 "_label", "", "", $8, "0", $10, $11, $12, "", $14, $15}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SCDLG_SORT_title/' | grep -E ' (nl|de|en-US) ' > localize-str.sdf
+-
+grep sortdlg.src sc/source/ui/src/localize.sdf | awk -F'\t' '{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\sort-options.xml", $3, "layout", $6 "_label", "", "", $8, "0", $10, $11, $12, "", $14, $15}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SCDLG_SORT_title/' > sc/uiconfig/layout/localize-sort-options.sdf
+*** insert-sheet
+grep instbdlg.src sc/source/ui/miscdlgs/localize.sdf | awk -F'\t' '{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\insert-sheet.xml", $3, "layout", $6 "_label", "", "", $8, "0", $10, $11, $12, "", $14, $15}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SCDLG_INSERT_TABLE_title/' > sc/uiconfig/layout/localize-insert-sheet.sdf
+*** move-copy-sheet
+grep -E 'miscdlgs.src.*(FT_DEST|FT_INSERT|STR_NEWDOC|RID_SCDLG_MOVETAB|BTN_COPY)' sc/source/ui/src/localize.sdf | awk -F'\t' '{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\move-copy-sheet.xml", $3, "layout", $6 "_label", "", "", $8, "0", $10, $11, $12, "", $14, $15}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SCDLG_MOVETAB_title/' > sc/uiconfig/layout/localize-move-copy-sheet.sdf
-
++*** find-and-replace
++grep srchdlg.src svx/source/dialog/localize.sdf | awk -F'\t' '{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "svx\\uiconfig\\layout\\find-and-replace.xml", $3, "layout", $6 "_label", "", "", $8, "0", $10, $11, $12, "", $14, $15}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SVXDLG_SEARCH_title/' > svx/uiconfig/layout/localize-find-and-replace.sdf
* i18n
+ + forget java property files nonsense
diff --git a/toolkit/inc/layout/layout-post.hxx b/toolkit/inc/layout/layout-post.hxx
-index 54ed610..1d3d955 100644
+index 54ed610..e97fa99 100644
--- toolkit/inc/layout/layout-post.hxx
+++ toolkit/inc/layout/layout-post.hxx
@@ -34,6 +34,10 @@
@@ -73,7 +84,7 @@
#undef NoButton
#undef NumericField
#undef NumericFormatter
-@@ -64,36 +73,31 @@
+@@ -64,36 +73,32 @@
#undef Plugin
#undef ProgressBar
#undef PushButton
@@ -96,6 +107,7 @@
#undef ModalDialog
#undef ModelessDialog
+#undef ScExpandedFixedText
++#undef SfxDialog
#undef SfxModalDialog
-#undef SfxTabPage
+#undef SfxModelessDialog
@@ -120,7 +132,7 @@
#endif /* _LAYOUT_POST_HXX */
diff --git a/toolkit/inc/layout/layout-pre.hxx b/toolkit/inc/layout/layout-pre.hxx
-index fbbc1df..b628708 100644
+index fbbc1df..e43f048 100644
--- toolkit/inc/layout/layout-pre.hxx
+++ toolkit/inc/layout/layout-pre.hxx
@@ -34,15 +34,8 @@
@@ -149,11 +161,12 @@
#define FixedImage layout::FixedImage
#define FixedInfo layout::FixedInfo
#define FixedLine layout::FixedLine
-@@ -62,11 +56,15 @@
+@@ -62,11 +56,16 @@
#define HBox layout::HBox
#define HelpButton layout::HelpButton
#define IgnoreButton layout::IgnoreButton
+#define InfoBox layout::InfoBox
++#define LocalizedString layout::LocalizedString
#define ListBox layout::ListBox
+#define MessBox layout::MessBox
+#define MessageBox layout::MessageBox
@@ -165,7 +178,7 @@
#define NoButton layout::NoButton
#define NumericField layout::NumericField
#define NumericFormatter layout::NumericFormatter
-@@ -74,64 +72,31 @@
+@@ -74,64 +73,36 @@
#define Plugin layout::Plugin
#define ProgressBar layout::ProgressBar
#define PushButton layout::PushButton
@@ -187,6 +200,7 @@
#define ModalDialog Dialog
#define ModelessDialog Dialog
+#define ScExpandedFixedText FixedText
++#define SfxDialog Dialog
#define SfxModalDialog Dialog
-#define SfxTabPage TabPage
+#define SfxModelessDialog Dialog
@@ -233,15 +247,17 @@
-#endif /* _LAYOUT_POST_HXX */
-
-#else /* !ENABLE_LAYOUT */
--
++#else
+
-#define LAYOUT_PRE_POST 1
--
++#define LocalizedString String
+
-#endif /* !ENABLE_LAYOUT */
+#endif /* ENABLE_LAYOUT */
#endif /* _LAYOUT_PRE_HXX */
diff --git a/toolkit/inc/layout/layout.hxx b/toolkit/inc/layout/layout.hxx
-index 62b7ffa..8db7e00 100644
+index 62b7ffa..1c596ec 100644
--- toolkit/inc/layout/layout.hxx
+++ toolkit/inc/layout/layout.hxx
@@ -32,28 +32,46 @@
@@ -382,7 +398,7 @@
WinBits GetStyle();
- void SetStyle( WinBits nStyle );
- void SetUpdateMode( bool /*bUpdate*/ ) { }
-+ void SetText( String const& str );
++ void SetText( rtl::OUString const& str );
+ String GetText() const;
+ void SetStyle( WinBits style );
+ void SetUpdateMode( bool mode );
@@ -405,7 +421,7 @@
+ Point GetPosPixel () const;
+ void SetSizePixel (Size const&);
+ Size GetSizePixel () const;
-+ sal_Int32 GetCtrlTextWidth (String const& str) const;
++ sal_Int32 GetCtrlTextWidth (rtl::OUString const& str) const;
+ sal_Int32 GetTextHeight () const;
+
+ Size LogicToPixel( Size const& size, MapMode const& mapMode=(MapMode const&)*(MapMode*)0 ) const;
@@ -435,16 +451,18 @@
public:
bool IsEnabled();
};
-@@ -148,7 +214,9 @@ class TOOLKIT_DLLPUBLIC FixedText : public Control
+@@ -148,8 +214,10 @@ class TOOLKIT_DLLPUBLIC FixedText : public Control
{
DECL_GET_IMPL( FixedText );
DECL_CONSTRUCTORS( FixedText, Control, 0 );
+
public:
+- void SetText( String const& rStr );
+ ~FixedText ();
- void SetText( String const& rStr );
++ void SetText( rtl::OUString const& rStr );
};
+ class FixedImageImpl;
@@ -183,13 +251,18 @@ class TOOLKIT_DLLPUBLIC Button : public Control
{
DECL_GET_IMPL( Button );
@@ -452,10 +470,11 @@
+ DECL_GET_WINDOW (Button);
+
public:
+- void SetText( String const& rStr );
+- BOOL SetModeImage( const Image& rImage );
+ ~Button ();
+ static String GetStandardText (sal_uInt16 button_type);
- void SetText( String const& rStr );
-- BOOL SetModeImage( const Image& rImage );
++ void SetText( rtl::OUString const& rStr );
+ bool SetModeImage( const Image& rImage );
void SetImageAlign( ImageAlign eAlign );
@@ -543,7 +562,7 @@
- void SetText( XubString const& rStr ) const;
- XubString GetText() const;
+ ~Edit ();
-+ void SetText( String const& rStr ) const;
++ void SetText( rtl::OUString const& rStr ) const;
+ String GetText() const;
void SetModifyHdl( Link const& rLink );
void SetSelection( Selection const& rSelection );
@@ -609,18 +628,19 @@
public:
- USHORT InsertEntry( XubString const& rStr, USHORT nPos = COMBOBOX_APPEND );
-+ ~ComboBox ();
-+ sal_uInt16 InsertEntry( XubString const& rStr, sal_uInt16 nPos=COMBOBOX_APPEND );
- void RemoveEntry( XubString const& rStr );
+- void RemoveEntry( XubString const& rStr );
- void RemoveEntry( USHORT nPos );
++ ~ComboBox ();
++ sal_uInt16 InsertEntry( rtl::OUString const& rStr, sal_uInt16 nPos=COMBOBOX_APPEND );
++ void RemoveEntry( rtl::OUString const& rStr );
+ void RemoveEntry( sal_uInt16 nPos );
void Clear();
- USHORT GetEntryPos( XubString const& rStr ) const;
- XubString GetEntry( USHORT nPos ) const;
- USHORT GetEntryCount() const;
-+ sal_uInt16 GetEntryPos( XubString const& rStr ) const;
-+ XubString GetEntry( sal_uInt16 nPos ) const;
++ sal_uInt16 GetEntryPos( rtl::OUString const& rStr ) const;
++ String GetEntry( sal_uInt16 nPos ) const;
+ sal_uInt16 GetEntryCount() const;
void SetClickHdl( Link const& rLink );
@@ -640,30 +660,31 @@
public:
- USHORT InsertEntry( XubString const& rStr, USHORT nPos = LISTBOX_APPEND );
+ ~ListBox ();
-+ sal_uInt16 InsertEntry( XubString const& rStr, sal_uInt16 nPos=LISTBOX_APPEND );
++ sal_uInt16 InsertEntry( rtl::OUString const& rStr, sal_uInt16 nPos=LISTBOX_APPEND );
- void RemoveEntry( XubString const& rStr );
+- void RemoveEntry( XubString const& rStr );
- void RemoveEntry( USHORT nPos );
++ void RemoveEntry( rtl::OUString const& rStr );
+ void RemoveEntry( sal_uInt16 nPos );
void Clear();
- USHORT GetEntryPos( XubString const& rStr ) const;
- XubString GetEntry( USHORT nPos ) const;
- USHORT GetEntryCount() const;
-+ sal_uInt16 GetEntryPos( XubString const& rStr ) const;
-+ XubString GetEntry( sal_uInt16 nPos ) const;
++ sal_uInt16 GetEntryPos( rtl::OUString const& rStr ) const;
++ String GetEntry( sal_uInt16 nPos ) const;
+ sal_uInt16 GetEntryCount() const;
- void SelectEntry( XubString const& rStr, BOOL bSelect = TRUE );
- void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE );
-+ void SelectEntry( XubString const& rStr, bool bSelect=true );
++ void SelectEntry( rtl::OUString const& rStr, bool bSelect=true );
+ void SelectEntryPos( sal_uInt16 nPos, bool bSelect=true );
- USHORT GetSelectEntryCount() const;
- XubString GetSelectEntry( USHORT nSelIndex = 0 ) const;
- USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const;
+ sal_uInt16 GetSelectEntryCount() const;
-+ XubString GetSelectEntry( sal_uInt16 nSelIndex=0 ) const;
++ String GetSelectEntry( sal_uInt16 nSelIndex=0 ) const;
+ sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex=0 ) const;
void SetSelectHdl( Link const& rLink );
@@ -677,13 +698,7 @@
// SvxLanguageBox
- void SetLanguageList( INT16/*nLangList*/, bool/*bHasLangNone*/, bool /*bLangNoneIsLangAll*/= false, bool /*bCheckSpellAvail*/= false ) { }
+ void SetLanguageList (sal_Int16 list, bool hasLangNone, bool langNoneIsLangAll=false, bool checkSpellAvailable=false);
-
-- USHORT InsertLanguage( const LanguageType/*eLangType*/, USHORT/*nPos*/= LISTBOX_APPEND ) { return 0; }
-- USHORT InsertLanguage( const LanguageType/*eLangType*/, bool/*bCheckEntry*/, USHORT /*nPos*/= LISTBOX_APPEND ) { return 0; }
-- void RemoveLanguage( const LanguageType/*eLangType*/) { }
-- void SelectLanguage( const LanguageType/*eLangType*/, bool/*bSelect*/= true) { }
-- LanguageType GetSelectLanguage() const { return 0; }
-- bool IsLanguageSelected( const LanguageType/*eLangType*/) const { return true; }
++
+ sal_uInt16 InsertLanguage (LanguageType const type, sal_uInt16 pos=LISTBOX_APPEND);
+ sal_uInt16 InsertLanguage (LanguageType const type, bool checkEntry, sal_uInt16 pos=LISTBOX_APPEND);
+ void RemoveLanguage (LanguageType const type);
@@ -691,7 +706,13 @@
+ LanguageType GetSelectLanguage () const;
+ bool IsLanguageSelected( LanguageType const type) const;
+};
-+
+
+- USHORT InsertLanguage( const LanguageType/*eLangType*/, USHORT/*nPos*/= LISTBOX_APPEND ) { return 0; }
+- USHORT InsertLanguage( const LanguageType/*eLangType*/, bool/*bCheckEntry*/, USHORT /*nPos*/= LISTBOX_APPEND ) { return 0; }
+- void RemoveLanguage( const LanguageType/*eLangType*/) { }
+- void SelectLanguage( const LanguageType/*eLangType*/, bool/*bSelect*/= true) { }
+- LanguageType GetSelectLanguage() const { return 0; }
+- bool IsLanguageSelected( const LanguageType/*eLangType*/) const { return true; }
+class MultiListBoxImpl;
+class TOOLKIT_DLLPUBLIC MultiListBox : public ListBox
+{
@@ -711,14 +732,15 @@
- Dialog( ::Window *pOptParent, char const* pXMLPath, char const* pId, sal_uInt32 nId = 0 );
- short Execute();
- void EndDialog( long nResult = 0 );
+- void SetText( String const& rStr );
+ DECL_GET_IMPL (Dialog);
+ Dialog( Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 );
+ Dialog( ::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 );
+ ~Dialog ();
+ virtual short Execute();
+ void EndDialog( long nResult=0 );
- void SetText( String const& rStr );
-+ void SetTitle (String const& rStr );
++ void SetText( rtl::OUString const& rStr );
++ void SetTitle (rtl::OUString const& rStr );
+ bool Close ();
+ long Notify (NotifyEvent & event);
+
@@ -799,7 +821,7 @@
+
+public:
+ ~TabControl ();
-+ void InsertPage (sal_uInt16 id, String const& title, sal_uInt16 pos=TAB_APPEND);
++ void InsertPage (sal_uInt16 id, rtl::OUString const& title, sal_uInt16 pos=TAB_APPEND);
+ void RemovePage (sal_uInt16 id);
+ sal_uInt16 GetPageCount () const;
+ sal_uInt16 GetPageId (sal_uInt16 pos) const;
@@ -910,7 +932,7 @@
VBox( sal_Int32 nBorder, bool bHomogeneous );
};
-@@ -585,7 +763,7 @@ class TOOLKIT_DLLPUBLIC Plugin : public Control
+@@ -585,21 +763,50 @@ class TOOLKIT_DLLPUBLIC Plugin : public Control
//DECL_CONSTRUCTORS( Plugin, Control, 0 );
public:
::Control *mpPlugin;
@@ -919,18 +941,27 @@
};
class LocalizedStringImpl;
-@@ -593,13 +771,36 @@ class TOOLKIT_DLLPUBLIC LocalizedString : public Window
+ class TOOLKIT_DLLPUBLIC LocalizedString : public Window
{
DECL_GET_IMPL( LocalizedString );
++
public:
- LocalizedString( Context *pCtx, char const* pId );
+ LocalizedString( Context *context, char const* id );
- String operator =( String const& );
- operator String();
- // operator String const&() const;
- };
-
+- String operator =( String const& );
+- operator String();
+-// operator String const&() const;
++ rtl::OUString operator= (rtl::OUString const&);
++ rtl::OUString operator+= (sal_Unicode );
++ rtl::OUString operator+= (rtl::OUString const&);
++
++ operator rtl::OUString();
++ String getString ();
++ rtl::OUString getOUString ();
++ rtl::OUString GetToken (sal_uInt32 i, sal_Char c);
++};
++
+class InPlugImpl;
+class TOOLKIT_DLLPUBLIC InPlug : public Context, public Window
+{
@@ -941,8 +972,8 @@
+ InPlug ( ::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0);
+
+ void ParentSet (Window *window);
-+};
-+
+ };
+
} // end namespace layout
+#if ENABLE_LAYOUT
@@ -957,6 +988,30 @@
+#endif /* !ENABLE_LAYOUT */
+
#endif /* _LAYOUT_HXX */
+diff --git a/toolkit/inc/layout/layoutcore.hxx b/toolkit/inc/layout/layoutcore.hxx
+index 34d4b01..9de6eb2 100644
+--- toolkit/inc/layout/layoutcore.hxx
++++ toolkit/inc/layout/layoutcore.hxx
+@@ -44,19 +44,6 @@ namespace layoutimpl
+
+ namespace css = layout::css;
+
+-css::uno::Reference< css::awt::XLayoutContainer >
+-createContainer( const rtl::OUString &rName );
+-
+-css::uno::Reference< css::awt::XLayoutConstrains >
+-createWidget( css::uno::Reference< css::awt::XToolkit > xToolkit,
+- css::uno::Reference< css::uno::XInterface > xParent,
+- const rtl::OUString &rName, long nProps );
+-
+-css::uno::Reference< css::awt::XLayoutConstrains >
+-createInternalWidget( css::uno::Reference< css::awt::XToolkit > xToolkit,
+- css::uno::Reference< css::uno::XInterface > xParent,
+- const rtl::OUString &rName, long nProps );
+-
+ css::uno::Reference< css::graphic::XGraphic > loadGraphic( const char *pName );
+
+ // Helpers - unfortunately VCLXWindows don't implement XPropertySet
diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx
index 4c250ba..27a803c 100644
--- toolkit/inc/toolkit/awt/vclxwindows.hxx
@@ -999,10 +1054,20 @@
ti toolkit\source\awt nmake - all ti_awt ti_inc NULL
ti toolkit\source\controls nmake - all ti_controls ti_inc NULL
diff --git a/toolkit/prj/d.lst b/toolkit/prj/d.lst
-index 88ee9c8..743e2d6 100644
+index 88ee9c8..1c424b6 100644
--- toolkit/prj/d.lst
+++ toolkit/prj/d.lst
-@@ -52,3 +52,5 @@ mkdir: %_DEST%\inc%_EXT%\layout
+@@ -22,7 +22,9 @@ mkdir: %_DEST%\inc%_EXT%\toolkit\controls
+ ..\inc\toolkit\awt\vclxdevice.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxdevice.hxx
+ ..\inc\toolkit\awt\vclxfont.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxfont.hxx
+ ..\inc\toolkit\awt\vclxtopwindow.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxtopwindow.hxx
++..\inc\toolkit\awt\vclxtoolkit.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxtoolkit.hxx
+ ..\inc\toolkit\awt\vclxwindow.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxwindow.hxx
++..\source\awt\vclxdialog.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxdialog.hxx
+ ..\inc\toolkit\awt\vclxwindows.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxwindows.hxx
+ ..\inc\toolkit\awt\vclxmenu.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxmenu.hxx
+
+@@ -52,3 +54,5 @@ mkdir: %_DEST%\inc%_EXT%\layout
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
..\inc\layout\*.hxx %_DEST%\inc%_EXT%\layout\*.hxx
@@ -1054,9 +1119,24 @@
{
::vos::OGuard aGuard( GetMutex() );
diff --git a/toolkit/source/awt/vclxdialog.hxx b/toolkit/source/awt/vclxdialog.hxx
-index 7f45718..337d780 100644
+index 7f45718..dad8390 100644
--- toolkit/source/awt/vclxdialog.hxx
+++ toolkit/source/awt/vclxdialog.hxx
+@@ -44,10 +44,10 @@ namespace layoutimpl
+
+ typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XDialog2 > VCLXDialog_Base;
+
+-class VCLXDialog :public VCLXWindow
+- ,public VCLXTopWindow_Base
+- ,public VCLXDialog_Base
+- ,public Bin
++class TOOLKIT_DLLPUBLIC VCLXDialog : public VCLXWindow
++ , public VCLXTopWindow_Base
++ , public VCLXDialog_Base
++ , public Bin
+ {
+ private:
+ bool bRealized, bResizeSafeguard;
@@ -102,6 +102,7 @@ public:
// ::com::sun::star::awt::XDialog2
@@ -1834,10 +1914,89 @@
virtual void SAL_CALL removeChild( const css::uno::Reference< css::awt::XLayoutConstrains >& Child )
throw (css::uno::RuntimeException);
diff --git a/toolkit/source/layout/helper.cxx b/toolkit/source/layout/helper.cxx
-index 1e96643..c1430b3 100644
+index 1e96643..e8339da 100644
--- toolkit/source/layout/helper.cxx
+++ toolkit/source/layout/helper.cxx
-@@ -207,6 +207,9 @@ createToolkitWidget( uno::Reference< awt::XToolkit > xToolkit,
+@@ -107,39 +107,34 @@ getToplevel( uno::Reference< uno::XInterface > xRef )
+ namespace layoutimpl
+ {
+
+-static uno::Reference< awt::XLayoutConstrains > ImplCreateWindow(
+- uno::Reference< uno::XInterface > xParent,
+- OUString aName, long WindowAttributes );
++oslModule WidgetFactory::mSfx2Library = 0;
++WindowCreator WidgetFactory::mSfx2CreateWidget = 0;
+
+-uno::Reference< awt::XLayoutContainer >
+-createContainer( const OUString &rName )
++uno::Reference <awt::XLayoutContainer> WidgetFactory::createContainer (OUString const& name)
+ {
+ uno::Reference< awt::XLayoutContainer > xPeer;
+
+- if ( rName.equalsAscii( "hbox" ) )
++ if ( name.equalsAscii( "hbox" ) )
+ xPeer = uno::Reference< awt::XLayoutContainer >( new HBox() );
+- else if ( rName.equalsAscii( "vbox" ) )
++ else if ( name.equalsAscii( "vbox" ) )
+ xPeer = uno::Reference< awt::XLayoutContainer >( new VBox() );
+- else if ( rName.equalsAscii( "table" ) )
++ else if ( name.equalsAscii( "table" ) )
+ xPeer = uno::Reference< awt::XLayoutContainer >( new Table() );
+- else if ( rName.equalsAscii( "flow" ) )
++ else if ( name.equalsAscii( "flow" ) )
+ xPeer = uno::Reference< awt::XLayoutContainer >( new Flow() );
+- else if ( rName.equalsAscii( "bin" ) )
++ else if ( name.equalsAscii( "bin" ) )
+ xPeer = uno::Reference< awt::XLayoutContainer >( new Bin() );
+- else if ( rName.equalsAscii( "min-size" ) )
++ else if ( name.equalsAscii( "min-size" ) )
+ xPeer = uno::Reference< awt::XLayoutContainer >( new MinSize() );
+- else if ( rName.equalsAscii( "align" ) )
++ else if ( name.equalsAscii( "align" ) )
+ xPeer = uno::Reference< awt::XLayoutContainer >( new Align() );
+- else if ( rName.equalsAscii( "dialogbuttonhbox" ) )
++ else if ( name.equalsAscii( "dialogbuttonhbox" ) )
+ xPeer = uno::Reference< awt::XLayoutContainer >( new DialogButtonHBox() );
+
+ return xPeer;
+ }
+
+-static uno::Reference< awt::XLayoutConstrains >
+-createToolkitWidget( uno::Reference< awt::XToolkit > xToolkit,
+- uno::Reference< uno::XInterface > xParent,
+- const OUString &rName, long nProps )
++uno::Reference <awt::XLayoutConstrains> WidgetFactory::toolkitCreateWidget (uno::Reference <awt::XToolkit> xToolkit, uno::Reference <uno::XInterface> xParent, OUString const& name, long properties)
+ {
+ uno::Reference< awt::XLayoutConstrains > xPeer;
+ bool bToplevel = !xParent.is();
+@@ -172,8 +167,8 @@ createToolkitWidget( uno::Reference< awt::XToolkit > xToolkit,
+ $OOO_INSTALL_PREFIX/openoffice.org/basis3.0/program/libtklx.so
+ each time.
+ */
+- VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( xWinParent );
+- if ( !pParentComponent )
++ VCLXWindow* parentComponent = VCLXWindow::GetImplementation( xWinParent );
++ if ( !parentComponent )
+ throw uno::RuntimeException(
+ OUString::createFromAscii( "parent has no implementation" ),
+ uno::Reference< uno::XInterface >() );
+@@ -187,8 +182,8 @@ createToolkitWidget( uno::Reference< awt::XToolkit > xToolkit,
+ desc.Bounds.Width = 300;
+ desc.Bounds.Height = 200;
+
+- desc.WindowAttributes = nProps;
+- desc.WindowServiceName = rName;
++ desc.WindowAttributes = properties;
++ desc.WindowServiceName = name;
+
+ uno::Reference< awt::XWindowPeer > xWinPeer;
+ try
+@@ -203,10 +198,13 @@ createToolkitWidget( uno::Reference< awt::XToolkit > xToolkit,
+ }
+ catch( uno::Exception & )
+ {
+- DBG_ERROR1( "Warning: %s is not a recognized type\n", OUSTRING_CSTR( rName ) );
++ DBG_ERROR1( "Warning: %s is not a recognized type\n", OUSTRING_CSTR( name ) );
return uno::Reference< awt::XLayoutConstrains >();
}
@@ -1847,7 +2006,7 @@
// default to visible, let then people change it on properties
if ( ! bToplevel )
{
-@@ -214,6 +217,8 @@ createToolkitWidget( uno::Reference< awt::XToolkit > xToolkit,
+@@ -214,33 +212,33 @@ createToolkitWidget( uno::Reference< awt::XToolkit > xToolkit,
if ( xWindow.is() )
xWindow->setVisible( true );
}
@@ -1856,81 +2015,467 @@
return xPeer;
}
-@@ -378,13 +383,14 @@ PropHelper::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::
+ uno::Reference< awt::XLayoutConstrains >
+-createWidget( uno::Reference< awt::XToolkit > xToolkit,
+- uno::Reference< uno::XInterface > xParent,
+- const OUString &rName, long nProps )
++WidgetFactory::createWidget (uno::Reference< awt::XToolkit > xToolkit, uno::Reference< uno::XInterface > xParent, OUString const& name, long properties)
+ {
+ uno::Reference< awt::XLayoutConstrains > xPeer;
+
+- xPeer = uno::Reference< awt::XLayoutConstrains >(
+- createContainer( rName ), uno::UNO_QUERY );
++ xPeer = uno::Reference <awt::XLayoutConstrains> (createContainer (name), uno::UNO_QUERY);
+ if ( xPeer.is() )
+ return xPeer;
+
+- xPeer = ImplCreateWindow( xParent, rName, nProps );
+- if ( xPeer.is() )
++ xPeer = implCreateWidget (xParent, name, properties);
++ if (xPeer.is ())
+ return xPeer;
+
++#define FIXED_INFO 1
+ #if FIXED_INFO
+- OUString tName = rName;
++ OUString tName = name;
+ // FIXME
+- if ( rName.equalsAscii( "fixedinfo" ) )
++ if ( name.equalsAscii( "fixedinfo" ) )
+ tName = OUString::createFromAscii( "fixedtext" );
+- xPeer = createToolkitWidget( xToolkit, xParent, tName, nProps );
++ xPeer = toolkitCreateWidget (xToolkit, xParent, tName, properties);
+ #else
+- xPeer = createToolkitWidget( xToolkit, xParent, rName, nProps );
++ xPeer = toolkitCreateWidget (xToolkit, xParent, name, properties);
+ #endif
+
+ return xPeer;
+@@ -377,172 +375,263 @@ PropHelper::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::
+ #include <vcl/fixed.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/tabpage.hxx>
-
++#include <vcl/unohelp.hxx>
++
+#include <toolkit/awt/vclxwindows.hxx>
+#include <vcl/lstbox.hxx>
-+
++#include <vcl.hxx>
+
#include <typeinfo>
namespace layoutimpl
{
-TOOLKIT_DLLPUBLIC Window* global_parent;
--
- uno::Reference< awt::XLayoutConstrains > ImplCreateWindow(
- uno::Reference< uno::XInterface > xParent,
- OUString aName, long WindowAttributes )
-@@ -408,6 +414,16 @@ uno::Reference< awt::XLayoutConstrains > ImplCreateWindow(
-
- WindowAttributes ^= awt::WindowAttribute::SHOW;
- }
-+ else if ( aName.equalsAscii( "modelessdialog" ) )
++uno::Reference <awt::XLayoutConstrains> WidgetFactory::implCreateWidget (uno::Reference <uno::XInterface> xParent, OUString name, long attributes)
++{
++ Window* parent = 0;
++
++ if (VCLXWindow* parentComponent = VCLXWindow::GetImplementation (xParent))
++ parent = parentComponent->GetWindow ();
++
++ VCLXWindow* component = 0;
++ Window* window = 0; //sfx2CreateWindow (&component, parent, name, attributes);
++ if (!window)
++ window = layoutCreateWindow (&component, parent, name, attributes);
++
++ uno::Reference <awt::XLayoutConstrains> reference;
++ if (window)
+ {
-+ if ( pParent == NULL )
-+ pParent = DIALOG_NO_PARENT;
-+ pNewWindow = new ModelessDialog( pParent,
-+ ImplGetWinBits( WindowAttributes, 0 ) );
-+ pNewComp = new layoutimpl::VCLXDialog();
++ window->SetCreatedWithToolkit( sal_True );
++ if ( component )
++ component->SetCreatedWithToolkit( true );
++ reference = component;
++ window->SetComponentInterface( component );
++ if ( attributes & awt::WindowAttribute::SHOW )
++ window->Show();
++ }
++
++ return reference;
++}
++
++extern "C" { static void SAL_CALL thisModule() {} }
+
-+ WindowAttributes ^= awt::WindowAttribute::SHOW;
++Window* WidgetFactory::sfx2CreateWindow (VCLXWindow** component, Window* parent, OUString const& name, long& attributes)
++{
++ OSL_TRACE("Asking sfx2: %s", OUSTRING_CSTR (name));
++
++ if (!mSfx2Library)
++ {
++ OUString libraryName = ::vcl::unohelper::CreateLibraryName ("sfx", TRUE);
++ mSfx2Library = osl_loadModuleRelative (&thisModule, libraryName.pData, SAL_LOADMODULE_DEFAULT);
++ if (mSfx2Library)
++ {
++ OUString functionName (RTL_CONSTASCII_USTRINGPARAM ("CreateWindow"));
++ mSfx2CreateWidget = (WindowCreator) osl_getFunctionSymbol (mSfx2Library, functionName.pData);
++ }
+ }
- else if ( aName.equalsAscii( "modaldialog" ) )
- {
- if ( pParent == NULL )
-@@ -509,9 +525,14 @@ uno::Reference< awt::XLayoutConstrains > ImplCreateWindow(
- }
- else if ( aName.equalsAscii( "tabpage" ) )
- {
++
++ if (mSfx2CreateWidget)
++ return mSfx2CreateWidget (component, name, parent, attributes);
++
++ return 0;
++}
+
+-uno::Reference< awt::XLayoutConstrains > ImplCreateWindow(
+- uno::Reference< uno::XInterface > xParent,
+- OUString aName, long WindowAttributes )
++Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *parent, OUString const& name, long& attributes)
+ {
+- VCLXWindow *pNewComp = NULL;
+- Window *pNewWindow = NULL;
+- Window *pParent = NULL;
+- uno::Reference< awt::XLayoutConstrains > xRef;
++ Window* window = 0;
++
++ if (0)
++ {
++ ;
++ }
++ if ( name.equalsAscii( "dialog" ) )
++ {
++ if ( parent == NULL )
++ parent = DIALOG_NO_PARENT;
++ window = new Dialog( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXDialog();
+
+- VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( xParent );
+- if ( pParentComponent )
+- pParent = pParentComponent->GetWindow();
++ attributes ^= awt::WindowAttribute::SHOW;
++ }
++ else if ( name.equalsAscii( "modaldialog" ) )
++ {
++ if ( parent == NULL )
++ parent = DIALOG_NO_PARENT;
++ window = new ModalDialog( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXDialog();
++
++ attributes ^= awt::WindowAttribute::SHOW;
++ }
++ else if ( name.equalsAscii( "modelessdialog" ) )
++ {
++ if ( parent == NULL )
++ parent = DIALOG_NO_PARENT;
++ window = new ModelessDialog (parent, ImplGetWinBits (attributes, 0));
++ *component = new layoutimpl::VCLXDialog();
++
++ attributes ^= awt::WindowAttribute::SHOW;
++ }
++ else if ( name.equalsAscii( "sfxdialog" ) )
++ {
++ if ( parent == NULL )
++ parent = DIALOG_NO_PARENT;
++ window = new ClosingDialog (parent, ImplGetWinBits (attributes, 0));
++ *component = new layoutimpl::VCLXDialog();
+
+- if ( aName.equalsAscii( "dialog" ) )
++ attributes ^= awt::WindowAttribute::SHOW;
++ }
++ else if ( name.equalsAscii( "sfxmodaldialog" ) )
+ {
+- if ( pParent == NULL )
+- pParent = DIALOG_NO_PARENT;
+- pNewWindow = new Dialog( pParent,
+- ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXDialog();
++ if ( parent == NULL )
++ parent = DIALOG_NO_PARENT;
++ window = new ClosingModalDialog( parent,
++ ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXDialog();
+
+- WindowAttributes ^= awt::WindowAttribute::SHOW;
++ attributes ^= awt::WindowAttribute::SHOW;
+ }
+- else if ( aName.equalsAscii( "modaldialog" ) )
++ else if ( name.equalsAscii( "sfxmodelessdialog" ) )
+ {
+- if ( pParent == NULL )
+- pParent = DIALOG_NO_PARENT;
+- pNewWindow = new ModalDialog( pParent,
+- ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXDialog();
++ if ( parent == NULL )
++ parent = DIALOG_NO_PARENT;
++ window = new ClosingModelessDialog (parent, ImplGetWinBits (attributes, 0));
++ *component = new layoutimpl::VCLXDialog();
+
+- WindowAttributes ^= awt::WindowAttribute::SHOW;
++ attributes ^= awt::WindowAttribute::SHOW;
+ }
+- else if ( aName.equalsAscii( "tabcontrol" ) )
++ else if ( name.equalsAscii( "tabcontrol" ) )
+ {
+- pNewWindow = new TabControl( pParent,
+- ImplGetWinBits( WindowAttributes, WINDOW_TABCONTROL ) );
+- pNewComp = new layoutimpl::VCLXTabControl();
++ window = new TabControl( parent, ImplGetWinBits( attributes, WINDOW_TABCONTROL ) );
++ *component = new layoutimpl::VCLXTabControl();
+ }
+- else if ( aName.equalsAscii( "scroller" ) )
++ else if ( name.equalsAscii( "scroller" ) )
+ {
+ // used FixedImage because I just want some empty non-intrusive widget
+- pNewWindow = new FixedImage( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXScroller();
++ window = new FixedImage( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXScroller();
+ }
+- else if ( aName.equalsAscii( "hsplitter" ) || aName.equalsAscii( "vsplitter" ) )
++ else if ( name.equalsAscii( "hsplitter" ) || name.equalsAscii( "vsplitter" ) )
+ {
+- pNewWindow = new FixedImage( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXSplitter( aName.equalsAscii( "hsplitter" ) );
++ window = new FixedImage( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXSplitter( name.equalsAscii( "hsplitter" ) );
+ }
+- else if ( aName.equalsAscii( "hfixedline" ) || aName.equalsAscii( "vfixedline" ) )
++ else if ( name.equalsAscii( "hfixedline" ) || name.equalsAscii( "vfixedline" ) )
+ {
+- WinBits nStyle = ImplGetWinBits( WindowAttributes, 0 );
++ WinBits nStyle = ImplGetWinBits( attributes, 0 );
+ nStyle ^= WB_HORZ;
+- if ( aName.equalsAscii( "hfixedline" ) )
++ if ( name.equalsAscii( "hfixedline" ) )
+ nStyle |= WB_HORZ;
+ else
+ nStyle |= WB_VERT;
+- pNewWindow = new FixedLine( pParent, nStyle );
+- pNewComp = new layoutimpl::VCLXFixedLine();
++ window = new FixedLine( parent, nStyle );
++ *component = new layoutimpl::VCLXFixedLine();
+ }
+- else if ( aName.equalsAscii( "okbutton" ) )
++ else if ( name.equalsAscii( "okbutton" ) )
+ {
+- pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXOKButton( pNewWindow );
++ window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXOKButton( window );
++ window->SetType (WINDOW_OKBUTTON);
+ }
+- else if ( aName.equalsAscii( "cancelbutton" ) )
++ else if ( name.equalsAscii( "cancelbutton" ) )
+ {
+- pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXCancelButton( pNewWindow );
++ window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXCancelButton( window );
++ window->SetType (WINDOW_CANCELBUTTON);
+ }
+- else if ( aName.equalsAscii( "yesbutton" ) )
++ else if ( name.equalsAscii( "yesbutton" ) )
+ {
+- pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXYesButton( pNewWindow );
++ window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXYesButton( window );
++ window->SetType (WINDOW_OKBUTTON);
+ }
+- else if ( aName.equalsAscii( "nobutton" ) )
++ else if ( name.equalsAscii( "nobutton" ) )
+ {
+- pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXNoButton( pNewWindow );
++ window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) );
++ window->SetType (WINDOW_CANCELBUTTON);
++ *component = new layoutimpl::VCLXNoButton( window );
+ }
+- else if ( aName.equalsAscii( "retrybutton" ) )
++ else if ( name.equalsAscii( "retrybutton" ) )
+ {
+- pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXRetryButton( pNewWindow );
++ window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXRetryButton( window );
+ }
+- else if ( aName.equalsAscii( "ignorebutton" ) )
++ else if ( name.equalsAscii( "ignorebutton" ) )
+ {
+- pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXIgnoreButton( pNewWindow );
++ window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXIgnoreButton( window );
+ }
+- else if ( aName.equalsAscii( "resetbutton" ) )
++ else if ( name.equalsAscii( "resetbutton" ) )
+ {
+- pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXResetButton( pNewWindow );
++ window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXResetButton( window );
+ }
+- else if ( aName.equalsAscii( "applybutton" ) )
++ else if ( name.equalsAscii( "applybutton" ) )
+ {
+- pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXApplyButton( pNewWindow );
++ window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXApplyButton( window );
+ }
+- else if ( aName.equalsAscii( "helpbutton" ) )
++ else if ( name.equalsAscii( "helpbutton" ) )
+ {
+- pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXHelpButton( pNewWindow );
++ window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXHelpButton( window );
++ window->SetType (WINDOW_HELPBUTTON);
+ }
+- else if ( aName.equalsAscii( "morebutton" ) )
++ else if ( name.equalsAscii( "morebutton" ) )
+ {
+- pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXMoreButton( pNewWindow );
++ window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXMoreButton( window );
++ window->SetType (WINDOW_MOREBUTTON);
+ }
+- else if ( aName.equalsAscii( "advancedbutton" ) )
++ else if ( name.equalsAscii( "advancedbutton" ) )
+ {
+- pNewWindow = new PushButton( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::VCLXAdvancedButton( pNewWindow );
++ window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::VCLXAdvancedButton( window );
+ }
+- else if ( aName.equalsAscii( "plugin" ) )
++ else if ( name.equalsAscii( "plugin" ) )
+ {
+- pNewWindow = new Control( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- OSL_TRACE( "%s: parent=%p (%s)\n", __FUNCTION__, pParent, typeid( *pParent ).name() );
+- pNewComp = new layoutimpl::VCLXPlugin( pNewWindow, ImplGetWinBits( WindowAttributes, 0 ) );
++ window = new Control( parent, ImplGetWinBits( attributes, 0 ) );
++ OSL_TRACE( "%s: parent=%p (%s)\n", __FUNCTION__, parent, typeid( *parent ).name() );
++ *component = new layoutimpl::VCLXPlugin( window, ImplGetWinBits( attributes, 0 ) );
+ }
+- else if ( aName.equalsAscii( "tabpage" ) )
++ else if ( name.equalsAscii( "tabpage" ) )
+ {
+- if ( !pParent )
+- pParent = layout::TabPage::global_parent;
+-
+- //pNewWindow = new TabPage( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- WindowAttributes ^= awt::WindowAttribute::SHOW;
+- WinBits nStyle = ImplGetWinBits( WindowAttributes, 0 );
+#if 0
- if ( !pParent )
- pParent = layout::TabPage::global_parent;
--
++ if ( !parent )
++ parent = layout::TabPage::global_parent;
+#else
+ if (layout::TabPage::global_parent)
-+ pParent = layout::TabPage::global_parent;
++ parent = layout::TabPage::global_parent;
+ layout::TabPage::global_parent = 0;
+#endif
- //pNewWindow = new TabPage( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
- WindowAttributes ^= awt::WindowAttribute::SHOW;
- WinBits nStyle = ImplGetWinBits( WindowAttributes, 0 );
-@@ -530,13 +551,23 @@ uno::Reference< awt::XLayoutConstrains > ImplCreateWindow(
- pNewWindow = new Window( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
- pNewComp = new layoutimpl::LocalizedString();
++ //window = new TabPage( parent, ImplGetWinBits( attributes, 0 ) );
++ attributes ^= awt::WindowAttribute::SHOW;
++ WinBits nStyle = ImplGetWinBits( attributes, 0 );
+ nStyle |= WB_HIDE;
+ //nStyle |= WB_NODIALOGCONTROL;
+ //nStyle |= WB_DIALOGCONTROL;
+ //nStyle = 2147483714L;
+ OSL_TRACE( "in bits=%lu", nStyle );
+- pNewWindow = new TabPage( pParent, nStyle );
+- pNewComp = new VCLXTabPage( pNewWindow );
++ window = new TabPage( parent, nStyle );
++ *component = new VCLXTabPage( window );
+ }
+- else if ( aName.equalsAscii( "string" ) )
++ else if ( name.equalsAscii( "string" ) )
+ {
+ // FIXME: move <string>s.text to simple map<string> in root?
+- WindowAttributes &= ~awt::WindowAttribute::SHOW;
+- pNewWindow = new Window( pParent, ImplGetWinBits( WindowAttributes, 0 ) );
+- pNewComp = new layoutimpl::LocalizedString();
++ attributes &= ~awt::WindowAttribute::SHOW;
++ window = new Window( parent, ImplGetWinBits( attributes, 0 ) );
++ *component = new layoutimpl::LocalizedString();
}
+-
+- if ( !pNewWindow )
+- return xRef;
+-
+- pNewWindow->SetCreatedWithToolkit( sal_True );
+- if ( pNewComp )
+- pNewComp->SetCreatedWithToolkit( TRUE );
+- xRef = pNewComp;
+- pNewWindow->SetComponentInterface( pNewComp );
+- if ( WindowAttributes & awt::WindowAttribute::SHOW )
+- pNewWindow->Show();
+-
+- return xRef;
+#if 0 // parent paranoia
-+ else if ( aName.equalsAscii( "listbox" ) )
++ else if ( name.equalsAscii( "listbox" ) )
+ {
-+ WindowAttributes |= awt::VclWindowPeerAttribute::DROPDOWN;
-+ WinBits nStyle = ImplGetWinBits( WindowAttributes, 0 );
++ attributes |= awt::VclWindowPeerAttribute::DROPDOWN;
++ WinBits nStyle = ImplGetWinBits( attributes, 0 );
+ nStyle |= WB_DROPDOWN;
-+ pNewWindow = new ListBox( pParent, nStyle );
-+ pNewComp = new VCLXListBox ();
++ window = new ListBox( parent, nStyle );
++ *component = new VCLXListBox ();
+ }
+#endif
++ return window;
+ }
+
+ } // namespace layoutimpl
+diff --git a/toolkit/source/layout/helper.hxx b/toolkit/source/layout/helper.hxx
+index 8c50a80..21fc224 100644
+--- toolkit/source/layout/helper.hxx
++++ toolkit/source/layout/helper.hxx
+@@ -41,8 +41,16 @@
+ #include <com/sun/star/xml/input/XRoot.hpp>
+ #include <cppuhelper/implbase1.hxx>
+ #include <cppuhelper/propshlp.hxx>
++#include <osl/module.h>
+ #include <rtl/ustring.hxx>
+
++class Window;
++class VCLXWindow;
++extern "C"
++{
++ typedef Window* (SAL_CALL *WindowCreator) (VCLXWindow** component, rtl::OUString const& name, Window* parent, long& attributes);
++}
++
+ namespace layoutimpl
+ {
- if ( !pNewWindow )
- return xRef;
+@@ -131,24 +139,21 @@ css::uno::Any anyFromString (const rtl::OUString &value, const css::uno::Type &t
+ css::uno::Reference< css::awt::XWindowPeer >
+ getParent( css::uno::Reference< css::uno::XInterface > xPeer );
+
+-
+-struct WidgetFactory
++class WidgetFactory
+ {
+- virtual css::uno::Reference< css::awt::XLayoutConstrains >
+- createWidget( css::uno::Reference< css::awt::XToolkit > xToolkit,
+- css::uno::Reference< css::uno::XInterface > xParent,
+- const rtl::OUString &rName, long nProps );
++public:
++ static oslModule mSfx2Library;
++ static WindowCreator mSfx2CreateWidget;
++
++ // Should use UNO services in due course
++ static css::uno::Reference <css::awt::XLayoutConstrains> toolkitCreateWidget (css::uno::Reference <css::awt::XToolkit> xToolkit, css::uno::Reference <css::uno::XInterface> xParent, rtl::OUString const& name, long properties);
++ static css::uno::Reference< css::awt::XLayoutConstrains > createWidget( css::uno::Reference <css::awt::XToolkit > xToolkit, css::uno::Reference< css::uno::XInterface > xParent, rtl::OUString const &name, long properties);
++ static css::uno::Reference <css::awt::XLayoutContainer> createContainer (rtl::OUString const& name);
++ static css::uno::Reference <css::awt::XLayoutConstrains> implCreateWidget (css::uno::Reference <css::uno::XInterface> xParent, rtl::OUString name, long attributes);
++ static Window* sfx2CreateWindow (VCLXWindow** component, Window* parent, rtl::OUString const& name, long& attributes);
++ static Window* layoutCreateWindow (VCLXWindow** component, Window *parent, rtl::OUString const& name, long& attributes);
+ };
+
+-// A local factory method - should use UNO services in due course
+-css::uno::Reference< css::awt::XLayoutConstrains > TOOLKIT_DLLPUBLIC
+-createWidget( css::uno::Reference< css::awt::XToolkit > xToolkit,
+- css::uno::Reference< css::uno::XInterface > xParent,
+- const rtl::OUString &rName, long nProps );
+-
+-// Factory for containers (not visible ones)
+-css::uno::Reference< css::awt::XLayoutContainer >
+-createContainer( const rtl::OUString &rName );
+
+ } // namespace layoutimpl
- pNewWindow->SetCreatedWithToolkit( sal_True );
- if ( pNewComp )
-- pNewComp->SetCreatedWithToolkit( TRUE );
-+ pNewComp->SetCreatedWithToolkit( true );
- xRef = pNewComp;
- pNewWindow->SetComponentInterface( pNewComp );
- if ( WindowAttributes & awt::WindowAttribute::SHOW )
diff --git a/toolkit/source/layout/import.cxx b/toolkit/source/layout/import.cxx
index 47857e6..500b69e 100644
--- toolkit/source/layout/import.cxx
@@ -2245,6 +2790,21 @@
inline ImportContext( LayoutRoot &rRoot ) SAL_THROW( () )
: mrRoot( rRoot ) {}
+diff --git a/toolkit/source/layout/makefile.mk b/toolkit/source/layout/makefile.mk
+index 3bf6cd9..45cc8f7 100644
+--- toolkit/source/layout/makefile.mk
++++ toolkit/source/layout/makefile.mk
+@@ -64,7 +64,9 @@ SLOFILES= \
+ $(SLO)$/root.obj \
+ $(SLO)$/table.obj \
+ $(SLO)$/timer.obj \
+- $(SLO)$/translate.obj
++ $(SLO)$/translate.obj\
++ $(SLO)$/vcl.obj\
++#
+
+ # --- Targets ------------------------------------------------------
+
diff --git a/toolkit/source/layout/proplist.cxx b/toolkit/source/layout/proplist.cxx
index c16d979..f63fba1 100644
--- toolkit/source/layout/proplist.cxx
@@ -2259,6 +2819,153 @@
{
rValue = it->second;
rProps.erase( it );
+diff --git a/toolkit/source/layout/root.cxx b/toolkit/source/layout/root.cxx
+index a50f42d..bb264f3 100644
+--- toolkit/source/layout/root.cxx
++++ toolkit/source/layout/root.cxx
+@@ -363,7 +363,7 @@ LayoutWidget::LayoutWidget( uno::Reference< awt::XToolkit > xToolkit,
+ xParent = uno::Reference< awt::XLayoutContainer >( xContainer->getParent(), uno::UNO_QUERY );
+ }
+
+- mxWidget = createWidget( xToolkit, xParent, unoName, attrbs );
++ mxWidget = WidgetFactory::createWidget( xToolkit, xParent, unoName, attrbs );
+ assert( mxWidget.is() );
+ mxContainer = uno::Reference< awt::XLayoutContainer >( mxWidget, uno::UNO_QUERY );
+ }
+diff --git a/toolkit/source/layout/vcl.cxx b/toolkit/source/layout/vcl.cxx
+new file mode 100644
+index 0000000..41d3ae8
+--- /dev/null
++++ toolkit/source/layout/vcl.cxx
+@@ -0,0 +1,70 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org 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 version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org. If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++#include <vcl.hxx>
++
++#include <sal/types.h>
++#include <vcl/button.hxx>
++
++static PushButton* get_button (Dialog const* dialog, sal_uInt32 type)
++{
++ Window* child = dialog->GetWindow (WINDOW_FIRSTCHILD);
++ while (child)
++ {
++ if (child->GetType () == type)
++ return static_cast <PushButton*> (child);
++ child = child->GetWindow (WINDOW_NEXT);
++ }
++
++ return 0;
++}
++
++#define IMPLEMENT_CLOSING_DIALOG(cls)\
++ Closing##cls::Closing##cls (Window* parent, WinBits bits)\
++ : cls (parent, bits)\
++ , mClosing (false)\
++ {\
++ }\
++ BOOL Closing##cls::Close ()\
++ {\
++ if (mClosing)\
++ EndDialog (false);\
++ else if (PushButton *cancel = get_button (this, WINDOW_CANCELBUTTON))\
++ cancel->Click ();\
++ else if (PushButton *ok = get_button (this, WINDOW_OKBUTTON))\
++ ok->Click ();\
++ mClosing = true;\
++ return false;\
++ }
++
++IMPLEMENT_CLOSING_DIALOG (Dialog);
++IMPLEMENT_CLOSING_DIALOG (ModelessDialog);
++IMPLEMENT_CLOSING_DIALOG (ModalDialog);
+diff --git a/toolkit/source/layout/vcl.hxx b/toolkit/source/layout/vcl.hxx
+new file mode 100644
+index 0000000..b54dacf
+--- /dev/null
++++ toolkit/source/layout/vcl.hxx
+@@ -0,0 +1,52 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * Copyright 2008 by Sun Microsystems, Inc.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * $RCSfile$
++ *
++ * $Revision$
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org 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 version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org. If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++#ifndef LAYOUT_VCL_HXX
++#define LAYOUT_VCL_HXX
++
++#include <vcl/dialog.hxx>
++
++#define DECLARE_CLOSING_DIALOG(cls)\
++ class Closing##cls : public cls\
++ {\
++ public:\
++ bool mClosing;\
++ Closing##cls (Window* parent, WinBits bits);\
++ virtual BOOL Close ();\
++ }
++
++DECLARE_CLOSING_DIALOG (Dialog);
++DECLARE_CLOSING_DIALOG (ModalDialog);
++DECLARE_CLOSING_DIALOG (ModelessDialog);
++
++#undef DECLARE_CLOSING_DIALOG
++
++#endif /* LAYOUT_VCL_HXX */
diff --git a/toolkit/source/vclcompat/makefile.mk b/toolkit/source/vclcompat/makefile.mk
index 26b414e..a95d39f 100644
--- toolkit/source/vclcompat/makefile.mk
@@ -2275,7 +2982,7 @@
# FIXME: This is bad, hmkay
diff --git a/toolkit/source/vclcompat/wbutton.cxx b/toolkit/source/vclcompat/wbutton.cxx
-index 5617f4f..5c1af3e 100644
+index 5617f4f..0891754 100644
--- toolkit/source/vclcompat/wbutton.cxx
+++ toolkit/source/vclcompat/wbutton.cxx
@@ -39,6 +39,7 @@
@@ -2370,7 +3077,7 @@
{
if ( !maClickHdl )
Click();
-@@ -124,20 +131,22 @@ class ButtonImpl : public ControlImpl
+@@ -124,33 +131,41 @@ class ButtonImpl : public ControlImpl
maClickHdl.Call( static_cast<Window *>( mpWindow ) );
}
@@ -2389,6 +3096,7 @@
}
};
+-void Button::SetText( String const& rStr )
+Button::~Button ()
+{
+}
@@ -2398,10 +3106,10 @@
+ return ::Button::GetStandardText (button_type);
+}
+
- void Button::SetText( String const& rStr )
++void Button::SetText( OUString const& rStr )
{
if ( !getImpl().mxButton.is() )
-@@ -145,12 +154,18 @@ void Button::SetText( String const& rStr )
+ return;
getImpl().mxButton->setLabel( rStr );
}
@@ -2558,10 +3266,10 @@
+ ::RadioButton *r = static_cast<RadioButton*>(mpWindow)->GetRadioButton ();
+ bool state = r->IsRadioCheckEnabled ();
+ r->EnableRadioCheck();
- mxRadioButton->setState( !!bCheck );
++ mxRadioButton->setState( !!bCheck );
+ r->EnableRadioCheck (state);
+#else
-+ mxRadioButton->setState( !!bCheck );
+ mxRadioButton->setState( !!bCheck );
+#endif
fireToggle();
-
@@ -2613,7 +3321,9 @@
- virtual void SAL_CALL itemStateChanged( const css::awt::ItemEvent& rEvent )
- throw (css::uno::RuntimeException)
+ virtual void SetClickHdl( const Link& link )
-+ {
+ {
+- if ( !!maToggleHdl )
+- ButtonImpl::itemStateChanged( rEvent );
+ // Keep RadioGroups::RadioGroup's actionListener at HEAD
+ // of list. This way, it can handle RadioGroup's button
+ // states before all other callbacks and make sure the
@@ -2631,9 +3341,7 @@
+
+ void SAL_CALL disposing( lang::EventObject const& e )
+ throw (uno::RuntimeException)
- {
-- if ( !!maToggleHdl )
-- ButtonImpl::itemStateChanged( rEvent );
++ {
+ ButtonImpl::disposing (e);
+ }
@@ -2783,12 +3491,11 @@
std::list< Window*> maAdvanced;
std::list< Window*> maSimple;
- rtl::OUString mSimpleLabel;
-- rtl::OUString mAdvancedLabel;
-
-+public:
-+ OUString mAdvancedLabel;
-+ OUString mSimpleLabel;
+
++public:
+ rtl::OUString mAdvancedLabel;
++ rtl::OUString mSimpleLabel;
+
+protected:
Window* Remove( std::list< Window*> lst, Window* w )
-{
@@ -2831,8 +3538,8 @@
- , mAdvancedLabel( rtl::OUString::createFromAscii( "Simple..." ) )
-{
-}
-+ , mAdvancedLabel( OUString::createFromAscii( "Advanced..." ) )
-+ , mSimpleLabel( OUString::createFromAscii( "Simple..." ) )
++ , mAdvancedLabel( rtl::OUString::createFromAscii( "Advanced..." ) )
++ , mSimpleLabel( rtl::OUString::createFromAscii( "Simple..." ) )
+ {
+ }
void Click()
@@ -2906,24 +3613,24 @@
}
-IMPL_CONSTRUCTORS( AdvancedButton, PushButton, "advancedbutton" );
-+void AdvancedButton::SetAdvancedText (OUString const& text)
++void AdvancedButton::SetAdvancedText (rtl::OUString const& text)
+{
+ if (text.getLength ())
+ getImpl ().mAdvancedLabel = text;
+}
+
-+void AdvancedButton::SetSimpleText (OUString const& text)
++void AdvancedButton::SetSimpleText (rtl::OUString const& text)
+{
+ if (text.getLength ())
+ getImpl ().mSimpleLabel = text;
+}
+
-+OUString AdvancedButton::GetAdvancedText () const
++rtl::OUString AdvancedButton::GetAdvancedText () const
+{
+ return getImpl ().mAdvancedLabel;
+}
+
-+OUString AdvancedButton::GetSimpleText () const
++rtl::OUString AdvancedButton::GetSimpleText () const
+{
+ return getImpl ().mSimpleLabel;
+}
@@ -2964,32 +3671,46 @@
getImpl().RemoveWindow( w );
}
-+void MoreButton::SetMoreText (OUString const& text)
++void MoreButton::SetMoreText (rtl::OUString const& text)
+{
+ SetAdvancedText (text);
+}
+
-+void MoreButton::SetLessText (OUString const& text)
++void MoreButton::SetLessText (rtl::OUString const& text)
+{
+ SetSimpleText (text);
+}
+
-+OUString MoreButton::GetMoreText () const
++rtl::OUString MoreButton::GetMoreText () const
+{
+ return GetAdvancedText ();
+}
+
-+OUString MoreButton::GetLessText () const
++rtl::OUString MoreButton::GetLessText () const
+{
+ return GetSimpleText ();
+}
+
} // namespace layout
diff --git a/toolkit/source/vclcompat/wcontainer.cxx b/toolkit/source/vclcompat/wcontainer.cxx
-index ba49195..9783cb9 100644
+index ba49195..c2164ca 100644
--- toolkit/source/vclcompat/wcontainer.cxx
+++ toolkit/source/vclcompat/wcontainer.cxx
-@@ -44,8 +44,8 @@ using namespace ::com::sun::star;
+@@ -31,12 +31,10 @@
+
+ #include "wrapper.hxx"
+
+-#include "layout/layoutcore.hxx"
+ #include <com/sun/star/awt/XLayoutRoot.hpp>
+ #include <com/sun/star/awt/XLayoutContainer.hpp>
+-
+ #include <comphelper/processfactory.hxx>
+-
++#include <layout/helper.hxx>
+ #include <tools/debug.hxx>
+
+ using namespace ::com::sun::star;
+@@ -44,8 +42,8 @@ using namespace ::com::sun::star;
namespace layout
{
@@ -3000,7 +3721,36 @@
{
if ( !mxContainer.is() )
{
-@@ -154,12 +154,12 @@ Table::Table( sal_Int32 nBorder, sal_Int32 nColumns )
+@@ -55,7 +53,7 @@ Container::Container( Context const* pCtx, char const* pId )
+
+ Container::Container( rtl::OUString const& rName, sal_Int32 nBorder )
+ {
+- mxContainer = layoutimpl::createContainer( rName );
++ mxContainer = layoutimpl::WidgetFactory::createContainer( rName );
+
+ uno::Reference< beans::XPropertySet > xProps( mxContainer, uno::UNO_QUERY_THROW );
+ xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Border" ) ),
+@@ -102,8 +100,8 @@ void Container::Clear()
+ {
+ css::uno::Sequence< css::uno::Reference < css::awt::XLayoutConstrains > > children;
+ children = mxContainer->getChildren();
+- for( int i = 0; i < children.getLength(); i++ )
+- mxContainer->removeChild( children[ i ] );
++ for (int i = 0; i < children.getLength(); i++)
++ mxContainer->removeChild( children[i] );
+ }
+
+ void Container::ShowAll( bool bShow )
+@@ -117,7 +115,7 @@ void Container::ShowAll( bool bShow )
+ {
+ uno::Sequence< uno::Reference < awt::XLayoutConstrains > > aChildren;
+ aChildren = xCont->getChildren();
+- for( int i = 0; i < aChildren.getLength(); i++ )
++ for (int i = 0; i < aChildren.getLength(); i++)
+ {
+ uno::Reference < awt::XLayoutConstrains > xChild( aChildren[ i ] );
+
+@@ -154,12 +152,12 @@ Table::Table( sal_Int32 nBorder, sal_Int32 nColumns )
uno::Any( nColumns ) );
}
@@ -3016,7 +3766,7 @@
uno::Reference< awt::XLayoutConstrains > xChild( rImpl.mxWindow,
uno::UNO_QUERY );
mxContainer->addChild( xChild );
-@@ -200,11 +200,11 @@ Box::Box( rtl::OUString const& rName, sal_Int32 nBorder, bool bHomogeneous )
+@@ -200,11 +198,11 @@ Box::Box( rtl::OUString const& rName, sal_Int32 nBorder, bool bHomogeneous )
uno::Any( bHomogeneous ) );
}
@@ -3031,7 +3781,7 @@
uno::Reference< awt::XLayoutConstrains > xChild( rImpl.mxWindow,
uno::UNO_QUERY );
-@@ -237,13 +237,13 @@ void Box::setProps( uno::Reference< awt::XLayoutConstrains > xChild,
+@@ -237,13 +235,13 @@ void Box::setProps( uno::Reference< awt::XLayoutConstrains > xChild,
uno::Any( nPadding ) );
}
@@ -3049,7 +3799,7 @@
{
}
-@@ -253,8 +253,8 @@ HBox::HBox( sal_Int32 nBorder, bool bHomogeneous )
+@@ -253,8 +251,8 @@ HBox::HBox( sal_Int32 nBorder, bool bHomogeneous )
{
}
@@ -3060,7 +3810,7 @@
{
}
-@@ -264,8 +264,8 @@ VBox::VBox( sal_Int32 nBorder, bool bHomogeneous )
+@@ -264,8 +262,8 @@ VBox::VBox( sal_Int32 nBorder, bool bHomogeneous )
{
}
@@ -3072,10 +3822,10 @@
}
diff --git a/toolkit/source/vclcompat/wfield.cxx b/toolkit/source/vclcompat/wfield.cxx
-index 015cf63..c2520ff 100644
+index 015cf63..d9e2443 100644
--- toolkit/source/vclcompat/wfield.cxx
+++ toolkit/source/vclcompat/wfield.cxx
-@@ -33,48 +33,42 @@
+@@ -33,48 +33,43 @@
#include <comphelper/processfactory.hxx>
#include <com/sun/star/awt/XMetricField.hpp>
@@ -3093,6 +3843,7 @@
+#include <toolkit/awt/vclxwindows.hxx>
using namespace ::com::sun::star;
++using rtl::OUString;
namespace layout
{
@@ -3141,7 +3892,7 @@
void SAL_CALL textChanged( const css::awt::TextEvent& /* rEvent */ )
throw (css::uno::RuntimeException)
-@@ -83,6 +77,31 @@ class EditImpl : public ControlImpl,
+@@ -83,6 +78,31 @@ class EditImpl : public ControlImpl,
}
};
@@ -3173,8 +3924,26 @@
void Edit::SetSelection( Selection const& rSelection )
{
if ( !getImpl().mxEdit.is() )
-@@ -104,9 +123,10 @@ XubString Edit::GetText() const
- return XubString( getImpl().mxEdit->getText());
+@@ -90,23 +110,24 @@ void Edit::SetSelection( Selection const& rSelection )
+ getImpl().mxEdit->setSelection( awt::Selection( rSelection.Min(), rSelection.Max() ) );
+ }
+
+-void Edit::SetText( XubString const& rStr ) const
++void Edit::SetText( OUString const& rStr ) const
+ {
+ if ( !getImpl().mxEdit.is() )
+ return;
+ getImpl().mxEdit->setText( rStr );
+ }
+
+-XubString Edit::GetText() const
++String Edit::GetText() const
+ {
+ if ( !getImpl().mxEdit.is() )
+- return XubString();
+- return XubString( getImpl().mxEdit->getText());
++ return OUString();
++ return OUString( getImpl().mxEdit->getText());
}
-void Edit::SetModifyHdl( const Link& rLink )
@@ -3186,7 +3955,7 @@
}
IMPL_CONSTRUCTORS( Edit, Control, "edit" );
-@@ -116,8 +136,8 @@ IMPL_GET_IMPL( Edit );
+@@ -116,8 +137,8 @@ IMPL_GET_IMPL( Edit );
class MultiLineEditImpl : public EditImpl
{
public:
@@ -3197,7 +3966,7 @@
{
}
};
-@@ -129,8 +149,8 @@ IMPL_GET_IMPL( MultiLineEdit );
+@@ -129,8 +150,8 @@ IMPL_GET_IMPL( MultiLineEdit );
class SpinFieldImpl : public EditImpl
{
public:
@@ -3208,7 +3977,7 @@
{
}
};
-@@ -141,8 +161,8 @@ IMPL_CONSTRUCTORS( SpinField, Edit, "spinfield" );
+@@ -141,8 +162,8 @@ IMPL_CONSTRUCTORS( SpinField, Edit, "spinfield" );
class NumericFieldImpl : public SpinFieldImpl
{
public:
@@ -3219,7 +3988,7 @@
{
}
};
-@@ -151,8 +171,8 @@ class NumericFieldImpl : public SpinFieldImpl
+@@ -151,8 +172,8 @@ class NumericFieldImpl : public SpinFieldImpl
class MetricFieldImpl : public SpinFieldImpl
{
public:
@@ -3230,7 +3999,7 @@
{
}
};
-@@ -165,21 +185,26 @@ IMPL_GET_IMPL( MetricField );
+@@ -165,21 +186,26 @@ IMPL_GET_IMPL( MetricField );
class FormatterBaseImpl
{
protected:
@@ -3264,7 +4033,7 @@
{
}
-@@ -206,9 +231,9 @@ class MetricFormatterImpl : public FormatterBaseImpl
+@@ -206,9 +232,9 @@ class MetricFormatterImpl : public FormatterBaseImpl
{
public:
uno::Reference< awt::XMetricField > mxField;
@@ -3277,7 +4046,7 @@
{
}
};
-@@ -295,20 +320,27 @@ sal_Int64 MetricFormatter::GetValue( FieldUnit nUnit ) const
+@@ -295,20 +321,27 @@ sal_Int64 MetricFormatter::GetValue( FieldUnit nUnit ) const
IMPL_CONSTRUCTORS_2( MetricField, SpinField, MetricFormatter, "metricfield" );
// Window/Control/Edit/ComboBox
@@ -3309,11 +4078,11 @@
- USHORT InsertEntry( XubString const& rStr, USHORT nPos )
+ ~ComboBoxImpl ();
+
-+ sal_uInt16 InsertEntry( XubString const& rStr, sal_uInt16 nPos )
++ sal_uInt16 InsertEntry( OUString const& rStr, sal_uInt16 nPos )
{
if ( nPos == COMBOBOX_APPEND )
nPos = GetEntryCount();
-@@ -316,56 +348,53 @@ public:
+@@ -316,56 +349,53 @@ public:
return nPos;
}
@@ -3324,11 +4093,12 @@
}
- USHORT GetEntryPos( const XubString& rStr ) const
-+ sal_uInt16 GetEntryPos( const XubString& rStr ) const
++ sal_uInt16 GetEntryPos( const OUString& rStr ) const
{
uno::Sequence< rtl::OUString> aItems( mxComboBox->getItems() );
rtl::OUString rKey( rStr );
- for( unsigned int i = 0; aItems.getLength(); i++ )
+- for( unsigned int i = 0; aItems.getLength(); i++ )
++ for (unsigned int i = 0; aItems.getLength(); i++)
{
if ( aItems[ i ] == rKey )
- return sal::static_int_cast< USHORT >( i );
@@ -3338,9 +4108,10 @@
}
- XubString GetEntry( USHORT nPos ) const
-+ XubString GetEntry( sal_uInt16 nPos ) const
++ OUString GetEntry( sal_uInt16 nPos ) const
{
- return XubString( mxComboBox->getItem( nPos ) );
+- return XubString( mxComboBox->getItem( nPos ) );
++ return OUString( mxComboBox->getItem( nPos ) );
}
- USHORT GetEntryCount() const
@@ -3385,7 +4156,7 @@
virtual void SAL_CALL actionPerformed( const css::awt::ActionEvent& /* rEvent */ )
throw (css::uno::RuntimeException)
-@@ -386,7 +415,25 @@ public:
+@@ -386,17 +416,35 @@ public:
}
};
@@ -3408,11 +4179,14 @@
+ mxComboBox.clear ();
+}
+
-+sal_uInt16 ComboBox::InsertEntry( const XubString &rStr, sal_uInt16 nPos )
++sal_uInt16 ComboBox::InsertEntry( const OUString &rStr, sal_uInt16 nPos )
{
return getImpl().InsertEntry( rStr, nPos );
}
-@@ -396,7 +443,7 @@ void ComboBox::RemoveEntry( const XubString& rStr )
+
+-void ComboBox::RemoveEntry( const XubString& rStr )
++void ComboBox::RemoveEntry( const OUString& rStr )
+ {
getImpl().RemoveEntry( GetEntryPos( rStr ) );
}
@@ -3421,21 +4195,22 @@
{
getImpl().RemoveEntry( nPos );
}
-@@ -407,51 +454,70 @@ void ComboBox::Clear()
+@@ -407,51 +455,70 @@ void ComboBox::Clear()
getImpl().setProperty( "StringItemList", uno::Any( aNoItems ) );
}
-USHORT ComboBox::GetEntryPos( const XubString& rStr ) const
-+sal_uInt16 ComboBox::GetEntryPos( const XubString& rStr ) const
++sal_uInt16 ComboBox::GetEntryPos( const OUString& rStr ) const
{
return getImpl().GetEntryPos( rStr );
}
-XubString ComboBox::GetEntry( USHORT nPos ) const
-+XubString ComboBox::GetEntry( sal_uInt16 nPos ) const
++String ComboBox::GetEntry( sal_uInt16 nPos ) const
{
rtl::OUString rItem = getImpl().mxComboBox->getItem( nPos );
- return XubString( rItem );
+- return XubString( rItem );
++ return OUString( rItem );
}
-USHORT ComboBox::GetEntryCount() const
@@ -3505,11 +4280,11 @@
}
- USHORT InsertEntry(const XubString& rStr, USHORT nPos)
-+ sal_uInt16 InsertEntry(const XubString& rStr, sal_uInt16 nPos)
++ sal_uInt16 InsertEntry(const OUString& rStr, sal_uInt16 nPos)
{
if ( nPos == LISTBOX_APPEND )
nPos = mxListBox->getItemCount();
-@@ -459,12 +525,12 @@ public:
+@@ -459,12 +526,12 @@ public:
return nPos;
}
@@ -3520,20 +4295,21 @@
}
- USHORT RemoveEntry(const XubString& rStr, USHORT nPos)
-+ sal_uInt16 RemoveEntry(const XubString& rStr, sal_uInt16 nPos)
++ sal_uInt16 RemoveEntry(const OUString& rStr, sal_uInt16 nPos)
{
if ( nPos == LISTBOX_APPEND )
nPos = mxListBox->getItemCount();
-@@ -472,41 +538,41 @@ public:
+@@ -472,41 +539,41 @@ public:
return nPos;
}
- USHORT GetEntryPos( const XubString& rStr ) const
-+ sal_uInt16 GetEntryPos( const XubString& rStr ) const
++ sal_uInt16 GetEntryPos( const OUString& rStr ) const
{
uno::Sequence< rtl::OUString> aItems( mxListBox->getItems() );
rtl::OUString rKey( rStr );
- for( unsigned int i = 0; aItems.getLength(); i++ )
+- for( unsigned int i = 0; aItems.getLength(); i++ )
++ for (unsigned int i = 0; aItems.getLength(); i++)
{
if ( aItems[ i ] == rKey )
- return sal::static_int_cast< USHORT >( i );
@@ -3543,7 +4319,7 @@
}
- XubString GetEntry( USHORT nPos ) const
-+ XubString GetEntry( sal_uInt16 nPos ) const
++ OUString GetEntry( sal_uInt16 nPos ) const
{
return mxListBox->getItem( nPos );
}
@@ -3575,7 +4351,7 @@
if ( mxListBox->isMutipleMode() )
{
uno::Sequence< short > aItems( mxListBox->getSelectedItemsPos() );
-@@ -518,28 +584,29 @@ public:
+@@ -518,28 +585,29 @@ public:
return nSelected;
}
@@ -3615,7 +4391,7 @@
}
void SAL_CALL actionPerformed( const css::awt::ActionEvent& /* rEvent */ )
-@@ -558,12 +625,16 @@ public:
+@@ -558,17 +626,21 @@ public:
}
};
@@ -3624,7 +4400,7 @@
+{
+}
+
-+sal_uInt16 ListBox::InsertEntry(const XubString& rStr, sal_uInt16 nPos)
++sal_uInt16 ListBox::InsertEntry(const OUString& rStr, sal_uInt16 nPos)
{
return getImpl().InsertEntry(rStr, nPos);
}
@@ -3634,18 +4410,24 @@
{
return getImpl().RemoveEntry( nPos );
}
-@@ -579,57 +650,112 @@ void ListBox::Clear()
+
+-void ListBox::RemoveEntry( const XubString& rStr )
++void ListBox::RemoveEntry( const OUString& rStr )
+ {
+ return getImpl().RemoveEntry( GetEntryPos( rStr ) );
+ }
+@@ -579,57 +651,112 @@ void ListBox::Clear()
getImpl().setProperty( "StringItemList", uno::Any( aNoItems ) );
}
-USHORT ListBox::GetEntryPos( const XubString& rStr ) const
-+sal_uInt16 ListBox::GetEntryPos( const XubString& rStr ) const
++sal_uInt16 ListBox::GetEntryPos( const OUString& rStr ) const
{
return getImpl().GetEntryPos( rStr );
}
-XubString ListBox::GetEntry( USHORT nPos ) const
-+XubString ListBox::GetEntry( sal_uInt16 nPos ) const
++String ListBox::GetEntry( sal_uInt16 nPos ) const
{
return getImpl().GetEntry( nPos );
}
@@ -3663,7 +4445,7 @@
}
-void ListBox::SelectEntry( const XubString& rStr, BOOL bSelect )
-+void ListBox::SelectEntry( const XubString& rStr, bool bSelect )
++void ListBox::SelectEntry( const OUString& rStr, bool bSelect )
{
SelectEntryPos( GetEntryPos( rStr ), bSelect );
}
@@ -3681,7 +4463,7 @@
}
-XubString ListBox::GetSelectEntry( USHORT nSelIndex ) const
-+XubString ListBox::GetSelectEntry( sal_uInt16 nSelIndex ) const
++String ListBox::GetSelectEntry( sal_uInt16 nSelIndex ) const
{
return GetEntry( GetSelectEntryPos( nSelIndex ) );
}
@@ -3761,7 +4543,7 @@
} // namespace layout
diff --git a/toolkit/source/vclcompat/wrapper.cxx b/toolkit/source/vclcompat/wrapper.cxx
-index 38db3f4..e8c2b11 100644
+index 38db3f4..1286428 100644
--- toolkit/source/vclcompat/wrapper.cxx
+++ toolkit/source/vclcompat/wrapper.cxx
@@ -1,7 +1,7 @@
@@ -3965,8 +4747,9 @@
+ if (mpImpl)
+ mpImpl->wrapperGone ();
+ mpImpl = 0;
-+}
-+
+ }
+
+-void Window::SetParent( ::Window *pParent )
+///IMPL_GET_IMPL( Control );
+
+static ControlImpl& null_control_impl = (ControlImpl&)*(ControlImpl*)0;
@@ -3976,9 +4759,8 @@
+ if (ControlImpl* c = static_cast<ControlImpl *>(mpImpl))
+ return *c;
+ return null_control_impl;
- }
-
--void Window::SetParent( ::Window *pParent )
++}
++
+Control::~Control ()
+{
+ SetGetFocusHdl (Link ());
@@ -4038,20 +4820,20 @@
+ if (VCLXWindow *vcl = VCLXWindow::GetImplementation( ref ))
+ if (::Window *window = vcl->GetWindow())
+ window->SetParent( parent );
++}
++
++void Window::SetParent( Window *parent )
++{
++ /* Let's hear it for C++: poor man's dynamic binding. */
++ parent->ParentSet (this);
}
-void Window::SetParent( Window *pParent )
-+void Window::SetParent( Window *parent )
++void Window::ParentSet (Window *window)
{
- uno::Reference <awt::XWindow> parentRef( pParent->GetPeer(), uno::UNO_QUERY );
- ::Window *parentWindow = VCLXWindow::GetImplementation( parentRef )->GetWindow();
- SetParent( parentWindow );
-+ /* Let's hear it for C++: poor man's dynamic binding. */
-+ parent->ParentSet (this);
-+}
-+
-+void Window::ParentSet (Window *window)
-+{
+ window->SetParent (GetWindow ());
}
@@ -4186,25 +4968,45 @@
struct ToolkitVclPropsMap
{
WinBits vclStyle;
-@@ -341,7 +592,7 @@ uno::Reference< awt::XToolkit > getToolkit()
+@@ -279,7 +530,7 @@ static const int toolkitVclPropsMapLen =
+ void Window::SetStyle( WinBits nStyle )
+ {
+ uno::Reference< awt::XVclWindowPeer > xPeer = mpImpl->mxVclPeer;
+- for( int i = 0; i < toolkitVclPropsMapLen; i++ )
++ for (int i = 0; i < toolkitVclPropsMapLen; i++)
+ {
+ if ( toolkitVclPropsMap[ i ].propName )
+ {
+@@ -302,7 +553,7 @@ WinBits Window::GetStyle()
+ {
+ uno::Reference< awt::XVclWindowPeer > xPeer = mpImpl->mxVclPeer;
+ WinBits ret = 0;
+- for( int i = 0; i < toolkitVclPropsMapLen; i++ )
++ for (int i = 0; i < toolkitVclPropsMapLen; i++)
+ {
+ if ( toolkitVclPropsMap[ i ].propName )
+ {
+@@ -341,16 +592,14 @@ uno::Reference< awt::XToolkit > getToolkit()
return xToolkit;
}
-PeerHandle Window::CreatePeer( Window *pParent, WinBits nStyle, const char *pName)
+PeerHandle Window::CreatePeer( Window *parent, WinBits nStyle, const char *pName)
{
-
+-
long nWinAttrbs = 0;
-@@ -349,7 +600,7 @@ PeerHandle Window::CreatePeer( Window *pParent, WinBits nStyle, const char *pNam
+- for( int i = 0; i < toolkitVclPropsMapLen; i++ )
++ for (int i = 0; i < toolkitVclPropsMapLen; i++)
if ( nStyle & toolkitVclPropsMap[ i ].vclStyle )
nWinAttrbs |= toolkitVclPropsMap[ i ].initAttr;
- return layoutimpl::createWidget( getToolkit(), pParent->GetPeer(),
-+ return layoutimpl::createWidget( getToolkit(), parent->GetPeer(),
- OUString::createFromAscii( pName ), nWinAttrbs );
+- OUString::createFromAscii( pName ), nWinAttrbs );
++ return layoutimpl::WidgetFactory::createWidget (getToolkit(), parent->GetPeer(), OUString::createFromAscii( pName ), nWinAttrbs);
}
-@@ -360,11 +611,16 @@ void Window::Enable( bool bEnable )
+ void Window::Enable( bool bEnable )
+@@ -360,11 +609,16 @@ void Window::Enable( bool bEnable )
getImpl().mxWindow->setEnable( bEnable );
}
@@ -4222,7 +5024,7 @@
}
void Window::GrabFocus()
-@@ -374,158 +630,650 @@ void Window::GrabFocus()
+@@ -374,158 +628,650 @@ void Window::GrabFocus()
getImpl().mxWindow->setFocus();
}
@@ -4241,7 +5043,7 @@
+ return GetWindow()->GetPointer();
+}
+
-+void Window::SetText( String const& str )
++void Window::SetText( OUString const& str )
+{
+ GetWindow()->SetText( str );
+}
@@ -4251,7 +5053,7 @@
+ return GetWindow()->GetText();
+}
+
-+sal_Int32 Window::GetCtrlTextWidth (String const&) const
++sal_Int32 Window::GetCtrlTextWidth (OUString const&) const
+{
+ return 0;
+}
@@ -4370,14 +5172,22 @@
+ , mxDialog( peer, uno::UNO_QUERY )
+{
+}
++
++Dialog::Dialog( Window *parent, const char *xml_file, const char *id, sal_uInt32 nId )
++ : Context( xml_file )
++ , Window( new DialogImpl( this, Context::GetPeerHandle( id, nId ), this ) )
++ , bConstruct (true)
++{
++ if ( parent )
++ SetParent( parent );
++}
-Dialog::Dialog( Window *pParent, const char *pXMLPath, const char *pId, sal_uInt32 nId )
- : Context( pXMLPath )
- , Window( new DialogImpl( this, Context::GetPeerHandle( pId, nId ), this ) )
-+Dialog::Dialog( Window *parent, const char *xml_file, const char *id, sal_uInt32 nId )
++Dialog::Dialog( ::Window *parent, const char *xml_file, const char *id, sal_uInt32 nId )
+ : Context( xml_file )
+ , Window( new DialogImpl( this, Context::GetPeerHandle( id, nId ), this ) )
-+ , bConstruct (true)
{
- if ( pParent )
- SetParent( pParent );
@@ -4388,20 +5198,12 @@
-Dialog::Dialog( ::Window *pParent, const char *pXMLPath, const char *pId, sal_uInt32 nId )
- : Context( pXMLPath )
- , Window( new DialogImpl( this, Context::GetPeerHandle( pId, nId ), this ) )
-+Dialog::Dialog( ::Window *parent, const char *xml_file, const char *id, sal_uInt32 nId )
-+ : Context( xml_file )
-+ , Window( new DialogImpl( this, Context::GetPeerHandle( id, nId ), this ) )
++Dialog::~Dialog ()
{
- if ( pParent )
- SetParent( pParent );
-+ if ( parent )
-+ SetParent( parent );
}
-+Dialog::~Dialog ()
-+{
-+}
-+
+IMPL_GET_WINDOW (Dialog);
+IMPL_GET_IMPL (Dialog);
+
@@ -4427,7 +5229,7 @@
}
-void Dialog::SetText( String const& rStr )
-+void Dialog::SetText( String const& str )
++void Dialog::SetText( OUString const& str )
{
- if ( !getImpl().mxDialog.is() )
- return;
@@ -4436,7 +5238,7 @@
}
-class TabPageImpl : public WindowImpl
-+void Dialog::SetTitle( String const& str )
++void Dialog::SetTitle( OUString const& str )
{
-public:
- uno::Reference< awt::XWindow > mxTabPage;
@@ -4577,7 +5379,7 @@
-void TabPage::DeactivatePage()
+void MessageBox::init (OUString const& message, OUString const& yes, OUString const& no, sal_uIntPtr help_id)
-+{
+ {
+ imageError.Hide ();
+ imageInfo.Hide ();
+ imageQuery.Hide ();
@@ -4599,8 +5401,8 @@
+ SetHelpId (help_id);
+ else
+ helpButton.Hide ();
-+}
-+
+ }
+
+#undef MESSAGE_BOX_IMPL
+#define MESSAGE_BOX_IMPL(Name)\
+ Name##Box::Name##Box (::Window *parent, char const* message,\
@@ -4726,12 +5528,12 @@
+#define RETURN_MX_TABCONTROL if (getImpl ().mxTabControl.is ()) return getImpl ().mxTabControl
+
+TabControl::~TabControl ()
- {
++{
+ SetActivatePageHdl (Link ());
+ SetDeactivatePageHdl (Link ());
- }
-
-+void TabControl::InsertPage (sal_uInt16 id, String const& title, sal_uInt16 pos)
++}
++
++void TabControl::InsertPage (sal_uInt16 id, OUString const& title, sal_uInt16 pos)
+{
+ (void) pos;
+// GetTabControl ()->InsertPage (id, title, pos);
@@ -4828,7 +5630,7 @@
+ getImpl ().redraw ();
+}
+::TabPage* TabControl::GetTabPage (sal_uInt16 id) const
-+{
+ {
+ return GetTabControl ()->GetTabPage (id);
+}
+void TabControl::SetActivatePageHdl (Link const& link)
@@ -4850,7 +5652,7 @@
+ return getImpl ().GetDeactivatePageHdl ();
+}
+void TabControl::SetTabPageSizePixel (Size const& size)
- {
++{
+ GetTabControl ()->SetTabPageSizePixel (size);
+// GetParent()->SetSizePixel (size);
+// GetWindow()->SetSizePixel (size);
@@ -4899,12 +5701,12 @@
+
+::Window* TabPage::global_parent = 0;
+TabControl* TabPage::global_tabcontrol = 0;
++
++IMPL_GET_IMPL( TabPage );
- if ( !pItem && nWh != nSlot )
- pItem = &pPool->GetDefaultItem( nWh );
- return pItem;
-+IMPL_GET_IMPL( TabPage );
-+
+TabPage::TabPage( Window *parent, const char *xml_file, const char *id, sal_uInt32 nId)
+ : Context( xml_file )
+ , Window( new TabPageImpl( this, Context::GetPeerHandle( id, nId ), this ) )
@@ -4930,12 +5732,12 @@
+}
+
+IMPL_GET_WINDOW( TabPage );
-
--void SfxTabPage::Reset( SfxItemSet const& )
++
+void TabPage::ActivatePage()
+{
+}
-+
+
+-void SfxTabPage::Reset( SfxItemSet const& )
+void TabPage::DeactivatePage()
{
}
@@ -4957,7 +5759,7 @@
bool FixedLine::IsEnabled()
{
-@@ -537,21 +1285,35 @@ class FixedTextImpl : public ControlImpl
+@@ -537,23 +1283,37 @@ class FixedTextImpl : public ControlImpl
{
public:
uno::Reference< awt::XFixedText > mxFixedText;
@@ -5000,9 +5802,12 @@
-IMPL_GET_IMPL( FixedText )
+IMPL_GET_IMPL( FixedText );
- void FixedText::SetText( String const& rStr )
+-void FixedText::SetText( String const& rStr )
++void FixedText::SetText( OUString const& rStr )
{
-@@ -563,8 +1325,8 @@ void FixedText::SetText( String const& rStr )
+ if ( !getImpl().mxFixedText.is() )
+ return;
+@@ -563,8 +1323,8 @@ void FixedText::SetText( String const& rStr )
class FixedInfoImpl : public FixedTextImpl
{
public:
@@ -5013,7 +5818,7 @@
{
}
};
-@@ -576,16 +1338,17 @@ class ProgressBarImpl : public ControlImpl
+@@ -576,16 +1336,17 @@ class ProgressBarImpl : public ControlImpl
{
public:
uno::Reference< awt::XProgressBar > mxProgressBar;
@@ -5037,7 +5842,7 @@
}
};
-@@ -594,11 +1357,11 @@ class FixedImageImpl: public ControlImpl
+@@ -594,11 +1355,11 @@ class FixedImageImpl: public ControlImpl
{
public:
uno::Reference< graphic::XGraphic > mxGraphic;
@@ -5052,7 +5857,7 @@
{
if ( !mxGraphic.is() )
{
-@@ -620,12 +1383,12 @@ void FixedImage::setImage( ::Image const& i )
+@@ -620,12 +1381,12 @@ void FixedImage::setImage( ::Image const& i )
if ( !getImpl().mxGraphic.is() )
return;
//FIXME: hack moved to proplist
@@ -5067,7 +5872,7 @@
: pImpl( new FixedImageImpl( pName ) )
{
}
-@@ -637,31 +1400,18 @@ FixedImage::~FixedImage()
+@@ -637,31 +1398,18 @@ FixedImage::~FixedImage()
#endif
@@ -5102,7 +5907,7 @@
{
if ( !getImpl().mxProgressBar.is() )
return;
-@@ -694,8 +1444,8 @@ class PluginImpl: public ControlImpl
+@@ -694,8 +1442,8 @@ class PluginImpl: public ControlImpl
public:
::Control *mpPlugin;
@@ -5113,7 +5918,7 @@
, mpPlugin( plugin )
{
uno::Reference <awt::XWindow> ref( mxWindow, uno::UNO_QUERY );
-@@ -706,14 +1456,14 @@ public:
+@@ -706,14 +1454,14 @@ public:
vcl->SetPlugin( mpPlugin );
plugin->SetParent( parent );
plugin->SetStyle( vcl->mStyle );
@@ -5131,7 +5936,7 @@
, mpPlugin( plugin )
{
}
-@@ -724,8 +1474,8 @@ class LocalizedStringImpl : public WindowImpl
+@@ -724,8 +1472,8 @@ class LocalizedStringImpl : public WindowImpl
{
public:
layoutimpl::LocalizedString *mpString;
@@ -5142,7 +5947,7 @@
, mpString( static_cast<layoutimpl::LocalizedString*>( VCLXWindow::GetImplementation( uno::Reference <awt::XWindow> ( mxWindow, uno::UNO_QUERY ) ) ) )
{
}
-@@ -744,8 +1494,8 @@ public:
+@@ -744,20 +1492,96 @@ public:
IMPL_GET_IMPL( LocalizedString );
@@ -5153,10 +5958,51 @@
{
}
-@@ -760,4 +1510,49 @@ String LocalizedString::operator= (String const& s)
+-LocalizedString::operator String ()
++String LocalizedString::getString ()
+ {
+- return getImpl().getText();
++ return getImpl ().getText ();
++}
++
++OUString LocalizedString::getOUString ()
++{
++ return getImpl ().getText ();
++}
++
++LocalizedString::operator OUString ()
++{
++ return getOUString ();
++}
++
++OUString LocalizedString::GetToken (sal_uInt32 i, sal_Char c)
++{
++ return getString ().GetToken (i, c);
+ }
+
+-String LocalizedString::operator= (String const& s)
++OUString LocalizedString::operator= (OUString const& s)
+ {
+ getImpl().setText( s );
return getImpl().getText();
}
++OUString LocalizedString::operator+= (OUString const& b)
++{
++ OUString a = getImpl ().getText ();
++ a += b;
++ getImpl ().setText (a);
++ return getImpl ().getText ();
++}
++
++OUString LocalizedString::operator+= (sal_Unicode const b)
++{
++ String a = getImpl ().getText ();
++ a += b;
++ getImpl ().setText (a);
++ return getImpl ().getText ();
++}
++
+class InPlugImpl : public WindowImpl
+{
+public:
@@ -5437,19 +6283,12 @@
@@ -0,0 +1 @@
+empty
\ No newline at end of file
-diff --git a/toolkit/uiconfig/layout/localize.sdf b/toolkit/uiconfig/layout/localize.sdf
-new file mode 100644
-index 0000000..ea30561
---- /dev/null
-+++ toolkit/uiconfig/layout/localize.sdf
-@@ -0,0 +1 @@
-+#empty
diff --git a/toolkit/uiconfig/layout/makefile.mk b/toolkit/uiconfig/layout/makefile.mk
new file mode 100644
-index 0000000..c3d1e5a
+index 0000000..07a99a1
--- /dev/null
+++ toolkit/uiconfig/layout/makefile.mk
-@@ -0,0 +1,58 @@
+@@ -0,0 +1,62 @@
+#*************************************************************************
+#
+# OpenOffice.org - a multi-platform office productivity suite
@@ -5508,6 +6347,10 @@
+.ENDIF # ENABLE_LAYOUT != TRUE
+
+.INCLUDE : target.mk
++
++localize.sdf:
++ echo '#empty' | cat - > $@
++ rm -f *-$@
diff --git a/toolkit/uiconfig/layout/message-box.xml b/toolkit/uiconfig/layout/message-box.xml
new file mode 100644
index 0000000..6a64be1
@@ -5677,7 +6520,7 @@
+ </vbox>
+</modaldialog>
diff --git a/toolkit/workben/layout/makefile.mk b/toolkit/workben/layout/makefile.mk
-index e82e1c9..cd0f327 100644
+index e82e1c9..6abcb50 100644
--- toolkit/workben/layout/makefile.mk
+++ toolkit/workben/layout/makefile.mk
@@ -43,12 +43,10 @@ ENABLE_EXCEPTIONS=TRUE
@@ -5694,7 +6537,7 @@
.IF "$(COMNAME)" == "gcc3"
CFLAGS+=-Wall -Wno-non-virtual-dtor
.ENDIF
-@@ -92,8 +90,13 @@ default: ALLTAR
+@@ -92,15 +90,20 @@ default: ALLTAR
.INCLUDE : target.mk
XML_FILES=\
@@ -5708,6 +6551,14 @@
wordcount.xml\
zoom.xml\
+ TRALAY=tralay
+ XML_LANGS=$(alllangiso)
+
+-ALLTAR: $(BIN)/testrc $(svtools) $(foreach,i,$(XML_FILES) en-US/$i)
++ALLTAR: localize.sdf $(BIN)/testrc $(svtools) $(foreach,i,$(XML_FILES) en-US/$i)
+
+ $(XML_LANGS:f:t"/%.xml ")/%.xml: %.xml
+ $(TRALAY) -m localize.sdf -o . -l $(XML_LANGS:f:t" -l ") $<
@@ -119,12 +122,16 @@ $(svtools):
ln -sf ..$/$(PRJ)$/svtools$/inc $(INCCOM)$/svtools
@@ -5725,7 +6576,7 @@
# FIXME: broken setup
ln -sf ../inc/wordcountdialog.hxx ../$(PRJ)/sw/source/ui/dialog/wordcountdialog.hxx
$(SHELL) ./un-test.sh tpsort.cxx > ../$(PRJ)/sc/source/ui/dbgui/tpsort.cxx
-@@ -133,6 +140,10 @@ dist .PHONY :
+@@ -133,6 +140,17 @@ dist .PHONY :
$(SHELL) ./un-test.sh sortdlg.hxx > ../$(PRJ)/sc/source/ui/inc/sortdlg.hxx
touch ../$(PRJ)/sc/source/ui/attrdlg/scdlgfact.cxx
touch ../$(PRJ)/sc/source/ui/view/cellsh2.cxx
@@ -5733,6 +6584,13 @@
+ cp -pv move-copy-sheet.xml ../$(PRJ)/sc/uiconfig/layout
+ cp -pv sort-options.xml ../$(PRJ)/sc/uiconfig/layout
+ cp -pv string-input.xml ../$(PRJ)/sc/uiconfig/layout
++
++localize.sdf: $(PRJ)/../svx/source/dialog/localize.sdf $(PRJ)/../sw/source/ui/dialog/localize.sdf $(PRJ)/../sc/source/ui/src/localize.sdf
++ grep sortdlg.src $(PRJ)/../sc/source/ui/src/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\sort-options.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SCDLG_SORT_title/' > sort-options-$@
++ grep wordcountdialog.src $(PRJ)/../sw/source/ui/dialog/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sw\\uiconfig\\layout\\wordcount.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tDLG_WORDCOUNT_title/' > wordcount-$@
++ grep zoom.src $(PRJ)/source/dialog/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "svx\\uiconfig\\layout\\zoom.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SVXDLG_ZOOM_title/' > zoom-$@
++ echo '#empty' | cat - sort-options-$@ wordcount-$@ zoom-$@ > $@
++ rm -f *-$@
.ELSE # ENABLE_LAYOUT != TRUE
all .PHONY:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]