FixedLine FL_CURRENT
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 158 , 8 ) ;
Text [ en-US ] = "Current selection";
};
<fixedline id="FL_CURRENT" text="Current selection"/>
diff --git a/svx/source/dialog/zoom.hxx b/svx/source/dialog/zoom.hxx
index 87a8e0c..b3fa40f 100644
--- a/svx/source/dialog/zoom.hxx
+++ b/svx/source/dialog/zoom.hxx
@@ -37,6 +37,13 @@
// include ---------------------------------------------------------------
+#if USE_LAYOUT
+#include <layout/layout.hxx>
+class SfxItemSet;
+#else /* !USE_LAYOUT */
+#define LAYOUT_NS
... <skip includes>
+#endif /* !USE_LAYOUT */
...
+#if USE_LAYOUT
+class SvxZoomDialog : public layout::Dialog
+#else /* !USE_LAYOUT */
class SvxZoomDialog : public SfxModalDialog
+#endif /* !USE_LAYOUT */
{
private:
- FixedLine aZoomFl;
- RadioButton aWholePageBtn;
...
+ LAYOUT_NS::FixedLine aZoomFl;
+ LAYOUT_NS::RadioButton aWholePageBtn;
...
- DECL_LINK( UserHdl, RadioButton* );
- DECL_LINK( SpinHdl, MetricField* );
- DECL_LINK( OKHdl, Button* );
+ DECL_LINK( UserHdl, LAYOUT_NS::RadioButton* );
+ DECL_LINK( SpinHdl, LAYOUT_NS::MetricField* );
+ DECL_LINK( OKHdl, LAYOUT_NS::Button* );
#endif
diff --git a/svx/source/dialog/zoom.cxx b/svx/source/dialog/zoom.cxx
index 6809030..7274d86 100644
--- a/svx/source/dialog/zoom.cxx
+++ b/svx/source/dialog/zoom.cxx
@@ -61,15 +70,45 @@
#define _SVX_ZOOM_CXX
#include <svx/dialogs.hrc>
+
+#if !USE_LAYOUT
#include "zoom.hrc"
+#endif /* !USE_LAYOUT */
... <snip TEST_LAYOUT diff>
+
+#if USE_LAYOUT
+using namespace layout;
+#undef SVX_RES
+#define SVX_RES(x) #x
+#endif /* USE_LAYOUT */
...
+
+#if USE_LAYOUT
+ Dialog( pParent, "zoom.xml", "dialog" ),
+#else /* !USE_LAYOUT */
SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_ZOOM ) ),
+#endif /* !USE_LAYOUT */
aZoomFl ( this, SVX_RES( FL_ZOOM ) ),
aWholePageBtn ( this, SVX_RES( BTN_WHOLE_PAGE ) ),
<?xml version="1.0" encoding="UTF-8"?>
<modaldialog xmlns="http://openoffice.org/2007/layout"
xmlns:cnt="http://openoffice.org/2007/layout/container"
help-id="HID_DLG_WORDCOUNT"
id="dialog"
sizeable="true" moveable="true" optimumsize="true"
has_border="true" sv-look="true" title="Word Count">
<vbox border="5" spacing="5">
<fixedline id="FL_CURRENT" text="Current selection"/>
<hbox>
<fixedtext id="FT_CURRENTWORD" label="Words:" cnt:padding="13"/>
<flow cnt:padding="60"/>
<fixedtext id="FI_CURRENTWORD" right="true" label="0" cnt:padding="13"/>
</hbox>
<hbox>
<fixedtext id="FT_CURRENTCHARACTER" label="Characters:" cnt:padding="13"/>
<flow cnt:padding="60"/>
<fixedtext id="FI_CURRENTCHARACTER" right="true" label="00" cnt:padding="13"/>
</hbox>
<fixedline cnt:padding="0" id="FL_DOC" text="Whole document"/>
<hbox>
<fixedtext id="FT_DOCWORD" label="Words:" cnt:padding="13"/>
<fixedtext id="FI_DOCWORD" right="true" label="000" cnt:padding="13"/>
</hbox>
<hbox>
<fixedtext id="FT_DOCCHARACTER" label="Characters:" cnt:padding="13"/>
<fixedtext id="FI_DOCCHARACTER" right="true" label="0000" cnt:padding="13"/>
</hbox>
<fixedline cnt:padding="1" id="FL_BOTTOM"/>
<hbox border="5">
<flow cnt:padding="0" homogeneous="true"/>
<okbutton id="PB_OK" cnt:expand="false" default="true"/>
<helpbutton id="PB_HELP" cnt:expand="false"/>
</hbox>
</vbox>
</modaldialog>
+<?xml version="1.0" encoding="UTF-8"?>
-<modaldialog sizeable="true" help-id="HID_DLG_WORDCOUNT" moveable="true" output-size="true"\
id="DLG_WORDCOUNT" sv-look="true" text="Word Count" xmlns="http://openoffice.org/2007/layout"\
xmlns:cnt="http://openoffice.org/2007/layout/container">
- <vbox>
+<modaldialog xmlns="http://openoffice.org/2007/layout"
+ xmlns:cnt="http://openoffice.org/2007/layout/container"
+ help-id="HID_DLG_WORDCOUNT"
+ id="dialog"
+ sizeable="true" moveable="true" optimumsize="true"
+ has_border="true" sv-look="true" title="Word Count">
+ <vbox border="5" spacing="5">
<fixedline id="FL_CURRENT" text="Current selection"/>
<hbox>
- <fixedtext id="FT_CURRENTWORD" label="Words:"/>
- <fixedtext id="FI_CURRENTWORD" right="true"/>
+ <fixedtext id="FT_CURRENTWORD" label="Words:" cnt:padding="13"/>
+ <flow cnt:padding="60"/>
+ <fixedtext id="FI_CURRENTWORD" right="true" label="0" cnt:padding="13"/>
</hbox>
...
- <fixedline id="FL_BOTTOM"/>
- <hbox>
- <okbutton def-button="true" id="PB_OK"/>
- <helpbutton id="PB_HELP"/>
+ <fixedline cnt:padding="1" id="FL_BOTTOM"/>
+ <hbox border="5">
+ <flow cnt:padding="0" homogeneous="true"/>
+ <okbutton id="PB_OK" cnt:expand="false" default="true"/>
+ <helpbutton id="PB_HELP" cnt:expand="false"/>
</hbox>
</vbox>
</modaldialog>
cd build/oog680-m5
git clone http://lilypond.org/~janneke/layout.git/.git layout
cd layout/workben && . ./refresh [--inst OOO_INSTALL_PREFIX] --test
git clone http://lilypond.org/~janneke/layout.git/.git layout
git format-patch eb9982f6..HEAD
rm -f 00*-Import.patch
patch -p1 -f < 000*patch # cross fingers
export ENABLE_LAYOUT=1
dmake, ooinstall
cd ~/pkg/ooo/program && cp .../layout/workben/{zoom.xml,wordcount.xml} .
./soffice.bin ;-)