1 diff --git sw/inc/mdiexp.hxx sw/inc/mdiexp.hxx
2 index fa7d9f6..97b3187 100644
6 #include <tools/solar.h>
9 +#include <layout/layout.hxx>
13 @@ -63,7 +64,7 @@ void RescheduleProgress( SwDocShell *pDocShell );
15 void EnableCmdInterface(BOOL bEnable = TRUE);
17 -Dialog* GetSearchDialog();
18 +LAYOUT_NS Dialog* GetSearchDialog();
20 void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect );
22 diff --git sw/source/core/crsr/viscrs.cxx sw/source/core/crsr/viscrs.cxx
23 index 871f09c..aa50883 100644
24 --- sw/source/core/crsr/viscrs.cxx
25 +++ sw/source/core/crsr/viscrs.cxx
26 @@ -996,7 +996,7 @@ SwCursor* SwShellCrsr::Create( SwPaM* pRing ) const
27 short SwShellCrsr::MaxReplaceArived()
30 - Window* pDlg = ::GetSearchDialog();
31 + Window* pDlg = LAYOUT_THIS_WINDOW (::GetSearchDialog());
34 // alte Actions beenden; die Tabellen-Frames werden angelegt und
35 diff --git sw/source/ui/dialog/makefile.mk sw/source/ui/dialog/makefile.mk
36 index 1f16883..17ca965 100644
37 --- sw/source/ui/dialog/makefile.mk
38 +++ sw/source/ui/dialog/makefile.mk
39 @@ -42,10 +42,6 @@ LIBTARGET=no
40 .INCLUDE : settings.mk
41 .INCLUDE : $(PRJ)$/inc$/sw.mk
43 -.IF "$(ENABLE_LAYOUT)" == "TRUE"
44 -CFLAGS+= -DENABLE_LAYOUT=1 -I../$(PRJ)/layout/inc -I../$(PRJ)/layout/$(INPATH)/inc
45 -.ENDIF # ENABLE_LAYOUT == TRUE
47 # --- Files --------------------------------------------------------
50 diff --git sw/source/ui/dialog/wordcountdialog.cxx sw/source/ui/dialog/wordcountdialog.cxx
51 index 8639a68..8ae35e6 100644
52 --- sw/source/ui/dialog/wordcountdialog.cxx
53 +++ sw/source/ui/dialog/wordcountdialog.cxx
55 #include <layout/layout-pre.hxx>
56 #include <wordcountdialog.hrc>
61 +#undef SfxModalDialog
62 +#define SfxModalDialog( parent, id ) Dialog( parent, "wordcount.xml", id )
63 +#define SW_WORDCOUNTDIALOG_HRC
65 +#endif /* ENABLE_LAYOUT */
67 /*-- 06.04.2004 16:05:55---------------------------------------------------
69 -----------------------------------------------------------------------*/
70 @@ -67,6 +76,9 @@ SwWordCountDialog::SwWordCountDialog(Window* pParent) :
71 #pragma warning (default : 4355)
75 + SetHelpId (HID_DLG_WORDCOUNT);
76 +#endif /* ENABLE_LAYOUT */
79 /*-- 06.04.2004 16:05:56---------------------------------------------------
80 diff --git sw/source/ui/docvw/edtwin3.cxx sw/source/ui/docvw/edtwin3.cxx
81 index af37a99..fbe37b1 100644
82 --- sw/source/ui/docvw/edtwin3.cxx
83 +++ sw/source/ui/docvw/edtwin3.cxx
84 @@ -150,7 +150,7 @@ BOOL SwEditWin::RulerMarginDrag( const MouseEvent& rMEvt,
88 -Dialog* GetSearchDialog()
89 +LAYOUT_NS Dialog* GetSearchDialog()
91 return SwView::GetSearchDialog();
93 diff --git sw/source/ui/inc/view.hxx sw/source/ui/inc/view.hxx
94 index fcb7241..f2f87c7 100644
95 --- sw/source/ui/inc/view.hxx
96 +++ sw/source/ui/inc/view.hxx
99 #include <swtypes.hxx>
100 #include <shellid.hxx>
101 +#include <layout/layout.hxx>
105 @@ -488,7 +489,7 @@ public:
106 void SetVisArea( const Point&, BOOL bUpdateScrollbar = TRUE);
109 - static Dialog* GetSearchDialog();
110 + static LAYOUT_NS Dialog* GetSearchDialog();
112 static USHORT GetMoveType();
113 static void SetMoveType(USHORT nSet);
114 diff --git sw/source/ui/uiview/viewsrch.cxx sw/source/ui/uiview/viewsrch.cxx
115 index 984c2ee..4eb97d8 100644
116 --- sw/source/ui/uiview/viewsrch.cxx
117 +++ sw/source/ui/uiview/viewsrch.cxx
118 @@ -106,7 +106,7 @@ inline Window* GetParentWindow( SvxSearchDialog* pSrchDlg )
121 if( pSrchDlg && pSrchDlg->IsVisible() )
123 + pWin = LAYOUT_THIS_WINDOW (pSrchDlg);
127 @@ -168,7 +168,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
131 - pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
132 + pSrchDlg = static_cast <SvxSearchDialog*> (pWrp->getDialog ());
133 // die Search / Replace -Items merken wir uns
134 const SearchAttrItemList* pList = pSrchDlg->GetSearchItemList();
135 if( pList && pList->Count() )
136 @@ -189,7 +189,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
137 SwView::SetMoveType(NID_SRCH_REP);
140 - pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
141 + pSrchDlg = static_cast <SvxSearchDialog*> (pWrp->getDialog ());
145 @@ -493,7 +493,7 @@ BOOL SwView::SearchAndWrap(BOOL bApi)
147 const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
148 SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId);
149 - pSrchDlg = pWrp ? (SvxSearchDialog*)(pWrp->GetWindow()) : 0;
150 + pSrchDlg = pWrp ? static_cast <SvxSearchDialog*> (pWrp->getDialog ()) : 0;
152 // falls Startposition am Dokumentende / -anfang
154 @@ -728,19 +728,17 @@ ULONG SwView::FUNC_Search( const SwSearchOptions& rOptions )
159 -Dialog* SwView::GetSearchDialog()
160 +LAYOUT_NS Dialog* SwView::GetSearchDialog()
162 const USHORT nId = SvxSearchDialogWrapper::GetChildWindowId();
163 SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)SfxViewFrame::Current()->GetChildWindow(nId);
165 - pSrchDlg = (SvxSearchDialog*)(pWrp->GetWindow());
166 + pSrchDlg = pWrp->getDialog ();
173 void SwView::StateSearch(SfxItemSet &rSet)
175 SfxWhichIter aIter(rSet);
176 diff --git sw/uiconfig/layout/layout.mk sw/uiconfig/layout/layout.mk
177 deleted file mode 100644
178 index 88164bb..0000000
179 --- sw/uiconfig/layout/layout.mk
182 -# TODO: move to solenv/inc
183 -# copies: sw/uiconfig/layout svx/uiconfig/layout
187 -XML_LANGS=$(alllangiso)
189 -ALL_XMLS=$(foreach,i,$(XML_FILES) $(XML_DEST)/$i) $(foreach,i,$(XML_LANGS) $(foreach,j,$(XML_FILES) $(XML_DEST)/$i/$j))
191 -# Must remove the -j (no duplicate base file names) flag
193 -XML_ZIP = $(PRJNAME)-layout
197 -$(XML_ZIP): $(ALL_XMLS)
200 -ZIP1TARGET=$(XML_ZIP)
201 -ZIP1LIST=$(ALL_XMLS:s@$(XML_DEST)/@@)
203 -$(foreach,i,$(XML_LANGS) $(XML_DEST)/$i/%.xml): %.xml
205 - @echo $(foreach,i,$(XML_LANGS) $(XML_DEST)/$i/%.xml): %.xml
206 - $(TRALAY) -m localize.sdf -o $(XML_DEST) -l $(XML_LANGS:f:t" -l ") $<
208 -$(XML_DEST)/%.xml: %.xml
212 -# Don't want to overwrite filled localize.sdf with empty template
214 - $(foreach,i,$(XML_FILES) $(TRALAY) -l en-US $i) > $@
215 diff --git sw/uiconfig/layout/makefile.mk sw/uiconfig/layout/makefile.mk
216 index b577653..5f4bc52 100644
217 --- sw/uiconfig/layout/makefile.mk
218 +++ sw/uiconfig/layout/makefile.mk
219 @@ -48,3 +48,8 @@ all .PHONY:
220 .ENDIF # ENABLE_LAYOUT != TRUE
224 +localize.sdf: $(PRJ)/source/ui/dialog/localize.sdf
225 + 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-$@
226 + echo '#empty' | cat - wordcount-$@ > $@
228 diff --git sw/uiconfig/layout/wordcount.xml sw/uiconfig/layout/wordcount.xml
229 index ae33571..e922294 100644
230 --- sw/uiconfig/layout/wordcount.xml
231 +++ sw/uiconfig/layout/wordcount.xml
233 xmlns:cnt="http://openoffice.org/2007/layout/container"
234 help-id="HID_DLG_WORDCOUNT"
236 - sizeable="true" moveable="true" optimumsize="true"
237 + sizeable="true" moveable="true" optimumsize="true" closeable="true"
238 has_border="true" sv-look="true" _title="Word Count">
239 <vbox border="5" spacing="5">
240 <fixedline id="FL_CURRENT" _text="Current selection"/>
244 <!-- if we could do cnt:cnt:padding="-13" here, we would not have to close
245 - and reope the hbox/vbox thing !-->
246 + and reopen the hbox/vbox thing !-->
247 <fixedline id="FL_DOC" _text="Whole document"/>
249 <vbox cnt:padding="13" spacing="5">