Update git submodules
[LibreOffice.git] / vcl / jsdialog / enabled.cxx
blobd5997c9c6a9f9ff90e4891b7bf0da636ec1c96bb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include <comphelper/string.hxx>
11 #include <jsdialog/enabled.hxx>
12 #include <vector>
14 namespace jsdialog
16 bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile)
18 // mobile only dialogs
19 if (bMobile)
21 if (// swriter
22 rUIFile == u"modules/swriter/ui/watermarkdialog.ui"
23 || rUIFile == u"modules/swriter/ui/wordcount-mobile.ui"
24 // svx
25 || rUIFile == u"svx/ui/findreplacedialog-mobile.ui")
27 return true;
31 if (// cui
32 rUIFile == u"cui/ui/areatabpage.ui"
33 || rUIFile == u"cui/ui/areadialog.ui"
34 || rUIFile == u"cui/ui/asiantypography.ui"
35 || rUIFile == u"cui/ui/borderpage.ui"
36 || rUIFile == u"cui/ui/bulletandposition.ui"
37 || rUIFile == u"cui/ui/cellalignment.ui"
38 || rUIFile == u"cui/ui/charnamepage.ui"
39 || rUIFile == u"cui/ui/colorpage.ui"
40 || rUIFile == u"cui/ui/colorpickerdialog.ui"
41 || rUIFile == u"cui/ui/croppage.ui"
42 || rUIFile == u"cui/ui/effectspage.ui"
43 || rUIFile == u"cui/ui/eventassigndialog.ui"
44 || rUIFile == u"cui/ui/fontfeaturesdialog.ui"
45 || rUIFile == u"cui/ui/formatcellsdialog.ui"
46 || rUIFile == u"cui/ui/formatnumberdialog.ui"
47 || rUIFile == u"cui/ui/gradientpage.ui"
48 || rUIFile == u"cui/ui/hatchpage.ui"
49 || rUIFile == u"cui/ui/hyperlinkdialog.ui"
50 || rUIFile == u"cui/ui/hyperlinkinternetpage.ui"
51 || rUIFile == u"cui/ui/hyperlinkmailpage.ui"
52 || rUIFile == u"cui/ui/imagetabpage.ui"
53 || rUIFile == u"cui/ui/linedialog.ui"
54 || rUIFile == u"cui/ui/lineendstabpage.ui"
55 || rUIFile == u"cui/ui/linestyletabpage.ui"
56 || rUIFile == u"cui/ui/linetabpage.ui"
57 || rUIFile == u"cui/ui/macroselectordialog.ui"
58 || rUIFile == u"cui/ui/numberingformatpage.ui"
59 || rUIFile == u"cui/ui/numberingoptionspage.ui"
60 || rUIFile == u"cui/ui/numberingpositionpage.ui"
61 || rUIFile == u"cui/ui/optlingupage.ui"
62 || rUIFile == u"cui/ui/pageformatpage.ui"
63 || rUIFile == u"cui/ui/paragalignpage.ui"
64 || rUIFile == u"cui/ui/paraindentspacing.ui"
65 || rUIFile == u"cui/ui/paratabspage.ui"
66 || rUIFile == u"cui/ui/password.ui"
67 || rUIFile == u"cui/ui/pastespecial.ui"
68 || rUIFile == u"cui/ui/patterntabpage.ui"
69 || rUIFile == u"cui/ui/pickbulletpage.ui"
70 || rUIFile == u"cui/ui/pickgraphicpage.ui"
71 || rUIFile == u"cui/ui/picknumberingpage.ui"
72 || rUIFile == u"cui/ui/pickoutlinepage.ui"
73 || rUIFile == u"cui/ui/positionpage.ui"
74 || rUIFile == u"cui/ui/positionsizedialog.ui"
75 || rUIFile == u"cui/ui/possizetabpage.ui"
76 || rUIFile == u"cui/ui/rotationtabpage.ui"
77 || rUIFile == u"cui/ui/shadowtabpage.ui"
78 || rUIFile == u"cui/ui/slantcornertabpage.ui"
79 || rUIFile == u"cui/ui/spinbox.ui"
80 || rUIFile == u"cui/ui/queryduplicatedialog.ui"
81 || rUIFile == u"cui/ui/similaritysearchdialog.ui"
82 || rUIFile == u"cui/ui/specialcharacters.ui"
83 || rUIFile == u"cui/ui/spellingdialog.ui"
84 || rUIFile == u"cui/ui/spelloptionsdialog.ui"
85 || rUIFile == u"cui/ui/splitcellsdialog.ui"
86 || rUIFile == u"cui/ui/textflowpage.ui"
87 || rUIFile == u"cui/ui/thesaurus.ui"
88 || rUIFile == u"cui/ui/transparencytabpage.ui"
89 || rUIFile == u"cui/ui/twolinespage.ui"
90 || rUIFile == u"cui/ui/widgettestdialog.ui"
91 || rUIFile == u"cui/ui/qrcodegen.ui"
92 // formula
93 || rUIFile == u"formula/ui/formuladialog.ui"
94 || rUIFile == u"formula/ui/functionpage.ui"
95 || rUIFile == u"formula/ui/parameter.ui"
96 || rUIFile == u"formula/ui/structpage.ui"
97 // scalc
98 || rUIFile == u"modules/scalc/ui/advancedfilterdialog.ui"
99 || rUIFile == u"modules/scalc/ui/analysisofvariancedialog.ui"
100 || rUIFile == u"modules/scalc/ui/chardialog.ui"
101 || rUIFile == u"modules/scalc/ui/chisquaretestdialog.ui"
102 || rUIFile == u"modules/scalc/ui/colwidthdialog.ui"
103 || rUIFile == u"modules/scalc/ui/conditionaleasydialog.ui"
104 || rUIFile == u"modules/scalc/ui/condformatmanager.ui"
105 || rUIFile == u"modules/scalc/ui/correlationdialog.ui"
106 || rUIFile == u"modules/scalc/ui/covariancedialog.ui"
107 || rUIFile == u"modules/scalc/ui/datafielddialog.ui"
108 || rUIFile == u"modules/scalc/ui/datafieldoptionsdialog.ui"
109 || rUIFile == u"modules/scalc/ui/definename.ui"
110 || rUIFile == u"modules/scalc/ui/deletecells.ui"
111 || rUIFile == u"modules/scalc/ui/deletecontents.ui"
112 || rUIFile == u"modules/scalc/ui/descriptivestatisticsdialog.ui"
113 || rUIFile == u"modules/scalc/ui/erroralerttabpage.ui"
114 || rUIFile == u"modules/scalc/ui/exponentialsmoothingdialog.ui"
115 || rUIFile == u"modules/scalc/ui/formatcellsdialog.ui"
116 || rUIFile == u"modules/scalc/ui/fourieranalysisdialog.ui"
117 || rUIFile == u"modules/scalc/ui/goalseekdlg.ui"
118 || rUIFile == u"modules/scalc/ui/groupdialog.ui"
119 || rUIFile == u"modules/scalc/ui/headerfootercontent.ui"
120 || rUIFile == u"modules/scalc/ui/headerfooterdialog.ui"
121 || rUIFile == u"modules/scalc/ui/insertcells.ui"
122 || rUIFile == u"modules/scalc/ui/managenamesdialog.ui"
123 || rUIFile == u"modules/scalc/ui/movingaveragedialog.ui"
124 || rUIFile == u"modules/scalc/ui/optimalcolwidthdialog.ui"
125 || rUIFile == u"modules/scalc/ui/optimalrowheightdialog.ui"
126 || rUIFile == u"modules/scalc/ui/pagetemplatedialog.ui"
127 || rUIFile == u"modules/scalc/ui/paratemplatedialog.ui"
128 || rUIFile == u"modules/scalc/ui/pivotfielddialog.ui"
129 || rUIFile == u"modules/scalc/ui/pivottablelayoutdialog.ui"
130 || rUIFile == u"modules/scalc/ui/regressiondialog.ui"
131 || rUIFile == u"modules/scalc/ui/rowheightdialog.ui"
132 || rUIFile == u"modules/scalc/ui/samplingdialog.ui"
133 || rUIFile == u"modules/scalc/ui/selectsource.ui"
134 || rUIFile == u"modules/scalc/ui/sheetprintpage.ui"
135 || rUIFile == u"modules/scalc/ui/simplerefdialog.ui"
136 || rUIFile == u"modules/scalc/ui/sortcriteriapage.ui"
137 || rUIFile == u"modules/scalc/ui/sortdialog.ui"
138 || rUIFile == u"modules/scalc/ui/sortkey.ui"
139 || rUIFile == u"modules/scalc/ui/sortoptionspage.ui"
140 || rUIFile == u"modules/scalc/ui/sparklinedialog.ui"
141 || rUIFile == u"modules/scalc/ui/standardfilterdialog.ui"
142 || rUIFile == u"modules/scalc/ui/textimportcsv.ui"
143 || rUIFile == u"modules/scalc/ui/ttestdialog.ui"
144 || rUIFile == u"modules/scalc/ui/ungroupdialog.ui"
145 || rUIFile == u"modules/scalc/ui/validationcriteriapage.ui"
146 || rUIFile == u"modules/scalc/ui/validationdialog.ui"
147 || rUIFile == u"modules/scalc/ui/validationhelptabpage.ui"
148 || rUIFile == u"modules/scalc/ui/warnautocorrect.ui"
149 || rUIFile == u"modules/scalc/ui/ztestdialog.ui"
150 // schart
151 || rUIFile == u"modules/schart/ui/attributedialog.ui"
152 || rUIFile == u"modules/schart/ui/charttypedialog.ui"
153 || rUIFile == u"modules/schart/ui/datarangedialog.ui"
154 || rUIFile == u"modules/schart/ui/insertaxisdlg.ui"
155 || rUIFile == u"modules/schart/ui/inserttitledlg.ui"
156 || rUIFile == u"modules/schart/ui/smoothlinesdlg.ui"
157 || rUIFile == u"modules/schart/ui/steppedlinesdlg.ui"
158 || rUIFile == u"modules/schart/ui/tp_ChartType.ui"
159 || rUIFile == u"modules/schart/ui/tp_DataSource.ui"
160 || rUIFile == u"modules/schart/ui/tp_RangeChooser.ui"
161 || rUIFile == u"modules/schart/ui/tp_Trendline.ui"
162 || rUIFile == u"modules/schart/ui/wizelementspage.ui"
163 // sdraw
164 || rUIFile == u"modules/sdraw/ui/drawchardialog.ui"
165 || rUIFile == u"modules/sdraw/ui/drawpagedialog.ui"
166 || rUIFile == u"modules/sdraw/ui/drawparadialog.ui"
167 // simpress
168 || rUIFile == u"modules/simpress/ui/headerfooterdialog.ui"
169 || rUIFile == u"modules/simpress/ui/headerfootertab.ui"
170 // swriter
171 || rUIFile == u"modules/swriter/ui/bulletsandnumbering.ui"
172 || rUIFile == u"modules/swriter/ui/captionoptions.ui"
173 || rUIFile == u"modules/swriter/ui/characterproperties.ui"
174 || rUIFile == u"modules/swriter/ui/charurlpage.ui"
175 || rUIFile == u"modules/swriter/ui/columndialog.ui"
176 || rUIFile == u"modules/swriter/ui/columnpage.ui"
177 || rUIFile == u"modules/swriter/ui/contentcontroldlg.ui"
178 || rUIFile == u"modules/swriter/ui/contentcontrollistitemdlg.ui"
179 || rUIFile == u"modules/swriter/ui/dropcapspage.ui"
180 || rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui"
181 || rUIFile == u"modules/swriter/ui/endnotepage.ui"
182 || rUIFile == u"modules/swriter/ui/footendnotedialog.ui"
183 || rUIFile == u"modules/swriter/ui/footnoteareapage.ui"
184 || rUIFile == u"modules/swriter/ui/footnotepage.ui"
185 || rUIFile == u"modules/swriter/ui/footnotesendnotestabpage.ui"
186 || rUIFile == u"modules/swriter/ui/formatsectiondialog.ui"
187 || rUIFile == u"modules/swriter/ui/formattablepage.ui"
188 || rUIFile == u"modules/swriter/ui/framedialog.ui"
189 || rUIFile == u"modules/swriter/ui/frmaddpage.ui"
190 || rUIFile == u"modules/swriter/ui/frmurlpage.ui"
191 || rUIFile == u"modules/swriter/ui/frmtypepage.ui"
192 || rUIFile == u"modules/swriter/ui/indentpage.ui"
193 || rUIFile == u"modules/swriter/ui/indexentry.ui"
194 || rUIFile == u"modules/swriter/ui/inforeadonlydialog.ui"
195 || rUIFile == u"modules/swriter/ui/insertbreak.ui"
196 || rUIFile == u"modules/swriter/ui/insertcaption.ui"
197 || rUIFile == u"modules/swriter/ui/insertsectiondialog.ui"
198 || rUIFile == u"modules/swriter/ui/linenumbering.ui"
199 || rUIFile == u"modules/swriter/ui/newuserindexdialog.ui"
200 || rUIFile == u"modules/swriter/ui/numparapage.ui"
201 || rUIFile == u"modules/swriter/ui/objectdialog.ui"
202 || rUIFile == u"modules/swriter/ui/pagenumberdlg.ui"
203 || rUIFile == u"modules/swriter/ui/paradialog.ui"
204 || rUIFile == u"modules/swriter/ui/picturedialog.ui"
205 || rUIFile == u"modules/swriter/ui/picturepage.ui"
206 || rUIFile == u"modules/swriter/ui/sectionpage.ui"
207 || rUIFile == u"modules/swriter/ui/sortdialog.ui"
208 || rUIFile == u"modules/swriter/ui/splittable.ui"
209 || rUIFile == u"modules/swriter/ui/tablecolumnpage.ui"
210 || rUIFile == u"modules/swriter/ui/tableproperties.ui"
211 || rUIFile == u"modules/swriter/ui/tabletextflowpage.ui"
212 || rUIFile == u"modules/swriter/ui/templatedialog1.ui"
213 || rUIFile == u"modules/swriter/ui/templatedialog2.ui"
214 || rUIFile == u"modules/swriter/ui/templatedialog8.ui"
215 || rUIFile == u"modules/swriter/ui/textgridpage.ui"
216 || rUIFile == u"modules/swriter/ui/titlepage.ui"
217 || rUIFile == u"modules/swriter/ui/tocdialog.ui"
218 || rUIFile == u"modules/swriter/ui/tocentriespage.ui"
219 || rUIFile == u"modules/swriter/ui/tocindexpage.ui"
220 || rUIFile == u"modules/swriter/ui/tocstylespage.ui"
221 || rUIFile == u"modules/swriter/ui/translationdialog.ui"
222 || rUIFile == u"modules/swriter/ui/watermarkdialog.ui"
223 || rUIFile == u"modules/swriter/ui/wordcount.ui"
224 || rUIFile == u"modules/swriter/ui/wrappage.ui"
225 // sfx
226 || rUIFile == u"sfx/ui/cmisinfopage.ui"
227 || rUIFile == u"sfx/ui/custominfopage.ui"
228 || rUIFile == u"sfx/ui/descriptioninfopage.ui"
229 || rUIFile == u"sfx/ui/documentinfopage.ui"
230 || rUIFile == u"sfx/ui/documentpropertiesdialog.ui"
231 || rUIFile == u"sfx/ui/editdurationdialog.ui"
232 || rUIFile == u"svx/ui/headfootformatpage.ui"
233 || rUIFile == u"sfx/ui/linefragment.ui"
234 || rUIFile == u"sfx/ui/managestylepage.ui"
235 || rUIFile == u"sfx/ui/password.ui"
236 // svx
237 || rUIFile == u"svx/ui/acceptrejectchangesdialog.ui"
238 || rUIFile == u"svx/ui/accessibilitycheckdialog.ui"
239 || rUIFile == u"svx/ui/accessibilitycheckentry.ui"
240 || rUIFile == u"svx/ui/compressgraphicdialog.ui"
241 || rUIFile == u"svx/ui/findreplacedialog.ui"
242 || rUIFile == u"svx/ui/fontworkgallerydialog.ui"
243 || rUIFile == u"svx/ui/headfootformatpage.ui"
244 || rUIFile == u"svx/ui/redlinecontrol.ui"
245 || rUIFile == u"svx/ui/redlinefilterpage.ui"
246 || rUIFile == u"svx/ui/redlineviewpage.ui"
247 || rUIFile == u"svx/ui/themecoloreditdialog.ui"
248 || rUIFile == u"svx/ui/themedialog.ui"
249 // uui
250 || rUIFile == u"uui/ui/macrowarnmedium.ui"
251 // vcl
252 || rUIFile == u"vcl/ui/wizard.ui"
253 // filter
254 || rUIFile == u"filter/ui/pdfgeneralpage.ui"
255 || rUIFile == u"filter/ui/pdflinkspage.ui"
256 || rUIFile == u"filter/ui/pdfoptionsdialog.ui"
257 || rUIFile == u"filter/ui/pdfsecuritypage.ui"
258 || rUIFile == u"filter/ui/pdfsignpage.ui"
259 || rUIFile == u"filter/ui/pdfuserinterfacepage.ui"
260 || rUIFile == u"filter/ui/pdfviewpage.ui"
261 || rUIFile == u"filter/ui/warnpdfdialog.ui"
262 // writerperfect
263 || rUIFile == u"writerperfect/ui/exportepub.ui"
264 // xmlsec
265 || rUIFile == u"xmlsec/ui/certgeneral.ui"
266 || rUIFile == u"xmlsec/ui/certpage.ui"
267 || rUIFile == u"xmlsec/ui/digitalsignaturesdialog.ui"
268 || rUIFile == u"xmlsec/ui/viewcertdialog.ui"
271 return true;
274 const char* pEnabledDialog = getenv("SAL_JSDIALOG_ENABLE");
275 if (pEnabledDialog)
277 OUString sAllEnabledDialogs(pEnabledDialog, strlen(pEnabledDialog), RTL_TEXTENCODING_UTF8);
278 std::vector<OUString> aEnabledDialogsVector
279 = comphelper::string::split(sAllEnabledDialogs, ':');
280 for (const auto& rDialog : aEnabledDialogsVector)
282 if (rUIFile == rDialog)
283 return true;
287 return false;
290 bool isBuilderEnabledForPopup(std::u16string_view rUIFile)
292 if (// scalc
293 rUIFile == u"modules/scalc/ui/filterdropdown.ui"
294 || rUIFile == u"modules/scalc/ui/filterlist.ui"
295 || rUIFile == u"modules/scalc/ui/filtersubdropdown.ui"
296 || rUIFile == u"modules/scalc/ui/floatingborderstyle.ui"
297 || rUIFile == u"modules/scalc/ui/floatinglinestyle.ui"
298 // svt
299 || rUIFile == u"svt/ui/datewindow.ui"
300 || rUIFile == u"svt/ui/linewindow.ui"
301 // svx
302 || rUIFile == u"svx/ui/colorwindow.ui"
303 || rUIFile == u"svx/ui/currencywindow.ui"
304 || rUIFile == u"svx/ui/floatingareastyle.ui"
305 || rUIFile == u"svx/ui/floatinglineend.ui"
306 || rUIFile == u"svx/ui/floatinglineproperty.ui"
307 || rUIFile == u"svx/ui/floatinglinestyle.ui"
308 || rUIFile == u"svx/ui/fontworkalignmentcontrol.ui"
309 || rUIFile == u"svx/ui/fontworkcharacterspacingcontrol.ui"
310 || rUIFile == u"svx/ui/numberingwindow.ui"
311 || rUIFile == u"svx/ui/paralinespacingcontrol.ui"
312 || rUIFile == u"svx/ui/textcharacterspacingcontrol.ui"
313 || rUIFile == u"svx/ui/textunderlinecontrol.ui")
314 return true;
316 return false;
319 bool isBuilderEnabledForSidebar(std::u16string_view rUIFile)
321 if (// scalc
322 rUIFile == u"modules/scalc/ui/functionpanel.ui"
323 || rUIFile == u"modules/scalc/ui/navigatorpanel.ui"
324 || rUIFile == u"modules/scalc/ui/sidebaralignment.ui"
325 || rUIFile == u"modules/scalc/ui/sidebarcellappearance.ui"
326 || rUIFile == u"modules/scalc/ui/sidebarnumberformat.ui"
327 // schart
328 || rUIFile == u"modules/schart/ui/sidebaraxis.ui"
329 || rUIFile == u"modules/schart/ui/sidebarelements.ui"
330 || rUIFile == u"modules/schart/ui/sidebarerrorbar.ui"
331 || rUIFile == u"modules/schart/ui/sidebarseries.ui"
332 || rUIFile == u"modules/schart/ui/sidebartype.ui"
333 // simpress
334 || rUIFile == u"modules/simpress/ui/customanimationfragment.ui"
335 || rUIFile == u"modules/simpress/ui/customanimationspanel.ui"
336 || rUIFile == u"modules/simpress/ui/layoutpanel.ui"
337 || rUIFile == u"modules/simpress/ui/masterpagepanel.ui"
338 || rUIFile == u"modules/simpress/ui/masterpagepanelall.ui"
339 || rUIFile == u"modules/simpress/ui/masterpagepanelrecent.ui"
340 || rUIFile == u"modules/simpress/ui/navigatorpanel.ui"
341 || rUIFile == u"modules/simpress/ui/sidebarslidebackground.ui"
342 || rUIFile == u"modules/simpress/ui/slidetransitionspanel.ui"
343 || rUIFile == u"modules/simpress/ui/tabledesignpanel.ui"
344 // smath
345 || rUIFile == u"modules/smath/ui/sidebarelements_math.ui"
346 || rUIFile == u"modules/smath/ui/sidebarproperties_math.ui"
347 // swriter
348 || rUIFile == u"modules/swriter/ui/managechangessidebar.ui"
349 || rUIFile == u"modules/swriter/ui/navigatorpanel.ui"
350 || rUIFile == u"modules/swriter/ui/pagefooterpanel.ui"
351 || rUIFile == u"modules/swriter/ui/pageformatpanel.ui"
352 || rUIFile == u"modules/swriter/ui/pageheaderpanel.ui"
353 || rUIFile == u"modules/swriter/ui/pagestylespanel.ui"
354 || rUIFile == u"modules/swriter/ui/sidebarstylepresets.ui"
355 || rUIFile == u"modules/swriter/ui/sidebartableedit.ui"
356 || rUIFile == u"modules/swriter/ui/sidebartheme.ui"
357 || rUIFile == u"modules/swriter/ui/sidebarwrap.ui"
358 // sfx
359 || rUIFile == u"sfx/ui/panel.ui"
360 || rUIFile == u"sfx/ui/templatepanel.ui"
361 // svx
362 || rUIFile == u"svx/ui/defaultshapespanel.ui"
363 || rUIFile == u"svx/ui/inspectortextpanel.ui"
364 || rUIFile == u"svx/ui/mediaplayback.ui"
365 || rUIFile == u"svx/ui/sidebararea.ui"
366 || rUIFile == u"svx/ui/sidebareffect.ui"
367 || rUIFile == u"svx/ui/sidebarempty.ui"
368 || rUIFile == u"svx/ui/sidebarfontwork.ui"
369 || rUIFile == u"svx/ui/sidebargallery.ui"
370 || rUIFile == u"svx/ui/sidebargraphic.ui"
371 || rUIFile == u"svx/ui/sidebarline.ui"
372 || rUIFile == u"svx/ui/sidebarlists.ui"
373 || rUIFile == u"svx/ui/sidebarparagraph.ui"
374 || rUIFile == u"svx/ui/sidebarpossize.ui"
375 || rUIFile == u"svx/ui/sidebarshadow.ui"
376 || rUIFile == u"svx/ui/sidebarstylespanel.ui"
377 || rUIFile == u"svx/ui/sidebartextpanel.ui")
378 return true;
380 return false;
383 bool isInterimBuilderEnabledForNotebookbar(std::u16string_view rUIFile)
385 if (rUIFile == u"modules/scalc/ui/numberbox.ui"
386 || rUIFile == u"svx/ui/fontnamebox.ui"
387 || rUIFile == u"svx/ui/fontsizebox.ui"
388 || rUIFile == u"svx/ui/stylespreview.ui")
390 return true;
393 return false;
397 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */