30#include <editeng/editeng.hxx>
51#include <com/sun/star/awt/XBitmap.hpp>
52#include <com/sun/star/util/CellProtection.hpp>
53#include <com/sun/star/table/CellHoriJustify.hpp>
54#include <com/sun/star/table/CellOrientation.hpp>
55#include <com/sun/star/table/ShadowFormat.hpp>
56#include <com/sun/star/table/TableBorder.hpp>
57#include <com/sun/star/table/TableBorder2.hpp>
58#include <com/sun/star/sheet/CellFlags.hpp>
59#include <com/sun/star/sheet/FormulaResult.hpp>
60#include <com/sun/star/beans/PropertyAttribute.hpp>
61#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
62#include <com/sun/star/lang/Locale.hpp>
63#include <com/sun/star/beans/TolerantPropertySetResultType.hpp>
64#include <com/sun/star/beans/SetPropertyTolerantFailed.hpp>
65#include <com/sun/star/text/WritingMode2.hpp>
66#include <com/sun/star/text/textfield/Type.hpp>
67#include <com/sun/star/sheet/XConditionalFormats.hpp>
68#include <com/sun/star/util/XComplexColor.hpp>
102#include <stlsheet.hxx>
117#include <globstr.hrc>
119#include <unonames.hxx>
131#include <tokenarray.hxx>
248 return &aCellsPropertySet;
351 return &aRangePropertySet;
460 return &aCellPropertySet;
567 return &aColumnPropertySet;
672 return &aRowPropertySet;
789 return &aSheetPropertySet;
803 return aEditPropertyMap_Impl;
808 return &aEditPropertySet;
844 uno::Reference<beans::XPropertySetInfo> xInfo(rSource.getPropertySetInfo());
847 const uno::Sequence<beans::Property>
aSeq(xInfo->getProperties());
848 for (
const beans::Property& rProp :
aSeq)
850 OUString
aName(rProp.Name);
851 rDest.setPropertyValue(
aName, rSource.getPropertyValue(
aName ) );
859 throw std::out_of_range(
"empty range");
860 const ScRange & rFirst = rRanges[0];
866 if ( rRanges.
size() == 1 )
868 const ScRange & rRange = rRanges[0];
877template<
typename BorderLineType>
878const ::editeng::SvxBorderLine* lcl_getBorderLine(
895 return lcl_getBorderLine( rLine, rStruct);
901 return lcl_getBorderLine( rLine, rStruct);
905template<
typename TableBorderType>
916 rInner.
SetValid( SvxBoxInfoItemValidFlags::TOP, rBorder.IsTopLineValid );
917 rInner.
SetValid( SvxBoxInfoItemValidFlags::BOTTOM, rBorder.IsBottomLineValid );
918 rInner.
SetValid( SvxBoxInfoItemValidFlags::LEFT, rBorder.IsLeftLineValid );
919 rInner.
SetValid( SvxBoxInfoItemValidFlags::RIGHT, rBorder.IsRightLineValid );
920 rInner.
SetValid( SvxBoxInfoItemValidFlags::HORI, rBorder.IsHorizontalLineValid );
921 rInner.
SetValid( SvxBoxInfoItemValidFlags::VERT, rBorder.IsVerticalLineValid );
922 rInner.
SetValid( SvxBoxInfoItemValidFlags::DISTANCE, rBorder.IsDistanceValid );
929 lcl_fillBoxItems( rOuter, rInner, rBorder);
934 lcl_fillBoxItems( rOuter, rInner, rBorder);
949template<
typename TableBorderItem>
951 bool bInvalidateHorVerDist )
961 rBorder.IsTopLineValid = rInner.
IsValid(SvxBoxInfoItemValidFlags::TOP);
962 rBorder.IsBottomLineValid = rInner.
IsValid(SvxBoxInfoItemValidFlags::BOTTOM);
963 rBorder.IsLeftLineValid = rInner.
IsValid(SvxBoxInfoItemValidFlags::LEFT);
964 rBorder.IsRightLineValid = rInner.
IsValid(SvxBoxInfoItemValidFlags::RIGHT);
965 rBorder.IsHorizontalLineValid = !bInvalidateHorVerDist && rInner.
IsValid(SvxBoxInfoItemValidFlags::HORI);
966 rBorder.IsVerticalLineValid = !bInvalidateHorVerDist && rInner.
IsValid(SvxBoxInfoItemValidFlags::VERT);
967 rBorder.IsDistanceValid = !bInvalidateHorVerDist && rInner.
IsValid(SvxBoxInfoItemValidFlags::DISTANCE);
974 table::TableBorder aBorder;
975 lcl_fillTableBorder( aBorder, rOuter, rInner, bInvalidateHorVerDist);
982 table::TableBorder2 aBorder;
983 lcl_fillTableBorder( aBorder, rOuter, rInner, bInvalidateHorVerDist);
1000 ScRange const & rRange = rRanges[
i ];
1006 pUndoDoc->InitUndo( rDoc, nTab, nTab );
1008 pUndoDoc->AddUndoTab( nTab, nTab );
1023 std::make_unique<ScUndoBorder>( pDocShell, rRanges, std::move(pUndoDoc), rOuter, rInner ) );
1036 const uno::Sequence< uno::Sequence<uno::Any> >& aData )
1047 if ( !rDoc.
IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) )
1053 sal_Int32 nCols = 0;
1054 sal_Int32 nRows =
aData.getLength();
1056 nCols =
aData[0].getLength();
1058 if ( nCols != nEndCol-nStartCol+1 || nRows != nEndRow-nStartRow+1 )
1068 pUndoDoc->InitUndo( rDoc, nTab, nTab );
1074 bool bError =
false;
1075 SCROW nDocRow = nStartRow;
1076 for (
const uno::Sequence<uno::Any>& rColSeq :
aData)
1078 if ( rColSeq.getLength() == nCols )
1080 SCCOL nDocCol = nStartCol;
1081 for (
const uno::Any& rElement : rColSeq)
1085 switch( rElement.getValueTypeClass() )
1087 case uno::TypeClass_VOID:
1090 rDoc.
SetError( nDocCol, nDocRow, nTab, FormulaError::NotAvailable );
1096 case uno::TypeClass_BYTE:
1097 case uno::TypeClass_SHORT:
1098 case uno::TypeClass_UNSIGNED_SHORT:
1099 case uno::TypeClass_LONG:
1100 case uno::TypeClass_UNSIGNED_LONG:
1101 case uno::TypeClass_FLOAT:
1102 case uno::TypeClass_DOUBLE:
1110 case uno::TypeClass_STRING:
1114 if ( !aUStr.isEmpty() )
1134 case uno::TypeClass_SEQUENCE:
1136 uno::Sequence< sheet::FormulaToken > aTokens;
1137 if ( rElement >>= aTokens )
1167 std::make_unique<ScUndoPaste>(
1168 &rDocShell,
ScRange(nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab),
1181 const uno::Sequence< uno::Sequence<OUString> >& aData,
1192 if ( !rDoc.
IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) )
1198 sal_Int32 nCols = 0;
1199 sal_Int32 nRows =
aData.getLength();
1201 nCols =
aData[0].getLength();
1203 if ( nCols != nEndCol-nStartCol+1 || nRows != nEndRow-nStartRow+1 )
1213 pUndoDoc->InitUndo( rDoc, nTab, nTab );
1219 bool bError =
false;
1220 SCROW nDocRow = nStartRow;
1221 for (
const uno::Sequence<OUString>& rColSeq :
aData)
1223 if ( rColSeq.getLength() == nCols )
1225 SCCOL nDocCol = nStartCol;
1226 for (
const OUString& aText : rColSeq)
1228 ScAddress aPos( nDocCol, nDocRow, nTab );
1264 std::make_unique<ScUndoPaste>( &rDocShell,
1265 ScRange(nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab), aDestMark,
1319 OUString aTempString = aVal;
1320 bool bIsNumberFormat(pFormatter->
IsNumberFormat(aTempString, nNumFmt, fDummy));
1321 if ( bIsNumberFormat )
1322 aTempString =
"'" + aTempString;
1323 else if ( aTempString.startsWith(
"'") )
1327 if ( bEnglish || ( pFormatter->
GetType(nNumFmt) != SvNumFormatType::TEXT ) )
1328 aTempString =
"'" + aTempString;
1337 pDocShell( pDocSh ),
1339 bChartColAsHdr( false ),
1340 bChartRowAsHdr( false ),
1341 bCursorOnly( false ),
1342 bGotDataChangedHint( false ),
1343 aValueListeners( 0 )
1346 aCellRange.PutInOrder();
1347 aRanges.push_back( aCellRange );
1359 pDocShell( pDocSh ),
1360 aRanges(
std::move( aR )),
1362 bChartColAsHdr( false ),
1363 bChartRowAsHdr( false ),
1364 bCursorOnly( false ),
1365 bGotDataChangedHint( false ),
1366 aValueListeners( 0 )
1376ScCellRangesBase::~ScCellRangesBase()
1384 pDocShell->GetDocument().RemoveUnoObject(*
this);
1386 ForgetCurrentAttrs();
1389 pValueListener.reset();
1395void ScCellRangesBase::ForgetCurrentAttrs()
1397 pCurrentFlat.reset();
1398 pCurrentDeep.reset();
1399 moCurrentDataSet.reset();
1400 moNoDfltCurrentDataSet.reset();
1405void ScCellRangesBase::ForgetMarkData()
1414 if ( !pCurrentFlat && pDocShell )
1419 return pCurrentFlat.get();
1426 if ( !pCurrentDeep && pDocShell )
1431 return pCurrentDeep.get();
1434SfxItemSet* ScCellRangesBase::GetCurrentDataSet(
bool bNoDflt)
1436 if(!moCurrentDataSet)
1442 moCurrentDataSet.emplace( pPattern->
GetItemSet() );
1443 moNoDfltCurrentDataSet.emplace( pPattern->
GetItemSet() );
1444 moCurrentDataSet->ClearInvalidItems();
1449 if (moNoDfltCurrentDataSet)
1450 return &*moNoDfltCurrentDataSet;
1454 if (moCurrentDataSet)
1455 return &*moCurrentDataSet;
1460const ScMarkData* ScCellRangesBase::GetMarkData()
1464 pMarkData.reset(
new ScMarkData(GetDocument()->GetSheetLimits(), aRanges) );
1466 return pMarkData.get();
1472 if ( nId == SfxHintId::Dying )
1475 ForgetCurrentAttrs();
1476 pDocShell =
nullptr;
1479 if ( m_refCount > 0 && !aValueListeners.empty() )
1483 lang::EventObject
aEvent;
1484 aEvent.Source = getXWeak();
1485 for (uno::Reference<util::XModifyListener> & xValueListener : aValueListeners)
1486 xValueListener->disposing( aEvent );
1488 aValueListeners.clear();
1494 else if ( nId == SfxHintId::DataChanged )
1497 ForgetCurrentAttrs();
1499 if ( bGotDataChangedHint && pDocShell )
1509 lang::EventObject
aEvent;
1510 aEvent.Source = getXWeak();
1515 for (
const uno::Reference<util::XModifyListener> & xValueListener : aValueListeners)
1518 bGotDataChangedHint =
false;
1521 else if ( nId == SfxHintId::ScCalcAll )
1526 if ( !aValueListeners.empty() )
1527 bGotDataChangedHint =
true;
1529 else if (
auto pRefHint =
dynamic_cast<const ScUpdateRefHint*
>(&rHint) )
1532 std::unique_ptr<ScRangeList> pUndoRanges;
1536 if ( aRanges.UpdateReference( pRefHint->GetMode(), &rDoc, pRefHint->GetRange(),
1537 pRefHint->GetDx(), pRefHint->GetDy(), pRefHint->GetDz() ) )
1540 && aRanges.size() == 1
1545 ScRange & rR = aRanges.front();
1554 if ( !aValueListeners.empty() )
1555 bGotDataChangedHint =
true;
1563 if ( pUndoHint->GetObjectId() == nObjectId )
1567 aRanges = pUndoHint->GetRanges();
1570 if ( !aValueListeners.empty() )
1571 bGotDataChangedHint =
true;
1576void ScCellRangesBase::RefChanged()
1580 if ( pValueListener && !aValueListeners.empty() )
1582 pValueListener->EndListeningAll();
1585 for (
size_t i = 0, nCount = aRanges.size(); i < nCount; ++i )
1589 ForgetCurrentAttrs();
1593ScDocument* ScCellRangesBase::GetDocument()
const
1596 return &pDocShell->GetDocument();
1603 if ( pDocShell || !pDocSh )
1609 aCellRange.PutInOrder();
1610 aRanges.RemoveAll();
1611 aRanges.push_back( aCellRange );
1613 pDocShell->GetDocument().AddUnoObject(*
this);
1618void ScCellRangesBase::AddRange(
const ScRange& rRange,
const bool bMergeRanges)
1621 aRanges.Join(rRange);
1623 aRanges.push_back(rRange);
1627void ScCellRangesBase::SetNewRange(
const ScRange& rNew)
1630 aCellRange.PutInOrder();
1632 aRanges.RemoveAll();
1633 aRanges.push_back( aCellRange );
1637void ScCellRangesBase::SetNewRanges(
const ScRangeList& rNew)
1643void ScCellRangesBase::SetCursorOnly(
bool bSet )
1651void ScCellRangesBase::PaintGridRanges_Impl( )
1653 for (
size_t i = 0, nCount = aRanges.size(); i < nCount; ++i)
1659double SAL_CALL ScCellRangesBase::computeFunction( sheet::GeneralFunction nFunction )
1663 aMark.MarkToSimple();
1664 if (!aMark.IsMarked())
1665 aMark.SetMarkNegative(
true);
1673 throw uno::RuntimeException();
1679void SAL_CALL ScCellRangesBase::clearContents( sal_Int32 nContentFlags )
1682 if ( !aRanges.empty() )
1689 pDocShell->GetDocFunc().DeleteContents( *GetMarkData(), nDelFlags,
true, true );
1698 return pPropSet->getPropertyMap();
1702 sal_uInt16& rItemWhich )
1710 rItemWhich = pEntry->
nWID;
1712 switch ( pEntry->
nWID )
1732beans::PropertyState ScCellRangesBase::GetOnePropertyState( sal_uInt16 nItemWhich,
const SfxItemPropertyMapEntry* pEntry )
1734 beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
1749 if ( eState == SfxItemState::SET )
1750 eRet = beans::PropertyState_DIRECT_VALUE;
1751 else if ( eState == SfxItemState::DEFAULT )
1752 eRet = beans::PropertyState_DEFAULT_VALUE;
1753 else if ( eState == SfxItemState::DONTCARE )
1754 eRet = beans::PropertyState_AMBIGUOUS_VALUE;
1757 OSL_FAIL(
"unknown ItemState");
1764 eRet = beans::PropertyState_DIRECT_VALUE;
1768 const ScStyleSheet* pStyle = pDocShell->GetDocument().GetSelectionStyle(*GetMarkData());
1770 eRet = beans::PropertyState_DIRECT_VALUE;
1772 eRet = beans::PropertyState_AMBIGUOUS_VALUE;
1775 eRet = beans::PropertyState_DEFAULT_VALUE;
1780beans::PropertyState SAL_CALL ScCellRangesBase::getPropertyState(
const OUString& aPropertyName )
1783 if ( aRanges.empty() )
1784 throw uno::RuntimeException();
1787 sal_uInt16 nItemWhich = 0;
1790 return GetOnePropertyState( nItemWhich, pEntry );
1793uno::Sequence<beans::PropertyState> SAL_CALL ScCellRangesBase::getPropertyStates(
1794 const uno::Sequence<OUString>& aPropertyNames )
1800 uno::Sequence<beans::PropertyState> aRet(aPropertyNames.getLength());
1801 std::transform(aPropertyNames.begin(), aPropertyNames.end(), aRet.getArray(),
1802 [
this, &rPropertyMap](
const auto& rName) -> beans::PropertyState {
1803 sal_uInt16 nItemWhich = 0;
1804 const SfxItemPropertyMapEntry* pEntry = rPropertyMap.getByName( rName );
1805 lcl_GetPropertyWhich( pEntry, nItemWhich );
1806 return GetOnePropertyState(nItemWhich, pEntry);
1811void SAL_CALL ScCellRangesBase::setPropertyToDefault(
const OUString& aPropertyName )
1818 sal_uInt16 nItemWhich = 0;
1823 if ( !aRanges.empty() )
1829 sal_uInt16 aWIDs[3];
1830 aWIDs[0] = nItemWhich;
1838 pDocShell->GetDocFunc().ClearItems( *GetMarkData(), aWIDs,
true );
1844 bChartColAsHdr =
false;
1846 bChartRowAsHdr =
false;
1849 OUString aStyleName(
ScResId( STR_STYLENAME_STANDARD ) );
1850 pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aStyleName,
true );
1855uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault(
const OUString& aPropertyName )
1876 switch ( pEntry->
nWID )
1887 pPropSet->getPropertyValue(aPropertyName, rSet, aAny);
1892 switch ( pEntry->
nWID )
1900 ScResId(STR_STYLENAME_STANDARD), SfxStyleFamily::Para );
1929 aAny <<= uno::Reference<sheet::XSheetConditionalEntries>(
1943 aAny <<= uno::Reference<beans::XPropertySet>(
1961uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellRangesBase::getPropertySetInfo()
1964 static uno::Reference<beans::XPropertySetInfo> aRef(
1971 sal_uInt16& rFirstItemId, sal_uInt16& rSecondItemId )
1973 rFirstItemId = rEntry.
nWID;
1977 switch ( rEntry.
nWID )
1987 sal_Int32 nIntVal = 0;
1988 if ( !(rValue >>= nIntVal) )
1989 throw lang::IllegalArgumentException();
2017 sal_Int16 nIntVal = 0;
2018 if ( !(rValue >>= nIntVal) )
2019 throw lang::IllegalArgumentException();
2027 sal_Int32 nRotVal = 0;
2028 if ( !(rValue >>= nRotVal) )
2029 throw lang::IllegalArgumentException();
2042 table::CellOrientation eOrient;
2043 if( rValue >>= eOrient )
2047 case table::CellOrientation_STANDARD:
2050 case table::CellOrientation_TOPBOTTOM:
2055 case table::CellOrientation_BOTTOMTOP:
2060 case table::CellOrientation_STACKED:
2078void SAL_CALL ScCellRangesBase::setPropertyValue(
2079 const OUString& aPropertyName,
const uno::Any& aValue )
2083 if ( !pDocShell || aRanges.empty() )
2084 throw uno::RuntimeException();
2089 throw beans::UnknownPropertyException(aPropertyName);
2091 SetOnePropertyValue( pEntry, aValue );
2101 if ( !aRanges.empty() )
2116 sal_uInt16 nFirstItem, nSecondItem;
2120 if ( nWhich != nFirstItem && nWhich != nSecondItem )
2123 pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern,
true );
2127 switch ( pEntry->
nWID )
2135 for (
size_t i = 0, n = aRanges.size(); i < n; ++i)
2137 ScRange const & rRange = aRanges[
i];
2144 OUString
aStr = aCell.getString(&rDoc);
2146 aEngine.SetEditTextObjectPool(rDoc.
GetEditPool());
2154 SfxItemSet aAttr = aEngine.GetEmptyItemSet();
2155 aEngine.SetText(aStr);
2160 aEngine.QuickSetAttribs(aAttr,
ESelection(0, 0, 0,
aStr.getLength()));
2163 rDoc.
SetEditText(aRanges[0].aStart, aEngine.CreateTextObject());
2180 aStrVal, SfxStyleFamily::Para ));
2181 pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aString,
true );
2186 table::TableBorder aBorder;
2187 if ( !aRanges.empty() && ( aValue >>= aBorder ) )
2199 table::TableBorder2 aBorder2;
2200 if ( !aRanges.empty() && ( aValue >>= aBorder2 ) )
2214 uno::Reference<sheet::XSheetConditionalEntries> xInterface(aValue, uno::UNO_QUERY);
2215 if ( !aRanges.empty() && xInterface.is() )
2228 SCTAB nTab = aRanges.front().aStart.Tab();
2233 for (
size_t i = 0;
i < aRanges.size(); ++
i)
2236 aRanges[i].aStart.Col(), aRanges[
i].aStart.Row(),
2237 aRanges[
i].aEnd.Col(), aRanges[
i].aEnd.Row() );
2243 auto pNew = std::make_unique<ScConditionalFormat>( 0, &rDoc );
2244 pFormat->
FillFormat( *pNew, rDoc, eGrammar );
2245 pNew->SetRange( aRanges );
2246 pDocShell->GetDocFunc().ReplaceConditionalFormat( 0, std::move(pNew), nTab, aRanges );
2250 for (
size_t i = 0;
i < aRanges.size(); ++
i)
2252 pDocShell->SetDocumentModified();
2261 uno::Reference<beans::XPropertySet> xInterface(aValue, uno::UNO_QUERY);
2262 if ( !aRanges.empty() && xInterface.is() )
2275 std::unique_ptr<ScValidationData> pNewData(
2282 pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), aPattern,
true );
2291uno::Any SAL_CALL ScCellRangesBase::getPropertyValue(
const OUString& aPropertyName )
2295 if ( !pDocShell || aRanges.empty() )
2296 throw uno::RuntimeException();
2301 throw beans::UnknownPropertyException(aPropertyName);
2304 GetOnePropertyValue( pEntry, aAny );
2318 switch ( pEntry->
nWID )
2329 GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang );
2330 rAny <<= static_cast<sal_Int32>(nOldFormat);
2345 pPropSet->getPropertyValue(*pEntry, *pDataSet, rAny);
2350 switch ( pEntry->
nWID )
2353 rAny <<= bChartColAsHdr;
2356 rAny <<= bChartRowAsHdr;
2360 OUString aStyleName;
2361 const ScStyleSheet* pStyle = pDocShell->GetDocument().GetSelectionStyle(*GetMarkData());
2363 aStyleName = pStyle->
GetName();
2365 aStyleName, SfxStyleFamily::Para );
2372 if ( !aRanges.empty() )
2374 const ScRange & rFirst = aRanges[ 0 ];
2380 aMark.SetMarkArea( rFirst );
2381 aMark.SelectTable( rFirst.
aStart.
Tab(),
true );
2409 rAny <<= uno::Reference<sheet::XSheetConditionalEntries>(
2429 rAny <<= uno::Reference<beans::XPropertySet>(
2450 rAny <<= pPattern->
GetKey();
2456void SAL_CALL ScCellRangesBase::addPropertyChangeListener(
const OUString& ,
2457 const uno::Reference<beans::XPropertyChangeListener>& )
2460 if ( aRanges.empty() )
2461 throw uno::RuntimeException();
2463 OSL_FAIL(
"not implemented");
2466void SAL_CALL ScCellRangesBase::removePropertyChangeListener(
const OUString& ,
2467 const uno::Reference<beans::XPropertyChangeListener>& )
2470 if ( aRanges.empty() )
2471 throw uno::RuntimeException();
2473 OSL_FAIL(
"not implemented");
2476void SAL_CALL ScCellRangesBase::addVetoableChangeListener(
const OUString&,
2477 const uno::Reference<beans::XVetoableChangeListener>&)
2479 OSL_FAIL(
"not implemented");
2482void SAL_CALL ScCellRangesBase::removeVetoableChangeListener(
const OUString&,
2483 const uno::Reference<beans::XVetoableChangeListener>&)
2485 OSL_FAIL(
"not implemented");
2490void SAL_CALL ScCellRangesBase::setPropertyValues(
const uno::Sequence< OUString >& aPropertyNames,
2491 const uno::Sequence< uno::Any >& aValues )
2495 sal_Int32
nCount(aPropertyNames.getLength());
2496 sal_Int32 nValues(aValues.getLength());
2497 if (nCount != nValues)
2498 throw lang::IllegalArgumentException();
2500 if ( !(pDocShell && nCount) )
2504 const OUString* pNames = aPropertyNames.getConstArray();
2516 pEntryArray[
i] = pEntry;
2523 SetOnePropertyValue( pEntry, pValues[i] );
2525 catch ( lang::IllegalArgumentException& )
2534 std::unique_ptr<ScPatternAttr> pOldPattern;
2535 std::unique_ptr<ScPatternAttr> pNewPattern;
2548 pOldPattern.reset(
new ScPatternAttr( *GetCurrentAttrsDeep() ));
2549 pOldPattern->GetItemSet().ClearInvalidItems();
2555 sal_uInt16 nFirstItem, nSecondItem;
2560 pNewPattern->GetItemSet().Put( pOldPattern->GetItemSet().Get( nFirstItem ) );
2562 pNewPattern->GetItemSet().Put( pOldPattern->GetItemSet().Get( nSecondItem ) );
2567 SetOnePropertyValue( pEntry, pValues[i] );
2572 if ( pNewPattern && !aRanges.empty() )
2573 pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), *pNewPattern,
true );
2576uno::Sequence<uno::Any> SAL_CALL ScCellRangesBase::getPropertyValues(
2577 const uno::Sequence< OUString >& aPropertyNames )
2583 uno::Sequence<uno::Any> aRet(aPropertyNames.getLength());
2584 uno::Any* pProperties = aRet.getArray();
2585 for(sal_Int32 i = 0;
i < aPropertyNames.getLength();
i++)
2588 GetOnePropertyValue( pEntry, pProperties[i] );
2593void SAL_CALL ScCellRangesBase::addPropertiesChangeListener(
const uno::Sequence< OUString >& ,
2594 const uno::Reference< beans::XPropertiesChangeListener >& )
2596 OSL_FAIL(
"not implemented");
2599void SAL_CALL ScCellRangesBase::removePropertiesChangeListener(
const uno::Reference< beans::XPropertiesChangeListener >& )
2601 OSL_FAIL(
"not implemented");
2604void SAL_CALL ScCellRangesBase::firePropertiesChangeEvent(
const uno::Sequence< OUString >& ,
2605 const uno::Reference< beans::XPropertiesChangeListener >& )
2607 OSL_FAIL(
"not implemented");
2612 if ( pDocShell && (rHint.
GetId() == SfxHintId::ScDataChanged))
2618 bGotDataChangedHint =
true;
2623uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::setPropertyValuesTolerant(
const uno::Sequence< OUString >& aPropertyNames,
2624 const uno::Sequence< uno::Any >& aValues )
2628 sal_Int32
nCount(aPropertyNames.getLength());
2629 sal_Int32 nValues(aValues.getLength());
2630 if (nCount != nValues)
2631 throw lang::IllegalArgumentException();
2633 if ( pDocShell && nCount )
2635 uno::Sequence < beans::SetPropertyTolerantFailed > aReturns(nCount);
2636 beans::SetPropertyTolerantFailed* pReturns = aReturns.getArray();
2639 const OUString* pNames = aPropertyNames.getConstArray();
2651 pMapArray[
i] = pEntry;
2658 SetOnePropertyValue( pEntry, pValues[i] );
2660 catch ( lang::IllegalArgumentException& )
2669 std::unique_ptr<ScPatternAttr> pOldPattern;
2670 std::unique_ptr<ScPatternAttr> pNewPattern;
2672 sal_Int32 nFailed(0);
2678 if ( pEntry && ((pEntry->
nFlags & beans::PropertyAttribute::READONLY) == 0))
2684 pOldPattern.reset(
new ScPatternAttr( *GetCurrentAttrsDeep() ));
2685 pOldPattern->GetItemSet().ClearInvalidItems();
2692 sal_uInt16 nFirstItem, nSecondItem;
2697 pNewPattern->GetItemSet().Put( pOldPattern->GetItemSet().Get( nFirstItem ) );
2699 pNewPattern->GetItemSet().Put( pOldPattern->GetItemSet().Get( nSecondItem ) );
2701 catch ( lang::IllegalArgumentException& )
2703 pReturns[nFailed].Name = pNames[
i];
2704 pReturns[nFailed++].Result = beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT;
2712 SetOnePropertyValue( pEntry, pValues[i] );
2714 catch ( lang::IllegalArgumentException& )
2716 pReturns[nFailed].Name = pNames[
i];
2717 pReturns[nFailed++].Result = beans::TolerantPropertySetResultType::ILLEGAL_ARGUMENT;
2723 pReturns[nFailed].Name = pNames[
i];
2725 pReturns[nFailed++].Result = beans::TolerantPropertySetResultType::PROPERTY_VETO;
2727 pReturns[nFailed++].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
2731 if ( pNewPattern && !aRanges.empty() )
2732 pDocShell->GetDocFunc().ApplyAttributes( *GetMarkData(), *pNewPattern,
true );
2734 aReturns.realloc(nFailed);
2738 return uno::Sequence < beans::SetPropertyTolerantFailed >();
2741uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::getPropertyValuesTolerant(
const uno::Sequence< OUString >& aPropertyNames )
2745 sal_Int32
nCount(aPropertyNames.getLength());
2746 uno::Sequence < beans::GetPropertyTolerantResult > aReturns(nCount);
2747 beans::GetPropertyTolerantResult* pReturns = aReturns.getArray();
2751 for(sal_Int32 i = 0;
i <
nCount;
i++)
2756 pReturns[
i].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
2760 sal_uInt16 nItemWhich = 0;
2762 pReturns[
i].State = GetOnePropertyState( nItemWhich, pEntry );
2763 GetOnePropertyValue( pEntry, pReturns[i].Value );
2764 pReturns[
i].Result = beans::TolerantPropertySetResultType::SUCCESS;
2770uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBase::getDirectPropertyValuesTolerant(
const uno::Sequence< OUString >& aPropertyNames )
2774 sal_Int32
nCount(aPropertyNames.getLength());
2775 uno::Sequence < beans::GetDirectPropertyTolerantResult > aReturns(nCount);
2776 beans::GetDirectPropertyTolerantResult* pReturns = aReturns.getArray();
2781 for(sal_Int32 i = 0;
i <
nCount;
i++)
2786 pReturns[
i].Result = beans::TolerantPropertySetResultType::UNKNOWN_PROPERTY;
2790 sal_uInt16 nItemWhich = 0;
2792 pReturns[j].State = GetOnePropertyState( nItemWhich, pEntry );
2793 if (pReturns[j].
State == beans::PropertyState_DIRECT_VALUE)
2795 GetOnePropertyValue( pEntry, pReturns[j].Value );
2796 pReturns[j].Result = beans::TolerantPropertySetResultType::SUCCESS;
2797 pReturns[j].Name = aPropertyNames[
i];
2803 aReturns.realloc(j);
2809void SAL_CALL ScCellRangesBase::decrementIndent()
2812 if ( pDocShell && !aRanges.empty() )
2816 aMarkData.MarkToMulti();
2817 pDocShell->GetDocFunc().ChangeIndent( aMarkData,
false,
true );
2821void SAL_CALL ScCellRangesBase::incrementIndent()
2824 if ( pDocShell && !aRanges.empty() )
2828 aMarkData.MarkToMulti();
2829 pDocShell->GetDocFunc().ChangeIndent( aMarkData,
true,
true );
2835std::unique_ptr<ScMemChart> ScCellRangesBase::CreateMemChart_Impl()
const
2837 if ( pDocShell && !aRanges.empty() )
2840 if ( aRanges.size() == 1 )
2846 const ScDocument & rDoc = pDocShell->GetDocument();
2847 const ScRange & rRange = aRanges[0];
2855 if (!pDocShell->GetDocument().GetDataStart( nTab, nStartX, nStartY ))
2863 if (!pDocShell->GetDocument().GetTableArea( nTab, nEndX, nEndY ))
2869 xChartRanges =
new ScRangeList(
ScRange( nStartX, nStartY, nTab, nEndX, nEndY, nTab ) );
2872 if (!xChartRanges.
is())
2877 aArr.SetHeaders( bChartRowAsHdr, bChartColAsHdr );
2879 return aArr.CreateMemChart();
2884uno::Sequence< uno::Sequence<double> > SAL_CALL ScCellRangesBase::getData()
2887 std::unique_ptr<ScMemChart> pMemChart(CreateMemChart_Impl());
2890 sal_Int32 nColCount = pMemChart->GetColCount();
2891 sal_Int32 nRowCount =
static_cast<sal_Int32
>(pMemChart->GetRowCount());
2893 uno::Sequence< uno::Sequence<double> > aRowSeq( nRowCount );
2894 uno::Sequence<double>* pRowAry = aRowSeq.getArray();
2895 for (sal_Int32 nRow = 0; nRow < nRowCount; nRow++)
2897 uno::Sequence<double> aColSeq( nColCount );
2898 double* pColAry = aColSeq.getArray();
2899 for (sal_Int32 nCol = 0; nCol < nColCount; nCol++)
2900 pColAry[nCol] = pMemChart->GetData( nCol, nRow );
2902 pRowAry[nRow] = aColSeq;
2911ScRangeListRef ScCellRangesBase::GetLimitedChartRanges_Impl( sal_Int32 nDataColumns, sal_Int32 nDataRows )
const
2913 if ( aRanges.size() == 1 )
2915 const ScDocument & rDoc = pDocShell->GetDocument();
2916 const ScRange & rRange = aRanges[0];
2924 sal_Int32 nEndColumn = nDataColumns - 1 + ( bChartColAsHdr ? 1 : 0 );
2925 if ( nEndColumn < 0 )
2927 if ( nEndColumn > rDoc.
MaxCol() )
2928 nEndColumn = rDoc.
MaxCol();
2930 sal_Int32 nEndRow = nDataRows - 1 + ( bChartRowAsHdr ? 1 : 0 );
2933 if ( nEndRow > rDoc.
MaxRow() )
2937 return xChartRanges;
2944void SAL_CALL ScCellRangesBase::setData(
const uno::Sequence< uno::Sequence<double> >& aData )
2948 sal_Int32 nRowCount =
aData.getLength();
2949 sal_Int32 nColCount = nRowCount ?
aData[0].getLength() : 0;
2950 ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( nColCount, nRowCount );
2951 if ( pDocShell && xChartRanges.
is() )
2955 aArr.SetHeaders( bChartRowAsHdr, bChartColAsHdr );
2962 for (sal_Int32 nRow=0; nRow<nRowCount; nRow++)
2964 const uno::Sequence<double>& rRowSeq =
aData[nRow];
2965 const double* pArray = rRowSeq.getConstArray();
2966 nColCount = rRowSeq.getLength();
2967 for (sal_Int32 nCol=0; nCol<nColCount; nCol++)
2970 sal::static_int_cast<SCCOL>(nCol),
2971 sal::static_int_cast<SCROW>(nRow) );
2974 double fVal = pArray[nCol];
2975 if ( fVal == DBL_MIN )
2978 rDoc.
SetValue(*pPos, pArray[nCol]);
2984 PaintGridRanges_Impl();
2985 pDocShell->SetDocumentModified();
2986 ForceChartListener_Impl();
2993 throw uno::RuntimeException();
2996uno::Sequence<OUString> SAL_CALL ScCellRangesBase::getRowDescriptions()
2999 std::unique_ptr<ScMemChart> pMemChart(CreateMemChart_Impl());
3002 sal_Int32 nRowCount =
static_cast<sal_Int32
>(pMemChart->GetRowCount());
3003 uno::Sequence<OUString>
aSeq( nRowCount );
3004 OUString* pAry =
aSeq.getArray();
3005 for (sal_Int32 nRow = 0; nRow < nRowCount; nRow++)
3006 pAry[nRow] = pMemChart->GetRowText(nRow);
3013void SAL_CALL ScCellRangesBase::setRowDescriptions(
3014 const uno::Sequence<OUString>& aRowDescriptions )
3018 if ( bChartColAsHdr )
3020 sal_Int32 nRowCount = aRowDescriptions.getLength();
3021 ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( 1, nRowCount );
3022 if ( pDocShell && xChartRanges.
is() )
3026 aArr.SetHeaders( bChartRowAsHdr, bChartColAsHdr );
3032 const OUString* pArray = aRowDescriptions.getConstArray();
3033 for (sal_Int32 nRow=0; nRow<nRowCount; nRow++)
3036 static_cast<SCSIZE>(nRow) );
3039 const OUString&
aStr = pArray[nRow];
3052 PaintGridRanges_Impl();
3053 pDocShell->SetDocumentModified();
3054 ForceChartListener_Impl();
3062 throw uno::RuntimeException();
3065uno::Sequence<OUString> SAL_CALL ScCellRangesBase::getColumnDescriptions()
3068 std::unique_ptr<ScMemChart> pMemChart(CreateMemChart_Impl());
3071 sal_Int32 nColCount = pMemChart->GetColCount();
3072 uno::Sequence<OUString>
aSeq( nColCount );
3073 OUString* pAry =
aSeq.getArray();
3074 for (sal_Int32 nCol = 0; nCol < nColCount; nCol++)
3075 pAry[nCol] = pMemChart->GetColText(nCol);
3082void SAL_CALL ScCellRangesBase::setColumnDescriptions(
3083 const uno::Sequence<OUString>& aColumnDescriptions )
3087 if ( bChartRowAsHdr )
3089 sal_Int32 nColCount = aColumnDescriptions.getLength();
3090 ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( nColCount, 1 );
3091 if ( pDocShell && xChartRanges.
is() )
3095 aArr.SetHeaders( bChartRowAsHdr, bChartColAsHdr );
3101 const OUString* pArray = aColumnDescriptions.getConstArray();
3102 for (sal_Int32 nCol=0; nCol<nColCount; nCol++)
3105 sal::static_int_cast<SCCOL>(nCol) );
3108 const OUString&
aStr = pArray[nCol];
3121 PaintGridRanges_Impl();
3122 pDocShell->SetDocumentModified();
3123 ForceChartListener_Impl();
3131 throw uno::RuntimeException();
3134void ScCellRangesBase::ForceChartListener_Impl()
3147 for (
auto const& it : rListeners)
3151 if (
p->GetUnoSource() ==
static_cast<chart::XChartData*
>(
this) &&
p->IsDirty())
3156void SAL_CALL ScCellRangesBase::addChartDataChangeEventListener(
const uno::Reference<
3157 chart::XChartDataChangeEventListener >& aListener )
3160 if ( !pDocShell || aRanges.empty() )
3169 if (
aName.isEmpty())
3174 pListener->
SetUno( aListener,
this );
3175 pColl->
insert( pListener );
3179void SAL_CALL ScCellRangesBase::removeChartDataChangeEventListener(
const uno::Reference<
3180 chart::XChartDataChangeEventListener >& aListener )
3183 if ( pDocShell && !aRanges.empty() )
3187 pColl->
FreeUno( aListener,
this );
3191double SAL_CALL ScCellRangesBase::getNotANumber()
3197sal_Bool SAL_CALL ScCellRangesBase::isNotANumber(
double nNumber )
3200 return (nNumber == DBL_MIN);
3205void SAL_CALL ScCellRangesBase::addModifyListener(
const uno::Reference<util::XModifyListener>& aListener)
3208 if ( aRanges.empty() )
3209 throw uno::RuntimeException();
3211 aValueListeners.emplace_back( aListener );
3213 if ( aValueListeners.size() == 1 )
3215 if (!pValueListener)
3216 pValueListener.reset(
new ScLinkListener(
LINK(
this, ScCellRangesBase, ValueListenerHdl ) ) );
3219 for (
size_t i = 0, nCount = aRanges.size(); i < nCount; i++)
3226void SAL_CALL ScCellRangesBase::removeModifyListener(
const uno::Reference<util::XModifyListener>& aListener )
3230 if ( aRanges.empty() )
3231 throw uno::RuntimeException();
3235 sal_uInt16
nCount = aValueListeners.size();
3236 for ( sal_uInt16 n=nCount;
n--; )
3238 uno::Reference<util::XModifyListener>& rObj = aValueListeners[
n];
3239 if ( rObj == aListener )
3241 aValueListeners.erase( aValueListeners.begin() + n );
3243 if ( aValueListeners.empty() )
3246 pValueListener->EndListeningAll();
3258uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleCells()
3269 SCCOL nCol = 0, nLastCol;
3270 while (nCol <= rDoc.
MaxCol())
3272 if (rDoc.
ColHidden(nCol, nTab,
nullptr, &nLastCol))
3274 aMarkData.SetMultiMarkArea(
ScRange(nCol, 0, nTab, nLastCol, rDoc.
MaxRow(), nTab),
false);
3276 nCol = nLastCol + 1;
3279 SCROW nRow = 0, nLastRow;
3280 while (nRow <= rDoc.
MaxRow())
3282 if (rDoc.
RowHidden(nRow, nTab,
nullptr, &nLastRow))
3284 aMarkData.SetMultiMarkArea(
ScRange(0, nRow, nTab, rDoc.
MaxCol(), nLastRow, nTab),
false);
3286 nRow = nLastRow + 1;
3290 aMarkData.FillRangeListWithMarks( &aNewRanges,
false );
3291 return new ScCellRangesObj( pDocShell, aNewRanges );
3297uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCells()
3307 for (
size_t i = 0, nCount = aRanges.size(); i < nCount; ++i)
3309 ScRange const & rRange = aRanges[
i ];
3312 for (
bool bHasCell = aIter.first(); bHasCell; bHasCell = aIter.next())
3315 if (!aIter.isEmpty())
3316 aMarkData.SetMultiMarkArea(aIter.GetPos(),
false);
3323 aMarkData.FillRangeListWithMarks( &aNewRanges,
false );
3325 return new ScCellRangesObj( pDocShell, aNewRanges );
3331uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentCells(
3332 sal_Int16 nContentFlags )
3342 for (
size_t i = 0, nCount = aRanges.size(); i < nCount; ++i )
3344 ScRange const & rRange = aRanges[
i ];
3347 for (
bool bHasCell = aIter.first(); bHasCell; bHasCell = aIter.next())
3350 switch (aIter.getType())
3353 if ( nContentFlags & sheet::CellFlags::STRING )
3357 if ( (nContentFlags & sheet::CellFlags::STRING) || (nContentFlags & sheet::CellFlags::FORMATTED) )
3365 if ( (nContentFlags & (sheet::CellFlags::VALUE|sheet::CellFlags::DATETIME))
3366 == (sheet::CellFlags::VALUE|sheet::CellFlags::DATETIME) )
3375 if ((nTyp == SvNumFormatType::DATE) || (nTyp == SvNumFormatType::TIME) ||
3376 (nTyp == SvNumFormatType::DATETIME))
3378 if ( nContentFlags & sheet::CellFlags::DATETIME )
3383 if ( nContentFlags & sheet::CellFlags::VALUE )
3395 aMarkData.SetMultiMarkArea(aIter.GetPos());
3399 if (nContentFlags & sheet::CellFlags::ANNOTATION)
3401 std::vector<sc::NoteEntry> aNotes;
3404 for (
const auto& i : aNotes)
3406 aMarkData.SetMultiMarkArea(
i.maPos);
3411 if (aMarkData.IsMultiMarked())
3412 aMarkData.FillRangeListWithMarks( &aNewRanges,
false );
3414 return new ScCellRangesObj( pDocShell, aNewRanges );
3420uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaCells(
3421 sal_Int32 nResultFlags )
3431 for (
size_t i = 0, nCount = aRanges.size(); i < nCount; ++i )
3433 ScRange const & rRange = aRanges[
i ];
3436 for (
bool bHasCell = aIter.first(); bHasCell; bHasCell = aIter.next())
3442 if (pFCell->
GetErrCode() != FormulaError::NONE)
3444 if ( nResultFlags & sheet::FormulaResult::ERROR )
3449 if ( nResultFlags & sheet::FormulaResult::VALUE )
3454 if ( nResultFlags & sheet::FormulaResult::STRING )
3459 aMarkData.SetMultiMarkArea(aIter.GetPos());
3465 if (aMarkData.IsMultiMarked())
3466 aMarkData.FillRangeListWithMarks( &aNewRanges,
false );
3468 return new ScCellRangesObj( pDocShell, aNewRanges );
3474uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
3475 const table::CellAddress& aCompare,
bool bColumnDiff)
3479 size_t nRangeCount = aRanges.size();
3490 ScRange aCmpRange, aCellRange;
3492 aCmpRange =
ScRange( 0,nCmpPos,nTab, rDoc.
MaxCol(),nCmpPos,nTab );
3496 for (
bool bHasCell = aCmpIter.first(); bHasCell; bHasCell = aCmpIter.next())
3498 SCCOLROW nCellPos = bColumnDiff ?
static_cast<SCCOLROW>(aCmpIter.GetPos().Col()) :
static_cast<SCCOLROW>(aCmpIter.GetPos().Row());
3500 aCellRange =
ScRange(
static_cast<SCCOL>(nCellPos),0,nTab,
3501 static_cast<SCCOL>(nCellPos),rDoc.
MaxRow(),nTab );
3503 aCellRange =
ScRange( 0,nCellPos,nTab, rDoc.
MaxCol(),nCellPos,nTab );
3505 for (i=0;
i<nRangeCount;
i++)
3507 ScRange aRange( aRanges[ i ] );
3508 if ( aRange.Intersects( aCellRange ) )
3512 aRange.aStart.SetCol(
static_cast<SCCOL>(nCellPos));
3513 aRange.aEnd.SetCol(
static_cast<SCCOL>(nCellPos));
3517 aRange.aStart.SetRow(nCellPos);
3518 aRange.aEnd.SetRow(nCellPos);
3520 aMarkData.SetMultiMarkArea( aRange );
3529 for (i=0;
i<nRangeCount;
i++)
3531 ScRange const & rRange = aRanges[
i ];
3534 for (
bool bHasCell = aIter.first(); bHasCell; bHasCell = aIter.next())
3537 aCmpAddr =
ScAddress( aIter.GetPos().Col(), nCmpPos, aIter.GetPos().Tab() );
3539 aCmpAddr =
ScAddress(
static_cast<SCCOL>(nCmpPos), aIter.GetPos().Row(), aIter.GetPos().Tab() );
3541 ScRange aOneRange(aIter.GetPos());
3542 if (!aIter.equalsWithoutFormat(aCmpAddr))
3543 aMarkData.SetMultiMarkArea( aOneRange );
3545 aMarkData.SetMultiMarkArea( aOneRange,
false );
3550 if (aMarkData.IsMultiMarked())
3551 aMarkData.FillRangeListWithMarks( &aNewRanges,
false );
3553 return new ScCellRangesObj( pDocShell, aNewRanges );
3558uno::Reference<sheet::XSheetCellRanges > SAL_CALL ScCellRangesBase::queryColumnDifferences(
3559 const table::CellAddress& aCompare )
3562 return QueryDifferences_Impl( aCompare,
true );
3565uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryRowDifferences(
3566 const table::CellAddress& aCompare )
3569 return QueryDifferences_Impl( aCompare,
false );
3572uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryIntersection(
3573 const table::CellRangeAddress& aRange )
3576 ScRange aMask(
static_cast<SCCOL>(aRange.StartColumn),
static_cast<SCROW>(aRange.StartRow), aRange.Sheet,
3577 static_cast<SCCOL>(aRange.EndColumn),
static_cast<SCROW>(aRange.EndRow), aRange.Sheet );
3580 for (
size_t i = 0, nCount = aRanges.size(); i < nCount; ++i )
3582 ScRange aTemp( aRanges[ i ] );
3583 if ( aTemp.Intersects( aMask ) )
3584 aNew.
Join(
ScRange( std::max( aTemp.aStart.Col(), aMask.aStart.Col() ),
3585 std::max( aTemp.aStart.Row(), aMask.aStart.Row() ),
3586 std::max( aTemp.aStart.Tab(), aMask.aStart.Tab() ),
3587 std::min( aTemp.aEnd.Col(), aMask.aEnd.Col() ),
3588 std::min( aTemp.aEnd.Row(), aMask.aEnd.Row() ),
3589 std::min( aTemp.aEnd.Tab(), aMask.aEnd.Tab() ) ) );
3592 return new ScCellRangesObj( pDocShell, aNew );
3597uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPrecedents(
3613 aMarkData.MarkFromRangeList( aNewRanges,
false );
3615 for (
size_t nR = 0, nCount = aNewRanges.
size(); nR<nCount; ++nR)
3617 ScRange const & rRange = aNewRanges[ nR];
3619 for (
bool bHasCell = aIter.first(); bHasCell; bHasCell = aIter.next())
3626 while ( aRefIter.GetNextRef( aRefRange) )
3628 if ( bRecursive && !bFound && !aMarkData.IsAllMarked( aRefRange ) )
3630 aMarkData.SetMultiMarkArea(aRefRange);
3635 aMarkData.FillRangeListWithMarks( &aNewRanges,
true );
3637 while ( bRecursive && bFound );
3639 return new ScCellRangesObj( pDocShell, aNewRanges );
3645uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependents(
3661 aMarkData.MarkFromRangeList( aNewRanges,
false );
3666 for (
bool bHasCell = aCellIter.first(); bHasCell; bHasCell = aCellIter.next())
3674 while ( aIter.GetNextRef( aRefRange) && !bMark )
3676 size_t nRangesCount = aNewRanges.
size();
3677 for (
size_t nR = 0; nR < nRangesCount; ++nR)
3679 ScRange const & rRange = aNewRanges[ nR ];
3689 ScRange aCellRange(aCellIter.GetPos());
3690 if ( bRecursive && !bFound && !aMarkData.IsAllMarked( aCellRange ) )
3692 aMarkData.SetMultiMarkArea(aCellRange);
3696 aMarkData.FillRangeListWithMarks( &aNewRanges,
true );
3698 while ( bRecursive && bFound );
3700 return new ScCellRangesObj( pDocShell, aNewRanges );
3708uno::Reference<util::XSearchDescriptor> SAL_CALL ScCellRangesBase::createSearchDescriptor()
3713uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangesBase::findAll(
3714 const uno::Reference<util::XSearchDescriptor>& xDesc )
3718 uno::Reference<container::XIndexAccess> xRet;
3719 if ( pDocShell && xDesc.is() )
3728 pSearchItem->
SetCommand( SvxSearchCmd::FIND_ALL );
3734 OUString aDummyUndo;
3739 bool bMatchedRangesWereClamped =
false;
3741 *pSearchItem, nCol, nRow, nTab, aMark, aMatchedRanges, aDummyUndo,
nullptr, bMatchedRangesWereClamped);
3745 xRet.set(
new ScCellRangesObj( pDocShell, aMatchedRanges ));
3753uno::Reference<uno::XInterface> ScCellRangesBase::Find_Impl(
3754 const uno::Reference<util::XSearchDescriptor>& xDesc,
3757 uno::Reference<uno::XInterface> xRet;
3758 if ( pDocShell && xDesc.is() )
3767 pSearchItem->
SetCommand( SvxSearchCmd::FIND );
3777 pLastPos->
GetVars( nCol, nRow, nTab );
3784 OUString aDummyUndo;
3786 bool bMatchedRangesWereClamped;
3788 *pSearchItem, nCol, nRow, nTab, aMark, aMatchedRanges, aDummyUndo,
nullptr, bMatchedRangesWereClamped);
3791 ScAddress aFoundPos( nCol, nRow, nTab );
3792 xRet.set(cppu::getXWeak(
new ScCellObj( pDocShell, aFoundPos )));
3800uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findFirst(
3801 const uno::Reference<util::XSearchDescriptor>& xDesc )
3804 return Find_Impl( xDesc,
nullptr );
3807uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findNext(
3808 const uno::Reference<uno::XInterface>& xStartAt,
3809 const uno::Reference<util::XSearchDescriptor >& xDesc )
3812 if ( xStartAt.is() )
3814 ScCellRangesBase* pRangesImp =
dynamic_cast<ScCellRangesBase*
>( xStartAt.get() );
3815 if ( pRangesImp && pRangesImp->GetDocShell() == pDocShell )
3817 const ScRangeList& rStartRanges = pRangesImp->GetRangeList();
3818 if ( rStartRanges.
size() == 1 )
3820 ScAddress aStartPos = rStartRanges[ 0 ].aStart;
3821 return Find_Impl( xDesc, &aStartPos );
3830uno::Reference<util::XReplaceDescriptor> SAL_CALL ScCellRangesBase::createReplaceDescriptor()
3835sal_Int32 SAL_CALL ScCellRangesBase::replaceAll(
const uno::Reference<util::XSearchDescriptor>& xDesc )
3838 sal_uInt64 nReplaced = 0;
3839 if ( pDocShell && xDesc.is() )
3849 pSearchItem->
SetCommand( SvxSearchCmd::REPLACE_ALL );
3856 bool bProtected = !pDocShell->IsEditable();
3857 for (
const auto& rTab : aMark)
3859 if (rTab >= nTabCount)
3870 SCTAB nTab = aMark.GetFirstSelected();
3879 pUndoDoc->InitUndo( rDoc, nTab, nTab );
3881 for (
const auto& rTab : aMark)
3883 if (rTab >= nTabCount)
3885 if (rTab != nTab && bUndo)
3886 pUndoDoc->AddUndoTab( rTab, rTab );
3888 std::unique_ptr<ScMarkData> pUndoMark;
3892 bool bFound =
false;
3896 bool bMatchedRangesWereClamped;
3898 *pSearchItem, nCol, nRow, nTab, aMark, aMatchedRanges, aUndoStr, pUndoDoc.get(), bMatchedRangesWereClamped );
3902 nReplaced = pUndoDoc->GetCellCount();
3904 pDocShell->GetUndoManager()->AddUndoAction(
3905 std::make_unique<ScUndoReplace>( pDocShell, *pUndoMark, nCol, nRow, nTab,
3906 aUndoStr, std::move(pUndoDoc), pSearchItem ) );
3908 pDocShell->PostPaintGridAll();
3909 pDocShell->SetDocumentModified();
3919 : ScCellRangesBase(pDocSh, rR)
3923ScCellRangesObj::~ScCellRangesObj()
3927void ScCellRangesObj::RefChanged()
3929 ScCellRangesBase::RefChanged();
3943 return ScCellRangesBase::queryInterface( rType );
3946void SAL_CALL ScCellRangesObj::acquire() noexcept
3948 ScCellRangesBase::acquire();
3951void SAL_CALL ScCellRangesObj::release() noexcept
3953 ScCellRangesBase::release();
3956uno::Sequence<uno::Type> SAL_CALL ScCellRangesObj::getTypes()
3959 ScCellRangesBase::getTypes(),
3960 uno::Sequence<uno::Type>
3969uno::Sequence<sal_Int8> SAL_CALL ScCellRangesObj::getImplementationId()
3971 return css::uno::Sequence<sal_Int8>();
3980 if ( pDocSh && nIndex >= 0 && nIndex < sal::static_int_cast<sal_Int32>(rRanges.
size()) )
3992uno::Sequence<table::CellRangeAddress> SAL_CALL ScCellRangesObj::getRangeAddresses()
3998 if ( pDocSh && nCount )
4000 table::CellRangeAddress aRangeAddress;
4001 uno::Sequence<table::CellRangeAddress>
aSeq(nCount);
4002 table::CellRangeAddress* pAry =
aSeq.getArray();
4006 pAry[
i] = aRangeAddress;
4014uno::Reference<container::XEnumerationAccess> SAL_CALL ScCellRangesObj::getCells()
4030OUString SAL_CALL ScCellRangesObj::getRangeAddressesAsString()
4043void SAL_CALL ScCellRangesObj::addRangeAddress(
const table::CellRangeAddress& rRange,
4048 static_cast<SCROW>(rRange.StartRow),
4049 static_cast<SCTAB>(rRange.Sheet),
4050 static_cast<SCCOL>(rRange.EndColumn),
4051 static_cast<SCROW>(rRange.EndRow),
4052 static_cast<SCTAB>(rRange.Sheet));
4053 AddRange(aRange, bMergeRanges);
4058 sal_uInt16
nCount = rNamedEntries.size();
4060 if ( rNamedEntries[
n].GetRange() == rRange )
4061 rNamedEntries.erase( rNamedEntries.begin() +
n );
4064void SAL_CALL ScCellRangesObj::removeRangeAddress(
const table::CellRangeAddress& rRange )
4071 for (
size_t i = 0;
i < rRanges.
size(); ++
i)
4073 if (rRanges[ i].aStart.Tab() == rRange.Sheet)
4079 aNotSheetRanges.
push_back( rRanges[ i ] );
4082 ScMarkData aMarkData(GetDocument()->GetSheetLimits());
4083 aMarkData.MarkFromRangeList( aSheetRanges,
false );
4085 static_cast<SCROW>(rRange.StartRow),
4086 static_cast<SCTAB>(rRange.Sheet),
4087 static_cast<SCCOL>(rRange.EndColumn),
4088 static_cast<SCROW>(rRange.EndRow),
4089 static_cast<SCTAB>(rRange.Sheet));
4090 if (aMarkData.GetTableSelect( aRange.aStart.Tab() ))
4092 aMarkData.MarkToMulti();
4093 if (!aMarkData.IsAllMarked( aRange ) )
4094 throw container::NoSuchElementException();
4096 aMarkData.SetMultiMarkArea( aRange,
false );
4100 SetNewRanges(aNotSheetRanges);
4102 aMarkData.FillRangeListWithMarks( &aNew,
false );
4103 for (
size_t j = 0; j < aNew.
size(); ++j)
4105 AddRange(aNew[ j ],
false);
4109void SAL_CALL ScCellRangesObj::addRangeAddresses(
const uno::Sequence<table::CellRangeAddress >& rRanges,
4113 for (
const table::CellRangeAddress& rRange : rRanges)
4116 static_cast<SCROW>(rRange.StartRow),
4117 static_cast<SCTAB>(rRange.Sheet),
4118 static_cast<SCCOL>(rRange.EndColumn),
4119 static_cast<SCROW>(rRange.EndRow),
4120 static_cast<SCTAB>(rRange.Sheet));
4121 AddRange(aRange, bMergeRanges);
4125void SAL_CALL ScCellRangesObj::removeRangeAddresses(
const uno::Sequence<table::CellRangeAddress >& rRangeSeq )
4128 for (
const table::CellRangeAddress& rRange : rRangeSeq)
4130 removeRangeAddress(rRange);
4136static void lcl_RemoveNamedEntry( std::vector<ScCellRangesObj::ScNamedEntry>& rNamedEntries, std::u16string_view rName )
4138 sal_uInt16
nCount = rNamedEntries.size();
4140 if ( rNamedEntries[
n].
GetName() == rName )
4141 rNamedEntries.erase( rNamedEntries.begin() +
n );
4144void SAL_CALL ScCellRangesObj::insertByName(
const OUString& aName,
const uno::Any& aElement )
4152 uno::Reference<uno::XInterface> xInterface(aElement, uno::UNO_QUERY);
4153 if ( pDocSh && xInterface.is() )
4155 ScCellRangesBase* pRangesImp =
dynamic_cast<ScCellRangesBase*
>( xInterface.get() );
4156 if ( pRangesImp && pRangesImp->GetDocShell() == pDocSh )
4160 if ( !
aName.isEmpty() )
4162 size_t nNamedCount = m_aNamedEntries.size();
4163 for (
size_t n = 0;
n < nNamedCount;
n++)
4166 throw container::ElementExistException();
4171 const ScRangeList& rAddRanges = pRangesImp->GetRangeList();
4172 size_t nAddCount = rAddRanges.
size();
4173 for (
size_t i = 0;
i < nAddCount;
i++ )
4174 aNew.
Join( rAddRanges[ i ] );
4178 if ( !
aName.isEmpty() && nAddCount == 1 )
4183 m_aNamedEntries.emplace_back( ScNamedEntry{
aName, rAddRanges[ 0 ]} );
4191 throw lang::IllegalArgumentException();
4196 std::u16string_view rName,
size_t& rIndex )
4205 if ( aRangeStr == rName )
4217 const OUString& rName,
ScRange& rFound )
4224 rFound = rRanges[
nIndex ];
4239 rFound = aCellRange;
4246 for (
const auto & rNamedEntry : rNamedEntries)
4247 if ( rNamedEntry.GetName() == rName )
4251 const ScRange& rComp = rNamedEntry.GetRange();
4264void SAL_CALL ScCellRangesObj::removeByName(
const OUString& aName )
4275 for (
size_t i = 0, nCount = rRanges.
size(); i < nCount; i++ )
4289 sal_uInt16
nCount = m_aNamedEntries.size();
4290 for (sal_uInt16 n=0;
n<
nCount && !bValid;
n++)
4294 aDiff.
push_back(m_aNamedEntries[n].GetRange());
4300 ScMarkData aMarkData(GetDocument()->GetSheetLimits());
4301 aMarkData.MarkFromRangeList( rRanges,
false );
4303 for (
size_t i = 0, nDiffCount = aDiff.
size(); i < nDiffCount; i++ )
4305 ScRange const & rDiffRange = aDiff[
i ];
4306 if (aMarkData.GetTableSelect( rDiffRange.
aStart.
Tab() ))
4307 aMarkData.SetMultiMarkArea( rDiffRange,
false );
4311 aMarkData.FillRangeListWithMarks( &aNew,
false );
4318 if (!m_aNamedEntries.empty())
4322 throw container::NoSuchElementException();
4327void SAL_CALL ScCellRangesObj::replaceByName(
const OUString& aName,
const uno::Any& aElement )
4331 removeByName( aName );
4332 insertByName( aName, aElement );
4337uno::Any SAL_CALL ScCellRangesObj::getByName(
const OUString& aName )
4346 pDocSh, aName, aRange))
4347 throw container::NoSuchElementException();
4349 uno::Reference<table::XCellRange> xRange;
4360 const ScRange& rRange, OUString& rName )
4362 sal_uInt16
nCount = rNamedEntries.size();
4364 if (rNamedEntries[
i].GetRange() == rRange)
4366 rName = rNamedEntries[
i].GetName();
4372uno::Sequence<OUString> SAL_CALL ScCellRangesObj::getElementNames()
4384 uno::Sequence<OUString>
aSeq(nCount);
4385 OUString* pAry =
aSeq.getArray();
4389 ScRange const & rRange = rRanges[
i ];
4390 if (m_aNamedEntries.empty() ||
4395 pAry[
i] = aRangeStr;
4402sal_Bool SAL_CALL ScCellRangesObj::hasByName(
const OUString& aName )
4414uno::Reference<container::XEnumeration> SAL_CALL ScCellRangesObj::createEnumeration()
4417 return new ScIndexEnumeration(
this,
"com.sun.star.sheet.SheetCellRangesEnumeration");
4422sal_Int32 SAL_CALL ScCellRangesObj::getCount()
4426 return rRanges.
size();
4429uno::Any SAL_CALL ScCellRangesObj::getByIndex( sal_Int32 nIndex )
4432 uno::Reference<table::XCellRange> xRange(GetObjectByIndex_Impl(nIndex));
4434 throw lang::IndexOutOfBoundsException();
4440uno::Type SAL_CALL ScCellRangesObj::getElementType()
4445sal_Bool SAL_CALL ScCellRangesObj::hasElements()
4449 return !rRanges.
empty();
4453OUString SAL_CALL ScCellRangesObj::getImplementationName()
4455 return "ScCellRangesObj";
4458sal_Bool SAL_CALL ScCellRangesObj::supportsService(
const OUString& rServiceName )
4463uno::Sequence<OUString> SAL_CALL ScCellRangesObj::getSupportedServiceNames()
4474 if (
auto pDocShell =
dynamic_cast<ScDocShell*
>( pObjSh) )
4480 ScCellRangesBase( pDocSh, rR ),
4493 ScCellRangesBase::RefChanged();
4496 OSL_ENSURE(rRanges.
size() == 1,
"What ranges ?!?!");
4497 if ( !rRanges.
empty() )
4499 const ScRange & rFirst = rRanges[0];
4527 return ScCellRangesBase::queryInterface( rType );
4532 ScCellRangesBase::acquire();
4537 ScCellRangesBase::release();
4543 ScCellRangesBase::getTypes(),
4544 uno::Sequence<uno::Type>
4569 return css::uno::Sequence<sal_Int8>();
4578 sal_Int32 nColumn, sal_Int32 nRow )
4582 throw uno::RuntimeException();
4584 if ( nColumn >= 0 && nRow >= 0 )
4596 throw lang::IndexOutOfBoundsException();
4600 sal_Int32 nColumn, sal_Int32 nRow )
4608 sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom )
4614 throw uno::RuntimeException();
4616 if ( nLeft >= 0 && nTop >= 0 && nRight >= 0 && nBottom >= 0 )
4632 throw lang::IndexOutOfBoundsException();
4636 const OUString& aName )
4655 bool bFound =
false;
4688 throw uno::RuntimeException();
4701 OSL_FAIL(
"Document invalid");
4713 OSL_FAIL(
"Document invalid");
4722 table::CellRangeAddress aRet;
4736 OSL_FAIL(
"Document invalid");
4764 if (aStart1 == aStart2)
4778 if ( !rFormula.isEmpty() )
4783 throw uno::RuntimeException();
4791 ScMarkData aMark(GetDocument()->GetSheetLimits());
4812 uno::Sequence<sheet::FormulaToken> aSequence;
4828 if (aStart1 == aStart2)
4847 if ( rTokens.hasElements() )
4851 throw uno::RuntimeException();
4882 throw uno::RuntimeException();
4892 uno::Sequence< uno::Sequence<uno::Any> >
aSeq;
4893 if ( aAny >>=
aSeq )
4898 throw uno::RuntimeException();
4902 const uno::Sequence< uno::Sequence<uno::Any> >& aArray )
4915 throw uno::RuntimeException();
4927 throw uno::RuntimeException();
4937 SCCOL nColCount = nEndCol + 1 - nStartCol;
4938 SCROW nRowCount = nEndRow + 1 - nStartRow;
4941 uno::Sequence< uno::Sequence<OUString> > aRowSeq( nRowCount );
4942 uno::Sequence<OUString>* pRowAry = aRowSeq.getArray();
4943 for (
SCROW nRowIndex = 0; nRowIndex < nRowCount; nRowIndex++)
4945 uno::Sequence<OUString> aColSeq( nColCount );
4946 OUString* pColAry = aColSeq.getArray();
4947 for (
SCCOL nColIndex = 0; nColIndex < nColCount; nColIndex++)
4949 ScAddress( nStartCol+nColIndex, nStartRow+nRowIndex, nTab ),
true );
4951 pRowAry[nRowIndex] = aColSeq;
4957 throw uno::RuntimeException();
4961 const uno::Sequence< uno::Sequence<OUString> >& aArray )
4976 throw uno::RuntimeException();
4982 sheet::TableOperationMode nMode,
4983 const table::CellAddress& aColumnCell,
4984 const table::CellAddress& aRowCell )
4991 bool bError =
false;
4994 static_cast<SCROW>(aFormulaRange.StartRow), aFormulaRange.Sheet );
4996 static_cast<SCROW>(aFormulaRange.EndRow), aFormulaRange.Sheet );
4998 static_cast<SCROW>(aRowCell.Row), aRowCell.Sheet );
5000 static_cast<SCROW>(aColumnCell.Row), aColumnCell.Sheet );
5004 case sheet::TableOperationMode_COLUMN:
5007 case sheet::TableOperationMode_ROW:
5010 case sheet::TableOperationMode_BOTH:
5052 sheet::FillMode nFillMode, sheet::FillDateMode nFillDateMode,
5053 double fStep,
double fEndValue )
5060 bool bError =
false;
5063 switch (nFillDirection)
5065 case sheet::FillDirection_TO_BOTTOM:
5068 case sheet::FillDirection_TO_RIGHT:
5071 case sheet::FillDirection_TO_TOP:
5074 case sheet::FillDirection_TO_LEFT:
5082 switch ( nFillMode )
5084 case sheet::FillMode_SIMPLE:
5087 case sheet::FillMode_LINEAR:
5090 case sheet::FillMode_GROWTH:
5093 case sheet::FillMode_DATE:
5096 case sheet::FillMode_AUTO:
5104 switch ( nFillDateMode )
5106 case sheet::FillDateMode_FILL_DATE_DAY:
5109 case sheet::FillDateMode_FILL_DATE_WEEKDAY:
5112 case sheet::FillDateMode_FILL_DATE_MONTH:
5115 case sheet::FillDateMode_FILL_DATE_YEAR:
5128 sal_Int32 nSourceCount )
5132 if ( !(pDocSh && nSourceCount) )
5138 bool bError =
false;
5139 switch (nFillDirection)
5141 case sheet::FillDirection_TO_BOTTOM:
5146 case sheet::FillDirection_TO_RIGHT:
5151 case sheet::FillDirection_TO_TOP:
5156 case sheet::FillDirection_TO_LEFT:
5165 if (nCount < 0 || nCount > rDoc.
MaxRow())
5182 if (it == pAutoFormat->
end())
5183 throw lang::IllegalArgumentException();
5186 size_t nIndex = std::distance(itBeg, it);
5205 pData->GetSortParam(aParam);
5209 pData->GetArea(aDBRange);
5237 pData->GetSortParam(aParam);
5273 (void)aFunc.
Sort( nTab, aParam,
true,
true,
true );
5284 if ( !bEmpty && pDocSh )
5291 pData->GetQueryParam(aParam);
5294 pData->GetArea(aDBRange);
5303 rEntry.
nField -= nFieldStart;
5305 pNew->SetParam(aParam);
5315 if (!xDescriptor.is())
return;
5324 uno::Reference< sheet::XSheetFilterDescriptor2 > xDescriptor2( xDescriptor, uno::UNO_QUERY );
5325 if ( xDescriptor2.is() )
5327 xImpl->setFilterFields2( xDescriptor2->getFilterFields2() );
5331 xImpl->setFilterFields( xDescriptor->getFilterFields() );
5335 uno::Reference<beans::XPropertySet> xPropSet( xDescriptor, uno::UNO_QUERY );
5354 rEntry.
nField += nFieldStart;
5380 aFunc.
Query( nTab, aParam,
nullptr,
true,
true );
5388 const uno::Reference<sheet::XSheetFilterable>& xObject )
5395 uno::Reference<sheet::XCellRangeAddressable> xAddr( xObject, uno::UNO_QUERY );
5398 if ( !pDocSh || !xAddr.is() )
5400 OSL_FAIL(
"no document or no area");
5411 table::CellRangeAddress aDataAddress(xAddr->getRangeAddress());
5412 aParam.
nCol1 =
static_cast<SCCOL>(aDataAddress.StartColumn);
5413 aParam.
nRow1 =
static_cast<SCROW>(aDataAddress.StartRow);
5414 aParam.
nCol2 =
static_cast<SCCOL>(aDataAddress.EndColumn);
5415 aParam.
nRow2 =
static_cast<SCROW>(aDataAddress.EndRow);
5416 aParam.
nTab = aDataAddress.Sheet;
5424 static_cast<SCCOLROW>(aDataAddress.StartColumn) :
5425 static_cast<SCCOLROW>(aDataAddress.StartRow);
5431 rEntry.
nField -= nFieldStart;
5434 pNew->SetParam( aParam );
5446 if ( !bEmpty && pDocSh )
5453 pData->GetSubTotalParam(aParam);
5456 pData->GetArea(aDBRange);
5462 if ( aParam.
nField[
i] >= nFieldStart )
5463 aParam.
nField[
i] = sal::static_int_cast<SCCOL>( aParam.
nField[
i] - nFieldStart );
5469 pNew->SetParam(aParam);
5476 const uno::Reference<sheet::XSubTotalDescriptor>& xDescriptor,
5481 if (!xDescriptor.is())
return;
5487 if (!(pDocSh && pImp))
5499 aParam.
nField[
i] = sal::static_int_cast<SCCOL>( aParam.
nField[
i] + nFieldStart );
5530 pData->GetSubTotalParam(aParam);
5551 if ( !bEmpty && pDocSh )
5556 pData->GetImportParam(aParam);
5585 aFunc.
DoImport( nTab, aParam,
nullptr );
5615 static uno::Reference<beans::XPropertySetInfo> aRef(
5625 ScCellRangesBase::SetOnePropertyValue( pEntry, aValue );
5642 awt::Point aPos( aMMRect.
Left(), aMMRect.
Top() );
5656 awt::Size aAwtSize( aSize.
Width(), aSize.
Height() );
5661 ScCellRangesBase::GetOnePropertyValue( pEntry, rAny );
5673 return "ScCellRangeObj";
5704 nActionLockCount( 0 )
5735 OSL_ENSURE(rRanges.
size() == 1,
"What ranges ?!?!");
5736 if ( !rRanges.
empty() )
5774 uno::Sequence<uno::Type>
5791 return css::uno::Sequence<sal_Int8>();
5859 if (pFormatter->
GetType(nOldFormat) == SvNumFormatType::TEXT)
5876 if (nNewFormat != nOldFormat)
5913 const uno::Reference<text::XTextRange>& aTextPosition )
5918 SvxUnoTextRangeBase* pRange = comphelper::getFromUnoTunnel<SvxUnoTextRangeBase>( aTextPosition );
5920 pCursor->SetSelection( pRange->GetSelection() );
5923 ScCellTextCursor* pOther = comphelper::getFromUnoTunnel<ScCellTextCursor>( aTextPosition );
5925 throw uno::RuntimeException();
5927 pCursor->SetSelection( pOther->GetSelection() );
5951 const OUString& aString,
sal_Bool bAbsorb )
5961 sal_Int16 nControlCharacter,
sal_Bool bAbsorb )
5968 const uno::Reference<text::XTextContent >& xContent,
5973 if ( pDocSh && xContent.is() )
5976 SvxUnoTextRangeBase* pTextRange = comphelper::getFromUnoTunnel<ScCellTextCursor>( xRange );
5978 if ( pCellField && !pCellField->
IsInserted() && pTextRange )
5981 ESelection aSelection(pTextRange->GetSelection());
6003 uno::Reference<text::XTextRange> xParent(
this);
6005 xParent, std::make_unique<ScCellEditSource>(pDocSh,
aCellPos), aSelection);
6012 pTextRange->SetSelection( aSelection );
6023 if ( xContent.is() )
6026 if ( pCellField && pCellField->
IsInserted() )
6128 table::CellContentType eRet = table::CellContentType_EMPTY;
6136 eRet = table::CellContentType_VALUE;
6140 eRet = table::CellContentType_TEXT;
6143 eRet = table::CellContentType_FORMULA;
6146 eRet = table::CellContentType_EMPTY;
6151 OSL_FAIL(
"no DocShell");
6160 sal_Int32 eRet = sheet::FormulaResult::STRING;
6171 else if (pFCell->
GetErrCode() != FormulaError::NONE )
6173 eRet = sheet::FormulaResult::ERROR;
6177 eRet = sheet::FormulaResult::VALUE;
6181 eRet = sheet::FormulaResult::STRING;
6187 OSL_FAIL(
"no DocShell");
6202 return bValue ? table::CellContentType_VALUE : table::CellContentType_TEXT;
6214 OSL_FAIL(
"no DocShell");
6223 return static_cast<sal_Int32
>(nError);
6231 uno::Sequence<sheet::FormulaToken> aSequence;
6267 table::CellAddress aAdr;
6283 OSL_FAIL(
"getAnnotation without DocShell");
6295 uno::Reference<text::XTextRange> xContent(
this);
6313 static uno::Reference<beans::XPropertySetInfo> aRef(
6478 return ScRange(0, 0, nTab, nMaxcol, nMaxRow, nTab);
6536 uno::Sequence<uno::Type>
6563 return css::uno::Sequence<sal_Int8>();
6571 OSL_ENSURE(rRanges.
size() == 1,
"What ranges ?!?!");
6572 if ( !rRanges.
empty() )
6574 return rRanges[ 0 ].aStart.Tab();
6588 OSL_FAIL(
"no document");
6599 OSL_FAIL(
"no document");
6610 OSL_FAIL(
"no document");
6622 OSL_FAIL(
"no document");
6634 OSL_FAIL(
"no document");
6639 const OUString& rRange )
6660 const uno::Reference<sheet::XSheetCellRange>& xCellRange )
6664 if ( pDocSh && xCellRange.is() )
6666 ScCellRangesBase* pRangesImp =
dynamic_cast<ScCellRangesBase*
>( xCellRange.get() );
6669 const ScRangeList& rRanges = pRangesImp->GetRangeList();
6670 SAL_WARN_IF( rRanges.
size() != 1,
"sc",
"ScTableSheetObj::createCursorByRange: Range? Ranges?");
6671 if (rRanges.
empty())
6689 sal_Int32 nColumn, sal_Int32 nRow )
6696 sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom )
6726 sheet::TablePageBreakData
aData;
6727 uno::Sequence<sheet::TablePageBreakData>
aSeq(
nCount);
6728 sheet::TablePageBreakData* pAry =
aSeq.getArray();
6729 sal_uInt16
nPos = 0;
6735 aData.Position = nCol;
6785 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true,
true );
6788 std::make_unique<ScUndoRemoveBreaks>( pDocSh, nTab, std::move(pUndoDoc) ) );
6830 OSL_ENSURE(pDrawLayer,
"Cannot create Draw-Layer");
6833 SdrPage* pPage = pDrawLayer->
GetPage(
static_cast<sal_uInt16
>(nTab));
6834 OSL_ENSURE(pPage,
"Draw-Page not found");
6836 return uno::Reference<drawing::XDrawPage> (pPage->
getUnoPage(), uno::UNO_QUERY);
6847 sheet::CellInsertMode nMode )
6858 case sheet::CellInsertMode_NONE: bDo =
false;
break;
6859 case sheet::CellInsertMode_DOWN: eCmd =
INS_CELLSDOWN;
break;
6864 OSL_FAIL(
"insertCells: wrong mode");
6870 OSL_ENSURE( rRangeAddress.Sheet ==
GetTab_Impl(),
"wrong table in CellRangeAddress" );
6878 sheet::CellDeleteMode nMode )
6889 case sheet::CellDeleteMode_NONE: bDo =
false;
break;
6895 OSL_FAIL(
"deleteCells: wrong mode");
6901 OSL_ENSURE( rRangeAddress.Sheet ==
GetTab_Impl(),
"wrong table in CellRangeAddress" );
6909 const table::CellRangeAddress& aSource )
6915 OSL_ENSURE( aSource.Sheet ==
GetTab_Impl(),
"wrong table in CellRangeAddress" );
6918 ScAddress aDestPos(
static_cast<SCCOL>(aDestination.Column),
static_cast<SCROW>(aDestination.Row), aDestination.Sheet );
6924 const table::CellRangeAddress& aSource )
6930 OSL_ENSURE( aSource.Sheet ==
GetTab_Impl(),
"wrong table in CellRangeAddress" );
6933 ScAddress aDestPos(
static_cast<SCCOL>(aDestination.Column),
static_cast<SCROW>(aDestination.Row), aDestination.Sheet );
6955 std::make_unique<ScUndoPrintRange>(
6958 std::move(pOldRanges),
6983 table::CellRangeAddress aRangeAddress;
6984 uno::Sequence<table::CellRangeAddress>
aSeq(
nCount);
6985 table::CellRangeAddress* pAry =
aSeq.getArray();
6989 OSL_ENSURE(pRange,
"where is the printing area");
6993 aRangeAddress.Sheet = nTab;
6994 pAry[
i] = aRangeAddress;
6999 return uno::Sequence<table::CellRangeAddress>();
7003 const uno::Sequence<table::CellRangeAddress>& aPrintAreas )
7010 std::unique_ptr<ScPrintRangeSaver> pOldRanges;
7017 sal_uInt16
nCount =
static_cast<sal_uInt16
>(aPrintAreas.getLength());
7022 for (
const table::CellRangeAddress& rPrintArea : aPrintAreas)
7058 if ( bPrintTitleColumns )
7076 table::CellRangeAddress aRet;
7136 if ( bPrintTitleRows )
7154 table::CellRangeAddress aRet;
7194 sheet::SheetLinkMode eRet = sheet::SheetLinkMode_NONE;
7200 eRet = sheet::SheetLinkMode_NORMAL;
7202 eRet = sheet::SheetLinkMode_VALUE;
7216 link( aUrl, aSheet,
"",
"", nLinkMode );
7238 link( aLinkUrl, aSheet,
"",
"",
eMode );
7260 link( aUrl, aLinkSheetName,
"",
"",
eMode );
7264 const OUString& aFilterName,
const OUString& aFilterOptions,
7265 sheet::SheetLinkMode nMode )
7275 OUString aFileString = aUrl;
7276 OUString aFilterString = aFilterName;
7277 OUString aOptString = aFilterOptions;
7280 if (aFilterString.isEmpty())
7288 if ( nMode == sheet::SheetLinkMode_NORMAL )
7290 else if ( nMode == sheet::SheetLinkMode_VALUE )
7293 rDoc.
SetLink( nTab, nLinkMode, aFileString, aFilterString, aOptString, aSheetName, 0 );
7313 if (
auto pTabLink =
dynamic_cast<ScTableLink*
>( pBase))
7315 if ( aFileString == pTabLink->GetFileName() )
7334 OSL_ENSURE( aPosition.Sheet == nTab,
"wrong table in CellAddress" );
7335 ScAddress aPos(
static_cast<SCCOL>(aPosition.Column),
static_cast<SCROW>(aPosition.Row), nTab );
7348 OSL_ENSURE( aPosition.Sheet == nTab,
"wrong table in CellAddress" );
7349 ScAddress aPos(
static_cast<SCCOL>(aPosition.Column),
static_cast<SCROW>(aPosition.Row), nTab );
7362 OSL_ENSURE( aPosition.Sheet == nTab,
"wrong table in CellAddress" );
7363 ScAddress aPos(
static_cast<SCCOL>(aPosition.Column),
static_cast<SCROW>(aPosition.Row), nTab );
7376 OSL_ENSURE( aPosition.Sheet == nTab,
"wrong table in CellAddress" );
7377 ScAddress aPos(
static_cast<SCCOL>(aPosition.Column),
static_cast<SCROW>(aPosition.Row), nTab );
7390 OSL_ENSURE( aPosition.Sheet == nTab,
"wrong table in CellAddress" );
7391 ScAddress aPos(
static_cast<SCCOL>(aPosition.Column),
static_cast<SCROW>(aPosition.Row), nTab );
7417 table::TableOrientation nOrientation )
7423 bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
7427 aFunc.
MakeOutline( aGroupRange, bColumns,
true,
true );
7432 table::TableOrientation nOrientation )
7438 bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
7503 bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS );
7506 aFunc.
SelectLevel( nTab, bColumns, nLevel,
true,
true );
7531 throw lang::IllegalArgumentException();
7542 OSL_FAIL(
"no DocShell");
7590 aComment = aScenarioComment;
7611 for (
const table::CellRangeAddress& rRange : rScenRanges)
7613 OSL_ENSURE( rRange.Sheet == nTab,
"addRanges with wrong Tab" );
7614 ScRange aOneRange(
static_cast<SCCOL>(rRange.StartColumn),
static_cast<SCROW>(rRange.StartRow), nTab,
7615 static_cast<SCCOL>(rRange.EndColumn),
static_cast<SCROW>(rRange.EndRow), nTab );
7639 SCTAB nDestTab = nTab;
7640 while ( nDestTab > 0 && rDoc.
IsScenario(nDestTab) )
7663 uno::Sequence< table::CellRangeAddress > aRetRanges(
nCount );
7664 table::CellRangeAddress* pAry = aRetRanges.getArray();
7668 pAry->StartColumn = rRange.
aStart.
Col();
7670 pAry->EndColumn = rRange.
aEnd.
Col();
7671 pAry->EndRow = rRange.
aEnd.
Row();
7678 return uno::Sequence< table::CellRangeAddress > ();
7693 if ( !rDoc.
RenameTab( nTab, aDocTabName,
true ) )
7695 throw container::ElementExistException( OUString(), *
this );
7717 static uno::Reference<beans::XPropertySetInfo> aRef(
7730 ScCellRangesBase::SetOnePropertyValue(pEntry, aValue);
7748 aStrVal, SfxStyleFamily::Page ));
7763 pBindings->
Invalidate( SID_STATUS_PAGESTYLE );
7764 pBindings->
Invalidate( FID_RESET_PRINTZOOM );
7765 pBindings->
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
7766 pBindings->
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
7787 if (aValue >>= aColor)
7810 bool bModify(
false);
7843 bool bModify(
false);
7876 bool bModify(
false);
7909 bool bModify(
false);
7942 bool bModify(
false);
7975 bool bModify(
false);
8003 if (
nValue == css::text::WritingMode2::RL_TB)
8023 if ( aValue >>= aColor )
8032 if (aValue >>= aCodeName)
8039 uno::Reference<sheet::XConditionalFormats> xCondFormat;
8040 if (aValue >>= xCondFormat)
8057 throw uno::RuntimeException();
8165 rAny <<= sal_Int16(css::text::WritingMode2::RL_TB);
8167 rAny <<= sal_Int16(css::text::WritingMode2::LR_TB);
8172 rAny <<= bAutoPrint;
8186 rAny <<= uno::Reference<sheet::XConditionalFormats>(
new ScCondFormatsObj(pDocSh, nTab));
8201 return "ScTableSheetObj";
8256 return css::uno::Sequence<sal_Int8>();
8274 throw uno::RuntimeException();
8282 static uno::Reference<beans::XPropertySetInfo> aRef(
8295 ScCellRangesBase::SetOnePropertyValue(pEntry, aValue);
8310 std::vector<sc::ColRowSpan> aColArr(1,
sc::ColRowSpan(nCol,nCol));
8314 sal_Int32 nNewWidth = 0;
8315 if ( aValue >>= nNewWidth )
8357 throw uno::RuntimeException();
8371 rAny <<= static_cast<sal_Int32>(nWidth);
8375 bool bHidden = rDoc.
ColHidden(nCol, nTab);
8418 static uno::Reference<beans::XPropertySetInfo> aRef(
8431 ScCellRangesBase::SetOnePropertyValue(pEntry, aValue);
8447 std::vector<sc::ColRowSpan> aRowArr(1,
sc::ColRowSpan(nRow,nRow));
8451 sal_Int32 nNewHeight = 0;
8452 if ( aValue >>= nNewHeight )
8504 throw uno::RuntimeException();
8517 rAny <<= static_cast<sal_Int32>(nHeight);
8521 bool bHidden = rDoc.
RowHidden(nRow, nTab);
8554 pDocShell( pDocSh ),
8555 aRanges(
std::move( aR ))
8573 pRefHint->GetDx(), pRefHint->GetDy(), pRefHint->GetDz() );
8575 else if ( rHint.
GetId() == SfxHintId::Dying )
8605 bHas = xEnum->hasMoreElements();
8611 pDocShell( pDocSh ),
8612 aRanges(
std::move( aR )),
8633 bool bFound =
false;
8642 pMark->MarkToMulti();
8661 OSL_ENSURE(!
bAtEnd,
"too much Advance_Impl");
8666 pMark->MarkToMulti();
8698 aPos = aNew[ 0 ].aStart;
8704 else if ( rHint.
GetId() == SfxHintId::Dying )
8730 throw container::NoSuchElementException();
8734 pDocShell( pDocSh ),
8735 aTotalRange( rRange )
8757 else if ( rHint.
GetId() == SfxHintId::Dying )
8776 while ( aIter.
GetNext( nCol1, nCol2, nRow1, nRow2 ) )
8781 ScRange aNext( nCol1, nRow1, nTab, nCol2, nRow2, nTab );
8811 while ( aIter.
GetNext( nCol1, nCol2, nRow1, nRow2 ) )
8823 throw lang::IndexOutOfBoundsException();
8851 pDocShell( pDocSh ),
8852 nTab( rRange.aStart.
Tab() ),
8860 "CellFormatsEnumeration: different tables" );
8878 OSL_ENSURE(!
bAtEnd,
"too many Advance_Impl");
8884 pIter->DataChanged();
8890 if (
pIter->GetNext( nCol1, nCol2, nRow1, nRow2 ) )
8922 if (
nId == SfxHintId::Dying )
8927 else if (
nId == SfxHintId::DataChanged )
8947 throw container::NoSuchElementException();
8970 if ( rHint.
GetId() == SfxHintId::Dying )
8980struct ScPatternHashCode
8984 return reinterpret_cast<size_t>(pPattern);
8997class ScUniqueFormatsEntry
8999 enum EntryState { STATE_EMPTY, STATE_SINGLE, STATE_COMPLEX };
9004 std::vector<ScRange> aCompletedRanges;
9008 ScUniqueFormatsEntry() : eState( STATE_EMPTY ) {}
9010 void Join(
const ScRange& rNewRange );
9017void ScUniqueFormatsEntry::Join(
const ScRange& rNewRange )
9021 if ( eState == STATE_EMPTY )
9023 aSingleRange = rNewRange;
9024 eState = STATE_SINGLE;
9027 if ( eState == STATE_SINGLE )
9029 if ( aSingleRange.aStart.Row() == rNewRange.
aStart.
Row() &&
9030 aSingleRange.aEnd.Row() == rNewRange.
aEnd.
Row() &&
9031 aSingleRange.aEnd.Col() + 1 == rNewRange.
aStart.
Col() )
9037 SCROW nSingleRow = aSingleRange.aStart.Row();
9038 aJoinedRanges.emplace( nSingleRow, aSingleRange );
9039 eState = STATE_COMPLEX;
9050 ScRowRangeHashMap::iterator aIter( aJoinedRanges.find( nStartRow ) );
9051 if ( aIter != aJoinedRanges.end() )
9053 ScRange& rOldRange = aIter->second;
9063 aCompletedRanges.push_back( rOldRange );
9064 rOldRange = rNewRange;
9070 aJoinedRanges.emplace( nStartRow, rNewRange );
9074const ScRangeList& ScUniqueFormatsEntry::GetRanges()
9076 if ( eState == STATE_SINGLE )
9079 return *aReturnRanges;
9084 for (
const auto& rEntry : aJoinedRanges )
9085 aCompletedRanges.push_back( rEntry.second );
9086 aJoinedRanges.clear();
9090 std::sort( aCompletedRanges.begin(), aCompletedRanges.end() );
9095 aReturnRanges->
insert( aReturnRanges->end(), aCompletedRanges.begin(), aCompletedRanges.end() );
9096 aCompletedRanges.clear();
9098 return *aReturnRanges;
9104struct ScUniqueFormatsOrder
9109 OSL_ENSURE( !rList1.
empty() && !rList2.
empty(),
"ScUniqueFormatsOrder: empty list" );
9112 return ( rList1[ 0 ].aStart < rList2[ 0 ].aStart );
9123 OSL_ENSURE( rTotalRange.
aStart.
Tab() == rTotalRange.
aEnd.
Tab(),
"different tables" );
9135 std::unordered_map< const ScPatternAttr*, ScUniqueFormatsEntry, ScPatternHashCode > aHashMap;
9136 while (aIter.
GetNext( nCol1, nCol2, nRow1, nRow2 ) )
9138 ScRange aRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab );
9140 aHashMap[pPattern].Join( aRange );
9146 for (
auto& rMapEntry : aHashMap )
9148 ScUniqueFormatsEntry& rEntry = rMapEntry.second;
9175 throw lang::IndexOutOfBoundsException();
9203 aRangeLists(
std::move(rRangeLists)),
9204 pDocShell( pDocSh ),
9226 if ( rHint.
GetId() == SfxHintId::Dying )
9244 throw container::NoSuchElementException();
const PropertyValue * pValues
#define CHAR_COLOR_PROPERTIES
#define CELL_BORDER_PROPERTIES
#define CELL_BACKGROUND_COLOR_PROPERTIES
constexpr auto convertTwipToMm100(N n)
void ScColToAlpha(OUStringBuffer &rBuf, SCCOL nCol)
append alpha representation of column to buffer
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
@ Scenario
field button for datapilot
static const SvxItemPropertySet * lcl_GetEditPropertySet()
static OUString lcl_GetInputString(ScDocument &rDoc, const ScAddress &rPos, bool bEnglish)
static bool lcl_WholeSheet(const ScDocument &rDoc, const ScRangeList &rRanges)
static bool lcl_FindRangeByName(const ScRangeList &rRanges, ScDocShell *pDocSh, std::u16string_view rName, size_t &rIndex)
static bool lcl_PutDataArray(ScDocShell &rDocShell, const ScRange &rRange, const uno::Sequence< uno::Sequence< uno::Any > > &aData)
move lcl_PutDataArray to docfunc? merge loop with ScFunctionAccess::callFunction
static void lcl_GetPropertyWhich(const SfxItemPropertyMapEntry *pEntry, sal_uInt16 &rItemWhich)
constexpr OUStringLiteral SCCELLPROPERTIES_SERVICE
static bool lcl_PutFormulaArray(ScDocShell &rDocShell, const ScRange &rRange, const uno::Sequence< uno::Sequence< OUString > > &aData, const formula::FormulaGrammar::Grammar eGrammar)
static bool lcl_FindEntryName(const std::vector< ScCellRangesObj::ScNamedEntry > &rNamedEntries, const ScRange &rRange, OUString &rName)
static const SfxItemPropertySet * lcl_GetRangePropertySet()
constexpr OUStringLiteral SCSHEETCELLRANGES_SERVICE
static o3tl::span< const SfxItemPropertyMapEntry > lcl_GetEditPropertyMap()
constexpr OUStringLiteral SCSHEETCELL_SERVICE
constexpr OUStringLiteral SCSHEETCELLRANGE_SERVICE
static ScRange MaxDocRange(ScDocShell *pDocSh, SCTAB nTab)
static bool lcl_FindRangeOrEntry(const std::vector< ScCellRangesObj::ScNamedEntry > &rNamedEntries, const ScRangeList &rRanges, ScDocShell *pDocSh, const OUString &rName, ScRange &rFound)
static SCTAB lcl_FirstTab(const ScRangeList &rRanges)
static const SfxItemPropertySet * lcl_GetCellsPropertySet()
Instead of Which-ID 0 use special IDs and do not compare via names!
constexpr OUStringLiteral SCPARAPROPERTIES_SERVICE
constexpr OUStringLiteral SCCELL_SERVICE
constexpr OUStringLiteral SCSPREADSHEET_SERVICE
static void lcl_SetCellProperty(const SfxItemPropertyMapEntry &rEntry, const uno::Any &rValue, ScPatternAttr &rPattern, const ScDocument &rDoc, sal_uInt16 &rFirstItemId, sal_uInt16 &rSecondItemId)
static void lcl_CopyProperties(beans::XPropertySet &rDest, beans::XPropertySet &rSource)
constexpr OUStringLiteral SCCHARPROPERTIES_SERVICE
static const SfxItemPropertySet * lcl_GetColumnPropertySet()
static const SfxItemPropertySet * lcl_GetRowPropertySet()
static const SfxItemPropertySet * lcl_GetCellPropertySet()
constexpr OUStringLiteral SCCELLRANGE_SERVICE
std::unordered_map< SCROW, ScRange > ScRowRangeHashMap
static const SfxItemPropertySet * lcl_GetSheetPropertySet()
static void lcl_RemoveNamedEntry(std::vector< ScCellRangesObj::ScNamedEntry > &rNamedEntries, const ScRange &rRange)
IMPL_LINK(ScCellRangesBase, ValueListenerHdl, const SfxHint &, rHint, void)
sal_uInt16 GetValue() const
sal_uInt32 GetValue() const
OUString GetText(LineEnd eEnd=LINEEND_LF) const
std::unique_ptr< EditTextObject > CreateTextObject()
void SetText(const OUString &rStr)
void Set(SCCOL nCol, SCROW nRow, SCTAB nTab)
void GetVars(SCCOL &nColP, SCROW &nRowP, SCTAB &nTabP) const
static SC_DLLPUBLIC const Details detailsOOOa1
const ScPatternAttr * GetNext(SCCOL &rCol1, SCCOL &rCol2, SCROW &rRow1, SCROW &rRow2)
virtual void UpdateData() override
void SetDoUpdateData(bool bValue)
Walk through all cells in an area.
really derive cell from range?
virtual sal_Bool SAL_CALL isActionLocked() override
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange(const css::uno::Reference< css::text::XTextRange > &aTextPosition) override
virtual css::uno::Sequence< css::sheet::FormulaToken > SAL_CALL getTokens() override
css::table::CellContentType GetContentType_Impl()
SvxUnoText & GetUnoText()
rtl::Reference< SvxUnoText > mxUnoText
virtual void SAL_CALL release() noexcept override
void SetValue_Impl(double fValue)
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual const SfxItemPropertyMap & GetItemPropertyMap() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL setValue(double nValue) override
virtual void SAL_CALL insertControlCharacter(const css::uno::Reference< css::text::XTextRange > &xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb) override
static const SfxItemPropertyMap & GetCellPropertyMap()
virtual sal_Int32 SAL_CALL getError() override
virtual void SAL_CALL insertTextContent(const css::uno::Reference< css::text::XTextRange > &xRange, const css::uno::Reference< css::text::XTextContent > &xContent, sal_Bool bAbsorb) override
sal_Int16 nActionLockCount
virtual void RefChanged() override
virtual void SAL_CALL addActionLock() override
virtual css::uno::Reference< css::sheet::XSheetAnnotation > SAL_CALL getAnnotation() override
virtual sal_Bool SAL_CALL hasElements() override
virtual css::table::CellAddress SAL_CALL getCellAddress() override
const SfxItemPropertySet * pCellPropSet
ScCellObj(ScDocShell *pDocSh, const ScAddress &rP)
virtual void SAL_CALL setTokens(const css::uno::Sequence< css::sheet::FormulaToken > &aTokens) override
double GetValue_Impl() const
virtual void SetOnePropertyValue(const SfxItemPropertyMapEntry *pEntry, const css::uno::Any &aValue) override
virtual ~ScCellObj() override
virtual void SAL_CALL insertString(const css::uno::Reference< css::text::XTextRange > &xRange, const OUString &aString, sal_Bool bAbsorb) override
virtual void SAL_CALL removeTextContent(const css::uno::Reference< css::text::XTextContent > &xContent) override
static const SvxItemPropertySet * GetEditPropertySet()
virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override
OUString GetInputString_Impl(bool bEnglish) const
virtual void SAL_CALL setFormulaResult(double nValue) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual OUString SAL_CALL getString() override
virtual css::uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor() override
virtual void SAL_CALL removeActionLock() override
virtual void SAL_CALL setActionLocks(sal_Int16 nLock) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual css::table::CellContentType SAL_CALL getType() override
virtual void SAL_CALL setFormulaString(const OUString &aFormula) override
sal_Int32 GetResultType_Impl() const
OUString GetOutputString_Impl() const
virtual void GetOnePropertyValue(const SfxItemPropertyMapEntry *pEntry, css::uno::Any &) override
virtual double SAL_CALL getValue() override
void SetString_Impl(const OUString &rString, bool bInterpret, bool bEnglish)
void InputEnglishString(const OUString &rText)
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextFieldMasters() override
virtual sal_Int16 SAL_CALL resetActionLocks() override
virtual OUString SAL_CALL getFormula() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
virtual void SAL_CALL setString(const OUString &aString) override
virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getTextFields() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL setFormula(const OUString &aFormula) override
virtual void SetOnePropertyValue(const SfxItemPropertyMapEntry *pEntry, const css::uno::Any &aValue) override
virtual void SAL_CALL sort(const css::uno::Sequence< css::beans::PropertyValue > &xDescriptor) override
virtual void SAL_CALL removeSubTotals() override
virtual void SAL_CALL applySubTotals(const css::uno::Reference< css::sheet::XSubTotalDescriptor > &xDescriptor, sal_Bool bReplace) override
virtual void SAL_CALL setDataArray(const css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &aArray) override
const SfxItemPropertySet * pRangePropSet
const ScRange & GetRange() const
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Reference< css::table::XTableColumns > SAL_CALL getColumns() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual css::uno::Reference< css::sheet::XSheetFilterDescriptor > SAL_CALL createFilterDescriptorByObject(const css::uno::Reference< css::sheet::XSheetFilterable > &xObject) override
get/setAutoFilter as properties!!!
virtual void GetOnePropertyValue(const SfxItemPropertyMapEntry *pEntry, css::uno::Any &) override
virtual void RefChanged() override
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL setFormulaArray(const css::uno::Sequence< css::uno::Sequence< OUString > > &aArray) override
css::uno::Reference< css::table::XCell > GetCellByPosition_Impl(sal_Int32 nColumn, sal_Int32 nRow)
are used in Writer for tables ???
virtual void SAL_CALL merge(sal_Bool bMerge) override
virtual void SAL_CALL fillSeries(css::sheet::FillDirection nFillDirection, css::sheet::FillMode nFillMode, css::sheet::FillDateMode nFillDateMode, double fStep, double fEndValue) override
virtual css::uno::Reference< css::table::XTableRows > SAL_CALL getRows() override
void SetArrayFormula_Impl(const OUString &rFormula, const formula::FormulaGrammar::Grammar eGrammar)
virtual css::uno::Sequence< css::uno::Sequence< OUString > > SAL_CALL getFormulaArray() override
ScCellRangeObj(ScDocShell *pDocSh, const ScRange &rR)
virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow) override
virtual void SAL_CALL fillAuto(css::sheet::FillDirection nFillDirection, sal_Int32 nSourceCount) override
virtual css::uno::Reference< css::sheet::XSheetFilterDescriptor > SAL_CALL createFilterDescriptor(sal_Bool bEmpty) override
virtual css::uno::Sequence< css::sheet::FormulaToken > SAL_CALL getArrayTokens() override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByPosition(sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom) override
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getUniqueCellFormatRanges() override
virtual ~ScCellRangeObj() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL setTableOperation(const css::table::CellRangeAddress &aFormulaRange, css::sheet::TableOperationMode nMode, const css::table::CellAddress &aColumnCell, const css::table::CellAddress &aRowCell) override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByName(const OUString &aRange) override
virtual void SAL_CALL release() noexcept override
virtual void SAL_CALL autoFormat(const OUString &aName) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual const SfxItemPropertyMap & GetItemPropertyMap() override
static css::uno::Reference< css::table::XCellRange > CreateRangeFromDoc(const ScDocument &rDoc, const ScRange &rR)
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL createSortDescriptor() override
virtual void SAL_CALL setArrayTokens(const css::uno::Sequence< css::sheet::FormulaToken > &aTokens) override
virtual css::table::CellRangeAddress SAL_CALL getRangeAddress() override
virtual css::uno::Sequence< css::uno::Sequence< css::uno::Any > > SAL_CALL getDataArray() override
virtual css::uno::Reference< css::sheet::XSpreadsheet > SAL_CALL getSpreadsheet() override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL createImportDescriptor(sal_Bool bEmpty) override
virtual void SAL_CALL setArrayFormula(const OUString &aFormula) override
virtual css::uno::Reference< css::sheet::XSubTotalDescriptor > SAL_CALL createSubTotalDescriptor(sal_Bool bEmpty) override
virtual void SAL_CALL filter(const css::uno::Reference< css::sheet::XSheetFilterDescriptor > &xDescriptor) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL doImport(const css::uno::Sequence< css::beans::PropertyValue > &aDescriptor) override
virtual sal_Bool SAL_CALL getIsMerged() override
virtual OUString SAL_CALL getArrayFormula() override
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getCellFormatRanges() override
SvxSearchItem * GetSearchItem() const
uno3: SvxUnoTextCursor is not derived from XUnoTunnel, but should be (?)
ScCellsEnumeration(ScDocShell *pDocSh, ScRangeList aR)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual sal_Bool SAL_CALL hasMoreElements() override
virtual css::uno::Any SAL_CALL nextElement() override
std::unique_ptr< ScMarkData > pMark
virtual ~ScCellsEnumeration() override
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Type SAL_CALL getElementType() override
ScCellsObj(ScDocShell *pDocSh, ScRangeList aR)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual ~ScCellsObj() override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
bool insert(ScChartListener *pListener)
const ListenersType & getListeners() const
std::map< OUString, std::unique_ptr< ScChartListener > > ListenersType
OUString getUniqueName(std::u16string_view rPrefix) const
Create a unique name that's not taken by any existing chart listener objects.
void FreeUno(const css::uno::Reference< css::chart::XChartDataChangeEventListener > &rListener, const css::uno::Reference< css::chart::XChartData > &rSource)
void SetUno(const css::uno::Reference< css::chart::XChartDataChangeEventListener > &rListener, const css::uno::Reference< css::chart::XChartData > &rSource)
const ScAddress * GetRowHeaderPosition(SCROW nChartRow) const
const ScAddress * GetColHeaderPosition(SCCOL nChartCol) const
const ScAddress * GetPosition(sal_uInt64 nIndex) const
SCROW GetRowCount() const
SCCOL GetColCount() const
deletes all ScAddress*
SC_DLLPUBLIC bool Sort(SCTAB nTab, const ScSortParam &rSortParam, bool bRecord, bool bPaint, bool bApi)
SC_DLLPUBLIC bool Query(SCTAB nTab, const ScQueryParam &rQueryParam, const ScRange *pAdvSource, bool bRecord, bool bApi)
void DoSubTotals(SCTAB nTab, const ScSubTotalParam &rParam, bool bRecord, bool bApi)
bool DoImport(SCTAB nTab, const ScImportParam &rParam, const svx::ODataAccessDescriptor *pDescriptor)
static SC_DLLPUBLIC ScSubTotalFunc toSubTotalFunc(ScGeneralFunction eGenFunc)
DataPilotTables collection per sheet.
Iterator for references in a formula cell.
bool DetectiveAddError(const ScAddress &rPos)
bool MoveBlock(const ScRange &rSource, const ScAddress &rDestPos, bool bCut, bool bRecord, bool bPaint, bool bApi)
bool AutoFormat(const ScRange &rRange, const ScMarkData *pTabMark, sal_uInt16 nFormatNo, bool bApi)
bool SetStringOrEditCell(const ScAddress &rPos, const OUString &rStr, bool bInteraction)
bool Protect(SCTAB nTab, const OUString &rPassword)
bool UnmergeCells(const ScRange &rRange, bool bRecord, ScUndoRemoveMerge *pUndoRemoveMerge)
bool SetTabBgColor(SCTAB nTab, const Color &rColor, bool bRecord, bool bApi)
bool DetectiveAddPred(const ScAddress &rPos)
bool SetFormulaCell(const ScAddress &rPos, ScFormulaCell *pCell, bool bInteraction)
Below two methods take ownership of the formula cell instance(s).
bool SetValueCell(const ScAddress &rPos, double fVal, bool bInteraction)
bool RenameTable(SCTAB nTab, const OUString &rName, bool bRecord, bool bApi)
SC_DLLPUBLIC bool FillAuto(ScRange &rRange, const ScMarkData *pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, sal_uLong nCount, double fStep, double fMax, bool bRecord, bool bApi)
bool InsertCells(const ScRange &rRange, const ScMarkData *pTabMark, InsCellCmd eCmd, bool bRecord, bool bApi, bool bPartOfPaste=false)
bool RemovePageBreak(bool bColumn, const ScAddress &rPos, bool bRecord, bool bSetModified)
bool SetCellText(const ScAddress &rPos, const OUString &rText, bool bInterpret, bool bEnglish, bool bApi, const formula::FormulaGrammar::Grammar eGrammar)
bool TabOp(const ScRange &rRange, const ScMarkData *pTabMark, const ScTabOpParam &rParam, bool bRecord, bool bApi)
SC_DLLPUBLIC bool MergeCells(const ScCellMergeOption &rOption, bool bContents, bool bRecord, bool bApi, bool bEmptyMergedCells=false)
bool DeleteCells(const ScRange &rRange, const ScMarkData *pTabMark, DelCellCmd eCmd, bool bApi)
bool DetectiveMarkInvalid(SCTAB nTab)
bool InsertPageBreak(bool bColumn, const ScAddress &rPos, bool bRecord, bool bSetModified)
bool FillSeries(const ScRange &rRange, const ScMarkData *pTabMark, FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd, double fStart, double fStep, double fMax, bool bApi)
SC_DLLPUBLIC bool DeleteContents(const ScMarkData &rMark, InsertDeleteFlags nFlags, bool bRecord, bool bApi)
void SetTableVisible(SCTAB nTab, bool bVisible, bool bApi)
SC_DLLPUBLIC bool SetWidthOrHeight(bool bWidth, const std::vector< sc::ColRowSpan > &rRanges, SCTAB nTab, ScSizeMode eMode, sal_uInt16 nSizeTwips, bool bRecord, bool bApi)
bool DetectiveDelPred(const ScAddress &rPos)
bool DetectiveDelSucc(const ScAddress &rPos)
bool ApplyAttributes(const ScMarkData &rMark, const ScPatternAttr &rPattern, bool bApi)
bool DetectiveDelAll(SCTAB nTab)
SC_DLLPUBLIC bool EnterMatrix(const ScRange &rRange, const ScMarkData *pTabMark, const ScTokenArray *pTokenArray, const OUString &rString, bool bApi, bool bEnglish, const OUString &rFormulaNmsp, const formula::FormulaGrammar::Grammar)
bool SetLayoutRTL(SCTAB nTab, bool bRTL)
bool DetectiveAddSucc(const ScAddress &rPos)
bool Unprotect(SCTAB nTab, const OUString &rPassword, bool bApi)
void SetDocumentModified()
SfxBindings * GetViewBindings()
void UseScenario(SCTAB nTab, const OUString &rName, bool bRecord=true)
const ScDocument & GetDocument() const
ScDrawLayer * MakeDrawLayer()
void ModifyScenario(SCTAB nTab, const OUString &rName, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
ScDBData * GetDBData(const ScRange &rMarked, ScGetDBMode eMode, ScGetDBSelection eSel)
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
bool AdjustRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
merge with docfunc
virtual SfxUndoManager * GetUndoManager() override
void UpdateLinks() override
static void RemoveAppPrefix(OUString &rFilterName)
static bool GetFilterName(const OUString &rFileName, OUString &rFilter, OUString &rOptions, bool bWithContent, bool bWithInteraction)
Returns the filter name and options from a file name.
SC_DLLPUBLIC bool IsScenario(SCTAB nTab) const
void SetEmptyCell(const ScAddress &rPos)
SC_DLLPUBLIC SfxItemPool * GetEnginePool() const
SC_DLLPUBLIC bool SetEditText(const ScAddress &rPos, std::unique_ptr< EditTextObject > pEditText)
This method manages the lifecycle of the passed edit text object.
ScSheetLimits & GetSheetLimits() const
SC_DLLPUBLIC sal_uInt32 GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC ScRange GetRange(SCTAB nTab, const tools::Rectangle &rMMRect, bool bHiddenAsZero=true) const
SC_DLLPUBLIC ScPatternAttr * GetDefPattern() const
SC_DLLPUBLIC OUString GetLinkTab(SCTAB nTab) const
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
SC_DLLPUBLIC void SetFormula(const ScAddress &rPos, const ScTokenArray &rArray)
SC_DLLPUBLIC Color GetTabBgColor(SCTAB nTab) const
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
SC_DLLPUBLIC void AddPrintRange(SCTAB nTab, const ScRange &rNew)
Adds a new print ranges.
SC_DLLPUBLIC void SetTextCell(const ScAddress &rPos, const OUString &rStr)
Call this if you are not sure whether to put this as an edit text or a simple text.
SC_DLLPUBLIC ScDocumentPool * GetPool()
void GetSearchAndReplaceStart(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow)
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC void ClearPrintRanges(SCTAB nTab)
Removes all print ranges.
SC_DLLPUBLIC ScFieldEditEngine & GetEditEngine()
css::uno::Sequence< css::sheet::TablePageBreakData > GetRowBreakData(SCTAB nTab) const
void AddUnoRefChange(sal_Int64 nId, const ScRangeList &rOldRanges)
SC_DLLPUBLIC double GetValue(const ScAddress &rPos) const
SC_DLLPUBLIC ScChartListenerCollection * GetChartListenerCollection() const
SC_DLLPUBLIC void SetPrintEntireSheet(SCTAB nTab)
Marks the specified sheet to be printed completely.
SC_DLLPUBLIC const ScRange * GetPrintRange(SCTAB nTab, sal_uInt16 nPos)
formula::FormulaGrammar::Grammar GetStorageGrammar() const
SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC sal_uInt16 GetOriginalHeight(SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString &rComment, Color &rColor, ScScenarioFlags &rFlags) const
void AddUnoObject(SfxListener &rObject)
SC_DLLPUBLIC SfxItemPool * GetEditPool() const
SC_DLLPUBLIC bool CreateQueryParam(const ScRange &rRange, ScQueryParam &rQueryParam)
void SetCodeName(const OUString &r)
std::unique_ptr< ScPatternAttr > CreateSelectionPattern(const ScMarkData &rMark, bool bDeep=true)
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
void GetSelectionFrame(const ScMarkData &rMark, SvxBoxItem &rLineOuter, SvxBoxInfoItem &rLineInner)
SC_DLLPUBLIC ScBreakType HasColBreak(SCCOL nCol, SCTAB nTab) const
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
SC_DLLPUBLIC CRFlags GetRowFlags(SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC const ScRangeList * GetScenarioRanges(SCTAB nTab) const
SC_DLLPUBLIC void SetRepeatRowRange(SCTAB nTab, std::optional< ScRange > oNew)
bool IsExecuteLinkEnabled() const
SC_DLLPUBLIC ScLinkMode GetLinkMode(SCTAB nTab) const
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
SC_DLLPUBLIC CRFlags GetColFlags(SCCOL nCol, SCTAB nTab) const
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
void StartListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
bool HasUnoRefUndo() const
void SetError(SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError)
void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, InsertDeleteFlags nFlags, bool bMarked, ScDocument &rDestDoc, const ScMarkData *pMarks=nullptr, bool bColRowFlags=true)
SC_DLLPUBLIC void SetValue(SCCOL nCol, SCROW nRow, SCTAB nTab, const double &rVal)
const OUString & GetCodeName() const
void ApplySelectionFrame(const ScMarkData &rMark, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner)
SfxObjectShell * GetDocumentShell() const
SC_DLLPUBLIC std::optional< ScRange > GetRepeatColRange(SCTAB nTab)
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
SC_DLLPUBLIC sal_uLong AddValidationEntry(const ScValidationData &rNew)
SC_DLLPUBLIC void SetPageStyle(SCTAB nTab, const OUString &rName)
void SetLink(SCTAB nTab, ScLinkMode nMode, const OUString &rDoc, const OUString &rFilter, const OUString &rOptions, const OUString &rTabName, sal_uLong nRefreshDelay)
void AddUnoListenerCall(const css::uno::Reference< css::util::XModifyListener > &rListener, const css::lang::EventObject &rEvent)
SC_DLLPUBLIC ScConditionalFormatList * GetCondFormList(SCTAB nTab) const
SC_DLLPUBLIC std::optional< ScRange > GetRepeatRowRange(SCTAB nTab)
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
SC_DLLPUBLIC void SetActiveScenario(SCTAB nTab, bool bActive)
bool SearchAndReplace(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow, SCTAB &rTab, const ScMarkData &rMark, ScRangeList &rMatchedRanges, OUString &rUndoStr, ScDocument *pUndoDoc, bool &bMatchedRangesWereClamped)
std::unique_ptr< ScPrintRangeSaver > CreatePrintRangeSaver() const
SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, InsertDeleteFlags nDelFlag)
SC_DLLPUBLIC bool IsVisible(SCTAB nTab) const
void RemoveUnoObject(SfxListener &rObject)
SC_DLLPUBLIC sal_uInt16 GetOriginalWidth(SCCOL nCol, SCTAB nTab) const
SC_DLLPUBLIC OUString GetLinkDoc(SCTAB nTab) const
bool GetNextMarkedCell(SCCOL &rCol, SCROW &rRow, SCTAB nTab, const ScMarkData &rMark)
void RemoveCondFormatData(const ScRangeList &rRange, SCTAB nTab, sal_uInt32 nIndex)
SC_DLLPUBLIC const ScFormulaCell * GetFormulaCell(const ScAddress &rPos) const
SC_DLLPUBLIC CellType GetCellType(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
void GetNotesInRange(const ScRangeList &rRange, std::vector< sc::NoteEntry > &rNotes) const
SC_DLLPUBLIC void SetRepeatColRange(SCTAB nTab, std::optional< ScRange > oNew)
SC_DLLPUBLIC sfx2::LinkManager * GetLinkManager()
bool IsUndoEnabled() const
bool GetSelectionFunction(ScSubTotalFunc eFunc, const ScAddress &rCursor, const ScMarkData &rMark, double &rResult)
SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount(SCTAB nTab)
bool IsPrintEntireSheet(SCTAB nTab) const
Returns true, if the specified sheet is always printed.
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered)
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
SC_DLLPUBLIC ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const
void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const
void RemoveManualBreaks(SCTAB nTab)
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Size GetPageSize(SCTAB nTab) const
SC_DLLPUBLIC bool IsActiveScenario(SCTAB nTab) const
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
bool IsImportingXML() const
SC_DLLPUBLIC SCTAB GetTableCount() const
void SetTextCurrentDefaults(const EditTextObject &rTextObject)
SetText and apply defaults already set.
void InitDoc(const css::uno::Reference< css::text::XTextRange > &rContent, std::unique_ptr< ScEditSource > pEditSrc, const ESelection &rSel)
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
sal_Int32 GetFieldType() const
SvxFieldItem CreateFieldItem()
Use this guard when performing something from the API that might query values from external reference...
static SC_DLLPUBLIC OUString GetDocTabName(std::u16string_view rFileName, std::u16string_view rTabName)
static SC_DLLPUBLIC sal_uInt32 GetStandardFormat(SvNumberFormatter &, sal_uInt32 nFormat, SvNumFormatType nType)
static SvNumberFormatter * GetEnglishFormatter()
a "ReadOnly" formatter for UNO/XML export
static SC_DLLPUBLIC ScAutoFormat * GetOrCreateAutoFormat()
static SC_DLLPUBLIC OUString GetAbsDocName(const OUString &rFileName, const SfxObjectShell *pShell)
static void AssignTableBorder2ToAny(css::uno::Any &rAny, const SvxBoxItem &rOuter, const SvxBoxInfoItem &rInner, bool bInvalidateHorVerDist=false)
static void FillBorderLine(css::table::BorderLine &rStruct, const ::editeng::SvxBorderLine *pLine)
static void ApplyBorder(ScDocShell *pDocShell, const ScRangeList &rRanges, const SvxBoxItem &rOuter, const SvxBoxInfoItem &rInner)
move lcl_ApplyBorder to docfunc !
static void FillBoxItems(SvxBoxItem &rOuter, SvxBoxInfoItem &rInner, const css::table::TableBorder &rBorder)
static void AssignTableBorderToAny(css::uno::Any &rAny, const SvxBoxItem &rOuter, const SvxBoxInfoItem &rInner, bool bInvalidateHorVerDist=false)
static const ::editeng::SvxBorderLine * GetBorderLine(::editeng::SvxBorderLine &rLine, const css::table::BorderLine &rStruct)
static void FillImportParam(ScImportParam &rParam, const css::uno::Sequence< css::beans::PropertyValue > &rSeq)
static void FillProperties(css::uno::Sequence< css::beans::PropertyValue > &rSeq, const ScImportParam &rParam)
static tools::Long GetPropertyCount()
virtual void Notify(const SfxHint &rHint) override
Link< const SfxHint &, void > aLink
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
bool IsAllMarked(const ScRange &rRange) const
void SelectTable(SCTAB nTab, bool bNew)
void SelectOneTable(SCTAB nTab)
void SetMultiMarkArea(const ScRange &rRange, bool bMark=true, bool bSetupMulti=false)
void SetMarkArea(const ScRange &rRange)
void MarkFromRangeList(const ScRangeList &rList, bool bReset)
void RemoveOutline(const ScRange &rRange, bool bColumns, bool bRecord, bool bApi)
bool HideMarkedOutlines(const ScRange &rRange, bool bRecord)
void MakeOutline(const ScRange &rRange, bool bColumns, bool bRecord, bool bApi)
bool RemoveAllOutlines(SCTAB nTab, bool bRecord)
bool ShowMarkedOutlines(const ScRange &rRange, bool bRecord)
void AutoOutline(const ScRange &rRange, bool bRecord)
bool SelectLevel(SCTAB nTab, bool bColumns, sal_uInt16 nLevel, bool bRecord, bool bPaint)
sal_uInt64 GetKey() const
SfxItemSet & GetItemSet()
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
void Format(OUString &, ScRefFlags nFlags, const ScDocument &, formula::FormulaGrammar::AddressConvention eConv=formula::FormulaGrammar::CONV_OOO, sal_Unicode cDelimiter=0, bool bFullAddressNotation=false) const
void Join(const ScRange &, bool bIsInList=false)
void push_back(const ScRange &rRange)
bool UpdateReference(UpdateRefMode, const ScDocument *, const ScRange &rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz)
void insert(std::vector< ScRange >::iterator aPos, std::vector< ScRange >::const_iterator aSourceBegin, std::vector< ScRange >::const_iterator aSourceEnd)
ScRefFlags Parse(std::u16string_view, const ScDocument &, formula::FormulaGrammar::AddressConvention eConv=formula::FormulaGrammar::CONV_OOO, SCTAB nDefaultTab=0, sal_Unicode cDelimiter=0)
static bool FillMixedArray(css::uno::Any &rAny, ScDocument &rDoc, const ScRange &rRange, bool bAllowNV=false)
static bool MakeRangeFromName(const OUString &rName, const ScDocument &rDoc, SCTAB nCurTab, ScRange &rRange, RutlNameScope eScope=RUTL_NAMES, ScAddress::Details const &rDetails=ScAddress::detailsOOOa1, bool bUseDetailsPos=false)
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...
bool Intersects(const ScRange &rRange) const
bool Contains(const ScAddress &) const
is Address& fully in Range?
ScRefFlags ParseAny(const OUString &, const ScDocument &, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1)
static void FillProperties(css::uno::Sequence< css::beans::PropertyValue > &rSeq, const ScSortParam &rParam)
static void FillSortParam(ScSortParam &rParam, const css::uno::Sequence< css::beans::PropertyValue > &rSeq)
static tools::Long GetPropertyCount()
SortAscending needs to get out of the SheetSortDescriptor service description.
static ScInputStringType parseInputString(SvNumberFormatter &rFormatter, const OUString &rStr, LanguageType eLang)
static bool SC_DLLPUBLIC isMultiline(std::u16string_view rStr)
static SC_DLLPUBLIC OUString ProgrammaticToDisplayName(const OUString &rProgName, SfxStyleFamily nType)
static OUString DisplayToProgrammaticName(const OUString &rDispName, SfxStyleFamily nType)
static css::uno::Reference< css::container::XIndexReplace > CreateEmptyNumberingRules()
virtual void GetData(ScSubTotalParam &rParam) const =0
virtual void GetOnePropertyValue(const SfxItemPropertyMapEntry *pEntry, css::uno::Any &) override
const SfxItemPropertySet * pColPropSet
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual ~ScTableColumnObj() override
virtual void SAL_CALL setName(const OUString &aName) override
ScTableColumnObj(ScDocShell *pDocSh, SCCOL nCol, SCTAB nTab)
virtual OUString SAL_CALL getName() override
virtual const SfxItemPropertyMap & GetItemPropertyMap() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SetOnePropertyValue(const SfxItemPropertyMapEntry *pEntry, const css::uno::Any &aValue) override
virtual void SAL_CALL release() noexcept override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SetOnePropertyValue(const SfxItemPropertyMapEntry *pEntry, const css::uno::Any &aValue) override
ScTableRowObj(ScDocShell *pDocSh, SCROW nRow, SCTAB nTab)
const SfxItemPropertySet * pRowPropSet
virtual void GetOnePropertyValue(const SfxItemPropertyMapEntry *pEntry, css::uno::Any &) override
virtual const SfxItemPropertyMap & GetItemPropertyMap() override
virtual ~ScTableRowObj() override
virtual void SAL_CALL setExternalName(const OUString &aUrl, const OUString &aSheetName) override
virtual sal_Bool SAL_CALL getPrintTitleColumns() override
virtual void SAL_CALL setPrintTitleRows(sal_Bool bPrintTitleRows) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual void SAL_CALL apply() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual void SAL_CALL removeRange(const css::table::CellRangeAddress &aRange, css::sheet::CellDeleteMode nMode) override
virtual void SAL_CALL setScenarioComment(const OUString &aScenarioComment) override
virtual OUString SAL_CALL getScenarioComment() override
virtual void SAL_CALL moveRange(const css::table::CellAddress &aDestination, const css::table::CellRangeAddress &aSource) override
virtual void SAL_CALL group(const css::table::CellRangeAddress &aRange, css::table::TableOrientation nOrientation) override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByName(const OUString &aRange) override
virtual const SfxItemPropertyMap & GetItemPropertyMap() override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Reference< css::sheet::XSheetCellCursor > SAL_CALL createCursorByRange(const css::uno::Reference< css::sheet::XSheetCellRange > &aRange) override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByPosition(sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom) override
virtual void SAL_CALL setLinkUrl(const OUString &aLinkUrl) override
virtual sal_Bool SAL_CALL hidePrecedents(const css::table::CellAddress &aPosition) override
const SfxItemPropertySet * pSheetPropSet
virtual void SAL_CALL unprotect(const OUString &aPassword) override
ScTableSheetObj(ScDocShell *pDocSh, SCTAB nTab)
virtual sal_Bool SAL_CALL getPrintTitleRows() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void GetOnePropertyValue(const SfxItemPropertyMapEntry *pEntry, css::uno::Any &) override
virtual void SAL_CALL clearOutline() override
virtual css::uno::Sequence< css::sheet::TablePageBreakData > SAL_CALL getColumnPageBreaks() override
virtual sal_Bool SAL_CALL hideDependents(const css::table::CellAddress &aPosition) override
virtual sal_Bool SAL_CALL showPrecedents(const css::table::CellAddress &aPosition) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SetOnePropertyValue(const SfxItemPropertyMapEntry *pEntry, const css::uno::Any &aValue) override
virtual void SAL_CALL acquire() noexcept override
virtual void SAL_CALL setPrintAreas(const css::uno::Sequence< css::table::CellRangeAddress > &aPrintAreas) override
virtual OUString SAL_CALL getLinkSheetName() override
SCTAB GetTab_Impl() const
virtual void SAL_CALL ungroup(const css::table::CellRangeAddress &aRange, css::table::TableOrientation nOrientation) override
void PrintAreaUndo_Impl(std::unique_ptr< ScPrintRangeSaver > pOldRanges)
virtual void SAL_CALL autoOutline(const css::table::CellRangeAddress &aRange) override
virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow) override
virtual css::uno::Reference< css::sheet::XSpreadsheet > SAL_CALL getSpreadsheet() override
virtual void SAL_CALL addRanges(const css::uno::Sequence< css::table::CellRangeAddress > &aRanges) override
virtual css::uno::Reference< css::sheet::XSheetCellCursor > SAL_CALL createCursor() override
virtual css::uno::Sequence< css::sheet::TablePageBreakData > SAL_CALL getRowPageBreaks() override
virtual void SAL_CALL release() noexcept override
virtual css::uno::Reference< css::table::XTablePivotCharts > SAL_CALL getPivotCharts() override
virtual css::sheet::SheetLinkMode SAL_CALL getLinkMode() override
virtual void SAL_CALL setLinkSheetName(const OUString &aLinkSheetName) override
virtual void SAL_CALL setLinkMode(css::sheet::SheetLinkMode nLinkMode) override
virtual void SAL_CALL setName(const OUString &aName) override
virtual css::uno::Reference< css::table::XTableCharts > SAL_CALL getCharts() override
virtual OUString SAL_CALL getName() override
virtual void SAL_CALL setTitleColumns(const css::table::CellRangeAddress &aTitleColumns) override
virtual sal_Bool SAL_CALL showErrors(const css::table::CellAddress &aPosition) override
virtual void SAL_CALL protect(const OUString &aPassword) override
virtual ~ScTableSheetObj() override
virtual css::uno::Sequence< css::table::CellRangeAddress > SAL_CALL getRanges() override
virtual css::uno::Reference< css::sheet::XScenarios > SAL_CALL getScenarios() override
virtual void SAL_CALL setPrintTitleColumns(sal_Bool bPrintTitleColumns) override
virtual void SAL_CALL insertCells(const css::table::CellRangeAddress &aRange, css::sheet::CellInsertMode nMode) override
virtual void SAL_CALL removeAllManualPageBreaks() override
virtual void SAL_CALL copyRange(const css::table::CellAddress &aDestination, const css::table::CellRangeAddress &aSource) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents() override
virtual void SAL_CALL clearArrows() override
virtual css::uno::Reference< css::sheet::XDataPilotTables > SAL_CALL getDataPilotTables() override
virtual css::uno::Reference< css::sheet::XSheetAnnotations > SAL_CALL getAnnotations() override
virtual void SAL_CALL showLevel(sal_Int16 nLevel, css::table::TableOrientation nOrientation) override
virtual sal_Bool SAL_CALL isProtected() override
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getDrawPage() override
virtual OUString SAL_CALL getLinkUrl() override
virtual void SAL_CALL link(const OUString &aUrl, const OUString &aSheetName, const OUString &aFilterName, const OUString &aFilterOptions, css::sheet::SheetLinkMode nMode) override
virtual sal_Bool SAL_CALL showDependents(const css::table::CellAddress &aPosition) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL setTitleRows(const css::table::CellRangeAddress &aTitleRows) override
virtual css::uno::Sequence< css::table::CellRangeAddress > SAL_CALL getPrintAreas() override
virtual css::table::CellRangeAddress SAL_CALL getTitleRows() override
void InitInsertSheet(ScDocShell *pDocSh, SCTAB nTab)
virtual css::table::CellRangeAddress SAL_CALL getTitleColumns() override
virtual void SAL_CALL showDetail(const css::table::CellRangeAddress &aRange) override
virtual void SAL_CALL hideDetail(const css::table::CellRangeAddress &aRange) override
virtual sal_Bool SAL_CALL getIsScenario() override
virtual sal_Bool SAL_CALL showInvalid() override
ScValidationData * CreateValidationData(ScDocument &rDoc, formula::FormulaGrammar::Grammar eGrammar) const
static SC_DLLPUBLIC void ConvertToTokenSequence(const ScDocument &rDoc, css::uno::Sequence< css::sheet::FormulaToken > &rSequence, const ScTokenArray &rTokenArray)
static SC_DLLPUBLIC bool ConvertToTokenArray(ScDocument &rDoc, ScTokenArray &rTokenArray, const css::uno::Sequence< css::sheet::FormulaToken > &rSequence)
static void FillScRange(ScRange &rScRange, const css::table::CellRangeAddress &rApiRange)
static void FillApiRange(css::table::CellRangeAddress &rApiRange, const ScRange &rScRange)
static bool GetBoolFromAny(const css::uno::Any &aAny)
Hint to restore a UNO object to its old state (used during undo).
const ScRange & GetRange() const
UpdateRefMode GetMode() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
static SdrItemPool & GetGlobalDrawObjectItemPool()
css::uno::Reference< css::uno::XInterface > const & getUnoPage()
void Invalidate(sal_uInt16 nId)
const SfxItemPropertyMapEntry * getByName(std::u16string_view rName) const
void setPropertyValue(const SfxItemPropertyMapEntry &rEntry, const css::uno::Any &aVal, SfxItemSet &rSet) const
const SfxItemPropertyMap & getPropertyMap() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
const OUString & GetName() const
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
bool IsValid(SvxBoxInfoItemValidFlags nValid) const
const editeng::SvxBorderLine * GetHori() const
const editeng::SvxBorderLine * GetVert() const
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxInfoItemLine nLine)
static bool LineToSvxLine(const css::table::BorderLine &rLine, editeng::SvxBorderLine &rSvxLine, bool bConvert)
const editeng::SvxBorderLine * GetTop() const
sal_uInt16 GetSmallestDistance() const
const editeng::SvxBorderLine * GetRight() const
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
static css::table::BorderLine2 SvxLineToLine(const editeng::SvxBorderLine *pLine, bool bConvert)
const editeng::SvxBorderLine * GetLeft() const
const editeng::SvxBorderLine * GetBottom() const
void SetAllDistances(sal_Int16 nNew)
virtual SvxTextForwarder * GetTextForwarder()=0
virtual void UpdateData()=0
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
void SetSelection(bool bNewSelection)
void SetCommand(SvxSearchCmd nNewCommand)
virtual void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel)=0
virtual void SAL_CALL removeTextContent(const css::uno::Reference< css::text::XTextContent > &xContent) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual sal_Bool SAL_CALL hasElements() override
virtual void SAL_CALL insertString(const css::uno::Reference< css::text::XTextRange > &xRange, const OUString &aString, sal_Bool bAbsorb) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual void SAL_CALL insertTextContent(const css::uno::Reference< css::text::XTextRange > &xRange, const css::uno::Reference< css::text::XTextContent > &xContent, sal_Bool bAbsorb) override
virtual void SAL_CALL insertControlCharacter(const css::uno::Reference< css::text::XTextRange > &xRange, sal_Int16 nControlCharacter, sal_Bool bAbsorb) override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart() override
css::uno::Type const & get()
sal_uInt16 GetDistance() const
sal_uInt16 GetOutWidth() const
sal_uInt16 GetInWidth() const
const SvBaseLinks & GetLinks() const
SharedString intern(const OUString &rStr)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define TOOLS_WARN_EXCEPTION(area, stream)
virtual OUString GetName() const override
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
constexpr TypedWhichId< SvXMLAttrContainerItem > EE_PARA_XMLATTRIBS(EE_PARA_START+1)
constexpr TypedWhichId< SvxEscapementItem > EE_CHAR_ESCAPEMENT(EE_CHAR_START+10)
constexpr TypedWhichId< SvXMLAttrContainerItem > EE_CHAR_XMLATTRIBS(EE_CHAR_START+28)
ScGeneralFunction
the css::sheet::GeneralFunction enum is extended by constants in GeneralFunction2,...
@ NOCAPTIONS
Sparklines in a cell.
@ EDITATTR
Drawing objects.
@ ATTRIB
Internal use only (d&d undo): do not delete caption objects of cell notes.
@ ForceMark
Behave as if the range corresponding to a ScDBData area was selected, for API use.
constexpr sal_Int32 STD_EXTRA_WIDTH
@ SC_DB_MAKE
create "untitled" (if necessary)
#define LANGUAGE_DONTKNOW
#define LANGUAGE_ENGLISH_US
#define LINK(Instance, Class, Member)
Sequence< sal_Int8 > aSeq
#define SAL_WARN_IF(condition, area, stream)
#define MID_HORJUST_ADJUST
#define MID_FONT_CHAR_SET
#define MID_HORJUST_HORJUST
#define MID_GRAPHIC_TRANSPARENT
#define MID_FONT_FAMILY_NAME
#define MID_FONT_STYLE_NAME
std::unique_ptr< sal_Int32[]> pData
#define SC_QUERYINTERFACE(x)
#define SC_SIMPLE_SERVICE_INFO(ClassName, ClassNameAscii, ServiceAscii)
#define SC_QUERY_MULTIPLE(x, y)
void Notify(ScModelObj &rModelObj, const ScRangeList &rChangeRanges, const OUString &rType=OUString("cell-change"), const css::uno::Sequence< css::beans::PropertyValue > &rProperties=css::uno::Sequence< css::beans::PropertyValue >())
constexpr OUStringLiteral aData
void Clear(EHistoryType eHistory)
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
constexpr auto toTwips(N number, Length from)
bool GetRanges(std::vector< std::shared_ptr< SwUnoCursor > > &rRanges, SwDoc &rDoc, SwPaM const &rDelPam)
OUString ScResId(TranslateId aId)
constexpr TypedWhichId< ScIndentItem > ATTR_INDENT(131)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< SfxBoolItem > ATTR_VERTICAL_ASIAN(137)
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
constexpr TypedWhichId< SfxStringItem > ATTR_HYPERLINK(155)
constexpr TypedWhichId< SvxForbiddenRuleItem > ATTR_FORBIDDEN_RULES(128)
constexpr TypedWhichId< SvxPostureItem > ATTR_CTL_FONT_POSTURE(119)
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CJK_FONT_HEIGHT(112)
constexpr TypedWhichId< SvxPostureItem > ATTR_FONT_POSTURE(103)
constexpr TypedWhichId< SvxWeightItem > ATTR_FONT_WEIGHT(102)
constexpr TypedWhichId< SvxWeightItem > ATTR_CJK_FONT_WEIGHT(113)
constexpr TypedWhichId< SvxEmphasisMarkItem > ATTR_FONT_EMPHASISMARK(121)
constexpr TypedWhichId< ScShrinkToFitCell > ATTR_SHRINKTOFIT(140)
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_TLBR(141)
constexpr TypedWhichId< SvxShadowedItem > ATTR_FONT_SHADOWED(108)
constexpr TypedWhichId< SvxScriptSpaceItem > ATTR_SCRIPTSPACE(126)
constexpr TypedWhichId< SvxWordLineModeItem > ATTR_FONT_WORDLINE(123)
constexpr TypedWhichId< SvxContourItem > ATTR_FONT_CONTOUR(107)
constexpr TypedWhichId< SvxLanguageItem > ATTR_CTL_FONT_LANGUAGE(120)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SvxOverlineItem > ATTR_FONT_OVERLINE(105)
constexpr TypedWhichId< SvxShadowItem > ATTR_SHADOW(152)
constexpr TypedWhichId< SvxLanguageItem > ATTR_LANGUAGE_FORMAT(147)
constexpr TypedWhichId< ScRotateValueItem > ATTR_ROTATE_VALUE(135)
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_VER_JUSTIFY_METHOD(133)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
constexpr sal_uInt16 ATTR_PATTERN_START(100)
constexpr TypedWhichId< SvxBoxInfoItem > ATTR_BORDER_INNER(151)
constexpr TypedWhichId< SvxHangingPunctuationItem > ATTR_HANGPUNCTUATION(127)
constexpr TypedWhichId< SvxRotateModeItem > ATTR_ROTATE_MODE(136)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr TypedWhichId< SvxJustifyMethodItem > ATTR_HOR_JUSTIFY_METHOD(130)
constexpr TypedWhichId< SvxCharReliefItem > ATTR_FONT_RELIEF(124)
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
constexpr TypedWhichId< SvxFrameDirectionItem > ATTR_WRITINGDIR(138)
constexpr TypedWhichId< SvxCrossedOutItem > ATTR_FONT_CROSSEDOUT(106)
constexpr TypedWhichId< SvxMarginItem > ATTR_MARGIN(143)
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_BLTR(142)
constexpr TypedWhichId< ScVerticalStackCell > ATTR_STACKED(134)
constexpr TypedWhichId< SvxVerJustifyItem > ATTR_VER_JUSTIFY(132)
constexpr TypedWhichId< ScHyphenateCell > ATTR_HYPHENATE(125)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
constexpr TypedWhichId< SvxLanguageItem > ATTR_FONT_LANGUAGE(110)
constexpr sal_uInt16 ATTR_PATTERN_END(155)
constexpr TypedWhichId< SvxWeightItem > ATTR_CTL_FONT_WEIGHT(118)
constexpr TypedWhichId< SvXMLAttrContainerItem > ATTR_USERDEF(122)
constexpr TypedWhichId< ScLineBreakCell > ATTR_LINEBREAK(139)
constexpr TypedWhichId< SvxPostureItem > ATTR_CJK_FONT_POSTURE(114)
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALIDDATA(153)
constexpr TypedWhichId< SvxLanguageItem > ATTR_CJK_FONT_LANGUAGE(115)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CTL_FONT_HEIGHT(117)
constexpr TypedWhichId< ScCondFormatItem > ATTR_CONDITIONAL(154)
constexpr TypedWhichId< SvxUnderlineItem > ATTR_FONT_UNDERLINE(104)
::std::set< SCTAB > maTabs
svl::SharedString maString
Each instance of this struct represents a single filtering criteria.
std::vector< Item > QueryItemsType
QueryItemsType & GetQueryItems()
SC_DLLPUBLIC const ScQueryEntry & GetEntry(SCSIZE n) const
SC_DLLPUBLIC SCSIZE GetEntryCount() const
This is very similar to ScCellValue, except that it references the original value instead of copying ...
ScFormulaCell * getFormula() const
const EditTextObject * getEditText() const
Store parameters used in the ScDocument::SetString() method.
void setTextInput()
Call this whenever you need to unconditionally set input as text, no matter what the input is.
::std::vector< ScSortKeyState > maKeyState
sal_uInt16 GetSortKeyCount() const
bool bGroupActive[MAXSUBTOTAL]
active groups
SCCOL nField[MAXSUBTOTAL]
associated field
SCCOL nSubTotals[MAXSUBTOTAL]
number of SubTotals
std::unique_ptr< SCCOL[]> pSubTotals[MAXSUBTOTAL]
array of columns to be calculated
bool bReplace
replace existing results
Parameter for data table aka multiple operations.
ScRefAddress aRefFormulaEnd
ScRefAddress aRefFormulaCell
constexpr OUStringLiteral SCLINKTARGET_SERVICE
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
#define MID_MARGIN_LO_MARGIN
#define MID_MARGIN_R_MARGIN
#define MID_MARGIN_L_MARGIN
#define MID_MARGIN_UP_MARGIN
constexpr OUStringLiteral SC_UNONAME_PADJUST
constexpr OUStringLiteral SC_UNO_CJK_CFFAMIL
constexpr OUStringLiteral SC_UNO_CJK_CFPITCH
constexpr OUStringLiteral SC_UNONAME_TABLEPOS
constexpr OUStringLiteral SC_UNO_CJK_CPOST
constexpr OUStringLiteral SC_UNONAME_CEMPHAS
constexpr OUStringLiteral SC_UNONAME_NUMRULES
constexpr OUStringLiteral SC_UNONAME_PRMARGIN
constexpr OUStringLiteral SC_UNONAME_COVRLHAS
constexpr OUStringLiteral SC_UNONAME_CFCHARS
constexpr OUStringLiteral SC_UNONAME_CHROWHDR
constexpr OUStringLiteral SC_UNONAME_COPYFORM
constexpr OUStringLiteral SC_UNONAME_PROTECT
constexpr OUStringLiteral SC_UNONAME_CLOCAL
constexpr OUStringLiteral SC_UNONAME_HYPERLINK
constexpr OUStringLiteral SC_UNO_NAMEDRANGES
constexpr OUStringLiteral SC_UNO_CJK_CFCHARS
constexpr OUStringLiteral SC_UNONAME_VALIDAT
constexpr OUStringLiteral SC_UNONAME_PISHYPHEN
constexpr OUStringLiteral SC_UNONAME_SHOWBORD
constexpr OUStringLiteral SC_UNONAME_CELLWID
constexpr OUStringLiteral SC_UNONAME_WRITING
constexpr OUStringLiteral SC_UNONAME_CELLVJUS_METHOD
constexpr OUStringLiteral SC_UNONAME_TEXTUSER
constexpr OUStringLiteral SC_UNONAME_CSHADD
constexpr OUStringLiteral SC_UNONAME_CRELIEF
constexpr OUStringLiteral SC_UNO_CTL_CFNAME
constexpr OUStringLiteral SC_UNO_CJK_CWEIGHT
constexpr OUStringLiteral SC_UNONAME_CUNDLHAS
constexpr OUStringLiteral SC_UNONAME_NUMFMT
constexpr OUStringLiteral SC_UNONAME_COPYSTYL
constexpr OUStringLiteral SC_UNONAME_WRAP
constexpr OUStringLiteral SC_UNONAME_CELLHGT
constexpr OUStringLiteral SC_UNONAME_CPOST
constexpr OUStringLiteral SC_UNO_CODENAME
constexpr OUStringLiteral SC_UNO_CTL_CFFAMIL
constexpr OUStringLiteral SC_UNONAME_CFFAMIL
constexpr OUStringLiteral SC_UNONAME_PINDENT
constexpr OUStringLiteral SC_UNONAME_PLMARGIN
constexpr OUStringLiteral SC_UNO_CJK_CFSTYLE
constexpr OUStringLiteral SC_UNONAME_COVRLCOL
constexpr OUStringLiteral SC_UNO_CTL_CWEIGHT
constexpr OUStringLiteral SC_UNONAME_CELLTRAN
constexpr OUStringLiteral SC_UNO_CTL_CFPITCH
constexpr OUStringLiteral SC_UNONAME_CELLORI
constexpr OUStringLiteral SC_UNONAME_OHEIGHT
constexpr OUStringLiteral SC_UNONAME_CSTRIKE
constexpr OUStringLiteral SC_UNO_CTL_CFCHARS
constexpr OUStringLiteral SC_UNONAME_ISACTIVE
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_BLTR2
constexpr OUStringLiteral SC_UNONAME_CHCOLHDR
constexpr OUStringLiteral SC_UNONAME_CONDLOC
constexpr OUStringLiteral SC_UNONAME_FORMRT2
constexpr OUStringLiteral SC_UNONAME_BORDCOL
constexpr OUStringLiteral SC_UNONAME_POS
constexpr OUStringLiteral SC_UNONAME_VALIXML
constexpr OUStringLiteral SC_UNONAME_CFNAME
constexpr OUStringLiteral SC_UNONAME_PISFORBID
constexpr OUStringLiteral SC_UNONAME_FORMATID
constexpr OUStringLiteral SC_UNONAME_CFONT
constexpr OUStringLiteral SC_UNO_LINKDISPBIT
constexpr OUStringLiteral SC_UNO_CTL_CLOCAL
constexpr OUStringLiteral SC_UNO_CJK_CHEIGHT
constexpr OUStringLiteral SC_UNONAME_CELLPRO
constexpr OUStringLiteral SC_UNONAME_PTMARGIN
constexpr OUStringLiteral SC_UNONAME_CCROSS
constexpr OUStringLiteral SC_UNO_CJK_CFNAME
constexpr OUStringLiteral SC_UNONAME_CWORDMOD
constexpr OUStringLiteral SC_UNONAME_PBMARGIN
constexpr OUStringLiteral SC_UNONAME_TABCOLOR
constexpr OUStringLiteral SC_UNONAME_MANPAGE
constexpr OUStringLiteral SC_UNONAME_SHRINK_TO_FIT
constexpr OUStringLiteral SC_UNONAME_CONDFMT
constexpr OUStringLiteral SC_UNONAME_CFPITCH
constexpr OUStringLiteral SC_UNONAME_AUTOPRINT
constexpr OUStringLiteral SC_UNONAME_ASIANVERT
constexpr OUStringLiteral SC_UNONAME_CELLCONTENTTYPE
constexpr OUStringLiteral SC_UNONAME_COVER
constexpr OUStringLiteral SC_UNONAME_COUTL
constexpr OUStringLiteral SC_UNONAME_SIZE
constexpr OUStringLiteral SC_UNONAME_ROTANG
constexpr OUStringLiteral SC_UNO_CTL_CHEIGHT
constexpr OUStringLiteral SC_UNONAME_VALILOC
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_BLTR
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_TLBR
constexpr OUStringLiteral SC_UNONAME_USERDEF
constexpr OUStringLiteral SC_UNONAME_CELLVJUS
constexpr OUStringLiteral SC_UNONAME_CONDXML
constexpr OUStringLiteral SC_UNONAME_PLASTADJ
constexpr OUStringLiteral SC_UNONAME_ROTREF
constexpr OUStringLiteral SC_UNONAME_CUNDLCOL
constexpr OUStringLiteral SC_UNONAME_TBLBORD
constexpr OUStringLiteral SC_UNONAME_DIAGONAL_TLBR2
constexpr OUStringLiteral SC_UNONAME_CELLVIS
constexpr OUStringLiteral SC_UNONAME_PISHANG
constexpr OUStringLiteral SC_UNONAME_FORMRT
constexpr OUStringLiteral SC_UNONAME_COPYBACK
constexpr OUStringLiteral SC_UNONAME_CWEIGHT
constexpr OUStringLiteral SC_UNONAME_NEWPAGE
constexpr OUStringLiteral SC_UNONAME_ABSNAME
constexpr OUStringLiteral SC_UNONAME_FORMLOC
constexpr OUStringLiteral SC_UNO_CTL_CPOST
constexpr OUStringLiteral SC_UNONAME_CUNDER
constexpr OUStringLiteral SC_UNONAME_SHADOW
constexpr OUStringLiteral SC_UNONAME_CELLFILT
constexpr OUStringLiteral SC_UNONAME_TBLBORD2
constexpr OUStringLiteral SC_UNO_LINKDISPNAME
constexpr OUStringLiteral SC_UNONAME_TABLAYOUT
constexpr OUStringLiteral SC_UNONAME_PISCHDIST
constexpr OUStringLiteral SC_UNONAME_OWIDTH
constexpr OUStringLiteral SC_UNONAME_CELLSTYL
constexpr OUStringLiteral SC_UNONAME_CHEIGHT
constexpr OUStringLiteral SC_UNONAME_PRINTBORD
constexpr OUStringLiteral SC_UNONAME_CONDFORMAT
constexpr OUStringLiteral SC_UNONAME_CELLHJUS
constexpr OUStringLiteral SC_UNO_CTL_CFSTYLE
constexpr OUStringLiteral SC_UNONAME_CFSTYLE
constexpr OUStringLiteral SC_UNONAME_PAGESTL
constexpr OUStringLiteral SC_UNONAME_CELLHJUS_METHOD
constexpr OUStringLiteral SC_UNO_CJK_CLOCAL
constexpr OUStringLiteral UNO_NAME_EDIT_CHAR_ESCAPEMENT
#define SVX_UNOEDIT_CHAR_PROPERTIES
#define SVX_UNOEDIT_NUMBERING_PROPERTY
#define SVX_UNOEDIT_PARA_PROPERTIES
#define SVX_UNOEDIT_FONT_PROPERTIES
#define SC_WID_UNO_VALIDAT
#define SC_WID_UNO_FORMATID
#define SC_WID_UNO_CELLSTYL
#define SC_WID_UNO_VALILOC
#define SC_WID_UNO_CELLVIS
#define SC_WID_UNO_CONDLOC
#define SC_WID_UNO_CELLCONTENTTYPE
#define SC_WID_UNO_OWIDTH
#define SC_WID_UNO_LINKDISPNAME
#define SC_WID_UNO_TBLBORD2
#define SC_WID_UNO_TBLBORD
#define SC_WID_UNO_PROTECT
#define SC_WID_UNO_FORMRT
#define SC_WID_UNO_VALIXML
#define SC_WID_UNO_CELLFILT
#define SC_WID_UNO_FORMRT2
#define SC_WID_UNO_CHCOLHDR
#define SC_WID_UNO_CONDFORMAT
#define SC_WID_UNO_BORDCOL
#define SC_WID_UNO_AUTOPRINT
#define SC_WID_UNO_COPYBACK
#define SC_WID_UNO_TABCOLOR
#define SC_WID_UNO_COPYSTYL
#define SC_WID_UNO_SHOWBORD
#define SC_WID_UNO_PAGESTL
#define SC_WID_UNO_CONDFMT
#define SC_WID_UNO_ABSNAME
#define SC_WID_UNO_CODENAME
bool IsScItemWid(sal_uInt16 nWid)
#define SC_WID_UNO_NUMRULES
#define SC_WID_UNO_ISACTIVE
#define SC_WID_UNO_CELLWID
#define SC_WID_UNO_OHEIGHT
#define SC_WID_UNO_CHROWHDR
#define SC_WID_UNO_FORMLOC
#define SC_WID_UNO_COPYFORM
#define SC_WID_UNO_CONDXML
#define SC_WID_UNO_CELLHGT
#define SC_WID_UNO_MANPAGE
#define SC_WID_UNO_NEWPAGE
#define SC_WID_UNO_PRINTBORD
#define SC_WID_UNO_LINKDISPBIT
#define SC_WID_UNO_TABLAYOUT
#define SV_COUNTRY_LANGUAGE_OFFSET
#define SV_MAX_COUNT_STANDARD_FORMATS