summaryrefslogtreecommitdiff
path: root/patches/dev300/layout-fix-experimental-layout.diff
blob: af7e2493fd30223617e5f092cbff665353ed56f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
 cui/source/inc/numfmt.hxx          |    6 ++++++
 cui/source/tabpages/numfmt.cxx     |   20 ++++++++------------
 sc/source/ui/attrdlg/scdlgfact.cxx |    8 ++------
 sc/source/ui/attrdlg/scdlgfact.hxx |    5 +++--
 4 files changed, 19 insertions(+), 20 deletions(-)

diff --git cui/source/inc/numfmt.hxx cui/source/inc/numfmt.hxx
index b5638c5..98b49d5 100644
--- cui/source/inc/numfmt.hxx
+++ cui/source/inc/numfmt.hxx
@@ -77,8 +77,12 @@ public:
 
 // -----------------------------------------------------------------------
 
+#if ENABLE_LAYOUT_EXPERIMENTAL
 #include <sfx2/layout.hxx>
 #include <layout/layout-pre.hxx>
+#else
+#define LocalizedString String
+#endif /* !ENABLE_LAYOUT_EXPERIMENTAL */
 
 class SvxNumberFormatTabPage : public SfxTabPage
 {
@@ -182,7 +186,9 @@ private:
 #endif
 };
 
+#if ENABLE_LAYOUT_EXPERIMENTAL
 #include <layout/layout-post.hxx>
+#endif /* ENABLE_LAYOUT_EXPERIMENTAL */
 
 #endif
 
diff --git cui/source/tabpages/numfmt.cxx cui/source/tabpages/numfmt.cxx
index c58c45c..87047e8 100644
--- cui/source/tabpages/numfmt.cxx
+++ cui/source/tabpages/numfmt.cxx
@@ -25,10 +25,6 @@
  *
  ************************************************************************/
 
-#if !ENABLE_LAYOUT_EXPERIMENTAL && defined (ENABLE_LAYOUT)
-#undef ENABLE_LAYOUT
-#endif
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_cui.hxx"
 
@@ -233,19 +229,19 @@ void SvxNumberPreviewImpl::DataChanged( const DataChangedEvent& rDCEvt )
 
 #define HDL(hdl) LINK( this, SvxNumberFormatTabPage, hdl )
 
+#if ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT
 #include <layout/layout-pre.hxx>
 
-#if ENABLE_LAYOUT
 #undef CUI_RES
 #define CUI_RES(x) #x
 #define CUI_RES_PLAIN(x) ResId (x, CUI_MGR ())
 #define THIS_CUI_RES(x) this, #x
 #undef SfxTabPage
 #define SfxTabPage( parent, id, args ) SfxTabPage( parent, "number-format.xml", id, &args )
-#else /* !ENABLE_LAYOUT */
+#else /* ! ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT */
 #define CUI_RES_PLAIN CUI_RES
 #define THIS_CUI_RES CUI_RES
-#endif /* !ENABLE_LAYOUT */
+#endif /* ! ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT */
 
 SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window*				pParent,
                                                 const SfxItemSet&	rCoreAttrs )
@@ -276,7 +272,7 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window*				pParent,
         aFtComment      ( this, CUI_RES( FT_COMMENT ) ),
         aEdComment      ( this, CUI_RES( ED_COMMENT ) ),
         
-#if ENABLE_LAYOUT
+#if ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT
         aWndPreview     ( LAYOUT_THIS_WINDOW(this), CUI_RES_PLAIN( WND_NUMBER_PREVIEW ) ),
 #else
         aWndPreview     ( this, CUI_RES_PLAIN( WND_NUMBER_PREVIEW ) ),
