LibreOffice Module sc (master) 1
validate.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifdef SC_DLLIMPLEMENTATION
21#undef SC_DLLIMPLEMENTATION
22#endif
23
24#include <com/sun/star/sheet/TableValidationVisibility.hpp>
25#include <comphelper/string.hxx>
26#include <svl/stritem.hxx>
27#include <svl/eitem.hxx>
28#include <svl/intitem.hxx>
29#include <sfx2/app.hxx>
30#include <o3tl/string_view.hxx>
31
32#include <scresid.hxx>
33#include <strings.hrc>
34
35#include <stringutil.hxx>
36#include <validat.hxx>
37#include <validate.hxx>
38#include <compiler.hxx>
39#include <formula/opcode.hxx>
40
41// cell range picker
42#include <tabvwsh.hxx>
43#include <sfx2/viewfrm.hxx>
44#include <sfx2/childwin.hxx>
45#include <reffact.hxx>
46#include <comphelper/lok.hxx>
47
48
49#define IS_MOBILE (comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() && SfxViewShell::Current()->isLOKMobilePhone())
50
51/* Position indexes for "Allow" list box.
52 They do not map directly to ScValidationMode and can safely be modified to
53 change the order of the list box entries. */
54#define SC_VALIDDLG_ALLOW_ANY 0
55#define SC_VALIDDLG_ALLOW_WHOLE 1
56#define SC_VALIDDLG_ALLOW_DECIMAL 2
57#define SC_VALIDDLG_ALLOW_DATE 3
58#define SC_VALIDDLG_ALLOW_TIME 4
59#define SC_VALIDDLG_ALLOW_RANGE 5
60#define SC_VALIDDLG_ALLOW_LIST 6
61#define SC_VALIDDLG_ALLOW_TEXTLEN 7
62#define SC_VALIDDLG_ALLOW_CUSTOM 8
63
64/* Position indexes for "Data" list box.
65 They do not map directly to ScConditionMode and can safely be modified to
66 change the order of the list box entries. */
67#define SC_VALIDDLG_DATA_EQUAL 0
68#define SC_VALIDDLG_DATA_LESS 1
69#define SC_VALIDDLG_DATA_GREATER 2
70#define SC_VALIDDLG_DATA_EQLESS 3
71#define SC_VALIDDLG_DATA_EQGREATER 4
72#define SC_VALIDDLG_DATA_NOTEQUAL 5
73#define SC_VALIDDLG_DATA_VALIDRANGE 6
74#define SC_VALIDDLG_DATA_INVALIDRANGE 7
75#define SC_VALIDDLG_DATA_DIRECT 8
76
77namespace ValidListType = css::sheet::TableValidationVisibility;
78
80 FID_VALID_LISTTYPE, FID_VALID_LISTTYPE,
81 FID_VALID_MODE, FID_VALID_ERRTEXT
82>);
83
85 ScTabViewShell *pTabViewSh)
86 : ScValidationDlgBase(pParent,
87 "modules/scalc/ui/validationdialog.ui", "ValidationDialog", pArgSet, nullptr)
88 , m_pTabVwSh(pTabViewSh)
89 , m_sValuePageId("criteria")
90 , m_bOwnRefHdlr(false)
91 , m_bRefInputting(false)
92 , m_xHBox(m_xBuilder->weld_container("refinputbox"))
93{
95 AddTabPage("inputhelp", ScTPValidationHelp::Create, nullptr);
96 AddTabPage("erroralert", ScTPValidationError::Create, nullptr);
97
98 if (IS_MOBILE)
99 {
100 m_xBuilder->weld_button("cancel")->hide();
101 m_xBuilder->weld_button("help")->hide();
102 }
103}
104
105void ScValidationDlg::EndDialog(int nResponse)
106{
107 // tdf#155708 - do not close, just hide validation window if we click in another sheet
108 if (nResponse == nCloseResponseToJustHide && getDialog()->get_visible())
109 {
110 getDialog()->hide();
111 return;
112 }
113 // tdf#137215 ensure original modality of true is restored before dialog loop ends
114 if (m_bOwnRefHdlr)
115 RemoveRefDlg(true);
117}
118
120{
121 if (m_bOwnRefHdlr)
122 RemoveRefDlg(false);
123}
124
126{
127 if ( rRange.aStart != rRange.aEnd )
128 if ( ScValidationDlg *pValidationDlg = GetValidationDlg() )
129 if( m_pRefEdit )
130 pValidationDlg->RefInputStart( m_pRefEdit );
131
132 if ( m_pRefEdit )
133 {
134 OUString aStr(rRange.Format(rDoc, ScRefFlags::RANGE_ABS_3D, rDoc.GetAddressConvention()));
136 }
137}
138
140{
142
143 if ( ScValidationDlg *pValidationDlg = GetValidationDlg() )
144 if( m_pRefEdit )
145 {
146 pValidationDlg->RefInputDone();
147 }
148}
149
151{
152 ScValidationDlg *pValidationDlg = GetValidationDlg();
153 if (!pValidationDlg)
154 return;
155
156 weld::Container* pNewParent = pValidationDlg->get_refinput_shrink_parent();
157 if (pEdit == m_pRefEdit && pNewParent != m_pRefEditParent)
158 {
159 m_xRefGrid->move(m_pRefEdit->GetWidget(), pNewParent);
160 m_pRefEditParent = pNewParent;
161 }
162
163 if (pNewParent != m_pBtnRefParent)
164 {
165 // if Edit SetParent but button not, the tab order will be
166 // incorrect, so move button anyway, and restore
167 // parent later in order to restore the tab order. But
168 // hide it if it's moved but unwanted.
169 m_xRefGrid->move(m_xBtnRef->GetWidget(), pNewParent);
170 m_xBtnRef->GetWidget()->set_visible(pButton == m_xBtnRef.get());
171 m_pBtnRefParent = pNewParent;
172 }
173
174 pNewParent->show();
175}
176
178{
179 if (ScValidationDlg *pValidationDlg = GetValidationDlg())
180 {
181 weld::Container* pOldParent = pValidationDlg->get_refinput_shrink_parent();
182
183 if (m_pRefEdit && m_pRefEditParent != m_xRefGrid.get())
184 {
185 pOldParent->move(m_pRefEdit->GetWidget(), m_xRefGrid.get());
187 }
188
189 if (m_pBtnRefParent != m_xRefGrid.get())
190 {
191 pOldParent->move(m_xBtnRef->GetWidget(), m_xRefGrid.get());
192 m_xBtnRef->GetWidget()->show();
194 }
195
196 pOldParent->hide();
197 ScViewData& rViewData = pValidationDlg->GetTabViewShell()->GetViewData();
198 SCTAB nCurTab = rViewData.GetTabNo();
199 SCTAB nRefTab = rViewData.GetRefTabNo();
200 // If RefInput switched to a different sheet from the data sheet,
201 // switch back: fdo#53920
202 if ( nCurTab != nRefTab )
203 {
204 rViewData.GetViewShell()->SetTabNo( nRefTab );
205 }
206 }
207
210}
211
212namespace {
213
215sal_uInt16 lclGetPosFromValMode( ScValidationMode eValMode )
216{
217 sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY;
218 switch( eValMode )
219 {
220 case SC_VALID_ANY: nLbPos = SC_VALIDDLG_ALLOW_ANY; break;
221 case SC_VALID_WHOLE: nLbPos = SC_VALIDDLG_ALLOW_WHOLE; break;
222 case SC_VALID_DECIMAL: nLbPos = SC_VALIDDLG_ALLOW_DECIMAL; break;
223 case SC_VALID_DATE: nLbPos = SC_VALIDDLG_ALLOW_DATE; break;
224 case SC_VALID_TIME: nLbPos = SC_VALIDDLG_ALLOW_TIME; break;
225 case SC_VALID_TEXTLEN: nLbPos = SC_VALIDDLG_ALLOW_TEXTLEN; break;
226 case SC_VALID_LIST: nLbPos = SC_VALIDDLG_ALLOW_RANGE; break;
227 case SC_VALID_CUSTOM: nLbPos = SC_VALIDDLG_ALLOW_CUSTOM; break;
228 default: OSL_FAIL( "lclGetPosFromValMode - unknown validity mode" );
229 }
230 return nLbPos;
231}
232
234ScValidationMode lclGetValModeFromPos( sal_uInt16 nLbPos )
235{
237 switch( nLbPos )
238 {
239 case SC_VALIDDLG_ALLOW_ANY: eValMode = SC_VALID_ANY; break;
240 case SC_VALIDDLG_ALLOW_WHOLE: eValMode = SC_VALID_WHOLE; break;
241 case SC_VALIDDLG_ALLOW_DECIMAL: eValMode = SC_VALID_DECIMAL; break;
242 case SC_VALIDDLG_ALLOW_DATE: eValMode = SC_VALID_DATE; break;
243 case SC_VALIDDLG_ALLOW_TIME: eValMode = SC_VALID_TIME; break;
244 case SC_VALIDDLG_ALLOW_RANGE: eValMode = SC_VALID_LIST; break;
245 case SC_VALIDDLG_ALLOW_LIST: eValMode = SC_VALID_LIST; break;
246 case SC_VALIDDLG_ALLOW_TEXTLEN: eValMode = SC_VALID_TEXTLEN; break;
247 case SC_VALIDDLG_ALLOW_CUSTOM: eValMode = SC_VALID_CUSTOM; break;
248 default: OSL_FAIL( "lclGetValModeFromPos - invalid list box position" );
249 }
250 return eValMode;
251}
252
254sal_uInt16 lclGetPosFromCondMode( ScConditionMode eCondMode )
255{
256 sal_uInt16 nLbPos = SC_VALIDDLG_DATA_EQUAL;
257 switch( eCondMode )
258 {
259 case ScConditionMode::NONE: // may occur in old XML files after Excel import
261 case ScConditionMode::Less: nLbPos = SC_VALIDDLG_DATA_LESS; break;
269 default: OSL_FAIL( "lclGetPosFromCondMode - unknown condition mode" );
270 }
271 return nLbPos;
272}
273
275ScConditionMode lclGetCondModeFromPos( sal_uInt16 nLbPos )
276{
278 switch( nLbPos )
279 {
280 case SC_VALIDDLG_DATA_EQUAL: eCondMode = ScConditionMode::Equal; break;
281 case SC_VALIDDLG_DATA_LESS: eCondMode = ScConditionMode::Less; break;
282 case SC_VALIDDLG_DATA_GREATER: eCondMode = ScConditionMode::Greater; break;
283 case SC_VALIDDLG_DATA_EQLESS: eCondMode = ScConditionMode::EqLess; break;
288 case SC_VALIDDLG_DATA_DIRECT: eCondMode = ScConditionMode::Direct; break;
289 default: OSL_FAIL( "lclGetCondModeFromPos - invalid list box position" );
290 }
291 return eCondMode;
292}
293
298void lclGetFormulaFromStringList( OUString& rFmlaStr, std::u16string_view rStringList, sal_Unicode cFmlaSep )
299{
300 rFmlaStr.clear();
301 if (!rStringList.empty())
302 {
303 sal_Int32 nIdx {0};
304 do
305 {
306 OUString aToken {o3tl::getToken(rStringList, 0, '\n', nIdx )};
307 ScGlobal::AddQuotes( aToken, '"' );
308 rFmlaStr = ScGlobal::addToken(rFmlaStr, aToken, cFmlaSep);
309 }
310 while (nIdx>0);
311 }
312 if( rFmlaStr.isEmpty() )
313 rFmlaStr = "\"\"";
314}
315
321bool lclGetStringListFromFormula( OUString& rStringList, const OUString& rFmlaStr, sal_Unicode cFmlaSep )
322{
323 static constexpr OUStringLiteral aQuotes( u"\"\"" );
324
325 rStringList.clear();
326 bool bIsStringList = !rFmlaStr.isEmpty();
327 bool bTokenAdded = false;
328
329 for ( sal_Int32 nStringIx = 0; bIsStringList && nStringIx>=0; )
330 {
331 OUString aToken( ScStringUtil::GetQuotedToken(rFmlaStr, 0, aQuotes, cFmlaSep, nStringIx ) );
332 aToken = comphelper::string::strip(aToken, ' ');
333 if( !aToken.isEmpty() ) // ignore empty tokens, i.e. "a";;"b"
334 {
335 bIsStringList = ScGlobal::IsQuoted( aToken, '"' );
336 if( bIsStringList )
337 {
338 ScGlobal::EraseQuotes( aToken, '"' );
339 rStringList = ScGlobal::addToken(rStringList, aToken, '\n', 1, bTokenAdded);
340 bTokenAdded = true;
341 }
342 }
343 }
344
345 return bIsStringList;
346}
347
348} // namespace
349
351 : SfxTabPage(pPage, pController, "modules/scalc/ui/validationcriteriapage.ui",
352 "ValidationCriteriaPage", &rArgSet)
353 , maStrMin(ScResId(SCSTR_VALID_MINIMUM))
354 , maStrMax(ScResId(SCSTR_VALID_MAXIMUM))
355 , maStrValue(ScResId(SCSTR_VALID_VALUE))
356 , maStrFormula(ScResId(SCSTR_VALID_FORMULA))
357 , maStrRange(ScResId(SCSTR_VALID_RANGE))
358 , maStrList(ScResId(SCSTR_VALID_LIST))
359 , m_pRefEdit(nullptr)
360 , m_xLbAllow(m_xBuilder->weld_combo_box("allow"))
361 , m_xCbAllow(m_xBuilder->weld_check_button("allowempty"))
362 , m_xCbShow(m_xBuilder->weld_check_button("showlist"))
363 , m_xCbSort(m_xBuilder->weld_check_button("sortascend"))
364 , m_xFtValue(m_xBuilder->weld_label("valueft"))
365 , m_xLbValue(m_xBuilder->weld_combo_box("data"))
366 , m_xFtMin(m_xBuilder->weld_label("minft"))
367 , m_xMinGrid(m_xBuilder->weld_widget("mingrid"))
368 , m_xEdMin(new formula::RefEdit(m_xBuilder->weld_entry("min")))
369 , m_xEdList(m_xBuilder->weld_text_view("minlist"))
370 , m_xFtMax(m_xBuilder->weld_label("maxft"))
371 , m_xEdMax(new formula::RefEdit(m_xBuilder->weld_entry("max")))
372 , m_xFtHint(m_xBuilder->weld_label("hintft"))
373 , m_xBtnRef(new formula::RefButton(m_xBuilder->weld_button("validref")))
374 , m_xRefGrid(m_xBuilder->weld_container("refgrid"))
375 , m_pRefEditParent(m_xRefGrid.get())
376 , m_pBtnRefParent(m_xRefGrid.get())
377{
378 m_xEdMin->SetReferences(nullptr, m_xFtMin.get());
379
380 Size aSize(m_xEdList->get_approximate_digit_width() * 40,
381 m_xEdList->get_height_rows(10));
382 m_xEdList->set_size_request(aSize.Width(), aSize.Height());
383 m_xEdMax->SetReferences(nullptr, m_xFtMax.get());
384
385 m_xBtnRef->SetClickHdl(LINK(this, ScTPValidationValue, ClickHdl));
386
387 //lock in the max size initial config
388 aSize = m_xContainer->get_preferred_size();
389 m_xContainer->set_size_request(aSize.Width(), aSize.Height());
390
391 Init();
392
393 // list separator in formulas
394 OUString aListSep = ::ScCompiler::GetNativeSymbol( ocSep );
395 OSL_ENSURE( aListSep.getLength() == 1, "ScTPValidationValue::ScTPValidationValue - list separator error" );
396 mcFmlaSep = aListSep.getLength() ? aListSep[0] : ';';
397 m_xBtnRef->GetWidget()->hide(); // cell range picker
398}
399
401{
402 m_xEdMin.reset();
403 m_xEdMax.reset();
404 m_xBtnRef.reset();
405}
406
408{
409 m_xLbAllow->connect_changed( LINK( this, ScTPValidationValue, SelectHdl ) );
410 m_xLbValue->connect_changed( LINK( this, ScTPValidationValue, SelectHdl ) );
411 m_xCbShow->connect_toggled( LINK( this, ScTPValidationValue, CheckHdl ) );
412
413 // cell range picker
414 m_xEdMin->SetGetFocusHdl( LINK( this, ScTPValidationValue, EditSetFocusHdl ) );
415 m_xEdMin->SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillEditFocusHdl ) );
416 m_xEdMax->SetGetFocusHdl( LINK( this, ScTPValidationValue, EditSetFocusHdl ) );
417 m_xEdMax->SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillEditFocusHdl ) );
418 m_xBtnRef->SetLoseFocusHdl( LINK( this, ScTPValidationValue, KillButtonFocusHdl ) );
419
420 m_xLbAllow->set_active( SC_VALIDDLG_ALLOW_ANY );
421 m_xLbValue->set_active( SC_VALIDDLG_DATA_EQUAL );
422
423 SelectHdl( *m_xLbAllow );
424 CheckHdl( *m_xCbShow );
425}
426
427std::unique_ptr<SfxTabPage> ScTPValidationValue::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rArgSet)
428{
429 return std::make_unique<ScTPValidationValue>(pPage, pController, *rArgSet);
430}
431
433{
434 sal_uInt16 nLbPos = SC_VALIDDLG_ALLOW_ANY;
435 if( const SfxUInt16Item* pItem = rArgSet->GetItemIfSet( FID_VALID_MODE ) )
436 nLbPos = lclGetPosFromValMode( static_cast< ScValidationMode >( pItem->GetValue() ) );
437 m_xLbAllow->set_active( nLbPos );
438
439 nLbPos = SC_VALIDDLG_DATA_EQUAL;
440 if( const SfxUInt16Item* pItem = rArgSet->GetItemIfSet( FID_VALID_CONDMODE ) )
441 nLbPos = lclGetPosFromCondMode( static_cast< ScConditionMode >( pItem->GetValue() ) );
442 m_xLbValue->set_active( nLbPos );
443
444 // *** check boxes ***
445 bool bCheck = true;
446 if( const SfxBoolItem* pItem = rArgSet->GetItemIfSet( FID_VALID_BLANK ) )
447 bCheck = pItem->GetValue();
448 m_xCbAllow->set_active( bCheck );
449
450 sal_Int32 nListType = ValidListType::UNSORTED;
451 if( const SfxInt16Item* pItem = rArgSet->GetItemIfSet( FID_VALID_LISTTYPE ) )
452 nListType = pItem->GetValue();
453 m_xCbShow->set_active( nListType != ValidListType::INVISIBLE );
454 m_xCbSort->set_active( nListType == ValidListType::SORTEDASCENDING );
455
456 // *** formulas ***
457 OUString aFmlaStr;
458 if ( const SfxStringItem* pItem = rArgSet->GetItemIfSet( FID_VALID_VALUE1 ) )
459 aFmlaStr = pItem->GetValue();
460 SetFirstFormula( aFmlaStr );
461
462 aFmlaStr.clear();
463 if ( const SfxStringItem* pItem = rArgSet->GetItemIfSet( FID_VALID_VALUE2 ) )
464 aFmlaStr = pItem->GetValue();
465 SetSecondFormula( aFmlaStr );
466
467 SelectHdl( *m_xLbAllow );
468 CheckHdl( *m_xCbShow );
469}
470
472{
473 sal_Int16 nListType = m_xCbShow->get_active() ?
474 (m_xCbSort->get_active() ? ValidListType::SORTEDASCENDING : ValidListType::UNSORTED) :
475 ValidListType::INVISIBLE;
476
477 const sal_Int32 nLbPos = m_xLbAllow->get_active();
478 bool bCustom = (nLbPos == SC_VALIDDLG_ALLOW_CUSTOM);
479 ScConditionMode eCondMode = bCustom ?
480 ScConditionMode::Direct : lclGetCondModeFromPos( m_xLbValue->get_active() );
481
482 rArgSet->Put( SfxUInt16Item( FID_VALID_MODE, sal::static_int_cast<sal_uInt16>(
483 lclGetValModeFromPos( nLbPos ) ) ) );
484 rArgSet->Put( SfxUInt16Item( FID_VALID_CONDMODE, sal::static_int_cast<sal_uInt16>( eCondMode ) ) );
485 rArgSet->Put( SfxStringItem( FID_VALID_VALUE1, GetFirstFormula() ) );
486 rArgSet->Put( SfxStringItem( FID_VALID_VALUE2, GetSecondFormula() ) );
487 rArgSet->Put( SfxBoolItem( FID_VALID_BLANK, m_xCbAllow->get_active() ) );
488 rArgSet->Put( SfxInt16Item( FID_VALID_LISTTYPE, nListType ) );
489 return true;
490}
491
493{
494 OUString aFmlaStr;
495 if( m_xLbAllow->get_active() == SC_VALIDDLG_ALLOW_LIST )
496 lclGetFormulaFromStringList( aFmlaStr, m_xEdList->get_text(), mcFmlaSep );
497 else
498 aFmlaStr = m_xEdMin->GetText();
499 return aFmlaStr;
500}
501
503{
504 return m_xEdMax->GetText();
505}
506
507void ScTPValidationValue::SetFirstFormula( const OUString& rFmlaStr )
508{
509 // try if formula is a string list, validation mode must already be set
510 OUString aStringList;
511 if( (m_xLbAllow->get_active() == SC_VALIDDLG_ALLOW_RANGE) &&
512 lclGetStringListFromFormula( aStringList, rFmlaStr, mcFmlaSep ) )
513 {
514 m_xEdList->set_text( aStringList );
515 m_xEdMin->SetText( OUString() );
516 // change validation mode to string list
517 m_xLbAllow->set_active( SC_VALIDDLG_ALLOW_LIST );
518 }
519 else
520 {
521 m_xEdMin->SetText( rFmlaStr );
522 m_xEdList->set_text( OUString() );
523 }
524}
525
526void ScTPValidationValue::SetSecondFormula( const OUString& rFmlaStr )
527{
528 m_xEdMax->SetText( rFmlaStr );
529}
530
532{
533 return dynamic_cast<ScValidationDlg*>(GetDialogController());
534}
535
537{
538 ScValidationDlg *pValidationDlg = GetValidationDlg();
539 if( !pValidationDlg )
540 return;
541
542 if( !pValidationDlg->SetupRefDlg() )
543 return;
544
545 pValidationDlg->SetHandler( this );
550
551 weld::Label* pLabel = nullptr;
552
553 if (m_xEdMax->GetWidget()->get_visible())
554 {
555 m_pRefEdit = m_xEdMax.get();
556 pLabel = m_xFtMax.get();
557 }
558 else if (m_xEdMin->GetWidget()->get_visible())
559 {
560 m_pRefEdit = m_xEdMin.get();
561 pLabel = m_xFtMin.get();
562 }
563
566
567 if( m_pRefEdit )
568 m_pRefEdit->SetReferences( pValidationDlg, pLabel );
569
570 m_xBtnRef->SetReferences( pValidationDlg, m_pRefEdit );
571}
572
573void ScTPValidationValue::RemoveRefDlg(bool bRestoreModal)
574{
575 ScValidationDlg *pValidationDlg = GetValidationDlg();
576 if( !pValidationDlg )
577 return;
578
579 if( !pValidationDlg->RemoveRefDlg(bRestoreModal) )
580 return;
581
582 pValidationDlg->SetHandler( nullptr );
583 pValidationDlg->SetSetRefHdl( nullptr );
584 pValidationDlg->SetSetActHdl( nullptr );
585 pValidationDlg->SetRefInputStartPreHdl( nullptr );
586 pValidationDlg->SetRefInputDonePostHdl( nullptr );
587
588 if( m_pRefEdit )
589 m_pRefEdit->SetReferences( nullptr, nullptr );
590 m_pRefEdit = nullptr;
591
592 m_xBtnRef->SetReferences( nullptr, nullptr );
593}
594
596{
597 const sal_Int32 nPos = m_xLbAllow->get_active();
598
600 {
601 SetupRefDlg();
602 }
603}
604
605IMPL_LINK( ScTPValidationValue, KillEditFocusHdl, formula::RefEdit&, rWnd, void )
606{
607 if (&rWnd != m_pRefEdit)
608 return;
609 if( ScValidationDlg *pValidationDlg = GetValidationDlg() )
610 {
611 if (pValidationDlg->IsChildFocus() && !pValidationDlg->IsRefInputting())
612 {
613 if( ( !m_pRefEdit || !m_pRefEdit->GetWidget()->has_focus()) && !m_xBtnRef->GetWidget()->has_focus() )
614 {
615 RemoveRefDlg(true);
616 }
617 }
618 }
619}
620
621IMPL_LINK( ScTPValidationValue, KillButtonFocusHdl, formula::RefButton&, rWnd, void )
622{
623 if( &rWnd != m_xBtnRef.get())
624 return;
625 if( ScValidationDlg *pValidationDlg = GetValidationDlg() )
626 if (pValidationDlg->IsChildFocus() && !pValidationDlg->IsRefInputting())
627 if( ( !m_pRefEdit || !m_pRefEdit->GetWidget()->has_focus()) && !m_xBtnRef->GetWidget()->has_focus() )
628 {
629 RemoveRefDlg(true);
630 }
631}
632
634{
635 const sal_Int32 nLbPos = m_xLbAllow->get_active();
636 bool bEnable = (nLbPos != SC_VALIDDLG_ALLOW_ANY);
637 bool bRange = (nLbPos == SC_VALIDDLG_ALLOW_RANGE);
638 bool bList = (nLbPos == SC_VALIDDLG_ALLOW_LIST);
639 bool bCustom = (nLbPos == SC_VALIDDLG_ALLOW_CUSTOM);
640
641 m_xCbAllow->set_sensitive( bEnable ); // Empty cell
642 m_xFtValue->set_sensitive( bEnable );
643 m_xLbValue->set_sensitive( bEnable );
644 m_xFtMin->set_sensitive( bEnable );
645 m_xEdMin->GetWidget()->set_sensitive( bEnable );
646 m_xEdList->set_sensitive( bEnable );
647 m_xFtMax->set_sensitive( bEnable );
648 m_xEdMax->GetWidget()->set_sensitive( bEnable );
649
650 bool bShowMax = false;
651
652 if( bRange )
653 m_xFtMin->set_label( maStrRange );
654 else if( bList )
655 m_xFtMin->set_label( maStrList );
656 else if( bCustom )
657 m_xFtMin->set_label( maStrFormula );
658 else
659 {
660 switch( m_xLbValue->get_active() )
661 {
663 case SC_VALIDDLG_DATA_NOTEQUAL: m_xFtMin->set_label( maStrValue ); break;
664
666 case SC_VALIDDLG_DATA_EQLESS: m_xFtMin->set_label( maStrMax ); break;
667
669 case SC_VALIDDLG_DATA_INVALIDRANGE: bShowMax = true;
670 [[fallthrough]];
672 case SC_VALIDDLG_DATA_EQGREATER: m_xFtMin->set_label( maStrMin ); break;
673
674 default:
675 OSL_FAIL( "ScTPValidationValue::SelectHdl - unknown condition mode" );
676 }
677 }
678
679 m_xCbShow->set_visible( bRange || bList );
680 m_xCbSort->set_visible( bRange || bList );
681 m_xFtValue->set_visible( !bRange && !bList && !bCustom);
682 m_xLbValue->set_visible( !bRange && !bList && !bCustom );
683 m_xEdMin->GetWidget()->set_visible( !bList );
684 m_xEdList->set_visible( bList );
685 m_xMinGrid->set_vexpand( bList );
686 m_xFtMax->set_visible( bShowMax );
687 m_xEdMax->GetWidget()->set_visible( bShowMax );
688 m_xFtHint->set_visible( bRange );
689 m_xBtnRef->GetWidget()->set_visible( bRange ); // cell range picker
690}
691
693{
694 m_xCbSort->set_sensitive( m_xCbShow->get_active() );
695}
696
697// Input Help Page
698
700 : SfxTabPage(pPage, pController, "modules/scalc/ui/validationhelptabpage.ui", "ValidationHelpTabPage", &rArgSet)
701 , m_xTsbHelp(m_xBuilder->weld_check_button("tsbhelp"))
702 , m_xEdtTitle(m_xBuilder->weld_entry("title"))
703 , m_xEdInputHelp(m_xBuilder->weld_text_view("inputhelp_text"))
704{
705 m_xEdInputHelp->set_size_request(m_xEdInputHelp->get_approximate_digit_width() * 40, m_xEdInputHelp->get_height_rows(13));
706}
707
709{
710}
711
712std::unique_ptr<SfxTabPage> ScTPValidationHelp::Create(weld::Container* pPage, weld::DialogController* pController,
713 const SfxItemSet* rArgSet)
714{
715 return std::make_unique<ScTPValidationHelp>(pPage, pController, *rArgSet);
716}
717
719{
720 if ( const SfxBoolItem* pItem = rArgSet->GetItemIfSet( FID_VALID_SHOWHELP ) )
721 m_xTsbHelp->set_state( pItem->GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
722 else
723 m_xTsbHelp->set_state( TRISTATE_FALSE );
724
725 if ( const SfxStringItem* pItem = rArgSet->GetItemIfSet( FID_VALID_HELPTITLE ) )
726 m_xEdtTitle->set_text( pItem->GetValue() );
727 else
728 m_xEdtTitle->set_text( OUString() );
729
730 if ( const SfxStringItem* pItem = rArgSet->GetItemIfSet( FID_VALID_HELPTEXT ) )
731 m_xEdInputHelp->set_text( pItem->GetValue() );
732 else
733 m_xEdInputHelp->set_text( OUString() );
734}
735
737{
738 rArgSet->Put( SfxBoolItem( FID_VALID_SHOWHELP, m_xTsbHelp->get_state() == TRISTATE_TRUE ) );
739 rArgSet->Put( SfxStringItem( FID_VALID_HELPTITLE, m_xEdtTitle->get_text() ) );
740 rArgSet->Put( SfxStringItem( FID_VALID_HELPTEXT, m_xEdInputHelp->get_text() ) );
741
742 return true;
743}
744
745// Error Alert Page
746
748 const SfxItemSet& rArgSet)
749
750 : SfxTabPage ( pPage, pController,
751 "modules/scalc/ui/erroralerttabpage.ui", "ErrorAlertTabPage",
752 &rArgSet )
753 , m_xTsbShow(m_xBuilder->weld_check_button("tsbshow"))
754 , m_xLbAction(m_xBuilder->weld_combo_box("actionCB"))
755 , m_xBtnSearch(m_xBuilder->weld_button("browseBtn"))
756 , m_xEdtTitle(m_xBuilder->weld_entry("erroralert_title"))
757 , m_xFtError(m_xBuilder->weld_label("errormsg_label"))
758 , m_xEdError(m_xBuilder->weld_text_view("errorMsg"))
759{
760 m_xEdError->set_size_request(m_xEdError->get_approximate_digit_width() * 40, m_xEdError->get_height_rows(12));
761 Init();
762}
763
765{
766}
767
769{
770 m_xLbAction->connect_changed(LINK(this, ScTPValidationError, SelectActionHdl));
771 m_xBtnSearch->connect_clicked(LINK( this, ScTPValidationError, ClickSearchHdl));
772
773 m_xLbAction->set_active(0);
774
775 SelectActionHdl(*m_xLbAction);
776}
777
778std::unique_ptr<SfxTabPage> ScTPValidationError::Create(weld::Container* pPage, weld::DialogController* pController,
779 const SfxItemSet* rArgSet)
780{
781 return std::make_unique<ScTPValidationError>(pPage, pController, *rArgSet);
782}
783
785{
786 if ( const SfxBoolItem* pItem = rArgSet->GetItemIfSet( FID_VALID_SHOWERR ) )
787 m_xTsbShow->set_state( pItem->GetValue() ? TRISTATE_TRUE : TRISTATE_FALSE );
788 else
789 m_xTsbShow->set_state( TRISTATE_TRUE ); // check by default
790
791 if ( const SfxUInt16Item* pItem = rArgSet->GetItemIfSet( FID_VALID_ERRSTYLE ) )
792 m_xLbAction->set_active( pItem->GetValue() );
793 else
794 m_xLbAction->set_active( 0 );
795
796 if ( const SfxStringItem* pItem = rArgSet->GetItemIfSet( FID_VALID_ERRTITLE ) )
797 m_xEdtTitle->set_text( pItem->GetValue() );
798 else
799 m_xEdtTitle->set_text( OUString() );
800
801 if ( const SfxStringItem* pItem = rArgSet->GetItemIfSet( FID_VALID_ERRTEXT ) )
802 m_xEdError->set_text( pItem->GetValue() );
803 else
804 m_xEdError->set_text( OUString() );
805
806 SelectActionHdl(*m_xLbAction);
807}
808
810{
811 rArgSet->Put( SfxBoolItem( FID_VALID_SHOWERR, m_xTsbShow->get_state() == TRISTATE_TRUE ) );
812 rArgSet->Put( SfxUInt16Item( FID_VALID_ERRSTYLE, m_xLbAction->get_active() ) );
813 rArgSet->Put( SfxStringItem( FID_VALID_ERRTITLE, m_xEdtTitle->get_text() ) );
814 rArgSet->Put( SfxStringItem( FID_VALID_ERRTEXT, m_xEdError->get_text() ) );
815
816 return true;
817}
818
820{
821 ScValidErrorStyle eStyle = static_cast<ScValidErrorStyle>(m_xLbAction->get_active());
822 bool bMacro = ( eStyle == SC_VALERR_MACRO );
823
824 m_xBtnSearch->set_sensitive( bMacro );
825 m_xFtError->set_sensitive( !bMacro );
826 m_xEdError->set_sensitive( !bMacro );
827}
828
830{
831 // Use static SfxApplication method to bring up selector dialog for
832 // choosing a script
833 OUString aScriptURL = SfxApplication::ChooseScript(GetFrameWeld());
834
835 if ( !aScriptURL.isEmpty() )
836 {
837 m_xEdtTitle->set_text( aScriptURL );
838 }
839}
840
842{
843 ScTabViewShell *pTabViewShell = GetTabViewShell();
844
845 if( !pTabViewShell ) return false;
846
847 sal_uInt16 nId = SLOTID;
848 SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
849 SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId );
850
851 if (pWnd && pWnd->GetController().get() != this) pWnd = nullptr;
852
853 SC_MOD()->SetRefDialog( nId, pWnd == nullptr );
854
855 return true;
856}
857
859{
860 ScTabViewShell *pTabViewShell = GetTabViewShell();
861
862 if( !pTabViewShell ) return false;
863
864 sal_uInt16 nId = SLOTID;
865 SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame();
866 if (rViewFrm.GetChildWindow(nId))
867 {
868 DoClose( nId );
869 }
870 return true;
871}
872
874{
875 if ( m_bOwnRefHdlr ) return false;
876 if( EnterRefMode() )
877 {
878 SetModal( false );
879 m_bOwnRefHdlr = true;
880 return EnterRefStatus();
881 }
882
883 return false;
884}
885
886bool ScValidationDlg::RemoveRefDlg( bool bRestoreModal /* = true */ )
887{
888 bool bVisLock = false;
889 bool bFreeWindowLock = false;
890
891 ScTabViewShell *pTabVwSh = GetTabViewShell();
892
893 if( !pTabVwSh ) return false;
894
895 if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame().GetChildWindow( SID_VALIDITY_REFERENCE ) )
896 {
897 bVisLock = static_cast<ScValidityRefChildWin*>(pWnd)->LockVisible( true );
898 bFreeWindowLock = static_cast<ScValidityRefChildWin*>(pWnd)->LockFreeWindow( true );
899 }
900
901 if ( !m_bOwnRefHdlr ) return false;
902 if( LeaveRefStatus() && LeaveRefMode() )
903 {
904 m_bOwnRefHdlr = false;
905
906 if( bRestoreModal )
907 {
908 SetModal( true );
909 }
910 }
911
912 if ( SfxChildWindow* pWnd = pTabVwSh->GetViewFrame().GetChildWindow( SID_VALIDITY_REFERENCE ) )
913 {
914 static_cast<ScValidityRefChildWin*>(pWnd)->LockVisible( bVisLock );
915 static_cast<ScValidityRefChildWin*>(pWnd)->LockFreeWindow( bFreeWindowLock );
916 }
917
918 return true;
919}
920
922{
923 SetupRefDlg();
924}
925
927{
928 return m_xDialog->has_toplevel_focus();
929}
930
931/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XExecutableDialog > m_xDialog
const int nCloseResponseToJustHide
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:492
static SC_DLLPUBLIC bool IsQuoted(std::u16string_view rString, sal_Unicode cQuote)
Returns true, if the first and last character of the string is cQuote.
Definition: global.cxx:715
static SC_DLLPUBLIC void EraseQuotes(OUString &rString, sal_Unicode cQuote, bool bUnescapeEmbedded=true)
Erases the character cQuote from rString, if it exists at beginning AND end.
Definition: global.cxx:733
static SC_DLLPUBLIC OUString addToken(std::u16string_view rTokenList, std::u16string_view rToken, sal_Unicode cSep, sal_Int32 nSepCount=1, bool bForceSep=false)
Adds the string rToken to rTokenList, using a list separator character.
Definition: global.cxx:705
static SC_DLLPUBLIC void AddQuotes(OUString &rString, sal_Unicode cQuote, bool bEscapeEmbedded=true)
Inserts the character cQuote at beginning and end of rString.
Definition: global.cxx:720
OUString Format(const ScDocument &rDocument, ScRefFlags nFlags=ScRefFlags::ZERO, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, bool bFullAddressNotation=false) const
Returns string with formatted cell range from aStart to aEnd, according to provided address conventio...
Definition: address.cxx:2170
ScAddress aEnd
Definition: address.hxx:498
ScAddress aStart
Definition: address.hxx:497
void(ScRefHandlerCaller::* PINPUTSTARTDLTYPE)(formula::RefEdit *pEdit, const formula::RefButton *pButton)
Definition: validate.hxx:51
void SetRefInputDonePostHdl(void(ScRefHandlerCaller::*pNewHdl)())
Definition: validate.hxx:68
void SetSetActHdl(PCOMMONHDLTYPE pNewHdl)
Definition: validate.hxx:58
void SetRefInputStartPreHdl(PINPUTSTARTDLTYPE pNewHdl)
Definition: validate.hxx:67
void(ScRefHandlerCaller::* PFUNCSETREFHDLTYPE)(const ScRange &, const ScDocument &)
Definition: validate.hxx:49
void(ScRefHandlerCaller::* PCOMMONHDLTYPE)()
Definition: validate.hxx:50
void SetHandler(ScRefHandlerCaller *pNewHandler)
Definition: validate.hxx:63
void SetSetRefHdl(PFUNCSETREFHDLTYPE pNewHdl)
Definition: validate.hxx:53
bool EnterRefMode()
Definition: anyrefdg.cxx:588
bool DoClose(sal_uInt16 nId)
Definition: anyrefdg.cxx:714
bool LeaveRefMode()
Definition: anyrefdg.cxx:651
static OUString SC_DLLPUBLIC GetQuotedToken(const OUString &rIn, sal_Int32 nToken, const OUString &rQuotedPairs, sal_Unicode cTok, sal_Int32 &rIndex)
Definition: stringutil.cxx:350
std::unique_ptr< weld::Button > m_xBtnSearch
Definition: validate.hxx:257
virtual void Reset(const SfxItemSet *rArgSet) override
Definition: validate.cxx:784
std::unique_ptr< weld::ComboBox > m_xLbAction
Definition: validate.hxx:256
virtual ~ScTPValidationError() override
Definition: validate.cxx:764
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rArgSet)
Definition: validate.cxx:778
virtual bool FillItemSet(SfxItemSet *rArgSet) override
Definition: validate.cxx:809
std::unique_ptr< weld::TextView > m_xEdError
Definition: validate.hxx:260
ScTPValidationError(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet)
Definition: validate.cxx:747
std::unique_ptr< weld::CheckButton > m_xTsbShow
Definition: validate.hxx:255
std::unique_ptr< weld::Entry > m_xEdtTitle
Definition: validate.hxx:258
std::unique_ptr< weld::TextView > m_xEdInputHelp
Definition: validate.hxx:241
virtual ~ScTPValidationHelp() override
Definition: validate.cxx:708
std::unique_ptr< weld::CheckButton > m_xTsbHelp
Definition: validate.hxx:239
virtual bool FillItemSet(SfxItemSet *rArgSet) override
Definition: validate.cxx:736
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rArgSet)
Definition: validate.cxx:712
std::unique_ptr< weld::Entry > m_xEdtTitle
Definition: validate.hxx:240
ScTPValidationHelp(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet)
Definition: validate.cxx:699
virtual void Reset(const SfxItemSet *rArgSet) override
Definition: validate.cxx:718
The tab page "Criteria" from the Validation dialog.
Definition: validate.hxx:77
virtual bool FillItemSet(SfxItemSet *rArgSet) override
Definition: validate.cxx:471
void SetFirstFormula(const OUString &rFmlaStr)
Definition: validate.cxx:507
ScTPValidationValue(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet)
Definition: validate.cxx:350
formula::RefEdit * m_pRefEdit
Definition: validate.hxx:114
void RefInputDonePostHdl()
Definition: validate.cxx:177
std::unique_ptr< weld::Container > m_xRefGrid
Definition: validate.hxx:130
virtual void Reset(const SfxItemSet *rArgSet) override
Definition: validate.cxx:432
std::unique_ptr< formula::RefEdit > m_xEdMin
Definition: validate.hxx:124
std::unique_ptr< weld::CheckButton > m_xCbAllow
Definition: validate.hxx:117
weld::Container * m_pBtnRefParent
Definition: validate.hxx:133
std::unique_ptr< formula::RefButton > m_xBtnRef
Hint text for cell range validity.
Definition: validate.hxx:129
sal_Unicode mcFmlaSep
Definition: validate.hxx:107
virtual ~ScTPValidationValue() override
Definition: validate.cxx:400
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rArgSet)
Definition: validate.cxx:427
void SetReferenceHdl(const ScRange &, const ScDocument &)
Definition: validate.cxx:125
std::unique_ptr< formula::RefEdit > m_xEdMax
Definition: validate.hxx:127
weld::Container * m_pRefEditParent
Definition: validate.hxx:132
std::unique_ptr< weld::CheckButton > m_xCbShow
Allow blank cells.
Definition: validate.hxx:118
void RefInputStartPreHdl(formula::RefEdit *pEdit, const formula::RefButton *pButton)
Definition: validate.cxx:150
std::unique_ptr< weld::CheckButton > m_xCbSort
Show selection list in cell.
Definition: validate.hxx:119
void SetSecondFormula(const OUString &rFmlaStr)
Definition: validate.cxx:526
OUString GetFirstFormula() const
Definition: validate.cxx:492
std::unique_ptr< weld::Label > m_xFtMin
Definition: validate.hxx:122
std::unique_ptr< weld::Label > m_xFtMax
Entries for explicit list.
Definition: validate.hxx:126
ScValidationDlg * GetValidationDlg()
Definition: validate.cxx:531
std::unique_ptr< weld::ComboBox > m_xLbValue
Definition: validate.hxx:121
static const WhichRangesContainer pValueRanges
Definition: validate.hxx:78
OUString GetSecondFormula() const
Definition: validate.cxx:502
void RemoveRefDlg(bool bRestoreModal)
Definition: validate.cxx:573
std::unique_ptr< weld::TextView > m_xEdList
Definition: validate.hxx:125
std::unique_ptr< weld::ComboBox > m_xLbAllow
Definition: validate.hxx:116
SC_DLLPUBLIC void SetTabNo(SCTAB nTab, bool bNew=false, bool bExtendSelection=false, bool bSameTabButMoved=false)
Definition: tabview3.cxx:1819
The "Validity" tab dialog.
Definition: validate.hxx:149
ScTabViewShell * GetTabViewShell()
Definition: validate.hxx:169
bool RemoveRefDlg(bool bRestoreModal)
Definition: validate.cxx:886
virtual ~ScValidationDlg() override
Definition: validate.cxx:119
virtual void EndDialog(int nResponse) override
Definition: validate.cxx:105
bool LeaveRefStatus()
Definition: validate.cxx:858
bool IsChildFocus() const
Definition: validate.cxx:926
bool SetupRefDlg()
Definition: validate.cxx:873
ScValidationDlg(weld::Window *pParent, const SfxItemSet *pArgSet, ScTabViewShell *pTabViewSh)
Definition: validate.cxx:84
void SetModal(bool bModal)
Definition: validate.hxx:177
OUString m_sValuePageId
Definition: validate.hxx:153
bool EnterRefStatus()
Definition: validate.cxx:841
weld::Container * get_refinput_shrink_parent()
Definition: validate.hxx:196
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
ScTabViewShell * GetViewShell() const
Definition: viewdata.hxx:357
SCTAB GetRefTabNo() const
Definition: viewdata.hxx:392
static OUString ChooseScript(weld::Window *pParent)
std::shared_ptr< SfxDialogController > & GetController()
virtual void EndDialog(int nResponse)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void AddTabPage(const OUString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
SfxOkDialogController * GetDialogController() const
SfxChildWindow * GetChildWindow(sal_uInt16)
SfxViewFrame & GetViewFrame() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static const OUString & GetNativeSymbol(OpCode eOp)
weld::Entry * GetWidget() const
void SetReferences(IControlReferenceHandler *pDlg, weld::Label *pLabelWidget)
void SetRefString(const OUString &rStr)
virtual void move(weld::Widget *pWidget, weld::Container *pNewParent)=0
virtual void show()=0
virtual void hide()=0
virtual bool has_focus() const=0
ScConditionMode
Definition: conditio.hxx:60
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
TRISTATE_FALSE
TRISTATE_TRUE
sal_uInt16 nPos
aStr
OString strip(const OString &rIn, char c)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
static constexpr auto Items
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Reference< XNameAccess > m_xContainer
sal_Int16 nId
ocSep
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
#define SC_MOD()
Definition: scmod.hxx:247
sal_uInt16 sal_Unicode
sal_Int16 SCTAB
Definition: types.hxx:22
ScValidationMode
Definition: validat.hxx:41
@ SC_VALID_TEXTLEN
Definition: validat.hxx:47
@ SC_VALID_TIME
Definition: validat.hxx:46
@ SC_VALID_CUSTOM
Definition: validat.hxx:49
@ SC_VALID_ANY
Definition: validat.hxx:42
@ SC_VALID_DECIMAL
Definition: validat.hxx:44
@ SC_VALID_WHOLE
Definition: validat.hxx:43
@ SC_VALID_DATE
Definition: validat.hxx:45
@ SC_VALID_LIST
Definition: validat.hxx:48
ScValidErrorStyle
Definition: validat.hxx:53
@ SC_VALERR_MACRO
Definition: validat.hxx:57
#define SC_VALIDDLG_DATA_LESS
Definition: validate.cxx:68
#define SC_VALIDDLG_ALLOW_TIME
Definition: validate.cxx:58
#define SC_VALIDDLG_DATA_VALIDRANGE
Definition: validate.cxx:73
#define SC_VALIDDLG_DATA_NOTEQUAL
Definition: validate.cxx:72
#define SC_VALIDDLG_DATA_EQLESS
Definition: validate.cxx:70
#define SC_VALIDDLG_DATA_DIRECT
Definition: validate.cxx:75
#define IS_MOBILE
Definition: validate.cxx:49
#define SC_VALIDDLG_ALLOW_DATE
Definition: validate.cxx:57
#define SC_VALIDDLG_ALLOW_DECIMAL
Definition: validate.cxx:56
#define SC_VALIDDLG_ALLOW_RANGE
Definition: validate.cxx:59
#define SC_VALIDDLG_DATA_INVALIDRANGE
Definition: validate.cxx:74
#define SC_VALIDDLG_ALLOW_TEXTLEN
Definition: validate.cxx:61
#define SC_VALIDDLG_ALLOW_ANY
Definition: validate.cxx:54
IMPL_LINK(ScTPValidationValue, KillEditFocusHdl, formula::RefEdit &, rWnd, void)
Definition: validate.cxx:605
IMPL_LINK_NOARG(ScTPValidationValue, EditSetFocusHdl, formula::RefEdit &, void)
Definition: validate.cxx:595
#define SC_VALIDDLG_DATA_GREATER
Definition: validate.cxx:69
#define SC_VALIDDLG_ALLOW_WHOLE
Definition: validate.cxx:55
#define SC_VALIDDLG_DATA_EQGREATER
Definition: validate.cxx:71
#define SC_VALIDDLG_ALLOW_LIST
Definition: validate.cxx:60
#define SC_VALIDDLG_DATA_EQUAL
Definition: validate.cxx:67
#define SC_VALIDDLG_ALLOW_CUSTOM
Definition: validate.cxx:62
const std::u16string_view aStringList[]
Definition: vbadialog.cxx:31