LibreOffice Module sc (master)  1
fmtuno.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 #include <sal/config.h>
21 
22 #include <osl/diagnose.h>
23 #include <svl/style.hxx>
24 #include <vcl/svapp.hxx>
25 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
26 #include <com/sun/star/sheet/ConditionOperator2.hpp>
27 #include <com/sun/star/sheet/ValidationAlertStyle.hpp>
28 #include <com/sun/star/sheet/ValidationType.hpp>
29 #include <com/sun/star/sheet/TableValidationVisibility.hpp>
30 
31 #include <fmtuno.hxx>
32 #include <miscuno.hxx>
33 #include <validat.hxx>
34 #include <document.hxx>
35 #include <unonames.hxx>
36 #include <tokenarray.hxx>
37 #include <tokenuno.hxx>
38 #include <stylehelper.hxx>
39 
40 using namespace ::com::sun::star;
41 using namespace ::formula;
42 
43 // map only for PropertySetInfo
44 
46 {
47  static const SfxItemPropertyMapEntry aValidatePropertyMap_Impl[] =
48  {
50  {OUString(SC_UNONAME_ERRMESS), 0, cppu::UnoType<OUString>::get(), 0, 0},
51  {OUString(SC_UNONAME_ERRTITLE), 0, cppu::UnoType<OUString>::get(), 0, 0},
52  {OUString(SC_UNONAME_IGNOREBL), 0, cppu::UnoType<bool>::get(), 0, 0},
53  {OUString(SC_UNONAME_INPMESS), 0, cppu::UnoType<OUString>::get(), 0, 0},
54  {OUString(SC_UNONAME_INPTITLE), 0, cppu::UnoType<OUString>::get(), 0, 0},
55  {OUString(SC_UNONAME_SHOWERR), 0, cppu::UnoType<bool>::get(), 0, 0},
56  {OUString(SC_UNONAME_SHOWINP), 0, cppu::UnoType<bool>::get(), 0, 0},
57  {OUString(SC_UNONAME_SHOWLIST), 0, cppu::UnoType<sal_Int16>::get(), 0, 0},
59  { OUString(), 0, css::uno::Type(), 0, 0 }
60  };
61  return aValidatePropertyMap_Impl;
62 }
63 
64 SC_SIMPLE_SERVICE_INFO( ScTableConditionalEntry, "ScTableConditionalEntry", "com.sun.star.sheet.TableConditionalEntry" )
65 SC_SIMPLE_SERVICE_INFO( ScTableConditionalFormat, "ScTableConditionalFormat", "com.sun.star.sheet.TableConditionalFormat" )
66 SC_SIMPLE_SERVICE_INFO( ScTableValidationObj, "ScTableValidationObj", "com.sun.star.sheet.TableValidation" )
67 
69 {
70  sal_Int32 eOper = sheet::ConditionOperator2::NONE;
71  switch (eMode)
72  {
73  case ScConditionMode::Equal: eOper = sheet::ConditionOperator2::EQUAL; break;
74  case ScConditionMode::Less: eOper = sheet::ConditionOperator2::LESS; break;
75  case ScConditionMode::Greater: eOper = sheet::ConditionOperator2::GREATER; break;
76  case ScConditionMode::EqLess: eOper = sheet::ConditionOperator2::LESS_EQUAL; break;
77  case ScConditionMode::EqGreater: eOper = sheet::ConditionOperator2::GREATER_EQUAL; break;
78  case ScConditionMode::NotEqual: eOper = sheet::ConditionOperator2::NOT_EQUAL; break;
79  case ScConditionMode::Between: eOper = sheet::ConditionOperator2::BETWEEN; break;
80  case ScConditionMode::NotBetween: eOper = sheet::ConditionOperator2::NOT_BETWEEN; break;
82  case ScConditionMode::Duplicate: eOper = sheet::ConditionOperator2::DUPLICATE; break;
83  default:
84  {
85  // added to avoid warnings
86  }
87  }
88  return eOper;
89 }
90 
91 static sheet::ConditionOperator lcl_ConditionModeToOperator( ScConditionMode eMode )
92 {
93  sheet::ConditionOperator eOper = sheet::ConditionOperator_NONE;
94  switch (eMode)
95  {
96  case ScConditionMode::Equal: eOper = sheet::ConditionOperator_EQUAL; break;
97  case ScConditionMode::Less: eOper = sheet::ConditionOperator_LESS; break;
98  case ScConditionMode::Greater: eOper = sheet::ConditionOperator_GREATER; break;
99  case ScConditionMode::EqLess: eOper = sheet::ConditionOperator_LESS_EQUAL; break;
100  case ScConditionMode::EqGreater: eOper = sheet::ConditionOperator_GREATER_EQUAL; break;
101  case ScConditionMode::NotEqual: eOper = sheet::ConditionOperator_NOT_EQUAL; break;
102  case ScConditionMode::Between: eOper = sheet::ConditionOperator_BETWEEN; break;
103  case ScConditionMode::NotBetween: eOper = sheet::ConditionOperator_NOT_BETWEEN; break;
104  case ScConditionMode::Direct: eOper = sheet::ConditionOperator_FORMULA; break;
105  default:
106  {
107  // added to avoid warnings
108  }
109  }
110  return eOper;
111 }
112 
113 static ScConditionMode lcl_ConditionOperatorToMode( sheet::ConditionOperator eOper )
114 {
116  switch (eOper)
117  {
118  case sheet::ConditionOperator_EQUAL: eMode = ScConditionMode::Equal; break;
119  case sheet::ConditionOperator_LESS: eMode = ScConditionMode::Less; break;
120  case sheet::ConditionOperator_GREATER: eMode = ScConditionMode::Greater; break;
121  case sheet::ConditionOperator_LESS_EQUAL: eMode = ScConditionMode::EqLess; break;
122  case sheet::ConditionOperator_GREATER_EQUAL: eMode = ScConditionMode::EqGreater; break;
123  case sheet::ConditionOperator_NOT_EQUAL: eMode = ScConditionMode::NotEqual; break;
124  case sheet::ConditionOperator_BETWEEN: eMode = ScConditionMode::Between; break;
125  case sheet::ConditionOperator_NOT_BETWEEN: eMode = ScConditionMode::NotBetween; break;
126  case sheet::ConditionOperator_FORMULA: eMode = ScConditionMode::Direct; break;
127  default:
128  {
129  // added to avoid warnings
130  }
131  }
132  return eMode;
133 }
134 
136  meGrammar1( FormulaGrammar::GRAM_UNSPECIFIED ),
137  meGrammar2( FormulaGrammar::GRAM_UNSPECIFIED ),
139 {
140 }
141 
143  const ScDocument* pDoc, sal_uLong nKey, SCTAB nTab, FormulaGrammar::Grammar eGrammar)
144 {
145  // read the entry from the document...
146 
147  if ( pDoc && nKey )
148  {
149  ScConditionalFormatList* pList = pDoc->GetCondFormList(nTab);
150  if (pList)
151  {
152  const ScConditionalFormat* pFormat = pList->GetFormat( nKey );
153  if (pFormat)
154  {
155  // During save to XML.
156  if (pDoc->IsInExternalReferenceMarking())
157  pFormat->MarkUsedExternalReferences();
158 
159  size_t nEntryCount = pFormat->size();
160  for (size_t i=0; i<nEntryCount; i++)
161  {
162  ScCondFormatEntryItem aItem;
163  const ScFormatEntry* pFrmtEntry = pFormat->GetEntry(i);
164  if(pFrmtEntry->GetType() != ScFormatEntry::Type::Condition &&
166  continue;
167 
168  const ScCondFormatEntry* pFormatEntry = static_cast<const ScCondFormatEntry*>(pFrmtEntry);
169  aItem.meMode = pFormatEntry->GetOperation();
170  aItem.maPos = pFormatEntry->GetValidSrcPos();
171  aItem.maExpr1 = pFormatEntry->GetExpression(aItem.maPos, 0, 0, eGrammar);
172  aItem.maExpr2 = pFormatEntry->GetExpression(aItem.maPos, 1, 0, eGrammar);
173  aItem.meGrammar1 = aItem.meGrammar2 = eGrammar;
174  aItem.maStyle = pFormatEntry->GetStyle();
175 
176  AddEntry_Impl(aItem);
177  }
178  }
179  }
180  }
181 }
182 
183 namespace {
184 
185 FormulaGrammar::Grammar lclResolveGrammar( FormulaGrammar::Grammar eExtGrammar, FormulaGrammar::Grammar eIntGrammar )
186 {
187  if( eExtGrammar != FormulaGrammar::GRAM_UNSPECIFIED )
188  return eExtGrammar;
189  OSL_ENSURE( eIntGrammar != FormulaGrammar::GRAM_UNSPECIFIED, "lclResolveGrammar - unspecified grammar, using GRAM_API" );
190  return (eIntGrammar == FormulaGrammar::GRAM_UNSPECIFIED) ? FormulaGrammar::GRAM_API : eIntGrammar;
191 }
192 
193 } // namespace
194 
196  ScDocument* pDoc, FormulaGrammar::Grammar eGrammar) const
197 {
198  // ScConditionalFormat = Core-Struktur, has to be empty
199 
200  OSL_ENSURE( rFormat.IsEmpty(), "FillFormat: format not empty" );
201 
202  for (const auto & i : maEntries)
203  {
205  i->GetData(aData);
206 
207  FormulaGrammar::Grammar eGrammar1 = lclResolveGrammar( eGrammar, aData.meGrammar1 );
208  FormulaGrammar::Grammar eGrammar2 = lclResolveGrammar( eGrammar, aData.meGrammar2 );
209 
210  ScCondFormatEntry* pCoreEntry = new ScCondFormatEntry( aData.meMode, aData.maExpr1, aData.maExpr2,
211  pDoc, aData.maPos, aData.maStyle, aData.maExprNmsp1, aData.maExprNmsp2, eGrammar1, eGrammar2 );
212 
213  if ( !aData.maPosStr.isEmpty() )
214  pCoreEntry->SetSrcString( aData.maPosStr );
215 
216  if ( aData.maTokens1.hasElements() )
217  {
218  ScTokenArray aTokenArray(pDoc);
219  if ( ScTokenConversion::ConvertToTokenArray(*pDoc, aTokenArray, aData.maTokens1) )
220  pCoreEntry->SetFormula1(aTokenArray);
221  }
222 
223  if ( aData.maTokens2.hasElements() )
224  {
225  ScTokenArray aTokenArray(pDoc);
226  if ( ScTokenConversion::ConvertToTokenArray(*pDoc, aTokenArray, aData.maTokens2) )
227  pCoreEntry->SetFormula2(aTokenArray);
228  }
229  rFormat.AddEntry( pCoreEntry );
230  }
231 }
232 
234 {
235 }
236 
238 {
240  maEntries.emplace_back(pNew);
241 }
242 
243 // XSheetConditionalFormat
244 
246 {
247  return nIndex < maEntries.size() ? maEntries[nIndex].get() : nullptr;
248 }
249 
251  const uno::Sequence<beans::PropertyValue >& aConditionalEntry )
252 {
253  SolarMutexGuard aGuard;
254  ScCondFormatEntryItem aEntry;
255  aEntry.meMode = ScConditionMode::NONE;
256 
257  for (const beans::PropertyValue& rProp : aConditionalEntry)
258  {
259  if ( rProp.Name == SC_UNONAME_OPERATOR )
260  {
261  sal_Int32 eOper = ScUnoHelpFunctions::GetEnumFromAny( rProp.Value );
262  aEntry.meMode = ScConditionEntry::GetModeFromApi( static_cast<sheet::ConditionOperator>(eOper) );
263  }
264  else if ( rProp.Name == SC_UNONAME_FORMULA1 )
265  {
266  OUString aStrVal;
267  uno::Sequence<sheet::FormulaToken> aTokens;
268  if ( rProp.Value >>= aStrVal )
269  aEntry.maExpr1 = aStrVal;
270  else if ( rProp.Value >>= aTokens )
271  {
272  aEntry.maExpr1.clear();
273  aEntry.maTokens1 = aTokens;
274  }
275  }
276  else if ( rProp.Name == SC_UNONAME_FORMULA2 )
277  {
278  OUString aStrVal;
279  uno::Sequence<sheet::FormulaToken> aTokens;
280  if ( rProp.Value >>= aStrVal )
281  aEntry.maExpr2 = aStrVal;
282  else if ( rProp.Value >>= aTokens )
283  {
284  aEntry.maExpr2.clear();
285  aEntry.maTokens2 = aTokens;
286  }
287  }
288  else if ( rProp.Name == SC_UNONAME_SOURCEPOS )
289  {
290  table::CellAddress aAddress;
291  if ( rProp.Value >>= aAddress )
292  aEntry.maPos = ScAddress( static_cast<SCCOL>(aAddress.Column), static_cast<SCROW>(aAddress.Row), aAddress.Sheet );
293  }
294  else if ( rProp.Name == SC_UNONAME_SOURCESTR )
295  {
296  OUString aStrVal;
297  if ( rProp.Value >>= aStrVal )
298  aEntry.maPosStr = aStrVal;
299  }
300  else if ( rProp.Name == SC_UNONAME_STYLENAME )
301  {
302  OUString aStrVal;
303  if ( rProp.Value >>= aStrVal )
305  aStrVal, SfxStyleFamily::Para );
306  }
307  else if ( rProp.Name == SC_UNONAME_FORMULANMSP1 )
308  {
309  OUString aStrVal;
310  if ( rProp.Value >>= aStrVal )
311  aEntry.maExprNmsp1 = aStrVal;
312  }
313  else if ( rProp.Name == SC_UNONAME_FORMULANMSP2 )
314  {
315  OUString aStrVal;
316  if ( rProp.Value >>= aStrVal )
317  aEntry.maExprNmsp2 = aStrVal;
318  }
319  else if ( rProp.Name == SC_UNONAME_GRAMMAR1 )
320  {
321  sal_Int32 nVal = 0;
322  if ( rProp.Value >>= nVal )
323  aEntry.meGrammar1 = static_cast< FormulaGrammar::Grammar >( nVal );
324  }
325  else if ( rProp.Name == SC_UNONAME_GRAMMAR2 )
326  {
327  sal_Int32 nVal = 0;
328  if ( rProp.Value >>= nVal )
329  aEntry.meGrammar2 = static_cast< FormulaGrammar::Grammar >( nVal );
330  }
331  else
332  {
333  OSL_FAIL("wrong property");
335  }
336  }
337 
338  AddEntry_Impl(aEntry);
339 }
340 
341 void SAL_CALL ScTableConditionalFormat::removeByIndex( sal_Int32 nIndex )
342 {
343  SolarMutexGuard aGuard;
344 
345  if (nIndex < static_cast<sal_Int32>(maEntries.size()) && nIndex >= 0)
346  {
347  maEntries.erase(maEntries.begin()+nIndex);
348  }
349 }
350 
352 {
353  SolarMutexGuard aGuard;
354  maEntries.clear();
355 }
356 
357 // XEnumerationAccess
358 
359 uno::Reference<container::XEnumeration> SAL_CALL ScTableConditionalFormat::createEnumeration()
360 {
361  SolarMutexGuard aGuard;
362  return new ScIndexEnumeration(this, "com.sun.star.sheet.TableConditionalEntryEnumeration");
363 }
364 
365 // XIndexAccess
366 
368 {
369  SolarMutexGuard aGuard;
370  return maEntries.size();
371 }
372 
373 uno::Any SAL_CALL ScTableConditionalFormat::getByIndex( sal_Int32 nIndex )
374 {
375  SolarMutexGuard aGuard;
376  uno::Reference<sheet::XSheetConditionalEntry> xEntry(GetObjectByIndex_Impl(static_cast<sal_uInt16>(nIndex)));
377  if (!xEntry.is())
378  throw lang::IndexOutOfBoundsException();
379 
380  return uno::makeAny(xEntry);
381 }
382 
384 {
385  SolarMutexGuard aGuard;
387 }
388 
390 {
391  SolarMutexGuard aGuard;
392  return ( getCount() != 0 );
393 }
394 
395 // conditional format entries have no real names
396 // -> generate name from index
397 
398 static OUString lcl_GetEntryNameFromIndex( sal_Int32 nIndex )
399 {
400  OUString aRet = "Entry" + OUString::number( nIndex );
401  return aRet;
402 }
403 
404 uno::Any SAL_CALL ScTableConditionalFormat::getByName( const OUString& aName )
405 {
406  SolarMutexGuard aGuard;
407 
408  uno::Reference<sheet::XSheetConditionalEntry> xEntry;
409  long nCount = maEntries.size();
410  for (long i=0; i<nCount; i++)
411  if ( aName == lcl_GetEntryNameFromIndex(i) )
412  {
413  xEntry.set(GetObjectByIndex_Impl(static_cast<sal_uInt16>(i)));
414  break;
415  }
416 
417  if (!xEntry.is())
418  throw container::NoSuchElementException();
419 
420  return uno::makeAny(xEntry);
421 }
422 
423 uno::Sequence<OUString> SAL_CALL ScTableConditionalFormat::getElementNames()
424 {
425  SolarMutexGuard aGuard;
426 
427  long nCount = maEntries.size();
428  uno::Sequence<OUString> aNames(nCount);
429  OUString* pArray = aNames.getArray();
430  for (long i=0; i<nCount; i++)
431  pArray[i] = lcl_GetEntryNameFromIndex(i);
432 
433  return aNames;
434 }
435 
436 sal_Bool SAL_CALL ScTableConditionalFormat::hasByName( const OUString& aName )
437 {
438  SolarMutexGuard aGuard;
439 
440  long nCount = maEntries.size();
441  for (long i=0; i<nCount; i++)
442  if ( aName == lcl_GetEntryNameFromIndex(i) )
443  return true;
444 
445  return false;
446 }
447 
448 // XUnoTunnel
449 
451 
453  aData( aItem )
454 {
455  // #i113668# only store the settings, keep no reference to parent object
456 }
457 
459 {
460 }
461 
463 {
464  rData = aData;
465 }
466 
467 // XSheetCondition
468 
469 sheet::ConditionOperator SAL_CALL ScTableConditionalEntry::getOperator()
470 {
471  SolarMutexGuard aGuard;
473 }
474 
475 void SAL_CALL ScTableConditionalEntry::setOperator( sheet::ConditionOperator nOperator )
476 {
477  SolarMutexGuard aGuard;
479 }
480 
482 {
483  SolarMutexGuard aGuard;
485 }
486 
487 void SAL_CALL ScTableConditionalEntry::setConditionOperator( sal_Int32 nOperator )
488 {
489  SolarMutexGuard aGuard;
490  aData.meMode = ScConditionEntry::GetModeFromApi( static_cast<sheet::ConditionOperator>(nOperator) );
491 }
492 
494 {
495  SolarMutexGuard aGuard;
496  return aData.maExpr1;
497 }
498 
499 void SAL_CALL ScTableConditionalEntry::setFormula1( const OUString& aFormula1 )
500 {
501  SolarMutexGuard aGuard;
502  aData.maExpr1 = aFormula1;
503 }
504 
506 {
507  SolarMutexGuard aGuard;
508  return aData.maExpr2;
509 }
510 
511 void SAL_CALL ScTableConditionalEntry::setFormula2( const OUString& aFormula2 )
512 {
513  SolarMutexGuard aGuard;
514  aData.maExpr2 = aFormula2;
515 }
516 
517 table::CellAddress SAL_CALL ScTableConditionalEntry::getSourcePosition()
518 {
519  SolarMutexGuard aGuard;
520  table::CellAddress aRet;
521  aRet.Column = aData.maPos.Col();
522  aRet.Row = aData.maPos.Row();
523  aRet.Sheet = aData.maPos.Tab();
524  return aRet;
525 }
526 
527 void SAL_CALL ScTableConditionalEntry::setSourcePosition( const table::CellAddress& aSourcePosition )
528 {
529  SolarMutexGuard aGuard;
530  aData.maPos.Set( static_cast<SCCOL>(aSourcePosition.Column), static_cast<SCROW>(aSourcePosition.Row), aSourcePosition.Sheet );
531 }
532 
533 // XSheetConditionalEntry
534 
536 {
537  SolarMutexGuard aGuard;
538  return ScStyleNameConversion::DisplayToProgrammaticName( aData.maStyle, SfxStyleFamily::Para );
539 }
540 
541 void SAL_CALL ScTableConditionalEntry::setStyleName( const OUString& aStyleName )
542 {
543  SolarMutexGuard aGuard;
544  aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SfxStyleFamily::Para );
545 }
546 
548  const formula::FormulaGrammar::Grammar eGrammar) :
549  aPropSet( lcl_GetValidatePropertyMap() )
550 {
551  // read the entry from the document...
552 
553  bool bFound = false;
554  if ( pDoc && nKey )
555  {
556  const ScValidationData* pData = pDoc->GetValidationEntry( nKey );
557  if (pData)
558  {
559  nMode = pData->GetOperation();
560  aSrcPos = pData->GetValidSrcPos(); // valid pos for expressions
561  aExpr1 = pData->GetExpression( aSrcPos, 0, 0, eGrammar );
562  aExpr2 = pData->GetExpression( aSrcPos, 1, 0, eGrammar );
563  meGrammar1 = meGrammar2 = eGrammar;
564  nValMode = sal::static_int_cast<sal_uInt16>( pData->GetDataMode() );
565  bIgnoreBlank = pData->IsIgnoreBlank();
566  nShowList = pData->GetListType();
568  ScValidErrorStyle eStyle;
569  bShowError = pData->GetErrMsg( aErrorTitle, aErrorMessage, eStyle );
570  nErrorStyle = sal::static_int_cast<sal_uInt16>( eStyle );
571 
572  // During save to XML, sheet::ValidationType_ANY formulas are not
573  // saved, even if in the list, see
574  // ScMyValidationsContainer::GetCondition(), so shall not mark
575  // anything in use.
578 
579  bFound = true;
580  }
581  }
582  if (!bFound)
583  ClearData_Impl(); // Defaults
584 }
585 
587  formula::FormulaGrammar::Grammar eGrammar ) const
588 {
589  // ScValidationData = Core-Struktur
590 
591  FormulaGrammar::Grammar eGrammar1 = lclResolveGrammar( eGrammar, meGrammar1 );
592  FormulaGrammar::Grammar eGrammar2 = lclResolveGrammar( eGrammar, meGrammar2 );
593 
594  ScValidationData* pRet = new ScValidationData( static_cast<ScValidationMode>(nValMode),
595  nMode,
596  aExpr1, aExpr2, pDoc, aSrcPos,
598  eGrammar1, eGrammar2 );
600  pRet->SetListType(nShowList);
601 
602  if ( aTokens1.hasElements() )
603  {
604  ScTokenArray aTokenArray(pDoc);
605  if ( ScTokenConversion::ConvertToTokenArray(*pDoc, aTokenArray, aTokens1) )
606  pRet->SetFormula1(aTokenArray);
607  }
608 
609  if ( aTokens2.hasElements() )
610  {
611  ScTokenArray aTokenArray(pDoc);
612  if ( ScTokenConversion::ConvertToTokenArray(*pDoc, aTokenArray, aTokens2) )
613  pRet->SetFormula2(aTokenArray);
614  }
615 
616  // set strings for error / input even if disabled (and disable afterwards)
618  if (!bShowInput)
619  pRet->ResetInput();
620  pRet->SetError( aErrorTitle, aErrorMessage, static_cast<ScValidErrorStyle>(nErrorStyle) );
621  if (!bShowError)
622  pRet->ResetError();
623 
624  if ( !aPosString.isEmpty() )
625  pRet->SetSrcString( aPosString );
626 
627  return pRet;
628 }
629 
631 {
634  bIgnoreBlank = true;
635  nShowList = sheet::TableValidationVisibility::UNSORTED;
636  bShowInput = false;
637  bShowError = false;
639  aSrcPos.Set(0,0,0);
640  aExpr1.clear();
641  aExpr2.clear();
642  maExprNmsp1.clear();
643  maExprNmsp2.clear();
644  meGrammar1 = meGrammar2 = FormulaGrammar::GRAM_UNSPECIFIED; // will be overridden when needed
645  aInputTitle.clear();
646  aInputMessage.clear();
647  aErrorTitle.clear();
648  aErrorMessage.clear();
649 }
650 
652 {
653 }
654 
655 // XSheetCondition
656 
657 sheet::ConditionOperator SAL_CALL ScTableValidationObj::getOperator()
658 {
659  SolarMutexGuard aGuard;
661 }
662 
663 void SAL_CALL ScTableValidationObj::setOperator( sheet::ConditionOperator nOperator )
664 {
665  SolarMutexGuard aGuard;
666  nMode = lcl_ConditionOperatorToMode( nOperator );
667 }
668 
670 {
671  SolarMutexGuard aGuard;
673 }
674 
675 void SAL_CALL ScTableValidationObj::setConditionOperator( sal_Int32 nOperator )
676 {
677  SolarMutexGuard aGuard;
678  nMode = ScConditionEntry::GetModeFromApi( static_cast<css::sheet::ConditionOperator>(nOperator) );
679 }
680 
682 {
683  SolarMutexGuard aGuard;
684  return aExpr1;
685 }
686 
687 void SAL_CALL ScTableValidationObj::setFormula1( const OUString& aFormula1 )
688 {
689  SolarMutexGuard aGuard;
690  aExpr1 = aFormula1;
691 }
692 
694 {
695  SolarMutexGuard aGuard;
696  return aExpr2;
697 }
698 
699 void SAL_CALL ScTableValidationObj::setFormula2( const OUString& aFormula2 )
700 {
701  SolarMutexGuard aGuard;
702  aExpr2 = aFormula2;
703 }
704 
705 table::CellAddress SAL_CALL ScTableValidationObj::getSourcePosition()
706 {
707  SolarMutexGuard aGuard;
708  table::CellAddress aRet;
709  aRet.Column = aSrcPos.Col();
710  aRet.Row = aSrcPos.Row();
711  aRet.Sheet = aSrcPos.Tab();
712  return aRet;
713 }
714 
715 void SAL_CALL ScTableValidationObj::setSourcePosition( const table::CellAddress& aSourcePosition )
716 {
717  SolarMutexGuard aGuard;
718  aSrcPos.Set( static_cast<SCCOL>(aSourcePosition.Column), static_cast<SCROW>(aSourcePosition.Row), aSourcePosition.Sheet );
719 }
720 
721 uno::Sequence<sheet::FormulaToken> SAL_CALL ScTableValidationObj::getTokens( sal_Int32 nIndex )
722 {
723  SolarMutexGuard aGuard;
724  if (nIndex >= 2 || nIndex < 0)
725  throw lang::IndexOutOfBoundsException();
726 
727  return nIndex == 0 ? aTokens1 : aTokens2;
728 }
729 
730 void SAL_CALL ScTableValidationObj::setTokens( sal_Int32 nIndex, const uno::Sequence<sheet::FormulaToken>& aTokens )
731 {
732  SolarMutexGuard aGuard;
733  if (nIndex >= 2 || nIndex < 0)
734  throw lang::IndexOutOfBoundsException();
735 
736  if (nIndex == 0)
737  {
738  aTokens1 = aTokens;
739  aExpr1.clear();
740  }
741  else if (nIndex == 1)
742  {
743  aTokens2 = aTokens;
744  aExpr2.clear();
745  }
746 }
747 
748 sal_Int32 SAL_CALL ScTableValidationObj::getCount()
749 {
750  return 2;
751 }
752 
753 uno::Reference<beans::XPropertySetInfo> SAL_CALL ScTableValidationObj::getPropertySetInfo()
754 {
755  SolarMutexGuard aGuard;
756  static uno::Reference<beans::XPropertySetInfo> aRef(
758  return aRef;
759 }
760 
762  const OUString& aPropertyName, const uno::Any& aValue )
763 {
764  SolarMutexGuard aGuard;
765 
766  if ( aPropertyName == SC_UNONAME_SHOWINP ) bShowInput = ScUnoHelpFunctions::GetBoolFromAny( aValue );
767  else if ( aPropertyName == SC_UNONAME_SHOWERR ) bShowError = ScUnoHelpFunctions::GetBoolFromAny( aValue );
768  else if ( aPropertyName == SC_UNONAME_IGNOREBL ) bIgnoreBlank = ScUnoHelpFunctions::GetBoolFromAny( aValue );
769  else if ( aPropertyName == SC_UNONAME_SHOWLIST ) aValue >>= nShowList;
770  else if ( aPropertyName == SC_UNONAME_INPTITLE )
771  {
772  OUString aStrVal;
773  if ( aValue >>= aStrVal )
774  aInputTitle = aStrVal;
775  }
776  else if ( aPropertyName == SC_UNONAME_INPMESS )
777  {
778  OUString aStrVal;
779  if ( aValue >>= aStrVal )
780  aInputMessage = aStrVal;
781  }
782  else if ( aPropertyName == SC_UNONAME_ERRTITLE )
783  {
784  OUString aStrVal;
785  if ( aValue >>= aStrVal )
786  aErrorTitle = aStrVal;
787  }
788  else if ( aPropertyName == SC_UNONAME_ERRMESS )
789  {
790  OUString aStrVal;
791  if ( aValue >>= aStrVal )
792  aErrorMessage = aStrVal;
793  }
794  else if ( aPropertyName == SC_UNONAME_TYPE )
795  {
796  sheet::ValidationType eType = static_cast<sheet::ValidationType>(ScUnoHelpFunctions::GetEnumFromAny( aValue ));
797  switch (eType)
798  {
799  case sheet::ValidationType_ANY: nValMode = SC_VALID_ANY; break;
800  case sheet::ValidationType_WHOLE: nValMode = SC_VALID_WHOLE; break;
801  case sheet::ValidationType_DECIMAL: nValMode = SC_VALID_DECIMAL; break;
802  case sheet::ValidationType_DATE: nValMode = SC_VALID_DATE; break;
803  case sheet::ValidationType_TIME: nValMode = SC_VALID_TIME; break;
804  case sheet::ValidationType_TEXT_LEN: nValMode = SC_VALID_TEXTLEN; break;
805  case sheet::ValidationType_LIST: nValMode = SC_VALID_LIST; break;
806  case sheet::ValidationType_CUSTOM: nValMode = SC_VALID_CUSTOM; break;
807  default:
808  {
809  // added to avoid warnings
810  }
811  }
812  }
813  else if ( aPropertyName == SC_UNONAME_ERRALSTY )
814  {
815  sheet::ValidationAlertStyle eStyle = static_cast<sheet::ValidationAlertStyle>(ScUnoHelpFunctions::GetEnumFromAny( aValue ));
816  switch (eStyle)
817  {
818  case sheet::ValidationAlertStyle_STOP: nErrorStyle = SC_VALERR_STOP; break;
819  case sheet::ValidationAlertStyle_WARNING: nErrorStyle = SC_VALERR_WARNING; break;
820  case sheet::ValidationAlertStyle_INFO: nErrorStyle = SC_VALERR_INFO; break;
821  case sheet::ValidationAlertStyle_MACRO: nErrorStyle = SC_VALERR_MACRO; break;
822  default:
823  {
824  // added to avoid warnings
825  }
826  }
827  }
828  else if ( aPropertyName == SC_UNONAME_SOURCESTR )
829  {
830  // internal - only for XML filter, not in PropertySetInfo, only set
831 
832  OUString aStrVal;
833  if ( aValue >>= aStrVal )
834  aPosString = aStrVal;
835  }
836  else if ( aPropertyName == SC_UNONAME_FORMULANMSP1 )
837  {
838  // internal - only for XML filter, not in PropertySetInfo, only set
839 
840  OUString aStrVal;
841  if ( aValue >>= aStrVal )
842  maExprNmsp1 = aStrVal;
843  }
844  else if ( aPropertyName == SC_UNONAME_FORMULANMSP2 )
845  {
846  // internal - only for XML filter, not in PropertySetInfo, only set
847 
848  OUString aStrVal;
849  if ( aValue >>= aStrVal )
850  maExprNmsp2 = aStrVal;
851  }
852  else if ( aPropertyName == SC_UNONAME_GRAMMAR1 )
853  {
854  // internal - only for XML filter, not in PropertySetInfo, only set
855 
856  sal_Int32 nVal = 0;
857  if ( aValue >>= nVal )
858  meGrammar1 = static_cast< FormulaGrammar::Grammar >(nVal);
859  }
860  else if ( aPropertyName == SC_UNONAME_GRAMMAR2 )
861  {
862  // internal - only for XML filter, not in PropertySetInfo, only set
863 
864  sal_Int32 nVal = 0;
865  if ( aValue >>= nVal )
866  meGrammar2 = static_cast< FormulaGrammar::Grammar >(nVal);
867  }
868 }
869 
870 uno::Any SAL_CALL ScTableValidationObj::getPropertyValue( const OUString& aPropertyName )
871 {
872  SolarMutexGuard aGuard;
873  uno::Any aRet;
874 
875  if ( aPropertyName == SC_UNONAME_SHOWINP ) aRet <<= bShowInput;
876  else if ( aPropertyName == SC_UNONAME_SHOWERR ) aRet <<= bShowError;
877  else if ( aPropertyName == SC_UNONAME_IGNOREBL ) aRet <<= bIgnoreBlank;
878  else if ( aPropertyName == SC_UNONAME_SHOWLIST ) aRet <<= nShowList;
879  else if ( aPropertyName == SC_UNONAME_INPTITLE ) aRet <<= aInputTitle;
880  else if ( aPropertyName == SC_UNONAME_INPMESS ) aRet <<= aInputMessage;
881  else if ( aPropertyName == SC_UNONAME_ERRTITLE ) aRet <<= aErrorTitle;
882  else if ( aPropertyName == SC_UNONAME_ERRMESS ) aRet <<= aErrorMessage;
883  else if ( aPropertyName == SC_UNONAME_TYPE )
884  {
885  sheet::ValidationType eType = sheet::ValidationType_ANY;
886  switch (nValMode)
887  {
888  case SC_VALID_ANY: eType = sheet::ValidationType_ANY; break;
889  case SC_VALID_WHOLE: eType = sheet::ValidationType_WHOLE; break;
890  case SC_VALID_DECIMAL: eType = sheet::ValidationType_DECIMAL; break;
891  case SC_VALID_DATE: eType = sheet::ValidationType_DATE; break;
892  case SC_VALID_TIME: eType = sheet::ValidationType_TIME; break;
893  case SC_VALID_TEXTLEN: eType = sheet::ValidationType_TEXT_LEN; break;
894  case SC_VALID_LIST: eType = sheet::ValidationType_LIST; break;
895  case SC_VALID_CUSTOM: eType = sheet::ValidationType_CUSTOM; break;
896  }
897  aRet <<= eType;
898  }
899  else if ( aPropertyName == SC_UNONAME_ERRALSTY )
900  {
901  sheet::ValidationAlertStyle eStyle = sheet::ValidationAlertStyle_STOP;
902  switch (nErrorStyle)
903  {
904  case SC_VALERR_STOP: eStyle = sheet::ValidationAlertStyle_STOP; break;
905  case SC_VALERR_WARNING: eStyle = sheet::ValidationAlertStyle_WARNING; break;
906  case SC_VALERR_INFO: eStyle = sheet::ValidationAlertStyle_INFO; break;
907  case SC_VALERR_MACRO: eStyle = sheet::ValidationAlertStyle_MACRO; break;
908  }
909  aRet <<= eStyle;
910  }
911 
912  return aRet;
913 }
914 
916 
917 // XUnoTunnel
918 
920 
921 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL setSourcePosition(const css::table::CellAddress &aSourcePosition) override
Definition: fmtuno.cxx:527
#define SC_UNONAME_FORMULANMSP1
Definition: unonames.hxx:347
#define SC_UNONAME_INPMESS
Definition: unonames.hxx:358
static OUString DisplayToProgrammaticName(const OUString &rDispName, SfxStyleFamily nType)
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
Definition: fmtuno.cxx:404
static sal_Int32 GetEnumFromAny(const css::uno::Any &aAny)
Definition: miscuno.cxx:160
#define SC_UNONAME_OPERATOR
Definition: unonames.hxx:342
virtual OUString SAL_CALL getFormula1() override
Definition: fmtuno.cxx:493
formula::FormulaGrammar::Grammar meGrammar1
Definition: fmtuno.hxx:171
#define SC_UNONAME_FORMULA1
Definition: unonames.hxx:343
virtual void SAL_CALL setFormula2(const OUString &aFormula2) override
Definition: fmtuno.cxx:699
void AddEntry(ScFormatEntry *pNew)
Definition: conditio.cxx:1747
SfxItemPropertySet aPropSet
Definition: fmtuno.hxx:165
SCROW Row() const
Definition: address.hxx:262
const char aData[]
ScConditionMode nMode
Definition: fmtuno.hxx:166
std::unique_ptr< ContentProperties > pData
ScConditionMode meMode
Definition: fmtuno.hxx:62
css::uno::Sequence< css::sheet::FormulaToken > aTokens1
Definition: fmtuno.hxx:173
virtual sal_Int32 SAL_CALL getConditionOperator() override
Definition: fmtuno.cxx:669
OUString aPosString
Definition: fmtuno.hxx:176
virtual void SAL_CALL setTokens(sal_Int32 nIndex, const css::uno::Sequence< css::sheet::FormulaToken > &aTokens) override
Definition: fmtuno.cxx:730
ScValidErrorStyle
Definition: validat.hxx:50
virtual ~ScTableConditionalEntry() override
Definition: fmtuno.cxx:458
sal_uIntPtr sal_uLong
void SetFormula1(const ScTokenArray &rArray)
Definition: conditio.cxx:468
void AddEntry_Impl(const ScCondFormatEntryItem &aEntry)
Definition: fmtuno.cxx:237
#define SC_UNONAME_SHOWINP
Definition: unonames.hxx:361
const OUString & GetStyle() const
Definition: conditio.hxx:474
bool MarkUsedExternalReferences() const
Definition: conditio.cxx:1379
static sal_Int32 lcl_ConditionModeToOperatorNew(ScConditionMode eMode)
Definition: fmtuno.cxx:68
ScTableValidationObj()=delete
#define SC_UNONAME_ERRMESS
Definition: unonames.hxx:355
sal_uInt16 nValMode
Definition: fmtuno.hxx:177
static OUString ProgrammaticToDisplayName(const OUString &rProgName, SfxStyleFamily nType)
#define SC_UNONAME_FORMULANMSP2
Definition: unonames.hxx:348
virtual void SAL_CALL setOperator(css::sheet::ConditionOperator nOperator) override
Definition: fmtuno.cxx:475
OUString aInputTitle
Definition: fmtuno.hxx:181
UNO3_GETIMPLEMENTATION_IMPL(ScTableConditionalFormat)
virtual sal_Int32 SAL_CALL getCount() override
Definition: fmtuno.cxx:367
ScConditionalFormat * GetFormat(sal_uInt32 nKey)
Definition: conditio.cxx:2069
virtual sal_Int32 SAL_CALL getConditionOperator() override
Definition: fmtuno.cxx:481
ScConditionMode GetOperation() const
Definition: conditio.hxx:370
ScValidationData * CreateValidationData(ScDocument *pDoc, formula::FormulaGrammar::Grammar eGrammar) const
Definition: fmtuno.cxx:586
#define SC_UNONAME_ERRTITLE
Definition: unonames.hxx:356
formula::FormulaGrammar::Grammar meGrammar2
Definition: fmtuno.hxx:61
virtual OUString SAL_CALL getFormula1() override
Definition: fmtuno.cxx:681
OUString maExprNmsp1
Definition: fmtuno.hxx:169
virtual ~ScTableConditionalFormat() override
Definition: fmtuno.cxx:233
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uLong nIndex) const
Definition: documen4.cxx:871
void SetListType(sal_Int16 nListType)
Definition: validat.hxx:117
#define SC_UNONAME_IGNOREBL
Definition: unonames.hxx:357
SC_DLLPUBLIC ScConditionalFormatList * GetCondFormList(SCTAB nTab) const
Definition: documen4.cxx:857
#define SC_UNONAME_ERRALSTY
Definition: unonames.hxx:354
virtual void SAL_CALL addNew(const css::uno::Sequence< css::beans::PropertyValue > &aConditionalEntry) override
Definition: fmtuno.cxx:250
OUString aErrorTitle
Definition: fmtuno.hxx:185
void SetSrcString(const OUString &rNew)
Definition: conditio.cxx:460
virtual void SAL_CALL setFormula1(const OUString &aFormula1) override
Definition: fmtuno.cxx:499
formula::FormulaGrammar::Grammar meGrammar1
Definition: fmtuno.hxx:60
static sheet::ConditionOperator lcl_ConditionModeToOperator(ScConditionMode eMode)
Definition: fmtuno.cxx:91
int nCount
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: fmtuno.cxx:870
virtual css::sheet::ConditionOperator SAL_CALL getOperator() override
Definition: fmtuno.cxx:657
#define SC_UNONAME_SHOWERR
Definition: unonames.hxx:360
void SetInput(const OUString &rTitle, const OUString &rMsg)
Definition: validat.cxx:160
virtual css::uno::Sequence< css::sheet::FormulaToken > SAL_CALL getTokens(sal_Int32 nIndex) override
Definition: fmtuno.cxx:721
ScConditionMode
Definition: conditio.hxx:61
ScAddress aSrcPos
Definition: fmtuno.hxx:175
OUString maExprNmsp1
Definition: fmtuno.hxx:55
Mode eMode
SCTAB Tab() const
Definition: address.hxx:271
OUString aInputMessage
Definition: fmtuno.hxx:182
virtual void SAL_CALL setConditionOperator(sal_Int32 nOperator) override
Definition: fmtuno.cxx:675
OUString maExprNmsp2
Definition: fmtuno.hxx:170
std::vector< rtl::Reference< ScTableConditionalEntry > > maEntries
Definition: fmtuno.hxx:76
sal_uInt16 nErrorStyle
Definition: fmtuno.hxx:184
css::uno::Sequence< css::sheet::FormulaToken > aTokens2
Definition: fmtuno.hxx:174
size_t size() const
Definition: conditio.cxx:1767
ColorMode meMode
ScValidationMode GetDataMode() const
Definition: validat.hxx:114
#define SC_UNONAME_SOURCESTR
Definition: unonames.hxx:346
ScAddress GetValidSrcPos() const
Return a position that's adjusted to allow textual representation of expressions if possible...
Definition: conditio.cxx:1326
DocumentType eType
virtual css::sheet::ConditionOperator SAL_CALL getOperator() override
Definition: fmtuno.cxx:469
virtual OUString SAL_CALL getStyleName() override
Definition: fmtuno.cxx:535
const ScFormatEntry * GetEntry(sal_uInt16 nPos) const
Definition: conditio.cxx:1781
virtual css::table::CellAddress SAL_CALL getSourcePosition() override
Definition: fmtuno.cxx:705
int i
OUString maExprNmsp2
Definition: fmtuno.hxx:56
#define SC_UNONAME_TYPE
Definition: unonames.hxx:363
#define SC_UNONAME_GRAMMAR1
Definition: unonames.hxx:349
#define SC_UNONAME_SOURCEPOS
Definition: unonames.hxx:345
virtual sal_Int32 SAL_CALL getCount() override
Definition: fmtuno.cxx:748
void Set(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: address.hxx:406
OUString GetExpression(const ScAddress &rCursor, sal_uInt16 nPos, sal_uInt32 nNumFmt=0, const formula::FormulaGrammar::Grammar eGrammar=formula::FormulaGrammar::GRAM_DEFAULT) const
Definition: conditio.cxx:1235
virtual void SAL_CALL setStyleName(const OUString &aStyleName) override
Definition: fmtuno.cxx:541
void GetData(ScCondFormatEntryItem &rData) const
Definition: fmtuno.cxx:462
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
Definition: fmtuno.cxx:436
#define SC_UNONAME_GRAMMAR2
Definition: unonames.hxx:350
ScTableConditionalEntry * GetObjectByIndex_Impl(sal_uInt16 nIndex) const
Definition: fmtuno.cxx:245
virtual OUString SAL_CALL getFormula2() override
Definition: fmtuno.cxx:505
css::uno::Sequence< css::sheet::FormulaToken > maTokens1
Definition: fmtuno.hxx:51
virtual void SAL_CALL setSourcePosition(const css::table::CellAddress &aSourcePosition) override
Definition: fmtuno.cxx:715
unsigned char sal_Bool
const SfxItemPropertyMap & getPropertyMap() const
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: fmtuno.cxx:359
#define SC_UNONAME_STYLENAME
Definition: unonames.hxx:351
formula::FormulaGrammar::Grammar meGrammar2
Definition: fmtuno.hxx:172
static SC_DLLPUBLIC bool ConvertToTokenArray(ScDocument &rDoc, ScTokenArray &rTokenArray, const css::uno::Sequence< css::sheet::FormulaToken > &rSequence)
Definition: tokenuno.cxx:348
void SetIgnoreBlank(bool bSet)
Definition: conditio.cxx:415
css::uno::Type const & get()
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
Definition: miscuno.hxx:64
bool IsInExternalReferenceMarking() const
Definition: documen3.cxx:613
virtual css::table::CellAddress SAL_CALL getSourcePosition() override
Definition: fmtuno.cxx:517
void SetFormula2(const ScTokenArray &rArray)
Definition: conditio.cxx:480
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: fmtuno.cxx:761
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
Definition: miscuno.hxx:73
SCCOL Col() const
Definition: address.hxx:267
virtual void SAL_CALL clear() override
Definition: fmtuno.cxx:351
virtual OUString SAL_CALL getFormula2() override
Definition: fmtuno.cxx:693
virtual void SAL_CALL setConditionOperator(sal_Int32 nOperator) override
Definition: fmtuno.cxx:487
virtual void SAL_CALL removeByIndex(sal_Int32 nIndex) override
Definition: fmtuno.cxx:341
bool GetErrMsg(OUString &rTitle, OUString &rMsg, ScValidErrorStyle &rStyle) const
Definition: validat.cxx:176
OUString aErrorMessage
Definition: fmtuno.hxx:186
virtual void SAL_CALL setFormula1(const OUString &aFormula1) override
Definition: fmtuno.cxx:687
sal_Int16 nShowList
Definition: fmtuno.hxx:179
static ScConditionMode lcl_ConditionOperatorToMode(sheet::ConditionOperator eOper)
Definition: fmtuno.cxx:113
ScCondFormatEntryItem aData
Definition: fmtuno.hxx:126
void ResetInput()
Definition: validat.cxx:150
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: fmtuno.cxx:753
void FillFormat(ScConditionalFormat &rFormat, ScDocument *pDoc, formula::FormulaGrammar::Grammar eGrammar) const
Definition: fmtuno.cxx:195
virtual css::uno::Type SAL_CALL getElementType() override
Definition: fmtuno.cxx:383
virtual void SAL_CALL setFormula2(const OUString &aFormula2) override
Definition: fmtuno.cxx:511
bool MarkUsedExternalReferences() const
Definition: conditio.cxx:2007
bool GetInput(OUString &rTitle, OUString &rMsg) const
Definition: validat.hxx:108
void SetError(const OUString &rTitle, const OUString &rMsg, ScValidErrorStyle eStyle)
Definition: validat.cxx:167
#define SC_UNONAME_SHOWLIST
Definition: unonames.hxx:362
virtual ~ScTableValidationObj() override
Definition: fmtuno.cxx:651
sal_Int16 GetListType() const
Definition: validat.hxx:116
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: fmtuno.cxx:423
virtual void SAL_CALL setOperator(css::sheet::ConditionOperator nOperator) override
Definition: fmtuno.cxx:663
#define SC_UNONAME_INPTITLE
Definition: unonames.hxx:359
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
Definition: fmtuno.cxx:373
virtual Type GetType() const =0
#define SC_UNONAME_FORMULA2
Definition: unonames.hxx:344
static ScConditionMode GetModeFromApi(css::sheet::ConditionOperator nOperator)
Definition: conditio.cxx:1396
css::uno::Sequence< css::sheet::FormulaToken > maTokens2
Definition: fmtuno.hxx:52
bool IsIgnoreBlank() const
Definition: conditio.hxx:372
static bool GetBoolFromAny(const css::uno::Any &aAny)
Definition: miscuno.cxx:138
static OUString lcl_GetEntryNameFromIndex(sal_Int32 nIndex)
Definition: fmtuno.cxx:398
bool IsEmpty() const
Definition: conditio.cxx:1762
void ResetError()
Definition: validat.cxx:155
virtual sal_Bool SAL_CALL hasElements() override
Definition: fmtuno.cxx:389
static const SfxItemPropertyMapEntry * lcl_GetValidatePropertyMap()
Definition: fmtuno.cxx:45
sal_Int16 SCTAB
Definition: types.hxx:23
ScTableConditionalEntry()=delete