20 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
21 #include <com/sun/star/beans/XPropertySet.hpp>
22 #include <com/sun/star/container/XNameAccess.hpp>
60 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
64 #include <globstr.hrc>
69 #include <stlpool.hxx>
70 #include <stlsheet.hxx>
78 #define ShellClass_ScFormatShell
79 #define ShellClass_TableFont
80 #define ShellClass_FormatForSelection
81 #include <scslots.hxx>
98 case SID_ALIGN_ANY_HDEFAULT: eHJustify = SvxCellHorJustify::Standard;
break;
99 case SID_ALIGN_ANY_LEFT: eHJustify = SvxCellHorJustify::Left;
break;
100 case SID_ALIGN_ANY_HCENTER: eHJustify = SvxCellHorJustify::Center;
break;
101 case SID_ALIGN_ANY_RIGHT: eHJustify = SvxCellHorJustify::Right;
break;
102 case SID_ALIGN_ANY_JUSTIFIED: eHJustify = SvxCellHorJustify::Block;
break;
103 default: OSL_FAIL(
"lclConvertSlotToHAlign - invalid slot" );
113 case SID_ALIGN_ANY_VDEFAULT: eVJustify = SvxCellVerJustify::Standard;
break;
114 case SID_ALIGN_ANY_TOP: eVJustify = SvxCellVerJustify::Top;
break;
115 case SID_ALIGN_ANY_VCENTER: eVJustify = SvxCellVerJustify::Center;
break;
116 case SID_ALIGN_ANY_BOTTOM: eVJustify = SvxCellVerJustify::Bottom;
break;
117 default: OSL_FAIL(
"lclConvertSlotToVAlign - invalid slot" );
130 SfxVisibilityFlags::Standard | SfxVisibilityFlags::Server,
131 ToolbarId::Objectbar_Format);
145 pMgr->SetMaxUndoActionCount( 0 );
160 bool bProtected =
false;
162 for (
SCTAB i=0;
i<nTabCount && !bProtected;
i++)
168 sal_uInt16 nSlotId = 0;
178 case SID_STYLE_APPLY:
183 case SID_STYLE_FAMILY2:
198 case SID_STYLE_FAMILY4:
203 Find( aPageStyle, SfxStyleFamily::Page )) :
nullptr;
212 case SID_STYLE_WATERCAN:
218 case SID_STYLE_UPDATE_BY_EXAMPLE:
220 std::unique_ptr<SfxUInt16Item> pFamilyItem;
223 bool bPage = pFamilyItem && SfxStyleFamily::Page ==
static_cast<SfxStyleFamily>(pFamilyItem->GetValue());
225 if ( bProtected || bPage )
231 case SID_STYLE_DELETE:
235 std::unique_ptr<SfxUInt16Item> pFamilyItem;
237 bool bPage = pFamilyItem && SfxStyleFamily::Page ==
static_cast<SfxStyleFamily>(pFamilyItem->GetValue());
239 if ( bProtected && !bPage )
255 const sal_uInt16 nSlotId = rReq.
GetSlot();
256 if ( !pArgs && nSlotId != SID_STYLE_NEW_BY_EXAMPLE && nSlotId != SID_STYLE_UPDATE_BY_EXAMPLE )
274 if ( (nSlotId == SID_STYLE_PREVIEW)
275 || (nSlotId == SID_STYLE_END_PREVIEW) )
277 if (nSlotId == SID_STYLE_PREVIEW)
281 if ( pArgs && (pFamItem = pArgs->
GetItemIfSet( SID_STYLE_FAMILY )) )
285 if (pArgs && SfxItemState::SET == pArgs->
GetItemState( nSlotId,
true, &pNameItem ))
286 aStyleName = static_cast<const SfxStringItem*>(pNameItem)->GetValue();
287 if ( eFamily == SfxStyleFamily::Para )
291 aFuncMark.MarkToMulti();
293 if ( !aFuncMark.IsMarked() && !aFuncMark.IsMultiMarked() )
298 ScRange aRange( nCol, nRow, nTab );
299 aFuncMark.SetMarkArea( aRange );
311 rNewSet.
Put( aItemSet,
false );
323 if (aPreviewMark.IsMarked() || aPreviewMark.IsMultiMarked())
334 rNewSet.
Put( aItemSet,
false );
340 else if ( (nSlotId == SID_STYLE_NEW)
341 || (nSlotId == SID_STYLE_EDIT)
342 || (nSlotId == SID_STYLE_DELETE)
343 || (nSlotId == SID_STYLE_HIDE)
344 || (nSlotId == SID_STYLE_SHOW)
345 || (nSlotId == SID_STYLE_APPLY)
346 || (nSlotId == SID_STYLE_WATERCAN)
347 || (nSlotId == SID_STYLE_FAMILY)
348 || (nSlotId == SID_STYLE_NEW_BY_EXAMPLE)
349 || (nSlotId == SID_STYLE_UPDATE_BY_EXAMPLE) )
353 bool bStyleToMarked =
false;
354 bool bListAction =
false;
355 bool bAddUndo =
false;
362 if ( pArgs && (pFamItem = pArgs->
GetItemIfSet( SID_STYLE_FAMILY )) )
364 else if ( pArgs && (pFamilyNameItem = pArgs->
GetItemIfSet( SID_STYLE_FAMILYNAME )) )
366 OUString sFamily = pFamilyNameItem->
GetValue();
367 if (sFamily ==
"CellStyles")
368 eFamily = SfxStyleFamily::Para;
369 else if (sFamily ==
"PageStyles")
370 eFamily = SfxStyleFamily::Page;
374 sal_uInt16 nRetMask = 0xffff;
381 if (pArgs && SfxItemState::SET == pArgs->
GetItemState( nSlotId,
true, &pNameItem ))
382 aStyleName = static_cast<const SfxStringItem*>(pNameItem)->GetValue();
385 if (pArgs && (pRefItem = pArgs->
GetItemIfSet( SID_STYLE_REFERENCE )))
390 pStyleSheet = &(pStylePool->
Make( aStyleName, eFamily,
391 SfxStyleSearchBits::UserDefined ) );
398 case SID_STYLE_APPLY:
402 if ( pFamilyItem && pNameItem )
404 css::uno::Reference< css::style::XStyleFamiliesSupplier >
xModel(pDocSh->
GetModel(), css::uno::UNO_QUERY);
407 css::uno::Reference< css::container::XNameAccess > xStyles;
408 css::uno::Reference< css::container::XNameAccess > xCont =
xModel->getStyleFamilies();
409 xCont->getByName(pFamilyItem->GetValue()) >>= xStyles;
410 css::uno::Reference< css::beans::XPropertySet > xInfo;
411 xStyles->getByName( pNameItem->
GetValue() ) >>= xInfo;
413 xInfo->getPropertyValue(
"DisplayName") >>= aUIName;
414 if ( !aUIName.isEmpty() )
417 catch( css::uno::Exception& )
424 case SID_STYLE_DELETE:
427 case SID_STYLE_NEW_BY_EXAMPLE:
430 if (pArgs && SfxItemState::SET == pArgs->
GetItemState( nSlotId,
true, &pNameItem ))
431 aStyleName = static_cast<const SfxStringItem*>(pNameItem)->GetValue();
432 else if ( nSlotId == SID_STYLE_NEW_BY_EXAMPLE )
443 pStyleSheet = pStylePool->
Find( aStyleName, eFamily );
449 case SID_STYLE_WATERCAN:
457 if ( SfxItemState::SET ==
464 pStyleSheet = pStylePool->
Find( aStyleName, eFamily );
469 SetActualStyleSheet( pStyleSheet );
476 if ( !bWaterCan && pStyleSheet )
496 if ( nSlotId == SID_STYLE_APPLY && pScMod->
GetIsWaterCan() && pStyleSheet )
497 static_cast<ScStyleSheetPool*>(pStylePool)->SetActualStyleSheet( pStyleSheet );
501 case SfxStyleFamily::Para:
505 case SID_STYLE_DELETE:
510 pStylePool->
Remove( pStyleSheet );
512 nRetMask = sal_uInt16(
true);
517 nRetMask = sal_uInt16(
false);
526 pStyleSheet->
SetHidden( nSlotId == SID_STYLE_HIDE );
531 nRetMask = sal_uInt16(
false);
535 case SID_STYLE_APPLY:
547 case SID_STYLE_NEW_BY_EXAMPLE:
548 case SID_STYLE_UPDATE_BY_EXAMPLE:
562 pAttrItem = rDoc.
GetPattern( nCol, nRow, nCurTab );
573 if ( SID_STYLE_NEW_BY_EXAMPLE == nSlotId )
577 OUString aUndo =
ScResId( STR_UNDO_EDITCELLSTYLE );
582 bool bConvertBack =
false;
588 if ( pStyleSheet && pSheetInUse && pStyleSheet == pSheetInUse )
589 pSheetInUse =
nullptr;
599 pStylePool->
Remove(pStyleSheet);
603 pStyleSheet = &pStylePool->
Make( aStyleName, eFamily,
604 SfxStyleSearchBits::UserDefined );
623 bStyleToMarked =
true;
635 OUString aUndo =
ScResId( STR_UNDO_EDITCELLSTYLE );
645 bStyleToMarked =
true;
661 case SfxStyleFamily::Page:
665 case SID_STYLE_DELETE:
667 nRetMask = sal_uInt16(
nullptr != pStyleSheet );
676 pStylePool->
Remove( pStyleSheet );
688 nRetMask = sal_uInt16(
nullptr != pStyleSheet );
691 pStyleSheet->
SetHidden( nSlotId == SID_STYLE_HIDE );
699 case SID_STYLE_APPLY:
701 nRetMask = sal_uInt16(
nullptr != pStyleSheet );
704 std::unique_ptr<ScUndoApplyPageStyle> pUndoAction;
706 for (
const auto& rTab : rMark)
708 if (rTab >= nTabCount)
711 if ( aOldName != aStyleName )
717 pUndoAction->AddSheetAction( rTab, aOldName );
733 case SID_STYLE_NEW_BY_EXAMPLE:
735 const OUString& rStrCurStyle = rDoc.
GetPageStyle( nCurTab );
737 if ( rStrCurStyle != aStyleName )
746 pStylePool->
Remove( pStyleSheet );
749 pStyleSheet = &pStylePool->
Make( aStyleName, eFamily,
750 SfxStyleSearchBits::UserDefined );
763 nRetMask = sal_uInt16(
true);
779 if ( nSlotId == SID_STYLE_NEW || nSlotId == SID_STYLE_EDIT )
789 OUString aOldName = pStyleSheet->
GetName();
793 case SfxStyleFamily::Page:
797 case SfxStyleFamily::Para:
810 GetFormatForLanguageIfBuiltIn( nFormat, eLang );
811 if ( nLangFormat != nFormat )
814 rSet.
Put( aNewItem );
815 aOldSet.
Put( aNewItem );
821 std::unique_ptr<SvxNumberInfoItem> pNumberInfoItem(
824 pDocSh->
PutItem( *pNumberInfoItem );
836 rSet.
Put( aBoxInfoItem );
853 short nResult = pDlg->Execute();
862 nRetMask = sal_uInt16(pStyleSheet->
GetMask());
866 if ( SfxStyleFamily::Para == eFam )
869 bool bNumFormatChanged;
871 bNumFormatChanged, rNewSet, aOldSet ) )
875 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
880 if ( nNewFormat != nOldFormat )
896 OUString aNewName = pStyleSheet->
GetName();
897 if ( aNewName != aOldName &&
910 if ( SfxStyleFamily::Para == eFam )
913 *( pDocSh->
GetItem(SID_ATTR_NUMBERFORMAT_INFO) ));
925 if ( nSlotId == SID_STYLE_NEW )
926 pStylePool->
Remove( pStyleSheet );
939 if ( bAddUndo && bUndo)
941 std::make_unique<ScUndoModifyStyle>( pDocSh, eFamily, aOldData, aNewData ) );
943 if ( bStyleToMarked )
954 else if (nSlotId == SID_CLASSIFICATION_APPLY)
957 if (pArgs && pArgs->
GetItemState(nSlotId,
false, &pItem) == SfxItemState::SET)
961 auto eType = SfxClassificationPolicyType::IntellectualProperty;
964 const OUString& rType = pNameItem->GetValue();
967 aHelper.SetBACName(rName, eType);
970 SAL_WARN(
"sc.ui",
"missing parameter for SID_CLASSIFICATION_APPLY");
974 OSL_FAIL(
"Unknown slot (ScViewShell::ExecuteStyle)" );
983 sal_uInt16 nSlot = rReq.
GetSlot();
993 case SID_NUMBER_TYPE_FORMAT:
994 case SID_NUMBER_TWODEC:
995 case SID_NUMBER_SCIENTIFIC:
996 case SID_NUMBER_DATE:
997 case SID_NUMBER_CURRENCY:
998 case SID_NUMBER_PERCENT:
999 case SID_NUMBER_STANDARD:
1000 case SID_NUMBER_FORMAT:
1001 case SID_NUMBER_INCDEC:
1002 case SID_NUMBER_DECDEC:
1003 case SID_NUMBER_THOUSANDS:
1004 case FID_DEFINE_NAME:
1007 case FID_INSERT_NAME:
1008 case SID_SPELL_DIALOG:
1009 case SID_HANGUL_HANJA_CONVERSION:
1023 case SID_NUMBER_TWODEC:
1028 if ((nType & SvNumFormatType::NUMBER) && nNumberFormat == 4)
1036 case SID_NUMBER_SCIENTIFIC:
1037 if (nType & SvNumFormatType::SCIENTIFIC)
1044 case SID_NUMBER_DATE:
1045 if (nType & SvNumFormatType::DATE)
1052 case SID_NUMBER_TIME:
1053 if (nType & SvNumFormatType::TIME)
1060 case SID_NUMBER_CURRENCY:
1064 if ( pReqArgs->
HasItem( SID_NUMBER_CURRENCY, &pItem ) )
1074 if ( nOldFormat != nNewFormat )
1091 if ( nType & SvNumFormatType::CURRENCY )
1099 case SID_NUMBER_PERCENT:
1100 if (nType & SvNumFormatType::PERCENT)
1107 case SID_NUMBER_STANDARD:
1111 case SID_NUMBER_INCDEC:
1115 case SID_NUMBER_DECDEC:
1119 case SID_NUMBER_THOUSANDS:
1123 bool bThousand(
false);
1124 bool bNegRed(
false);
1125 sal_uInt16 nPrecision(0);
1126 sal_uInt16 nLeadZeroes(0);
1136 pFormatter->
GetFormatSpecialInfo(nCurrentNumberFormat, bThousand, bNegRed, nPrecision, nLeadZeroes);
1137 bThousand = !bThousand;
1139 nCurrentNumberFormat,
1151 case SID_NUMBER_FORMAT:
1171 if(!(eType == SvNumFormatType::ALL
1172 || eType == SvNumFormatType::NUMBER
1173 || eType == SvNumFormatType::PERCENT
1174 || eType == SvNumFormatType::CURRENCY
1175 || eType == SvNumFormatType::SCIENTIFIC
1176 || eType == SvNumFormatType::TIME
1177 || eType == SvNumFormatType::FRACTION))
1180 if(SfxItemState::SET == pReqArgs->
GetItemState(nSlot,
true, &pItem) && pEntry)
1183 sal_uInt16 aLen = aCode.getLength();
1184 std::unique_ptr<OUString[]> sFormat(
new OUString[4] );
1185 OUStringBuffer sTmpStr;
1187 sal_uInt16 nStrCount(0);
1189 while(nCount < aLen)
1195 sFormat[nStrCount] = sTmpStr.makeStringAndClear();
1200 sTmpStr.append(cChar);
1209 const bool bThousand =
static_cast<bool>(sFormat[0].toInt32());
1210 const bool bNegRed =
static_cast<bool>(sFormat[1].toInt32());
1211 const sal_uInt16 nPrecision =
static_cast<sal_uInt16
>(sFormat[2].toInt32());
1212 const sal_uInt16 nLeadZeroes =
static_cast<sal_uInt16
>(sFormat[3].toInt32());
1215 nCurrentNumberFormat,
1226 case SID_ATTR_NUMBERFORMAT_VALUE:
1238 aNewSet.
Put( *pItem );
1244 case SID_NUMBER_TYPE_FORMAT:
1248 if ( pReqArgs->
GetItemState( nSlot,
true, &pItem ) == SfxItemState::SET )
1292 OSL_FAIL(
"ExecuteEdit: invalid slot");
1302 sal_uInt16 nSlot = rReq.
GetSlot();
1309 case SID_ALIGN_ANY_HDEFAULT:
1310 case SID_ALIGN_ANY_LEFT:
1311 case SID_ALIGN_ANY_HCENTER:
1312 case SID_ALIGN_ANY_RIGHT:
1313 case SID_ALIGN_ANY_JUSTIFIED:
1316 case SID_ALIGN_ANY_VDEFAULT:
1317 case SID_ALIGN_ANY_TOP:
1318 case SID_ALIGN_ANY_VCENTER:
1319 case SID_ALIGN_ANY_BOTTOM:
1332 case SID_ATTR_ALIGN_HOR_JUSTIFY:
1333 case SID_ATTR_ALIGN_VER_JUSTIFY:
1334 case SID_ATTR_ALIGN_INDENT:
1335 case SID_ATTR_ALIGN_HYPHENATION:
1336 case SID_ATTR_ALIGN_DEGREES:
1337 case SID_ATTR_ALIGN_LOCKPOS:
1338 case SID_ATTR_ALIGN_MARGIN:
1339 case SID_ATTR_ALIGN_STACKED:
1343 case SID_H_ALIGNCELL:
1351 case SID_V_ALIGNCELL:
1355 OSL_FAIL(
"ExecuteAlignment: invalid slot" );
1361 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_LEFT );
1362 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_RIGHT );
1363 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_BLOCK );
1364 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_CENTER);
1375 rBindings.
Invalidate( SID_ALIGN_ANY_HDEFAULT );
1377 rBindings.
Invalidate( SID_ALIGN_ANY_HCENTER );
1379 rBindings.
Invalidate( SID_ALIGN_ANY_JUSTIFIED );
1380 rBindings.
Invalidate( SID_ALIGN_ANY_VDEFAULT );
1382 rBindings.
Invalidate( SID_ALIGN_ANY_VCENTER );
1383 rBindings.
Invalidate( SID_ALIGN_ANY_BOTTOM );
1386 if( ! rReq.
IsAPI() )
1396 sal_uInt16 nSlot = rReq.
GetSlot();
1397 std::optional<SfxAllItemSet> pNewSet;
1401 if ( (nSlot == SID_ATTR_CHAR_WEIGHT)
1402 ||(nSlot == SID_ATTR_CHAR_POSTURE)
1403 ||(nSlot == SID_ATTR_CHAR_UNDERLINE)
1404 ||(nSlot == SID_ULINE_VAL_NONE)
1405 ||(nSlot == SID_ULINE_VAL_SINGLE)
1406 ||(nSlot == SID_ULINE_VAL_DOUBLE)
1407 ||(nSlot == SID_ULINE_VAL_DOTTED) )
1413 case SID_ATTR_CHAR_WEIGHT:
1416 SvtScriptType nScript = SvtScriptType::LATIN | SvtScriptType::ASIAN | SvtScriptType::COMPLEX;
1430 if ( pCore && static_cast<const SvxWeightItem*>(pCore)->GetWeight() ==
WEIGHT_BOLD )
1436 pNewSet->Put( aSetItem.GetItemSet(),
false );
1440 case SID_ATTR_CHAR_POSTURE:
1443 SvtScriptType nScript = SvtScriptType::LATIN | SvtScriptType::ASIAN | SvtScriptType::COMPLEX;
1457 if ( pCore && static_cast<const SvxPostureItem*>(pCore)->GetPosture() ==
ITALIC_NORMAL )
1463 pNewSet->Put( aSetItem.GetItemSet(),
false );
1467 case SID_ATTR_CHAR_UNDERLINE:
1473 if( dynamic_cast<const SvxUnderlineItem*>( &rUnderline) !=
nullptr )
1476 pNewSet->Put( rUnderline,rUnderline.
Which() );
1478 else if (
auto pTextLineItem = dynamic_cast<const SvxTextLineItem*>( &rUnderline) )
1481 SvxUnderlineItem aNewItem( pTextLineItem->GetLineStyle(), pTextLineItem->Which() );
1482 aNewItem.
SetColor( pTextLineItem->GetColor() );
1484 pNewSet->Put( aNewItem, aNewItem.Which() );
1493 aUnderline.SetLineStyle( eUnderline );
1495 pNewSet->Put( aUnderline,aUnderline.Which() );
1500 case SID_ULINE_VAL_NONE:
1503 case SID_ULINE_VAL_SINGLE:
1504 case SID_ULINE_VAL_DOUBLE:
1505 case SID_ULINE_VAL_DOTTED:
1511 case SID_ULINE_VAL_SINGLE:
1514 case SID_ULINE_VAL_DOUBLE:
1517 case SID_ULINE_VAL_DOTTED:
1546 eHorJustify = pHorJustify->GetValue();
1550 eVerJustify = pVerJustify->GetValue();
1556 rReq.
SetSlot( SID_H_ALIGNCELL );
1558 !pHorJustify || (eHorJustify != SvxCellHorJustify::Left) ?
1559 SvxCellHorJustify::Left : SvxCellHorJustify::Standard, SID_H_ALIGNCELL ) );
1563 case SID_ALIGNRIGHT:
1564 rReq.
SetSlot( SID_H_ALIGNCELL );
1566 !pHorJustify || (eHorJustify != SvxCellHorJustify::Right) ?
1567 SvxCellHorJustify::Right : SvxCellHorJustify::Standard, SID_H_ALIGNCELL ) );
1571 case SID_ALIGNCENTERHOR:
1572 rReq.
SetSlot( SID_H_ALIGNCELL );
1574 !pHorJustify || (eHorJustify != SvxCellHorJustify::Center) ?
1575 SvxCellHorJustify::Center : SvxCellHorJustify::Standard, SID_H_ALIGNCELL ) );
1579 case SID_ALIGNBLOCK:
1580 rReq.
SetSlot( SID_H_ALIGNCELL );
1582 !pHorJustify || (eHorJustify != SvxCellHorJustify::Block) ?
1583 SvxCellHorJustify::Block : SvxCellHorJustify::Standard, SID_H_ALIGNCELL ) );
1588 rReq.
SetSlot( SID_V_ALIGNCELL );
1590 !pVerJustify || (eVerJustify != SvxCellVerJustify::Top) ?
1591 SvxCellVerJustify::Top : SvxCellVerJustify::Standard, SID_V_ALIGNCELL ) );
1595 case SID_ALIGNBOTTOM:
1596 rReq.
SetSlot( SID_V_ALIGNCELL );
1598 !pVerJustify || (eVerJustify != SvxCellVerJustify::Bottom) ?
1599 SvxCellVerJustify::Bottom : SvxCellVerJustify::Standard, SID_V_ALIGNCELL ) );
1603 case SID_ALIGNCENTERVER:
1604 rReq.
SetSlot( SID_V_ALIGNCELL );
1606 !pVerJustify || (eVerJustify != SvxCellVerJustify::Center) ?
1607 SvxCellVerJustify::Center : SvxCellVerJustify::Standard, SID_V_ALIGNCELL ) );
1621 rReq.
Done( *pNewSet );
1637 if (pArgs && (pColorStringItem = pArgs->
GetItemIfSet(SID_ATTR_COLOR_STR,
false)))
1640 sColor = pColorStringItem->
GetValue();
1642 if (sColor ==
"transparent")
1645 rColor =
Color(ColorTransparency, sColor.toInt32(16));
1657 sal_uInt16 nSlot = rReq.
GetSlot();
1665 case SID_GROW_FONT_SIZE:
1666 case SID_SHRINK_FONT_SIZE:
1682 if ( nSlot == SID_GROW_FONT_SIZE )
1683 nSize = std::min< sal_uInt32 >( nSize + nFontInc, nFontMaxSz );
1685 nSize = std::max< sal_Int32 >( nSize - nFontInc, nFontInc );
1691 rBindings.
Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
1695 case SID_ATTR_CHAR_ENDPREVIEW_FONT:
1701 case SID_ATTR_CHAR_COLOR:
1702 case SID_ATTR_CHAR_FONT:
1703 case SID_ATTR_CHAR_FONTHEIGHT:
1707 case SID_BACKGROUND_COLOR:
1712 pTabViewShell->
ApplyAttr( aBrushItem,
false );
1716 case SID_ATTR_ALIGN_LINEBREAK:
1724 aNewSet.
Put( aBreakItem,aBreakItem.
Which() );
1725 rReq.
Done( aNewSet );
1731 case SID_SCATTR_CELLPROTECTION:
1739 ScProtectionAttr aProtectionItem( !bProtect, bHideFormula, bHideCell, bHidePrint );
1740 pTabViewShell->
ApplyAttr( aProtectionItem );
1743 aNewSet.
Put( aProtectionItem, aProtectionItem.
Which());
1744 aNewSet.
Put(
SfxBoolItem( SID_SCATTR_CELLPROTECTION, !bProtect ) );
1745 rReq.
Done( aNewSet );
1756 case SID_ATTR_CHAR_PREVIEW_FONT:
1759 sal_uInt16 nWhich = rPool.
GetWhich( nSlot );
1768 aFuncMark.MarkToMulti();
1770 if ( !aFuncMark.IsMarked() && !aFuncMark.IsMultiMarked() )
1775 ScRange aRange( nCol, nRow, nTab );
1776 aFuncMark.SetMarkArea( aRange );
1782 case SID_ATTR_CHAR_OVERLINE:
1783 case SID_ATTR_CHAR_STRIKEOUT:
1784 case SID_ATTR_ALIGN_LINEBREAK:
1785 case SID_ATTR_CHAR_CONTOUR:
1786 case SID_ATTR_CHAR_SHADOWED:
1787 case SID_ATTR_CHAR_RELIEF:
1790 rBindings.
Update( nSlot );
1792 case SID_ATTR_CHAR_COLOR:
1793 case SID_SCATTR_PROTECTION :
1796 if (lcl_getColorFromStr(pNewAttrs, aColor))
1801 pTabViewShell->
ApplyAttr(aColorItem,
false);
1809 rBindings.
Update( nSlot );
1814 case SID_ATTR_CHAR_FONT:
1815 case SID_ATTR_CHAR_FONTHEIGHT:
1818 SvtScriptType nScript = SvtScriptType::LATIN | SvtScriptType::ASIAN | SvtScriptType::COMPLEX;
1819 if (nSlot == SID_ATTR_CHAR_FONT)
1824 sal_uInt16 nWhich = rPool.
GetWhich( nSlot );
1830 rBindings.
Update( nSlot );
1834 case SID_FRAME_LINESTYLE:
1837 const ::editeng::SvxBorderLine* pLine =
1838 pNewAttrs->
Get( SID_FRAME_LINESTYLE ).
1848 pLine->GetBorderLineStyle());
1849 pDefLine->
SetWidth( pLine->GetWidth( ) );
1863 SvxBorderLineStyle::SOLID );
1870 case SID_FRAME_LINECOLOR:
1875 if (!lcl_getColorFromStr(pNewAttrs, aColor))
1876 aColor = pNewAttrs->
Get( SID_FRAME_LINECOLOR ).GetValue();
1893 case SID_ATTR_BORDER_OUTER:
1894 case SID_ATTR_BORDER:
1915 aBoxItem.
SetLine( pDefLine, SvxBoxItemLine::TOP );
1917 aBoxItem.
SetLine( pDefLine, SvxBoxItemLine::BOTTOM );
1919 aBoxItem.
SetLine( pDefLine, SvxBoxItemLine::LEFT );
1921 aBoxItem.
SetLine( pDefLine, SvxBoxItemLine::RIGHT );
1922 aNewSet.Put( aBoxItem );
1930 aBoxInfoItem.
SetLine( pDefLine, SvxBoxInfoItemLine::HORI );
1932 aBoxInfoItem.
SetLine( pDefLine, SvxBoxInfoItemLine::VERT );
1933 aNewSet.Put( aBoxInfoItem );
1939 aBoxInfoItem.
SetLine(
nullptr, SvxBoxInfoItemLine::HORI );
1940 aBoxInfoItem.
SetLine(
nullptr, SvxBoxInfoItemLine::VERT );
1941 aNewSet.Put( aBoxInfoItem );
1944 aOldSet.Put( rBorderAttr );
1949 case SID_ATTR_BORDER_DIAG_TLBR:
1950 case SID_ATTR_BORDER_DIAG_BLTR:
1956 if(SID_ATTR_BORDER_DIAG_TLBR == nSlot)
1984 case SID_BACKGROUND_COLOR:
1988 if (!lcl_getColorFromStr(pNewAttrs, aColor))
1990 const SvxColorItem& rNewColorItem = pNewAttrs->
Get( SID_BACKGROUND_COLOR );
1998 pTabViewShell->
ApplyAttr( aBrushItem,
false );
2002 case SID_ATTR_BRUSH:
2008 aBrushItem.
SetColor(rNewBrushItem.GetColor());
2013 case SID_ATTR_BORDER_SHADOW:
2017 pTabViewShell->
ApplyAttr( rNewShadowItem );
2038 rSet.
Put( rAttrSet,
false );
2057 case SID_BACKGROUND_COLOR:
2066 case SID_FRAME_LINESTYLE:
2067 case SID_FRAME_LINECOLOR:
2073 bool bColDisable =
false, bStyleDisable =
false;
2074 std::shared_ptr<SvxBoxItem> aBoxItem(std::make_shared<SvxBoxItem>(
ATTR_BORDER));
2075 std::shared_ptr<SvxBoxInfoItem> aInfoItem(std::make_shared<SvxBoxInfoItem>(
ATTR_BORDER_INNER));
2079 if( aBoxItem->GetTop() )
2082 aCol = aBoxItem->GetTop()->GetColor() ;
2084 aLine.
SetWidth( aBoxItem->GetTop()->GetWidth());
2088 if( aBoxItem->GetBottom() )
2093 aCol = aBoxItem->GetBottom()->GetColor() ;
2095 aLine.
SetWidth( aBoxItem->GetBottom()->GetWidth());
2100 if(aCol != aBoxItem->GetBottom()->GetColor() )
2102 if( aLine != *aBoxItem->GetBottom() )
2103 bStyleDisable =
true;
2107 if( aBoxItem->GetLeft() )
2112 aCol = aBoxItem->GetLeft()->GetColor() ;
2114 aLine.
SetWidth( aBoxItem->GetLeft()->GetWidth());
2119 if(aCol != aBoxItem->GetLeft()->GetColor() )
2121 if( aLine != *aBoxItem->GetLeft() )
2122 bStyleDisable =
true;
2126 if( aBoxItem->GetRight() )
2131 aCol = aBoxItem->GetRight()->GetColor() ;
2133 aLine.
SetWidth( aBoxItem->GetRight()->GetWidth());
2138 if(aCol != aBoxItem->GetRight()->GetColor() )
2140 if( aLine != *aBoxItem->GetRight() )
2141 bStyleDisable =
true;
2145 if( aInfoItem->GetVert())
2150 aCol = aInfoItem->GetVert()->GetColor() ;
2152 aLine.
SetWidth( aInfoItem->GetVert()->GetWidth());
2157 if(aCol != aInfoItem->GetVert()->GetColor() )
2159 if( aLine != *aInfoItem->GetVert() )
2160 bStyleDisable =
true;
2164 if( aInfoItem->GetHori())
2169 aCol = aInfoItem->GetHori()->GetColor() ;
2171 aLine.
SetWidth( aInfoItem->GetHori()->GetWidth());
2176 if(aCol != aInfoItem->GetHori()->GetColor() )
2178 if( aLine != *aInfoItem->GetHori() )
2179 bStyleDisable =
true;
2183 if( !aInfoItem->IsValid( SvxBoxInfoItemValidFlags::VERT )
2184 || !aInfoItem->IsValid( SvxBoxInfoItemValidFlags::HORI )
2185 || !aInfoItem->IsValid( SvxBoxInfoItemValidFlags::LEFT )
2186 || !aInfoItem->IsValid( SvxBoxInfoItemValidFlags::RIGHT )
2187 || !aInfoItem->IsValid( SvxBoxInfoItemValidFlags::TOP )
2188 || !aInfoItem->IsValid( SvxBoxInfoItemValidFlags::BOTTOM ) )
2191 bStyleDisable =
true;
2194 if(SID_FRAME_LINECOLOR == nWhich)
2229 case SID_ATTR_BRUSH:
2234 case SID_SCATTR_CELLPROTECTION:
2254 rSet.
Put( rAttrSet,
false );
2276 if ( eState == SfxItemState::DONTCARE )
2298 sal_uInt16 nWhich = 0;
2299 bool bJustifyStd =
false;
2303 reinterpret_cast<const SfxPoolItem**>(&pHorJustify) );
2306 case SfxItemState::SET:
2308 switch ( pHorJustify->GetValue() )
2310 case SvxCellHorJustify::Standard:
2313 case SvxCellHorJustify::Left:
2314 nWhich = SID_ALIGNLEFT;
2317 case SvxCellHorJustify::Right:
2318 nWhich = SID_ALIGNRIGHT;
2321 case SvxCellHorJustify::Center:
2322 nWhich = SID_ALIGNCENTERHOR;
2325 case SvxCellHorJustify::Block:
2326 nWhich = SID_ALIGNBLOCK;
2329 case SvxCellHorJustify::Repeat:
2337 case SfxItemState::DONTCARE:
2352 rSet.
Put( aBoolItem );
2354 else if ( bJustifyStd )
2357 aBoolItem.
SetWhich( SID_ALIGNLEFT ); rSet.
Put( aBoolItem );
2358 aBoolItem.
SetWhich( SID_ALIGNRIGHT ); rSet.
Put( aBoolItem );
2359 aBoolItem.
SetWhich( SID_ALIGNCENTERHOR ); rSet.
Put( aBoolItem );
2360 aBoolItem.
SetWhich( SID_ALIGNBLOCK ); rSet.
Put( aBoolItem );
2361 bJustifyStd =
false;
2370 reinterpret_cast<const SfxPoolItem**>(&pVerJustify) );
2374 case SfxItemState::SET:
2376 eVerJustify = pVerJustify->GetValue();
2378 switch ( eVerJustify )
2380 case SvxCellVerJustify::Top:
2381 nWhich = SID_ALIGNTOP;
2384 case SvxCellVerJustify::Bottom:
2385 nWhich = SID_ALIGNBOTTOM;
2388 case SvxCellVerJustify::Center:
2389 nWhich = SID_ALIGNCENTERVER;
2392 case SvxCellVerJustify::Standard:
2400 case SfxItemState::DONTCARE:
2414 rSet.
Put( aBoolItem );
2416 else if ( bJustifyStd )
2419 aBoolItem.
SetWhich( SID_ALIGNTOP ); rSet.
Put( aBoolItem );
2420 aBoolItem.
SetWhich( SID_ALIGNBOTTOM ); rSet.
Put( aBoolItem );
2421 aBoolItem.
SetWhich( SID_ALIGNCENTERVER ); rSet.
Put( aBoolItem );
2428 std::shared_ptr<SvxBoxItem> aBoxItem(std::make_shared<SvxBoxItem>(
ATTR_BORDER));
2429 std::shared_ptr<SvxBoxInfoItem> aInfoItem(std::make_shared<SvxBoxInfoItem>(
ATTR_BORDER_INNER));
2434 rSet.
Put( *aBoxItem );
2436 rSet.
Put( *aInfoItem );
2460 case SID_H_ALIGNCELL:
2464 case SID_V_ALIGNCELL:
2470 case SID_ALIGN_ANY_HDEFAULT:
2471 case SID_ALIGN_ANY_LEFT:
2472 case SID_ALIGN_ANY_HCENTER:
2473 case SID_ALIGN_ANY_RIGHT:
2474 case SID_ALIGN_ANY_JUSTIFIED:
2475 rSet.
Put(
SfxBoolItem( nWhich, bHasHAlign && (eHAlign == lclConvertSlotToHAlign( nWhich )) ) );
2477 case SID_ALIGN_ANY_VDEFAULT:
2478 case SID_ALIGN_ANY_TOP:
2479 case SID_ALIGN_ANY_VCENTER:
2480 case SID_ALIGN_ANY_BOTTOM:
2481 rSet.
Put(
SfxBoolItem( nWhich, bHasVAlign && (eVAlign == lclConvertSlotToVAlign( nWhich )) ) );
2514 case SID_NUMBER_THOUSANDS:
2516 bool bEnable = (SfxItemState::DONTCARE != eItemState);
2519 bEnable = ((nType != SvNumFormatType::ALL) && (nType &
2520 (SvNumFormatType::NUMBER |
2521 SvNumFormatType::PERCENT |
2522 SvNumFormatType::CURRENCY |
2523 SvNumFormatType::FRACTION)));
2526 bool bThousand(
false );
2527 bool bNegRed(
false );
2528 sal_uInt16 nPrecision( 0 );
2529 sal_uInt16 nLeadZeroes( 0 );
2540 case SID_NUMBER_FORMAT:
2543 if(SfxItemState::DONTCARE != eItemState)
2545 bool bThousand(
false);
2546 bool bNegRed(
false);
2547 sal_uInt16 nPrecision(0);
2548 sal_uInt16 nLeadZeroes(0);
2553 if (pFormatEntry && (pFormatEntry->
GetType() & SvNumFormatType::SCIENTIFIC))
2557 bThousand = nIntegerDigits > 0 && ((nIntegerDigits % 3) == 0);
2560 static constexpr OUStringLiteral sBreak =
u",";
2561 const OUString sThousand = OUString::number(static_cast<sal_Int32>(bThousand));
2562 const OUString sNegRed = OUString::number(static_cast<sal_Int32>(bNegRed));
2563 const OUString sPrecision = OUString::number(nPrecision);
2564 const OUString sLeadZeroes = OUString::number(nLeadZeroes);
2566 aFormat += sThousand +
2579 OUString sPayload =
".uno:NumberFormat=" + aFormat;
2591 case SID_NUMBER_TYPE_FORMAT:
2593 sal_Int16 nFormatCategory = -1;
2594 if ( eItemState >= SfxItemState::DEFAULT )
2598 case SvNumFormatType::NUMBER:
2601 nFormatCategory = 0;
2603 nFormatCategory = 1;
2605 case SvNumFormatType::PERCENT:
2606 nFormatCategory = 2;
2608 case SvNumFormatType::CURRENCY:
2609 nFormatCategory = 3;
2611 case SvNumFormatType::DATE:
2613 case SvNumFormatType::DATETIME:
2614 nFormatCategory = 4;
2616 case SvNumFormatType::TIME:
2617 nFormatCategory = 5;
2619 case SvNumFormatType::SCIENTIFIC:
2620 nFormatCategory = 6;
2622 case SvNumFormatType::FRACTION:
2623 nFormatCategory = 7;
2625 case SvNumFormatType::LOGICAL:
2626 nFormatCategory = 8;
2628 case SvNumFormatType::TEXT:
2629 nFormatCategory = 9;
2632 nFormatCategory = -1;
2634 if( nFormatCategory == -1 )
2646 case SID_NUMBER_CURRENCY:
2647 rSet.
Put(
SfxBoolItem(nWhich,
bool(nType & SvNumFormatType::CURRENCY)) );
2649 case SID_NUMBER_SCIENTIFIC:
2650 rSet.
Put(
SfxBoolItem(nWhich,
bool(nType & SvNumFormatType::SCIENTIFIC)) );
2652 case SID_NUMBER_DATE:
2653 rSet.
Put(
SfxBoolItem(nWhich,
bool(nType & SvNumFormatType::DATE)) );
2655 case SID_NUMBER_PERCENT:
2656 rSet.
Put(
SfxBoolItem(nWhich,
bool(nType & SvNumFormatType::PERCENT)) );
2658 case SID_NUMBER_TIME:
2659 rSet.
Put(
SfxBoolItem(nWhich,
bool(nType & SvNumFormatType::TIME)) );
2661 case SID_NUMBER_TWODEC:
2664 case SID_NUMBER_STANDARD:
2676 bool bEditMode =
false;
2680 SC_MOD()->InputEnterHandler();
2683 sal_uInt16 nSlot = rReq.
GetSlot();
2686 case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
2687 case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
2689 bool bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM);
2699 case SID_ATTR_PARA_LEFT_TO_RIGHT:
2700 case SID_ATTR_PARA_RIGHT_TO_LEFT:
2703 SvxFrameDirection::Horizontal_LR_TB : SvxFrameDirection::Horizontal_RL_TB;
2717 bool bVertDontCare =
2720 bool bLeftRight = !bVertDontCare &&
2722 bool bTopBottom = !bVertDontCare && !bLeftRight &&
2727 if ( !bBidiDontCare )
2730 if ( eCellDir == SvxFrameDirection::Environment )
2733 else if ( eCellDir == SvxFrameDirection::Horizontal_RL_TB )
2734 eBidiDir = EEHorizontalTextDirection::R2L;
2736 eBidiDir = EEHorizontalTextDirection::L2R;
2748 case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
2749 case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
2750 if ( bDisableVerticalText )
2756 else if ( nWhich == SID_TEXTDIRECTION_LEFT_TO_RIGHT )
2763 case SID_ATTR_PARA_LEFT_TO_RIGHT:
2764 case SID_ATTR_PARA_RIGHT_TO_LEFT:
2765 if ( bDisableCTLFont )
2771 else if ( bBidiDontCare )
2773 else if ( nWhich == SID_ATTR_PARA_LEFT_TO_RIGHT )
2774 rSet.
Put(
SfxBoolItem( nWhich, eBidiDir == EEHorizontalTextDirection::L2R ) );
2776 rSet.
Put(
SfxBoolItem( nWhich, eBidiDir == EEHorizontalTextDirection::R2L ) );
2795 if( pArgs && pArgs->
Count() >= 1 )
2796 bLock = pArgs->
Get(SID_FORMATPAINTBRUSH).GetValue();
2804 pView->
CopyToClip( pBrushDoc.get(),
false, true );
2836 bool bFirstItem =
true;
2844 while (aMultiIter.
Next(nRow1, nRow2))
2853 nComboType = nThisType;
2855 else if (nComboType != nThisType)
2857 return SvNumFormatType::ALL;
2866 nType = pFormatter->
GetType( nNumFmt );
ScMarkData & GetMarkData()
const SfxPoolItem * ExecuteSlot(SfxRequest &rReq, const SfxInterface *pIF=nullptr)
bool GetIsWaterCan() const
SfxViewFrame * GetViewFrame() const
void SetBorderLineStyle(SvxBorderLineStyle nNew)
void ResetBrushDocument()
static void UpdateNumberFormatter(const SvxNumberInfoItem &rInfoItem)
ScDocShell * GetDocShell() const
bool AdjustBlockHeight(bool bPaint=true, ScMarkData *pMarkData=nullptr)
void SetWidth(tools::Long nWidth)
void SetSelectionFrameLines(const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
constexpr TypedWhichId< SvxLanguageItem > ATTR_LANGUAGE_FORMAT(147)
void PutItemForScriptType(SvtScriptType nScriptType, const SfxPoolItem &rItem)
#define SFX_IMPL_INTERFACE(Class, SuperClass)
OUString ScResId(TranslateId aId)
SC_DLLPUBLIC bool CopyToClip(ScDocument *pClipDoc, bool bCut, bool bApi=false, bool bIncludeObjects=false, bool bStopEdit=true)
void CellStyleCreated(std::u16string_view rName, const ScDocument &rDoc)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
static SfxClassificationPolicyType stringToPolicyType(std::u16string_view rType)
static void PutItemScript(SfxItemSet &rShellSet, const SfxItemSet &rCoreSet, sal_uInt16 nWhichId, SvtScriptType nScript)
void SetPreviewSelection(const ScMarkData &rSel)
virtual const SfxItemSet * GetOutputItemSet() const =0
void SetBrushDocument(ScDocumentUniquePtr pNew, bool bLock)
constexpr TypedWhichId< SfxBoolItem > ATTR_VERTICAL_ASIAN(137)
void SetColor(const Color &rCol)
virtual bool SetParent(const OUString &)
void ApplyAttr(const SfxPoolItem &rAttrItem, bool bAdjustBlockHeight=true)
void SetMinDist(bool bNew)
void UpdateInputHandlerCellAdjust(SvxCellHorJustify eJust)
bool IsPageStyleInUse(std::u16string_view rStrPageStyle, SCTAB *pInTab)
virtual void Remove(SfxStyleSheetBase *)
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
const editeng::SvxBorderLine * GetVert() const
constexpr::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
css::uno::Reference< css::frame::XModel3 > GetModel() const
void ModifyStyleSheet(SfxStyleSheetBase &rPageStyle, const SfxItemSet &rChanges)
const ScMarkData & GetPreviewSelection() const
sal_uInt16 GetValue() const
void SetHeight(sal_uInt32 nNewHeight, const sal_uInt16 nNewProp=100, MapUnit eUnit=MapUnit::MapRelative)
void InvalidateItem(sal_uInt16 nWhich)
void SetDocumentModified()
bool HasEditView(ScSplitPos eWhich) const
constexpr TypedWhichId< SvxBoxInfoItem > ATTR_BORDER_INNER(151)
ScSplitPos GetActivePart() const
void Done(bool bRemove=false)
ScDocument & GetDocument() const
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
virtual SfxUndoManager * GetUndoManager()
virtual SfxItemSet & GetItemSet()
constexpr TypedWhichId< ScLineBreakCell > ATTR_LINEBREAK(139)
void SetLine(const editeng::SvxBorderLine *pNew)
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
void SetPreviewFont(std::unique_ptr< SfxItemSet > pFontSet)
bool IsCTLFontEnabled() const
const editeng::SvxBorderLine * GetRight() const
SfxStyleFamily GetFamily() const
void PutItem(const SfxPoolItem &rItem)
SfxStyleSearchBits GetMask() const
static std::unique_ptr< SvxNumberInfoItem > MakeNumberInfoItem(ScDocument &rDoc, const ScViewData &rViewData)
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
css::uno::Reference< css::document::XDocumentProperties > getDocProperties() const
SC_DLLPUBLIC ScDocumentPool * GetPool()
virtual SfxUndoManager * GetUndoManager() override
bool Next(SCROW &rTop, SCROW &rBottom)
const SfxStyleSheet * GetStyleSheetFromMarked()
bool HasMarks(SCCOL nCol) const
void disposeAndReset(reference_type *pBody)
void SetSlot(sal_uInt16 nNewSlot)
void MergeRange(sal_uInt16 nFrom, sal_uInt16 nTo)
virtual void SetHidden(bool bValue)
const OUString & GetName() const
void RemoveStyleSheetInUse(const SfxStyleSheetBase *pStyleSheet)
sal_uInt16 GetOutWidth() const
void SetColor(const Color &rColor)
constexpr TypedWhichId< SvxShadowItem > ATTR_SHADOW(152)
SC_DLLPUBLIC SCTAB GetTableCount() const
const ScPatternAttr * GetSelectionPattern(const ScMarkData &rMark)
bool IsMultiMarked() const
SC_DLLPUBLIC void InputEnterHandler(ScEnterMode nBlockMode=ScEnterMode::NORMAL, bool bBeforeSavingInLOK=false)
virtual void libreOfficeKitViewCallback(int nType, const char *pPayload) const override
bool RemovePageStyleInUse(std::u16string_view rStrPageStyle)
void UpdateInputHandler(bool bForce=false, bool bStopEditing=true)
void SetUndoManager(SfxUndoManager *pNewUndoMgr)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
const OUStringLiteral sColor
SvtScriptType GetSelectionScriptType()
void SetColor(const Color &rCol)
SfxItemPool & GetPool() const
constexpr TypedWhichId< SvxUnderlineItem > ATTR_FONT_UNDERLINE(104)
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
ScStyleSheet * GetPreviewCellStyle()
ScTabViewShell * GetViewShell() const
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_TLBR(141)
const Color & GetColor() const
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALIDDATA(153)
void InitFromStyle(const SfxStyleSheetBase *pSource)
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
const editeng::SvxBorderLine * GetHori() const
const editeng::SvxBorderLine * GetTop() const
constexpr TypedWhichId< SvxPostureItem > ATTR_FONT_POSTURE(103)
const sal_uInt32 nFontInc
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const sal_uInt32 nFontMaxSz
::editeng::SvxBorderLine * GetDefaultFrameLine() const
const editeng::SvxBorderLine * GetLeft() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
SfxBindings & GetBindings()
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
void SetActivePointer(PointerStyle nPointer)
constexpr TypedWhichId< SvxVerJustifyItem > ATTR_VER_JUSTIFY(132)
void UpdateStyleSheetInUse(const SfxStyleSheetBase *pStyleSheet)
SfxBindings & GetBindings()
void ExecuteCellFormatDlg(SfxRequest &rReq, const OString &rTabPage)
const OUString & GetValue() const
const T * GetArg(sal_uInt16 nSlotId) const
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxInfoItemLine nLine)
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
void SetPool(SfxItemPool *pNewPool)
EEHorizontalTextDirection
bool RenamePageStyleInUse(std::u16string_view rOld, const OUString &rNew)
SfxItemSet & GetItemSet()
ScMarkType GetSimpleArea(SCCOL &rStartCol, SCROW &rStartRow, SCTAB &rStartTab, SCCOL &rEndCol, SCROW &rEndRow, SCTAB &rEndTab) const
void SetNumFmtByStr(const OUString &rCode)
#define LANGUAGE_DONTKNOW
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALUE_FORMAT(146)
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
SfxItemState QueryState(sal_uInt16 nSID, std::unique_ptr< SfxPoolItem > &rpState)
void ApplySelectionPattern(const ScPatternAttr &rAttr, bool bCursorOnly=false)
constexpr TypedWhichId< ScVerticalStackCell > ATTR_STACKED(134)
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
void SetName(const OUString &rName)
#define SV_COUNTRY_LANGUAGE_OFFSET
void SetNumberFormat(SvNumFormatType nFormatType, sal_uLong nAdd=0)
static void UnmarkFiltered(ScMarkData &rMark, const ScDocument &rDoc)
static SC_DLLPUBLIC LanguageType eLnge
void UpdStlShtPtrsFrmNms()
virtual SvxScriptSetItem * Clone(SfxItemPool *pPool=nullptr) const override
SfxItemPool * GetPool() const
SfxViewShell * GetViewShell() const
void SetStyleSheet(ScStyleSheet *pNewStyle, bool bClearDirectFormat=true)
void SetValue(bool const bTheValue)
SC_DLLPUBLIC const ScPatternAttr * GetSelectionPattern()
#define SFX_OBJECTBAR_OBJECT
ScDBFunc * GetView() const
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
void SetReturnValue(const SfxPoolItem &)
void InvalidateTextWidth(std::u16string_view rStyleName)
weld::Window * GetFrameWeld() const
void Update(sal_uInt16 nId)
bool HasPaintBrush() const
constexpr TypedWhichId< SvxFrameDirectionItem > ATTR_WRITINGDIR(138)
SC_DLLPUBLIC void SetPageStyle(SCTAB nTab, const OUString &rName)
constexpr TypedWhichId< ScMergeFlagAttr > ATTR_MERGE_FLAG(145)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
virtual VclPtr< SfxAbstractTabDialog > CreateScStyleDlg(weld::Window *pParent, SfxStyleSheetBase &rStyleBase, bool bPage)=0
sal_uInt32 GetHeight() const
void SetStreamValid(SCTAB nTab, bool bSet, bool bIgnoreLock=false)
void DisableItem(sal_uInt16 nWhich)
weld::Window * GetFrameWeld() const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
virtual void Invalidate(sal_uInt16 nId=0)
void ChangeNumFmtDecimals(bool bIncrement)
void SetWhich(sal_uInt16 nId)
static SC_DLLPUBLIC ScAbstractDialogFactory * Create()
SfxDispatcher & GetDispatcher()
SC_DLLPUBLIC void ApplySelectionPattern(const ScPatternAttr &rAttr, const ScMarkData &rMark, ScEditDataArray *pDataArray=nullptr, bool *pIsChanged=nullptr)
static bool CheckWidthInvalidate(bool &bNumFormatChanged, const SfxItemSet &rNewAttrs, const SfxItemSet &rOldAttrs)
constexpr TypedWhichId< SvxWeightItem > ATTR_FONT_WEIGHT(102)
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
void SetStyleSheetToMarked(const SfxStyleSheet *pStyleSheet)
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId)
constexpr TypedWhichId< ScCondFormatItem > ATTR_CONDITIONAL(154)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
const ScDocument & GetDocument() const
void SetWaterCan(bool bNew)
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
void SetPreviewCellStyle(ScStyleSheet *pStyle)
void UpdateSelectionArea(const ScMarkData &rSel, ScPatternAttr *pAttr=nullptr)
virtual SfxInterface * GetInterface() const
bool IsVerticalTextEnabled()
void ApplyUserItemSet(const SfxItemSet &rItemSet)
void AppendItem(const SfxPoolItem &)
#define SAL_WARN(area, stream)
SfxObjectShell * GetSfxDocShell() const
const ScMultiSel & GetMultiSelData() const
bool IsUndoEnabled() const
Reference< XModel > xModel
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
void ApplyAttributes(const SfxItemSet *pDialogSet, const SfxItemSet *pOldSet, bool bAdjustBlockHeight=true)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
virtual SfxPrinter * GetPrinter(bool bCreate=false) override
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
virtual bool HasParentSupport() const
void SetDefaultFrameLine(const ::editeng::SvxBorderLine *pLine)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
constexpr TypedWhichId< SvxColorItem > ATTR_FONT_COLOR(109)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
const editeng::SvxBorderLine * GetBottom() const
const ScRange & GetMultiMarkArea() const
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_BLTR(142)
const SfxPoolItem * GetItemOfScript(SvtScriptType nScript) const
void GetSelectionFrame(std::shared_ptr< SvxBoxItem > &rLineOuter, std::shared_ptr< SvxBoxInfoItem > &rLineInner)
static bool IsWhich(sal_uInt16 nId)
const Color & GetValue() const
void SetValue(const Color &rNewColor)
ViewShellId GetViewShellId() const override
SC_DLLPUBLIC sal_uInt32 GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
bool m_bDetectedRangeSegmentation false
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
void SetInFormatDialog(bool bFlag)