@@ -288,7 +284,7 @@ SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window*				pParent,
         sAutomaticEntry ( THIS_CUI_RES( STR_AUTO_ENTRY)),
         pLastActivWindow( NULL )
 {
-#if ENABLE_LAYOUT
+#if ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT
     aLbFormat.Clear ();
 #endif /* ENABLE_LAYOUT */
 
@@ -1166,7 +1162,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
             aPos.Y()=nStdFormatY;
             aSize.Height()=nStdFormatHeight;
             aLbFormat.SetPosSizePixel(aPos,aSize);
-#if ENABLE_LAYOUT
+#if ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT
             aLbCurrency.Disable();
 #else /* !ENABLE_LAYOUT */
             aLbCurrency.Hide();
@@ -1177,7 +1173,7 @@ void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
             aPos.Y()=nCurFormatY;
             aSize.Height()=nCurFormatHeight;
             aLbFormat.SetPosSizePixel(aPos,aSize);
-#if ENABLE_LAYOUT
+#if ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT
             aLbCurrency.Enable();
 #else /* !ENABLE_LAYOUT */
             aLbCurrency.Show();
@@ -1315,7 +1311,7 @@ IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb )
 
         // Reinit options enable/disable for current selection.
 
-#if ENABLE_LAYOUT
+#if ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT
         if (aLbFormat.GetSelectEntryPos () == LISTBOX_ENTRY_NOTFOUND)
 #else /* !ENABLE_LAYOUT */
         // Current category may be UserDefined with no format entries defined.
diff --git sc/source/ui/attrdlg/scdlgfact.cxx sc/source/ui/attrdlg/scdlgfact.cxx
index 3d261aa..46da823 100644
--- sc/source/ui/attrdlg/scdlgfact.cxx
+++ sc/source/ui/attrdlg/scdlgfact.cxx
@@ -28,10 +28,6 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sc.hxx"
 
-#if ! ENABLE_LAYOUT_EXPERIMENTAL
-#undef ENABLE_LAYOUT
-#endif
-
 #undef SC_DLLIMPLEMENTATION
 
 #include "scdlgfact.hxx"
@@ -149,7 +145,7 @@ String AbstractTabDialog_Impl::GetText() const
     return pDlg->GetText();
 }
 
-#if ENABLE_LAYOUT
+#if ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT
 namespace layout
 {
 IMPL_ABSTDLG_BASE(AbstractTabDialog_Impl); //add for ScAttrDlg, ScHFEditDlg, ScStyleDlg, ScSubTotalDlg,ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg
@@ -184,7 +180,7 @@ String AbstractTabDialog_Impl::GetText() const
     return pDlg->GetText();
 }
 }
-#endif /* ENABLE_LAYOUT */
+#endif /* ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT */
 
 //add for AbstractTabDialog_Impl end
 // AbstractScImportAsciiDlg_Impl begin
diff --git sc/source/ui/attrdlg/scdlgfact.hxx sc/source/ui/attrdlg/scdlgfact.hxx
index d8ae113..f811170 100644
--- sc/source/ui/attrdlg/scdlgfact.hxx
+++ sc/source/ui/attrdlg/scdlgfact.hxx
@@ -368,7 +368,8 @@ class AbstractTabDialog_Impl : public SfxAbstractTabDialog
     virtual void		SetText( const XubString& rStr );
     virtual String   	GetText() const;
 };
-#if ENABLE_LAYOUT
+
+#if ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT
 namespace layout
 {
 //add for ScAttrDlg , ScHFEditDlg, ScStyleDlg, ScSubTotalDlg, ScCharDlg, ScParagraphDlg, ScValidationDlg, ScSortDlg
@@ -384,7 +385,7 @@ class AbstractTabDialog_Impl : public SfxAbstractTabDialog
     virtual String   	GetText() const;
 };
 } // end namespace layout
-#endif /* ENABLE_LAYOUT */
+#endif /* ENABLE_LAYOUT_EXPERIMENTAL && ENABLE_LAYOUT */
 //------------------------------------------------------------------------
 //AbstractDialogFactory_Impl implementations
 class ScAbstractDialogFactory_Impl : public ScAbstractDialogFactory