25#include <osl/diagnose.h>
60#include <com/sun/star/sheet/DataPilotFieldFilter.hpp>
61#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
62#include <com/sun/star/sheet/DataPilotTableHeaderData.hpp>
63#include <com/sun/star/sheet/MemberResultFlags.hpp>
64#include <com/sun/star/sheet/TableValidationVisibility.hpp>
65#include <com/sun/star/awt/KeyModifier.hpp>
66#include <com/sun/star/awt/MouseButton.hpp>
67#include <com/sun/star/awt/XVclWindowPeer.hpp>
68#include <com/sun/star/script/vba/VBAEventId.hpp>
69#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
70#include <com/sun/star/text/textfield/Type.hpp>
79#include <document.hxx>
108#include <compiler.hxx>
119#include <overlayobject.hxx>
121#include <drawview.hxx>
128#include <uiobject.hxx>
135#include <officecfg/Office/Common.hxx>
147#include <LibreOfficeKit/LibreOfficeKitEnums.h>
150#include <boost/property_tree/json_parser.hpp>
155using namespace css::uno;
166#define SC_FILTERLISTBOX_LINES 12
170 , mnCol2(rDoc.MaxCol())
172 , mnRow2(rDoc.MaxRow())
178 return mnCol1 <= nCol && nCol <= mnCol2 && mnRow1 <= nRow && nRow <= mnRow2;
183 bool bChanged = mnCol1 != nCol1 || mnRow1 != nRow1 || mnCol2 != nCol2 || mnRow2 != nRow2;
196 : xBuilder(
Application::CreateBuilder(pParent,
"modules/scalc/ui/filterlist.ui"))
197 , xPopover(xBuilder->weld_popover(
"FilterList"))
198 , xTreeView(xBuilder->weld_tree_view(
"list"))
207 , nAsyncSelectHdl(nullptr)
241 pGridWin->ClickExtern();
254 if (!bInit && !bCancelled && !nAsyncSelectHdl)
256 int nPos = xTreeView->get_selected_index();
269 nAsyncSelectHdl =
nullptr;
272 auto xThis(shared_from_this());
273 pGridWin->FilterSelect(nSel);
274 if (xThis.use_count() == 1)
279 pGridWin->ClickExtern();
358 rPoint.
setX(nMirrorPX - rPoint.
X());
359 rRect.
SetLeft(nMirrorMM - nRight);
366 DropTargetHelper( this ),
367 DragSourceHelper( this ),
368 maVisibleRange(rData.GetDocument()),
371 nCursorHideCount( 0 ),
376 pDragDPObj( nullptr ),
381 nPagebreakBreak( 0 ),
389 aComboButton( GetOutDev() ),
392 aRFSelectedCorned(
NONE ),
393 maShowPageBreaksTimer(
"ScGridWindow maShowPageBreaksTimer"),
398 bPagebreakDrawn( false ),
401 bNeedsRepaint( false ),
402 bAutoMarkVisible( false ),
403 bListValButton( false )
425 OSL_FAIL(
"GridWindow: wrong position");
491 bool bMouseWasCaptured = mpFilterBox->MouseWasCaptured();
492 mpFilterBox->SetCancelled();
495 SAL_WARN_IF(bMouseWasCaptured,
"sc.ui",
"Is there a scenario where the mouse was captured before mouse down?");
496 if (bMouseWasCaptured)
504 if( rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG )
505 mrViewData.GetDispatcher().Execute( SID_SPELL_DIALOG, SfxCallMode::ASYNCHRON );
506 else if (rInfo.nCommand == SpellCallbackCommand::AUTOCORRECT_OPTIONS)
507 mrViewData.GetDispatcher().Execute( SID_AUTO_CORRECT_DLG, SfxCallMode::ASYNCHRON );
533 virtual bool execute()
override
535 mpWindow->UpdateAutoFilterFromMenu(meMode);
549 virtual bool execute()
override
551 mpWindow->RefreshAutoFilterButton(maPos);
557class AutoFilterSubMenuAction :
public AutoFilterAction
564 : AutoFilterAction(
p,
eMode)
565 , m_pSubMenu(pSubMenu)
570class AutoFilterColorAction :
public AutoFilterSubMenuAction
577 : AutoFilterSubMenuAction(
p, pSubMenu,
eMode)
582 virtual bool execute()
override
584 const AutoFilterData*
pData =
585 static_cast<const AutoFilterData*
>(m_pSubMenu->getExtendedData());
596 ScViewData& rViewData = m_pSubMenu->GetViewData();
621 bool bActive =
false;
623 if (aItem.maColor == m_aColor
659class AutoFilterSortColorAction :
public AutoFilterSubMenuAction
667 : AutoFilterSubMenuAction(
p, pSubMenu,
eMode)
669 , m_rViewData(rViewData)
673 virtual bool execute()
override
675 const AutoFilterData*
pData =
676 static_cast<const AutoFilterData*
>(m_pSubMenu->getExtendedData());
689 if (nCol < aSortParam.nCol1 || nCol > aSortParam.
nCol2)
720class AutoFilterColorPopupStartAction :
public AutoFilterSubMenuAction
727 mbIsFilter(bIsFilter)
731 virtual bool execute()
override
733 const AutoFilterData*
pData =
734 static_cast<const AutoFilterData*
>(m_pSubMenu->getExtendedData());
743 ScViewData& rViewData = m_pSubMenu->GetViewData();
750 m_pSubMenu->clearMenuItems();
754 OUString aPaletteName(officecfg::Office::Common::UserColors::PaletteName::get());
756 std::vector<OUString> aPaletteNames = aPaletteManager.
GetPaletteList();
757 for (
size_t i = 0, nLen = aPaletteNames.size(); i < nLen; ++i)
759 if (aPaletteName == aPaletteNames[i])
765 if (!xUserColorList->Load())
766 xUserColorList =
nullptr;
782 for (
auto& rColor : aColors)
784 bool bActive =
false;
789 if (aItem.maColor == rColor
799 const bool bAutoColor = rColor ==
COL_AUTO;
805 xDev->SetOutputSize(aImageSize);
810 const Color aW(COL_WHITE);
811 const Color aG(0xef, 0xef, 0xef);
812 int nMinDim = std::min(aImageSize.Width(), aImageSize.Height()) + 1;
813 int nCheckSize = nMinDim / 3;
814 xDev->DrawCheckered(aRect.TopLeft(), aRect.GetSize(), std::min(nCheckSize, 8), aW, aG);
815 xDev->SetFillColor();
818 xDev->SetFillColor(rColor);
821 xDev->DrawRect(aRect);
826 ?
ScResId(SCSTR_FILTER_AUTOMATIC_COLOR)
827 :
ScResId(SCSTR_FILTER_NO_FILL);
830 m_pSubMenu->addMenuColorItem(
831 sText, bActive, *xDev, nMenu,
832 new AutoFilterColorAction(mpWindow, m_pSubMenu, eMode, rColor));
836 m_pSubMenu->addMenuColorItem(
837 sText, bActive, *xDev, nMenu,
838 new AutoFilterSortColorAction(mpWindow, m_pSubMenu, eMode, rColor, rViewData));
845 bool bFoundColorName =
false;
848 sal_Int32
nPos = xUserColorList->GetIndexOfColor(rColor);
851 XColorEntry* pColorEntry = xUserColorList->GetColor(nPos);
853 bFoundColorName =
true;
856 if (!bFoundColorName)
857 sName =
"#" + rColor.AsRGBHexString().toAsciiUpperCase();
861 m_pSubMenu->addMenuColorItem(
862 sName, bActive, *xDev, nMenu,
863 new AutoFilterColorAction(mpWindow, m_pSubMenu, eMode, rColor));
867 m_pSubMenu->addMenuColorItem(
868 sName, bActive, *xDev, nMenu,
869 new AutoFilterSortColorAction(mpWindow, m_pSubMenu, eMode, rColor,
878 m_pSubMenu->resizeToFitMenuItems();
890 mrItems(rItems), mrPool(rPool) {}
900 mrItems.push_back(aNew);
905class AddSelectedItemString
907 std::unordered_set<OUString>& mrSetString;
908 std::unordered_set<double>& mrSetValue;
910 explicit AddSelectedItemString(std::unordered_set<OUString>& rString, std::unordered_set<double>& rValue) :
911 mrSetString(rString), mrSetValue(rValue) {}
915 if( rItem.
meType == ScQueryEntry::QueryType::ByValue )
916 mrSetValue.insert(rItem.
mfVal);
922void collectUIInformation(
const OUString& aRow,
const OUString& aCol ,
const OUString& aevent)
925 aDescription.
aAction =
"LAUNCH";
926 aDescription.
aID =
"grid_window";
928 {
"ROW", aRow}, {
"COL", aCol}};
929 aDescription.
aParent =
"MainWindow";
930 aDescription.
aKeyWord =
"ScGridWinUIObject";
954 int nMaxTextWidth = 0;
955 if (aFilterEntries.
size() <= 10)
958 for (
const auto& rEntry : aFilterEntries)
960 const OUString& aText = rEntry.GetString();
961 nMaxTextWidth = std::max<int>(nMaxTextWidth,
mpAutoFilterPopup->GetTextWidth(aText) + aText.getLength() * 2);
968 auto itMax = aFilterEntries.
begin();
969 for (
auto it = itMax; it != aFilterEntries.
end(); ++it)
971 int nTextWidth = it->GetString().getLength();
972 if (nMaxTextWidth < nTextWidth)
974 nMaxTextWidth = nTextWidth;
978 nMaxTextWidth =
mpAutoFilterPopup->GetTextWidth(itMax->GetString()) + nMaxTextWidth * 2;
983 int nWindowWidth = std::min<int>(1024, nMaxTextWidth + 70);
985 nMaxTextWidth = std::max<int>(nMaxTextWidth, nWindowWidth - 70);
989 new AutoFilterPopupEndAction(
this,
ScAddress(nCol, nRow, nTab)));
990 std::unique_ptr<AutoFilterData>
pData(
new AutoFilterData);
1006 nSizeX = nSizeX / fZoomX;
1007 nSizeY = nSizeY / fZoomY;
1015 pData->mpData = pDBData;
1021 std::unordered_set<OUString> aSelectedString;
1022 std::unordered_set<double> aSelectedValue;
1023 bool bQueryByNonEmpty =
aEntries.size() == 1 &&
aEntries[0]->IsQueryByNonEmpty();
1025 if (!bQueryByNonEmpty)
1032 std::for_each(rItems.begin(), rItems.end(), AddSelectedItemString(aSelectedString, aSelectedValue));
1039 for (
auto it = aFilterEntries.
begin(); it != aFilterEntries.
end(); ++it)
1042 if (it->GetString().isEmpty())
1044 const OUString& aStringVal = it->GetString();
1045 const double aDoubleVal = it->GetValue();
1046 bool bSelected =
true;
1047 if (!aSelectedValue.empty() || !aSelectedString.empty())
1048 bSelected = aSelectedString.count(aStringVal) > 0;
1049 else if (bQueryByNonEmpty)
1051 mpAutoFilterPopup->addMember(aStringVal, aDoubleVal, bSelected, it->IsHiddenByFilter());
1056 for (
const auto& rEntry : aFilterEntries)
1058 const OUString& aStringVal = rEntry.GetString();
1059 const double aDoubleVal = rEntry.GetValue();
1060 const double aRDoubleVal = rEntry.GetRoundedValue();
1061 bool bSelected = !rEntry.IsHiddenByFilter();
1063 if (!aSelectedValue.empty() || !aSelectedString.empty())
1067 if (aDoubleVal == aRDoubleVal)
1068 bSelected = aSelectedValue.count(aDoubleVal) > 0
1069 || aSelectedString.count(aStringVal) > 0;
1071 bSelected = aSelectedValue.count(aDoubleVal) > 0
1072 || aSelectedValue.count(aRDoubleVal) > 0
1073 || aSelectedString.count(aStringVal) > 0;
1076 bSelected = aSelectedString.count(aStringVal) > 0;
1079 if ( rEntry.IsDate() )
1080 mpAutoFilterPopup->addDateMember( aStringVal, rEntry.GetValue(), bSelected, rEntry.IsHiddenByFilter());
1082 mpAutoFilterPopup->addMember( aStringVal, aRDoubleVal, bSelected, rEntry.IsHiddenByFilter(),
1094 pSubMenu->setPopupStartAction(
new AutoFilterColorPopupStartAction(
this, pSubMenu,
false));
1097 pSubMenu->setPopupStartAction(
new AutoFilterColorPopupStartAction(
this, pSubMenu,
true));
1100 pSubMenu->addMenuItem(
1102 pSubMenu->addMenuItem(
1104 pSubMenu->addMenuItem(
1106 pSubMenu->addMenuItem(
1108 pSubMenu->addSeparator();
1109 pSubMenu->addMenuItem(
1111 pSubMenu->resizeToFitMenuItems();
1130 collectUIInformation(OUString::number(nRow), OUString::number(nCol),
"AUTOFILTER");
1151 const AutoFilterData*
pData =
1172 if (nCol < aSortParam.nCol1 || nCol > aSortParam.
nCol2)
1179 aSortParam.
bByRow =
true;
1221 SAL_INFO(
"sc.ui",
"Apply autofilter to data when entries are the same");
1278 std::for_each(aResult.begin(), aResult.end(), AddItemToEntry(rItems, rPool));
1299 assert(
false &&
"should be handled by AutoFilterColorAction::execute");
1317 rScrPos = rViewData.
GetScrPos(nCol, nRow, eWhich);
1322 rScrSize =
Size(nSizeX-1, nSizeY-1);
1361 auto nSizeX = rCellRect.
GetWidth();
1367 if (nSizeX < nMinLOKWinWidth)
1368 nSizeX = nMinLOKWinWidth;
1378 auto nMaxToExpandTo = std::min(nSizeX,
static_cast<decltype(nSizeX)
>(300));
1379 if (aSize.
Width() < nMaxToExpandTo)
1389 if (!bLayoutRTL && aSize.
Width() > nSizeX)
1408 bool bMenuAtTop =
true;
1417 nRow = rScenRange.
aEnd.
Row() + 1;
1463 aCurrent = aTabName;
1472 sal_Int32
nPos = -1;
1473 if (!aCurrent.isEmpty())
1514 nSizeX = nSizeX / fZoomX;
1515 nSizeY = nSizeY / fZoomY;
1533 bool bEmpty =
false;
1534 std::vector<ScTypedStrData> aStrings;
1541 auto lambda = [](
const ScTypedStrData& rStr) {
return rStr.GetString().isEmpty(); };
1542 aStrings.erase(std::remove_if(aStrings.begin(), aStrings.end(), lambda), aStrings.end());
1545 if (aStrings.empty())
1553 bool bWait = aStrings.size() > 100;
1558 for (
const auto& rString : aStrings)
1560 const OUString& rFilterString = rString.GetString();
1572 sal_Int32 nSelPos = -1;
1578 std::unique_ptr<ScTypedStrData> pNew;
1579 OUString aDocStr = rDoc.
GetString(nCol, nRow, nTab);
1588 if (
pData->GetListType() == css::sheet::TableValidationVisibility::SORTEDASCENDING)
1592 nSelPos =
static_cast<sal_Int32
>(std::distance(aStrings.begin(), it));
1596 auto it = std::find_if(aStrings.begin(), aStrings.end(),
FindTypedStrData(*pNew,
true));
1597 if (it != aStrings.end())
1598 nSelPos =
static_cast<sal_Int32
>(std::distance(aStrings.begin(), it));
1622 rFilterBox.
select(nSelPos);
1628 collectUIInformation(OUString::number(nRow), OUString::number(nCol),
"SELECTMENU");
1634 OUString aString = rFilterBox.
get_text(
static_cast<sal_Int32
>(nSel));
1664 pView->
EnterData( nCol, nRow, nTab, rStr );
1707 if ( bAction && !rMEvt.
IsLeft() )
1710 bool bNewPointer =
false;
1769 bool bTop = ( aMousePos.
X() >= aStartPos.
X()-3 && aMousePos.
X() <= aStartPos.
X()+1 &&
1770 aMousePos.
Y() >= aStartPos.
Y()-3 && aMousePos.
Y() <= aStartPos.
Y()+1 );
1771 bool bBottom = ( aMousePos.
X() >= aEndPos.
X()-3 && aMousePos.
X() <= aEndPos.
X()+1 &&
1772 aMousePos.
Y() >= aEndPos.
Y()-3 && aMousePos.
Y() <= aEndPos.
Y()+1 );
1773 if ( bTop || bBottom )
1789 if (!bNewPointer && bAction)
1866 SAL_WARN_IF(bWasMouseCaptured,
"sc.ui",
"Is there a scenario where the mouse is captured before mouse down?");
1875 bool bDouble = (rMEvt.
GetClicks() == 2);
1911 SfxCallMode::SLOT | SfxCallMode::RECORD,
1912 { &aPosXItem, &aPosYItem });
1947 if ( nPosX >= nEditCol && nPosX <= nEndCol &&
1948 nPosY >= nEditRow && nPosY <= nEndRow )
1962 [pEditView, aOutputArea] {
2006 bool bCrossPointer =
TestMouse( rMEvt,
true );
2007 if ( bCrossPointer )
2015 if ( !bCrossPointer )
2030 if (((!bFormulaMode && !bEditMode) || bIsTiledRendering) && rMEvt.
IsLeft())
2060 if ( !bDouble && !bFormulaMode && rMEvt.
IsLeft() )
2070 SC_MOD()->InputEnterHandler();
2104 if ( aButtonRect.
Contains( aPos ) )
2146 if ( bDouble && !bCrossPointer )
2157 bool bAlt = rMEvt.
IsMod2();
2248 [pEditView, aOutputArea] {
2263 GetSettings().GetMouseSettings().GetMiddleButtonAction() == MouseMiddleButtonAction::PasteSelection )
2272 rBindings.
Invalidate( SID_HYPERLINK_GETLINK );
2313 rFrmBindings.
Invalidate(SID_ATTR_TRANSFORM_WIDTH);
2314 rFrmBindings.
Invalidate(SID_ATTR_TRANSFORM_HEIGHT);
2315 rFrmBindings.
Invalidate(SID_ATTR_TRANSFORM_POS_X);
2316 rFrmBindings.
Invalidate(SID_ATTR_TRANSFORM_POS_Y);
2317 rFrmBindings.
Invalidate(SID_ATTR_TRANSFORM_ANGLE);
2318 rFrmBindings.
Invalidate(SID_ATTR_TRANSFORM_ROT_X);
2319 rFrmBindings.
Invalidate(SID_ATTR_TRANSFORM_ROT_Y);
2320 rFrmBindings.
Invalidate(SID_ATTR_TRANSFORM_AUTOWIDTH);
2321 rFrmBindings.
Invalidate(SID_ATTR_TRANSFORM_AUTOHEIGHT);
2351 ScRange aBlockRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
2352 if ( aBlockRange != aDelRange )
2354 if ( aDelRange.
aStart.
Row() == nStartRow )
2372 ScRange aBlockRange( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab );
2375 ScAddress aEndPos( nFillCol, nFillRow, nTab );
2382 if ( aEndPos != aBlockRange.
aEnd )
2409 GetStyleSheetPool();
2421 case SfxStyleFamily::Para:
2426 case SfxStyleFamily::Page:
2434 rBindings.
Invalidate( SID_STATUS_PAGESTYLE );
2475 sheet::DataPilotTableHeaderData
aData;
2478 if ( (
aData.Flags & sheet::MemberResultFlags::HASMEMBER ) &&
2479 ! (
aData.Flags & sheet::MemberResultFlags::SUBTOTAL ) )
2481 css::sheet::DataPilotFieldOrientation nDummy;
2501 Sequence<sheet::DataPilotFieldFilter> aFilters;
2511 bool bEditAllowed =
true;
2518 if ( bSkipProtected && bSkipUnprotected )
2519 bEditAllowed =
false;
2520 else if ( (bCellProtected && bSkipProtected) || (!bCellProtected && bSkipUnprotected) )
2521 bEditAllowed =
false;
2550 bool bAlt = rMEvt.
IsMod2();
2555 OUString
aName, aUrl, aTarget;
2564 if (aUrl.startsWith(
"#")) {
2571 if (isTiledRendering && pViewShell &&
2578 int mouseX = aPos.
X() / fPPTX;
2579 OString aMsg(aUrl.toUtf8() +
" coordinates: " + aCursor +
", " + OString::number(mouseX));
2596 OUStringBuffer
aBuf;
2613 aBuf.append(
"#" + aUrlCalcA1);
2620 if( xVbaEvents.is() )
try
2629 ScAddress aCellPos( nPosX, nPosY, nTab );
2631 uno::Sequence< uno::Any > aArgs{
uno::Any(xCell) };
2632 xVbaEvents->processVbaEvent( script::vba::VBAEventId::WORKSHEET_FOLLOWHYPERLINK, aArgs );
2635 catch( uno::Exception& )
2655 OSL_ENSURE( pDisp || bFormulaMode,
"Cursor moved on inactive View ?" );
2671 aAddr +=
":" + aAddr;
2687 SfxBoolItem aAlignCursorItem( FN_PARAM_2,
false );
2689 SfxCallMode::SLOT | SfxCallMode::RECORD,
2690 { &aPosItem, &aAlignCursorItem });
2755 [pEditView, aOutputArea] {
2809 if ( nPosX >= nEditCol && nPosX <= nEndCol &&
2810 nPosY >= nEditRow && nPosY <= nEndRow )
2822 pFld = pEditView->
GetField( aLogicClick );
2829 bool bAlt = rMEvt.
IsMod2();
2846 bool bCross =
false;
2853 if (rCorner !=
NONE)
2865 if (nBreakType != 0 )
2868 switch ( nBreakType )
2873 eNew = PointerStyle::ESize;
2878 eNew = PointerStyle::SSize;
2882 eNew = PointerStyle::SESize;
2886 eNew = PointerStyle::NESize;
2909 bool bAlt = rMEvt.
IsMod2();
2927 if (!bSkipSelectionUpdate)
2933 rEvent.Modifiers = 0;
2935 rEvent.Modifiers |= css::awt::KeyModifier::SHIFT;
2937 rEvent.Modifiers |= css::awt::KeyModifier::MOD1;
2939 rEvent.Modifiers |= css::awt::KeyModifier::MOD2;
2941 rEvent.Modifiers |= css::awt::KeyModifier::MOD3;
2945 rEvent.Buttons |= css::awt::MouseButton::LEFT;
2947 rEvent.Buttons |= css::awt::MouseButton::RIGHT;
2954 rEvent.PopupTrigger =
false;
2961 if (
nType == NotifyEventType::MOUSEBUTTONUP ||
nType == NotifyEventType::MOUSEBUTTONDOWN )
2964 if (pWindow ==
this)
2973 css::awt::MouseEvent
aEvent;
2977 if (
nType == NotifyEventType::MOUSEBUTTONDOWN)
2987 if (
nType == NotifyEventType::MOUSEBUTTONDOWN )
3001 return Window::PreNotify( rNEvt );
3040 SC_MOD()->EndReference();
3065 CommandEvent aDragEvent( rPosPixel, CommandEventId::StartDrag,
true );
3078 pEditView->
Command( aDragEvent );
3121 nCmd == CommandEventId::ContextMenu )
3128 OSL_ENSURE( nCmd != CommandEventId::StartDrag,
"ScGridWindow::Command called with CommandEventId::StartDrag" );
3130 if (nCmd == CommandEventId::ModKeyChange)
3132 Window::Command(rCEvt);
3136 if ( nCmd == CommandEventId::StartExtTextInput ||
3137 nCmd == CommandEventId::EndExtTextInput ||
3138 nCmd == CommandEventId::ExtTextInput ||
3139 nCmd == CommandEventId::CursorPos ||
3140 nCmd == CommandEventId::QueryCharPosition )
3150 if ( pOlView && pOlView->
GetWindow() ==
this )
3158 if ( nCmd == CommandEventId::CursorPos && !bEditView )
3176 Window::Command( rCEvt );
3180 if ( nCmd == CommandEventId::PasteSelection )
3194 if ( nCmd == CommandEventId::InputLanguageChange )
3201 rBindings.
Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
3205 if ( nCmd == CommandEventId::Wheel || nCmd == CommandEventId::StartAutoScroll || nCmd == CommandEventId::AutoScroll )
3209 Window::Command(rCEvt);
3213 if (nCmd == CommandEventId::GestureZoom)
3217 Window::Command(rCEvt);
3227 if (nCmd != CommandEventId::ContextMenu ||
SC_MOD()->GetIsWaterCan())
3243 Point aMenuPos = aPosPixel;
3251 if (bPosIsInEditView)
3256 bPosIsInEditView =
false;
3261 bPosIsInEditView =
false;
3263 if (!bPosIsInEditView)
3273 bool bSpellError =
false;
3274 SCCOL nColSpellError = nCellX;
3281 bool bSelectAllowed =
true;
3290 bSelectAllowed = bSelProtected;
3292 bSelectAllowed = bSelUnprotected;
3294 if (!bSelectAllowed)
3310 aSpellCheckCell.
assign(rDoc, aPos);
3314 nColSpellError = aPos.
Col();
3318 bSpellError = (
mpSpellCheckCxt->isMisspelled(nColSpellError, nCellY));
3339 if (bMouse && bSpellError)
3346 OSL_ENSURE( bEdit,
"Can not be switched in edit mode" );
3382 const OUString sOldText = pHdl ? pHdl->
GetEditString() :
"";
3392 || (!bDone && !bPosIsInEditView)))
3397 if (!bDone && nColSpellError != nCellX)
3418 aMenuPos.
AdjustX(bLayoutIsRTL ? -nSizeXPix : nSizeXPix );
3431 aMenuPos = aSelectRect.
Center();
3445 if (!bShouldDisableEditHyperlink)
3475 if ( nCellX >= nEditStartCol && nCellX <= nEditEndCol &&
3476 nCellY >= nEditStartRow && nCellY <= nEditEndRow )
3488 aTextPos -= aOutputArea.
TopRight();
3490 aTextPos.
setX( aTextPos.
Y() );
3491 aTextPos.
setY( nTemp );
3494 aTextPos -= aOutputArea.
TopLeft();
3495 aTextPos += aVisArea.
TopLeft();
3501 if ( aCompare < aSelection || aCompare > aSelection )
3526 if ( aOutputArea.
Contains( aLogicPos ) )
3534 Point aTextPos = aLogicPos;
3537 aTextPos -= aOutputArea.
TopRight();
3539 aTextPos.
setX( aTextPos.
Y() );
3540 aTextPos.
setY( nTemp );
3543 aTextPos -= aOutputArea.
TopLeft();
3544 aTextPos += aVisArea.
TopLeft();
3550 if ( aCompare < aSelection || aCompare > aSelection )
3572 bool bHitSelected =
false;
3576 bHitSelected =
true;
3581 bHitSelected =
true;
3590 bool bHitDraw =
false;
3597 bHitDraw = pDrawView->
MarkObj( aLogicPos );
3642 for (
auto& itr : rMapper.getDataSources())
3652 if(
SC_MOD()->IsRefDialogOpen() )
3656 SC_MOD()->EndReference();
3669 &&
SC_MOD()->GetInputOptions().GetEnterPasteMode() )
3675 uno::Reference<datatransfer::clipboard::XClipboard> xSystemClipboard =
3677 if (xSystemClipboard.is())
3679 xSystemClipboard->setContents(
3680 uno::Reference<datatransfer::XTransferable>(),
3681 uno::Reference<datatransfer::clipboard::XClipboardOwner>());
3717 rBindings.
Invalidate(SID_ATTR_TRANSFORM_POS_X);
3718 rBindings.
Invalidate(SID_ATTR_TRANSFORM_POS_Y);
3729 if (pViewSh->SfxViewShell::KeyInput(rKEvt))
3735 if ( bHadKeyMarker )
3746 if ( bHadKeyMarker )
3765 Window::KeyInput(rKEvt);
3781 OutlinerView* pOlView = pSdrView->GetTextEditOutlinerView();
3782 if (pOlView && pOlView->
GetWindow() ==
this)
3786 return Window::GetSurroundingText();
3802 OutlinerView* pOlView = pSdrView->GetTextEditOutlinerView();
3803 if (pOlView && pOlView->
GetWindow() ==
this)
3807 return Window::GetSurroundingTextSelection();
3823 OutlinerView* pOlView = pSdrView->GetTextEditOutlinerView();
3824 if (pOlView && pOlView->
GetWindow() ==
this)
3828 return Window::DeleteSurroundingText(rSelection);
3856#define SCROLL_SENSITIVE 20
3882 if ( nDx != 0 || nDy != 0 )
3894 bool bReturn =
false;
3921 SCCOL nCol1 = nPosX;
3923 if ( nCol2 > rDoc.
MaxCol() )
3925 nCol1 -= nCol2 - rDoc.
MaxCol();
3928 SCROW nRow1 = nPosY;
3930 if ( nRow2 > rDoc.
MaxRow() )
3932 nRow1 -= nRow2 - rDoc.
MaxRow();
3936 return ScRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab );
3965 if (pSourceDoc == &rThisDoc)
3998 SCCOL nSizeX = nSourceEndX - nSourceStartX + 1;
3999 SCROW nSizeY = nSourceEndY - nSourceStartY + 1;
4005 if (nNewDragX<0) nNewDragX=0;
4006 if (nNewDragX+(nSizeX-1) > rThisDoc.
MaxCol())
4007 nNewDragX = rThisDoc.
MaxCol()-(nSizeX-1);
4009 if (nNewDragY<0) nNewDragY=0;
4010 if (nNewDragY+(nSizeY-1) > rThisDoc.
MaxRow())
4011 nNewDragY = rThisDoc.
MaxRow()-(nSizeY-1);
4033 if ( &rThisDoc == pSourceDoc && ( pDPObj = rThisDoc.
GetDPAtCursor( nNewDragX, nNewDragY, nTab ) ) !=
nullptr )
4037 bool bDPSort =
false;
4040 sheet::DataPilotTableHeaderData aDestData;
4042 bool bValid = ( aDestData.Dimension >= 0 );
4048 sheet::DataPilotTableHeaderData aSourceData;
4050 if ( aSourceData.Dimension != aDestData.Dimension || aSourceData.MemberName.isEmpty() )
4057 OUString aDimName = pDPObj->
GetDimName( aDestData.Dimension, bIsDataLayout );
4063 sheet::DataPilotFieldOrientation nOrient = pDim->
GetOrientation();
4064 if ( nOrient == sheet::DataPilotFieldOrientation_COLUMN )
4067 nSizeY = aOutRange.
aEnd.
Row() - nNewDragY + 1;
4070 else if ( nOrient == sheet::DataPilotFieldOrientation_ROW )
4073 nSizeX = aOutRange.
aEnd.
Col() - nNewDragX + 1;
4091 else if ( aState.mnState &
KEY_MOD2 )
4093 if ( &rThisDoc == pSourceDoc && nTab == aSourceRange.
aStart.
Tab() )
4097 if ( nDeltaX <= nDeltaY )
4106 if ( ( eDragInsertMode ==
INS_CELLSDOWN && nNewDragY <= nSourceEndY &&
4107 ( nNewDragX + nSizeX - 1 ) >= nSourceStartX && nNewDragX <= nSourceEndX &&
4108 ( nNewDragX != nSourceStartX || nNewDragY >= nSourceStartY ) ) ||
4109 ( eDragInsertMode ==
INS_CELLSRIGHT && nNewDragX <= nSourceEndX &&
4110 ( nNewDragY + nSizeY - 1 ) >= nSourceStartY && nNewDragY <= nSourceEndY &&
4111 ( nNewDragY != nSourceStartY || nNewDragX >= nSourceStartX ) ) )
4186 if (pDocSh && pDocSh->
HasName())
4208 nMyAction &= ~DND_ACTION_LINK;
4220 if ( IsDropFormatSupported(SotClipboardFormatId::SVXB)
4221 || IsDropFormatSupported(SotClipboardFormatId::GDIMETAFILE)
4222 || IsDropFormatSupported(SotClipboardFormatId::PNG)
4223 || IsDropFormatSupported(SotClipboardFormatId::BITMAP) )
4234 switch ( nMyAction )
4241 if ( IsDropFormatSupported( SotClipboardFormatId::EMBED_SOURCE ) ||
4242 IsDropFormatSupported( SotClipboardFormatId::LINK_SOURCE ) ||
4243 IsDropFormatSupported( SotClipboardFormatId::EMBED_SOURCE_OLE ) ||
4244 IsDropFormatSupported( SotClipboardFormatId::LINK_SOURCE_OLE ) ||
4245 IsDropFormatSupported( SotClipboardFormatId::EMBEDDED_OBJ_OLE ) ||
4246 IsDropFormatSupported( SotClipboardFormatId::STRING ) ||
4247 IsDropFormatSupported( SotClipboardFormatId::STRING_TSVC ) ||
4248 IsDropFormatSupported( SotClipboardFormatId::SYLK ) ||
4249 IsDropFormatSupported( SotClipboardFormatId::LINK ) ||
4250 IsDropFormatSupported( SotClipboardFormatId::HTML ) ||
4251 IsDropFormatSupported( SotClipboardFormatId::HTML_SIMPLE ) ||
4252 IsDropFormatSupported( SotClipboardFormatId::DIF ) ||
4253 IsDropFormatSupported( SotClipboardFormatId::DRAWING ) ||
4254 IsDropFormatSupported( SotClipboardFormatId::SVXB ) ||
4255 IsDropFormatSupported( SotClipboardFormatId::RTF ) ||
4256 IsDropFormatSupported( SotClipboardFormatId::RICHTEXT ) ||
4257 IsDropFormatSupported( SotClipboardFormatId::GDIMETAFILE ) ||
4258 IsDropFormatSupported( SotClipboardFormatId::PNG ) ||
4259 IsDropFormatSupported( SotClipboardFormatId::BITMAP ) ||
4260 IsDropFormatSupported( SotClipboardFormatId::SBA_DATAEXCHANGE ) ||
4261 IsDropFormatSupported( SotClipboardFormatId::SBA_FIELDDATAEXCHANGE ) ||
4263 IsDropFormatSupported( SotClipboardFormatId::FILE_LIST ) ||
4264 IsDropFormatSupported( SotClipboardFormatId::SIMPLE_FILE ) ||
4265 IsDropFormatSupported( SotClipboardFormatId::SOLK ) ||
4266 IsDropFormatSupported( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) ||
4267 IsDropFormatSupported( SotClipboardFormatId::NETSCAPE_BOOKMARK ) ||
4268 IsDropFormatSupported( SotClipboardFormatId::FILEGRPDESCRIPTOR ) ) ) )
4275 if ( IsDropFormatSupported( SotClipboardFormatId::LINK_SOURCE ) ||
4276 IsDropFormatSupported( SotClipboardFormatId::LINK_SOURCE_OLE ) ||
4277 IsDropFormatSupported( SotClipboardFormatId::LINK ) ||
4278 IsDropFormatSupported( SotClipboardFormatId::FILE_LIST ) ||
4279 IsDropFormatSupported( SotClipboardFormatId::SIMPLE_FILE ) ||
4280 IsDropFormatSupported( SotClipboardFormatId::SOLK ) ||
4281 IsDropFormatSupported( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) ||
4282 IsDropFormatSupported( SotClipboardFormatId::NETSCAPE_BOOKMARK ) ||
4283 IsDropFormatSupported( SotClipboardFormatId::FILEGRPDESCRIPTOR ) )
4324 if ( !aDataHelper.
HasFormat( SotClipboardFormatId::SBA_DATAEXCHANGE ) )
4328 if ( aDataHelper.
HasFormat( SotClipboardFormatId::SOLK ) )
4329 return SotClipboardFormatId::SOLK;
4330 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) )
4331 return SotClipboardFormatId::UNIFORMRESOURCELOCATOR;
4332 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) )
4333 return SotClipboardFormatId::NETSCAPE_BOOKMARK;
4334 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ) )
4335 return SotClipboardFormatId::FILEGRPDESCRIPTOR;
4339 if ( aDataHelper.
HasFormat( SotClipboardFormatId::DRAWING ) )
4340 nFormatId = SotClipboardFormatId::DRAWING;
4341 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::SVXB ) )
4342 nFormatId = SotClipboardFormatId::SVXB;
4343 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::EMBED_SOURCE ) )
4347 bool bDoRtf =
false;
4355 && ( aDataHelper.
HasFormat( SotClipboardFormatId::RTF ) || aDataHelper.
HasFormat( SotClipboardFormatId::RICHTEXT ) ) );
4358 nFormatId = aDataHelper.
HasFormat( SotClipboardFormatId::RTF ) ? SotClipboardFormatId::RTF : SotClipboardFormatId::RICHTEXT;
4360 nFormatId = SotClipboardFormatId::EMBED_SOURCE;
4362 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::LINK_SOURCE ) )
4363 nFormatId = SotClipboardFormatId::LINK_SOURCE;
4364 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::SBA_DATAEXCHANGE ) )
4365 nFormatId = SotClipboardFormatId::SBA_DATAEXCHANGE;
4366 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::SBA_FIELDDATAEXCHANGE ) )
4367 nFormatId = SotClipboardFormatId::SBA_FIELDDATAEXCHANGE;
4368 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::BIFF_8 ) )
4369 nFormatId = SotClipboardFormatId::BIFF_8;
4370 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::BIFF_5 ) )
4371 nFormatId = SotClipboardFormatId::BIFF_5;
4372 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::EMBED_SOURCE_OLE ) )
4373 nFormatId = SotClipboardFormatId::EMBED_SOURCE_OLE;
4374 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::EMBEDDED_OBJ_OLE ) )
4375 nFormatId = SotClipboardFormatId::EMBEDDED_OBJ_OLE;
4376 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::LINK_SOURCE_OLE ) )
4377 nFormatId = SotClipboardFormatId::LINK_SOURCE_OLE;
4378 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::RTF ) )
4379 nFormatId = SotClipboardFormatId::RTF;
4380 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::RICHTEXT ) )
4381 nFormatId = SotClipboardFormatId::RICHTEXT;
4382 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::HTML ) )
4383 nFormatId = SotClipboardFormatId::HTML;
4384 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::HTML_SIMPLE ) )
4385 nFormatId = SotClipboardFormatId::HTML_SIMPLE;
4386 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::SYLK ) )
4387 nFormatId = SotClipboardFormatId::SYLK;
4388 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::LINK ) )
4389 nFormatId = SotClipboardFormatId::LINK;
4390 else if ( bPreferText && aDataHelper.
HasFormat( SotClipboardFormatId::STRING ) )
4391 nFormatId = SotClipboardFormatId::STRING;
4392 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::FILE_LIST ) )
4393 nFormatId = SotClipboardFormatId::FILE_LIST;
4394 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::SIMPLE_FILE ) )
4395 nFormatId = SotClipboardFormatId::SIMPLE_FILE;
4396 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::STRING_TSVC ) )
4397 nFormatId = SotClipboardFormatId::STRING_TSVC;
4398 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::STRING ) )
4399 nFormatId = SotClipboardFormatId::STRING;
4400 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::GDIMETAFILE ) )
4401 nFormatId = SotClipboardFormatId::GDIMETAFILE;
4402 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::PNG ) )
4403 nFormatId = SotClipboardFormatId::PNG;
4404 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::BITMAP ) )
4405 nFormatId = SotClipboardFormatId::BITMAP;
4415 if ( aDataHelper.
HasFormat( SotClipboardFormatId::LINK_SOURCE ) )
4416 nFormatId = SotClipboardFormatId::LINK_SOURCE;
4417 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::LINK_SOURCE_OLE ) )
4418 nFormatId = SotClipboardFormatId::LINK_SOURCE_OLE;
4419 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::LINK ) )
4420 nFormatId = SotClipboardFormatId::LINK;
4421 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::FILE_LIST ) )
4422 nFormatId = SotClipboardFormatId::FILE_LIST;
4423 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::SIMPLE_FILE ) )
4424 nFormatId = SotClipboardFormatId::SIMPLE_FILE;
4425 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::SOLK ) )
4426 nFormatId = SotClipboardFormatId::SOLK;
4427 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) )
4428 nFormatId = SotClipboardFormatId::UNIFORMRESOURCELOCATOR;
4429 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) )
4430 nFormatId = SotClipboardFormatId::NETSCAPE_BOOKMARK;
4431 else if ( aDataHelper.
HasFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ) )
4432 nFormatId = SotClipboardFormatId::FILEGRPDESCRIPTOR;
4484 ScRange aDest( nDestPosX, nDestPosY, nThisTab,
4485 nDestPosX + nSizeX - 1, nDestPosY + nSizeY - 1, nThisTab );
4513 if (!bFiltered && pSourceDoc == &rThisDoc)
4527 OUString aChartName;
4534 sal_uInt16
nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE;
4536 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD,
4537 { &aRangeItem, &aNameItem });
4540 else if ( rThisDoc.
GetDPAtCursor( nDestPosX, nDestPosY, nThisTab ) )
4544 ScAddress aDestPos( nDestPosX, nDestPosY, nThisTab );
4545 if ( aDestPos != aSource.
aStart )
4551 nSourceTab != nThisTab )
4553 OUString aUndo =
ScResId( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
4556 SCCOL nCorrectCursorPosCol = 0;
4557 SCROW nCorrectCursorPosRow = 0;
4566 if ( nThisTab == nSourceTab )
4572 bDone = aSource.
Move( 0, nSizeY, 0, aErrorRange, *pSourceDoc );
4573 nCorrectCursorPosRow = nSizeY;
4579 bDone = aSource.
Move( nSizeX, 0, 0, aErrorRange, *pSourceDoc );
4580 nCorrectCursorPosCol = nSizeX;
4622 bDone = aDest.
Move( 0, -nSizeY, 0, aErrorRange, rThisDoc );
4627 bDone = aDest.
Move( -nSizeX, 0, 0, aErrorRange, rThisDoc );
4664 else if ( !bFiltered && pSourceDoc )
4672 std::vector<SCTAB> nTabs;
4682 for(
SCTAB j=
i+1;j<nTabCount;j++)
4686 nTabs.push_back( j );
4694 pView->
ImportTables( pSrcShell,
static_cast<SCTAB>(nTabs.size()), nTabs.data(), bIsLink, nThisTab );
4704 OSL_ENSURE(pSourceSh,
"drag document has no shell");
4707 OUString aUndo =
ScResId( STR_UNDO_COPY );
4729 const OUString aQuote(
'"');
4751 nDestPosY + nSizeY - 1, nThisTab );
4767 OUString aUndo =
ScResId( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY );
4785 pView->
SetCursor( nDestPosX, nDestPosY );
4823 if (pDocSh && pDocSh->
HasName())
4846 OSL_FAIL(
"drop with link: no sheet nor area");
4895 if ( pHitObj && bIsLink )
4908 if ( nFormatId != SotClipboardFormatId::NONE )
4912 nFormatId, rEvt.
maDropEvent.Transferable, nPosX, nPosY, &aLogicPos, bIsLink );
4946 if ( pOwnSelection )
4952 if ( pCellTransfer )
4960 if ( pDrawTransfer )
4965 aLogicPos, pDrawTransfer->GetModel(),
false,
4974 const uno::Reference<datatransfer::XTransferable>& xTransferable = aDataHelper.
GetTransferable();
4975 if ( xTransferable.is() )
4978 if ( nFormatId != SotClipboardFormatId::NONE )
4999 if (
SC_MOD()->IsFormulaMode() )
5020 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
5044 Scroll( nDifX, nDifY, ScrollFlags::Children );
5081 if (nX1 < 0 || nY1 < 0)
return;
5091 if (nX2 < nX1) nX2 = nX1;
5092 if (nY2 < nY1) nY2 = nY1;
5118 nMirrorWidth = aScrPos.
X() - nEndPixel;
5119 aScrPos.
setX( nEndPixel + 1 );
5134 nScrX, nScrY, nX1, nY1, nX2, nY2,
nPPTX,
nPPTY,
5167 boost::property_tree::ptree aTree;
5168 aTree.put(
"title", title);
5169 aTree.put(
"content", content);
5172 boost::property_tree::write_json(aStream, aTree);
5181 ss << nX <<
", " << nY <<
", " <<
static_cast<unsigned int>(
bVisible);
5251 if ( !
SC_MOD()->IsFormulaMode() )
5270 Window::LoseFocus();
5274 sal_uInt16* pIndex,
SCCOL* pAddX,
SCROW* pAddY)
5276 bool bFound =
false;
5281 if ( pRangeFinder && !pRangeFinder->
IsHidden() &&
5296 Point aCellEnd = aCellStart;
5301 aCellEnd.
AdjustX(nSizeXPix * nLayoutSign );
5304 bool bCornerHorizontalRight;
5305 bool bCornerHorizontalLeft;
5308 bCornerHorizontalRight = ( rMouse.
X() >= aCellEnd.
X() && rMouse.
X() <= aCellEnd.
X() + 8 );
5309 bCornerHorizontalLeft = ( rMouse.
X() >= aCellStart.
X() - 8 && rMouse.
X() <= aCellStart.
X() );
5313 bCornerHorizontalRight = ( rMouse.
X() >= aCellEnd.
X() - 8 && rMouse.
X() <= aCellEnd.
X() );
5314 bCornerHorizontalLeft = ( rMouse.
X() >= aCellStart.
X() && rMouse.
X() <= aCellStart.
X() + 8 );
5317 bool bCornerVerticalDown = rMouse.
Y() >= aCellEnd.
Y() - 8 && rMouse.
Y() <= aCellEnd.
Y();
5318 bool bCornerVerticalUp = rMouse.
Y() >= aCellStart.
Y() && rMouse.
Y() <= aCellStart.
Y() + 8;
5321 sal_uInt16
nCount =
static_cast<sal_uInt16
>(pRangeFinder->
Count());
5343 if ( bCornerHorizontalLeft && bCornerVerticalUp &&
5348 else if (bCornerHorizontalRight && bCornerVerticalDown &&
5353 else if (bCornerHorizontalRight && bCornerVerticalUp &&
5358 else if (bCornerHorizontalLeft && bCornerVerticalDown &&
5387 bool bHiddenEdge =
false;
5391 while ( nCol1 > 0 && rDoc.
ColHidden(nCol1, nTab1) )
5418 if ( nCol2 > nCol1 + 1 && nRow2 > nRow1 + 1 && !bHiddenEdge )
5459 if ( nNewRow2 < nOldRow1 || nNewRow1 > nOldRow2 ||
5460 nNewCol2 < nOldCol1 || nNewCol1 > nOldCol2 ||
5461 ( nNewCol1 != nOldCol1 && nNewRow1 != nOldRow1 &&
5462 nNewCol2 != nOldCol2 && nNewRow2 != nOldRow2 ) )
5472 if ( nNewRow1 < nOldRow1 )
5474 nOldCol1, nOldRow1, nTab1, nOldCol2, nOldRow1, nTab2 ),
SCE_ALL );
5475 else if ( nNewRow1 > nOldRow1 )
5477 nOldCol1, nOldRow1, nTab1, nOldCol2, nNewRow1-1, nTab2 ),
5481 if ( nNewRow2 > nOldRow2 )
5483 nOldCol1, nOldRow2, nTab1, nOldCol2, nOldRow2, nTab2 ),
SCE_ALL );
5484 else if ( nNewRow2 < nOldRow2 )
5486 nOldCol1, nNewRow2+1, nTab1, nOldCol2, nOldRow2, nTab2 ),
5490 if ( nNewCol1 < nOldCol1 )
5492 nOldCol1, nOldRow1, nTab1, nOldCol1, nOldRow2, nTab2 ),
SCE_ALL );
5493 else if ( nNewCol1 > nOldCol1 )
5495 nOldCol1, nOldRow1, nTab1, nNewCol1-1, nOldRow2, nTab2 ),
5499 if ( nNewCol2 > nOldCol2 )
5501 nOldCol2, nOldRow1, nTab1, nOldCol2, nOldRow2, nTab2 ),
SCE_ALL );
5502 else if ( nNewCol2 < nOldCol2 )
5504 nNewCol2+1, nOldRow1, nTab1, nOldCol2, nOldRow2, nTab2 ),
5528 bool bTimer =
false;
5532 if ( aPos.
X() < 0 ) nDx = -1;
5533 if ( aPos.
Y() < 0 ) nDy = -1;
5535 if ( aPos.
X() >= aSize.
Width() )
5537 if ( aPos.
Y() >= aSize.
Height() )
5539 if ( nDx != 0 || nDy != 0 )
5605 if ( nStartX < 0 ) nStartX = 0;
5607 if ( nStartY < 0 ) nStartY = 0;
5609 if ( nEndX > rDoc.
MaxCol() )
5611 nStartX -= ( nEndX - rDoc.
MaxRow() );
5615 if ( nEndY > rDoc.
MaxRow() )
5617 nStartY -= ( nEndY - rDoc.
MaxRow() );
5665 case SvxCellHorJustify::Left:
5666 case SvxCellHorJustify::Repeat:
5667 case SvxCellHorJustify::Standard:
5668 eSvxAdjust = SvxAdjust::Left;
5670 case SvxCellHorJustify::Right:
5671 eSvxAdjust = SvxAdjust::Right;
5673 case SvxCellHorJustify::Center:
5674 eSvxAdjust = SvxAdjust::Center;
5676 case SvxCellHorJustify::Block:
5677 eSvxAdjust = SvxAdjust::Block;
5688 auto pEngine = std::make_shared<ScFieldEditEngine>(&rDoc, rDoc.
GetEditPool());
5690 pEngine->SetRefDevice(aProv.GetDevice());
5691 pEngine->SetRefMapMode(
MapMode(MapUnit::Map100thMM));
5692 SfxItemSet aDefault = pEngine->GetEmptyItemSet();
5695 pEngine->SetDefaults(aDefault);
5700bool extractURLInfo(
const SvxFieldItem* pFieldItem, OUString* pName, OUString* pUrl, OUString* pTarget )
5706 if (pField->
GetClassId() != text::textfield::Type::URL)
5714 *pUrl = pURLField->
GetURL();
5724 OUString* pName, OUString* pUrl, OUString* pTarget )
5751 if (rPos.
Y() < aEditRect.
Top())
5765 std::shared_ptr<ScFieldEditEngine> pEngine = createEditEngine(pDocSh, *pPattern);
5770 Size aPaperSize( 1000000, 1000000 );
5776 aPaperSize =
Size(nSizeX, nSizeY );
5781 aPaperSize.
setWidth( nThisColLogic );
5782 pEngine->SetPaperSize( aPaperSize );
5784 std::unique_ptr<EditTextObject> pTextObj;
5788 pEngine->SetTextCurrentDefaults(*aCell.
getEditText());
5798 OUString aRepres = sURL;
5802 aRepres = OUString::number(aCell.
getValue());
5810 pEngine->SetTextCurrentDefaults(*pTextObj);
5815 tools::Long nTextWidth = pEngine->CalcTextWidth();
5816 tools::Long nTextHeight = pEngine->GetTextHeight();
5817 if ( nTextWidth < nThisColLogic )
5819 if (eHorJust == SvxCellHorJustify::Right)
5820 nStartX += nThisColLogic - nTextWidth;
5821 else if (eHorJust == SvxCellHorJustify::Center)
5822 nStartX += (nThisColLogic - nTextWidth) / 2;
5825 aLogicEdit.
SetLeft( nStartX );
5827 aLogicEdit.
SetRight( nStartX + nTextWidth );
5832 if (aCell.
hasNumeric() && eHorJust == SvxCellHorJustify::Standard)
5834 aLogicEdit.
SetRight( aLogicEdit.
Left() + nThisColLogic - 1 );
5837 aLogicEdit.
SetBottom( aLogicEdit.
Top() + nTextHeight );
5840 if ( aLogicEdit.
Contains(aLogicClick) )
5842 EditView aTempView(pEngine.get(),
this);
5848 bRet = extractURLInfo(aTempView.
GetField(aLogicClick),
pName, pUrl, pTarget);
5886 size_t nRangeCount = aRanges.
size();
5887 for (
size_t j=0; j< nRangeCount; ++j)
5894 bool bTextBelow = ( aRange.
aStart.
Row() == 0 );
5906 aButtonPos.
AdjustY( -nBHeight );
5909 aButtonPos.
AdjustX( -(nHSpace - 1) );
5911 aButtonPos.
AdjustX( -(nBWidth - nHSpace) );
5914 if ( aButRect.
Contains( rPosPixel ) )
5916 rScenRange = aRange;
5983 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
5996 std::vector<tools::Rectangle> aRects;
6012 OString aCursor(
"EMPTY");
6015 auto pForTabView =
dynamic_cast<const ScTabViewShell *
>(pForShell);
6020 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
6023 aCursor = pForTabView->GetViewData().describeCellCursorAt(
6038 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
6049 LOK_CALLBACK_CELL_VIEW_CURSOR,
"rectangle", aCursor);
6055 LOK_CALLBACK_CELL_VIEW_CURSOR,
"rectangle", aCursor);
6083 const ScGridWindow *pGrid = pOther->GetViewData().GetActiveWin();
6150 if ( aOldMode != aDrawMode )
6159 if (!
SC_MOD()->GetInputOptions().GetEnterPasteMode())
6162 if (!xOverlayManager.is())
6188 aClipStartScrPos -=
Point(1, 1);
6189 tools::Long nSizeXPix = aClipEndScrPos.
X() - aClipStartScrPos.
X();
6190 tools::Long nSizeYPix = aClipEndScrPos.
Y() - aClipStartScrPos.
Y();
6198 std::unique_ptr<ScOverlayDashedBorder> pDashedBorder(
new ScOverlayDashedBorder(aRange, aHighlight));
6199 xOverlayManager->add(*pDashedBorder);
6203 if ( aOldMode != aDrawMode )
6209 const std::vector<tools::Rectangle>& rRectangles,
6212 std::vector<tools::Rectangle> aLogicRects;
6217 for (
const auto& rRectangle : rRectangles)
6228 rBoundingBox.
Union(aRect);
6229 aLogicRects.push_back(aRect);
6237 OStringBuffer aRects;
6238 for (
const auto &rRect : rLogicRects)
6241 aRects.append(
"; ");
6243 aRects.append(rRect.toString());
6245 return aRects.makeStringAndClear();
6261 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
6264 std::vector<tools::Rectangle> aConvertedRects;
6267 std::for_each(rRectangles.begin(), rRectangles.end(),
6268 [&aBoundingBox](
const tools::Rectangle& rRect) { aBoundingBox.Union(rRect); });
6272 const std::vector<tools::Rectangle>& rLogicRects = bInPrintTwips ? rRectangles : aConvertedRects;
6275 *pLogicRects = rLogicRects;
6281 OString sBoundingBoxString =
"EMPTY";
6283 sBoundingBoxString = aBoundingBox.
toString();
6291 "selection", aRectListString);
6298 if (it == pViewShell)
6304 const ScGridWindow *pGrid = pOther->GetViewData().GetActiveWin();
6309 std::vector<tools::Rectangle> aPixelRects;
6325 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
6336 std::vector<tools::Rectangle> aRects;
6337 OString aRectsString;
6338 GetRectsAnyFor(pOther->GetViewData().GetMarkData() , aRects, bInPrintTwips);
6341 std::for_each(aRects.begin(), aRects.end(),
6342 [&aBoundingBox](
const tools::Rectangle& rRect) { aBoundingBox.Union(rRect); });
6349 if (it == pViewShell)
6351 OString sBoundingBoxString =
"EMPTY";
6353 sBoundingBoxString = aBoundingBox.
toString();
6360 "selection", aRectsString);
6375 OString sRectangleString =
"EMPTY";
6382 sRectangleString = aLogicRectangle.toString();
6397 if ( aOldMode != aDrawMode )
6405 std::vector<tools::Rectangle> aPixelRects;
6460 bMaybeVisible = ( aScrPos.
X() >= -2 && aScrPos.
Y() >= -2 );
6464 bMaybeVisible = ( aScrPos.
X() <= aOutSize.
Width() + 2 && aScrPos.
Y() <= aOutSize.
Height() + 2 );
6475 aScrPos.
AdjustX( -(nSizeXPix - 2) );
6504 aPixelRects.push_back(aLeft);
6505 aPixelRects.push_back(aRight);
6506 aPixelRects.push_back(aTop);
6507 aPixelRects.push_back(aBottom);
6511 if ( !aPixelRects.empty() )
6523 if (xOverlayManager.is())
6529 std::vector< basegfx::B2DRange > aRanges;
6539 basegfx::B2DRange aRB(rRA.Left() - MinSize - fZoom, rRA.Top() - MinSize - fZoom,
6540 rRA.Right() + MinSize + fZoom, rRA.Bottom() + MinSize + fZoom);
6542 aRanges.push_back(aRB);
6551 xOverlayManager->add(*pOverlay);
6558 if ( aOldMode != aDrawMode )
6564 std::vector<tools::Rectangle> aRects;
6567 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
6583 if ( aOldMode != aDrawMode )
6587 std::vector<tools::Rectangle> aRects;
6590 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
6604 else if (xOverlayManager.is())
6606 std::vector< basegfx::B2DRange > aRanges;
6616 basegfx::B2DRange aRB(rRA.Left(), rRA.Top() - 1, rRA.Right() + 1, rRA.Bottom());
6618 aRanges.push_back(aRB);
6622 basegfx::B2DRange aRB(rRA.Left() - 1, rRA.Top() - 1, rRA.Right(), rRA.Bottom());
6624 aRanges.push_back(aRB);
6637 xOverlayManager->add(*pOverlay);
6652 std::vector<ReferenceMark> aReferenceMarks;
6657 if ( aOldMode != aDrawMode )
6671 if ( aOldMode != aDrawMode )
6701 Size aFillHandleSize(fZoom + fScaleFactor, fZoom + fScaleFactor);
6709 aFillPos.
AdjustX( -(nSizeXPix - 2 + (aFillHandleSize.
Width() / 2)) );
6711 aFillPos.
AdjustX(nSizeXPix - (aFillHandleSize.
Width() / 2) );
6726 updateLibreOfficeKitAutoFill(
mrViewData, aFillRect);
6728 else if (xOverlayManager.is())
6734 std::vector< basegfx::B2DRange > aRanges;
6739 aRanges.push_back(aRB);
6747 xOverlayManager->add(*pOverlay);
6752 if ( aOldMode != aDrawMode )
6764 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
6768 if ( aOldMode != aDrawMode )
6777 std::vector<tools::Rectangle> aPixelRects;
6788 if (nX1 < nPosX) nX1 = nPosX;
6789 if (nX2 < nPosX) nX2 = nPosX;
6790 if (nY1 < nPosY) nY1 = nPosY;
6791 if (nY2 < nPosY) nY2 = nPosY;
6807 if (rDoc.
ValidCol(nX2) && nX2>=nX1)
6808 for (
i=nX1;
i<=nX2;
i++)
6815 aScrPos.
AdjustX( -nLayoutSign );
6819 if (rDoc.
ValidRow(nY2) && nY2>=nY1)
6820 for (
i=nY1;
i<=nY2;
i++)
6840 aScrPos.
X() + ( nSizeXPix +
nAdjust ) * nLayoutSign, aScrPos.
Y() + nSizeYPix +
nAdjust );
6849 aPixelRects.emplace_back( aRect.
Left()+1, aRect.
Top()+3, aRect.
Left()+1, aRect.
Bottom()-2 );
6850 aPixelRects.emplace_back( aRect.
Right()-1, aRect.
Top()+3, aRect.
Right()-1, aRect.
Bottom()-2 );
6851 aPixelRects.emplace_back( aRect.
Left()+1, aRect.
Top(), aRect.
Right()-1, aRect.
Top()+2 );
6856 aPixelRects.emplace_back( aRect.
Left(), aRect.
Top()+1, aRect.
Left()+2, aRect.
Bottom()-1 );
6857 aPixelRects.emplace_back( aRect.
Right()-1, aRect.
Top()+1, aRect.
Right()-1, aRect.
Bottom()-1 );
6858 aPixelRects.emplace_back( aRect.
Left()+3, aRect.
Top()+1, aRect.
Right()-2, aRect.
Top()+1 );
6863 aPixelRects.emplace_back( aRect.
Left(), aRect.
Top(), aRect.
Left()+2, aRect.
Bottom() );
6865 aPixelRects.emplace_back( aRect.
Left()+3, aRect.
Top(), aRect.
Right()-3, aRect.
Top()+2 );
6874 std::vector< basegfx::B2DRange > aRanges;
6879 basegfx::B2DRange aRB(rRA.Left(), rRA.Top(), rRA.Right() + 1, rRA.Bottom() + 1);
6881 aRanges.push_back(aRB);
6890 xOverlayManager->add(*pOverlay);
6898 OString aRectsString;
6901 std::vector<tools::Rectangle> aRectangles;
6902 aRectangles.push_back(aRect);
6906 aBoundingBox = aRect;
6914 OString sBoundingBoxString =
"EMPTY";
6916 sBoundingBoxString = aBoundingBox.
toString();
6923 if ( aOldMode != aDrawMode )
6936 if ( aOldMode != aDrawMode )
6950 std::vector< basegfx::B2DRange > aRanges;
6955 aRanges.push_back(aRB);
6963 xOverlayManager->add(*pOverlay);
6969 if ( aOldMode != aDrawMode )
6982 if ( aOldMode != aDrawMode )
7017 std::vector< basegfx::B2DRange > aRanges;
7022 aRanges.push_back(aRB);
7030 xOverlayManager->add(*pOverlay);
7036 if ( aOldMode != aDrawMode )
7050 if (aOldMode != aDrawMode)
7058 if (
auto pSparkline = rDocument.
GetSparkline(aCurrentAddress))
7063 if (xOverlayManager.is())
7068 auto const& pSparklines = pList->
getSparklinesFor(pSparkline->getSparklineGroup());
7072 std::vector<basegfx::B2DRange> aRanges;
7075 for (
auto const& pCurrentSparkline : pSparklines)
7077 SCCOL nColumn = pCurrentSparkline->getColumn();
7078 SCROW nRow = pCurrentSparkline->getRow();
7086 aRanges.push_back(aRange);
7091 aColor, std::move(aRanges),
true));
7093 xOverlayManager->add(*pOverlay);
7099 if (aOldMode != aDrawMode)
7126 if (xOverlayManager.is())
7127 xOverlayManager->flush();
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
static OUString GetAppName()
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
bool IsMouseEvent() const
EPosition FindDocPosition(const Point &rDocPos) const
bool IsEffectivelyVertical() const
void CompleteOnlineSpelling()
const SvxFieldItem * GetField(const Point &rPos, sal_Int32 *pnPara=nullptr, sal_Int32 *pnPos=nullptr) const
bool MouseButtonUp(const MouseEvent &rMouseEvent)
void HideCursor(bool bDeactivate=false)
bool ExecuteSpellPopup(const Point &rPosPixel, const Link< SpellCallbackInfo &, void > &rCallBack)
ESelection GetSelection() const
bool MouseButtonDown(const MouseEvent &rMouseEvent)
void SetOutputArea(const tools::Rectangle &rRect)
tools::Rectangle GetVisArea() const
OutputDevice & GetOutputDevice() const
void ShowCursor(bool bGotoCursor=true, bool bForceVisCursor=true, bool bActivate=false)
vcl::Cursor * GetCursor() const
const SvxFieldItem * GetFieldUnderMousePointer() const
bool MouseMove(const MouseEvent &rMouseEvent)
bool Command(const CommandEvent &rCEvt)
EditEngine * GetEditEngine() const
const tools::Rectangle & GetOutputArea() const
void SetLOKSpecialOutputArea(const tools::Rectangle &rOutputArea)
const tools::Rectangle & GetLOKSpecialOutputArea() const
void SetOptions(InputContextFlags nOptions)
const vcl::KeyCode & GetKeyCode() const
MouseEventModifiers GetMode() const
bool IsLeaveWindow() const
sal_uInt16 GetModifier() const
sal_uInt16 GetClicks() const
sal_uInt16 GetButtons() const
const Point & GetPosPixel() const
vcl::Window * GetWindow() const
const MouseEvent * GetMouseEvent() const
NotifyEventType GetType() const
bool Command(const CommandEvent &rCEvt)
OUString GetSurroundingText() const
vcl::Window * GetWindow() const
tools::Rectangle const & GetOutputArea() const
tools::Rectangle GetVisArea() const
ESelection GetSelection() const
Outliner * GetOutliner() const
Selection GetSurroundingTextSelection() const
bool DeleteSurroundingText(const Selection &rRange)
const EditEngine & GetEditEngine() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
void SetDigitLanguage(LanguageType)
std::vector< OUString > GetPaletteList()
void SetPalette(sal_Int32 nPos)
OUString GetSelectedPalettePath()
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
constexpr tools::Long getX() const
constexpr tools::Long getY() const
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
void IncCol(SCCOL nDelta=1)
SC_DLLPUBLIC ScRefFlags Parse(const OUString &, const ScDocument &, const Details &rDetails=detailsOOOa1, ExternalInfo *pExtInfo=nullptr, const css::uno::Sequence< css::sheet::ExternalLinkInfo > *pExternalLinks=nullptr, sal_Int32 *pSheetEndPos=nullptr, const OUString *pErrRef=nullptr)
really derive cell from range?
void GetArea(SCTAB &rTab, SCCOL &rCol1, SCROW &rRow1, SCCOL &rCol2, SCROW &rRow2) const
SC_DLLPUBLIC void GetSortParam(ScSortParam &rSortParam) const
SC_DLLPUBLIC void GetQueryParam(ScQueryParam &rQueryParam) const
SC_DLLPUBLIC void SetQueryParam(const ScQueryParam &rQueryParam)
bool DataPilotUpdate(ScDPObject *pOldObj, const ScDPObject *pNewObj, bool bRecord, bool bApi, bool bAllowMove=false)
bool DataPilotMove(const ScRange &rSource, const ScAddress &rDest)
SC_DLLPUBLIC void Query(const ScQueryParam &rQueryParam, const ScRange *pAdvSource, bool bRecord)
bool HasSelectionForDrillDown(css::sheet::DataPilotFieldOrientation &rOrientation)
void UISort(const ScSortParam &rSortParam)
void ShowDataPilotSourceData(ScDPObject &rDPObj, const css::uno::Sequence< css::sheet::DataPilotFieldFilter > &rFilters)
const ScRange & GetOutRange() const
void GetHeaderPositionData(const ScAddress &rPos, css::sheet::DataPilotTableHeaderData &rData)
bool GetDataFieldPositionData(const ScAddress &rPos, css::uno::Sequence< css::sheet::DataPilotFieldFilter > &rFilters)
void ToggleDetails(const css::sheet::DataPilotTableHeaderData &rElemDesc, ScDPObject *pDestObj)
ScDPSaveData * GetSaveData() const
OUString GetDimName(tools::Long nDim, bool &rIsDataLayout, sal_Int32 *pFlags=nullptr)
SC_DLLPUBLIC ScDPSaveDimension * GetExistingDimensionByName(std::u16string_view rName) const
bool GetDrillDown() const
css::sheet::DataPilotFieldOrientation GetOrientation() const
void ResizeMatrix(const ScRange &rOldRange, const ScAddress &rNewEnd)
bool InsertCells(const ScRange &rRange, const ScMarkData *pTabMark, InsCellCmd eCmd, bool bRecord, bool bApi, bool bPartOfPaste=false)
bool DeleteCells(const ScRange &rRange, const ScMarkData *pTabMark, DelCellCmd eCmd, bool bApi)
const ScDocument & GetDocument() const
void UpdateOle(const ScViewData &rViewData, bool bSnapSize=false)
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
bool MoveTable(SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRecord)
virtual SfxUndoManager * GetUndoManager() override
void CheckConfigOptions()
Called when the Options dialog is dismissed with the OK button, to handle potentially conflicting opt...
SC_DLLPUBLIC bool IsScenario(SCTAB nTab) const
ScSheetLimits & GetSheetLimits() const
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC std::shared_ptr< sc::Sparkline > GetSparkline(ScAddress const &rPosition)
Returns sparkline at the address if it exists.
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
bool ValidRow(SCROW nRow) const
SC_DLLPUBLIC const ScTableProtection * GetTabProtection(SCTAB nTab) const
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
ScClipParam & GetClipParam()
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab, ScMarkData &rDestMark, bool bResetMark=true, ScScenarioFlags nNeededBits=ScScenarioFlags::NONE) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uInt32 nIndex) const
const ScDBData * GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC double GetValue(const ScAddress &rPos) const
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
void FillInfo(ScTableInfo &rTabInfo, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale, double fRowScale, bool bPageMode, bool bFormulaMode, const ScMarkData *pMarkData=nullptr)
bool HasScenarioRange(SCTAB nTab, const ScRange &rRange) const
bool IsDocEditable() const
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
SC_DLLPUBLIC SfxItemPool * GetEditPool() const
void GetFilterEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, ScFilterEntries &rFilterEntries)
Get a list of unique strings to use in filtering criteria.
SC_DLLPUBLIC sc::ExternalDataMapper & GetExternalDataMapper()
SC_DLLPUBLIC void ExtendTotalMerge(ScRange &rRange) const
const css::uno::Reference< css::script::vba::XVBAEventProcessor > & GetVbaEventProcessor() const
void ExtendHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
void GetDataEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, std::vector< ScTypedStrData > &rStrings, bool bValidation=false)
Entries for selection list listbox (no numbers/formulas)
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
void GetEmbedded(ScRange &rRange) const
SC_DLLPUBLIC ScDPObject * GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SfxObjectShell * GetDocumentShell() const
bool ValidCol(SCCOL nCol) const
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
SC_DLLPUBLIC bool HasValueData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC void SetPageStyle(SCTAB nTab, const OUString &rName)
SC_DLLPUBLIC sc::SparklineList * GetSparklineList(SCTAB nTab)
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
SC_DLLPUBLIC OUString GetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScInterpreterContext *pContext=nullptr) const
SC_DLLPUBLIC bool IsVisible(SCTAB nTab) const
ScChangeTrack * GetChangeTrack() const
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
bool HasChartAtPoint(SCTAB nTab, const Point &rPos, OUString &rName)
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC bool IsActiveScenario(SCTAB nTab) const
SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC SCTAB GetTableCount() const
SdrObject * GetObjectAtPoint(SCTAB nTab, const Point &rPos)
static bool IsNoteCaption(SdrObject *pObj)
Returns true, if the passed object is the caption of a cell note.
ScDragSrc GetDragSourceFlags() const
SdrModel * GetModel() const
void SetDragWasInternal()
SdrView * GetDragSourceView()
void LockInternalLayer(bool bLock=true)
Locks/unlocks the internal layer that contains caption objects of cell notes.
static std::unique_ptr< EditTextObject > CreateURLObjectFromURL(ScDocument &rDoc, const OUString &rURL, const OUString &rText)
bool IsFormatEditable() const
const OUString * getExternalFileName(sal_uInt16 nFileId, bool bForceOriginal=false)
It returns a pointer to the name of the URI associated with a given external file ID.
std::unique_ptr< weld::TreeView > xTreeView
ImplSVEvent * nAsyncSelectHdl
ScFilterListBox(weld::Window *pParent, ScGridWindow *pGrid, SCCOL nNewCol, SCROW nNewRow, ScFilterBoxMode eNewMode)
static void OpenURL(const OUString &rURL, const OUString &rTarget, bool bIgnoreSettings=false)
Open the specified URL.
static bool ShouldOpenURL()
Whether the URL can be opened according to current security options (Click/Ctrl-Click)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
void DPMouseButtonUp(const MouseEvent &rMEvt)
tools::Rectangle aInvertRect
virtual void LoseFocus() override
bool DrawMouseMove(const MouseEvent &rMEvt)
void DeleteSelectionOverlay()
std::unique_ptr< sdr::overlay::OverlayObjectList > mpOODragRect
void dumpColumnInformationPixel()
void UpdateSelectionOverlay()
virtual ~ScGridWindow() override
std::unique_ptr< sdr::overlay::OverlayObjectList > mpOOSelectionBorder
ScCheckListMenuControl::ResultType aSaveAutoFilterResult
void DropScroll(const Point &rMousePos)
ScGridWindow(vcl::Window *pParent, ScViewData &rData, ScSplitPos eWhichPos)
void DeleteShrinkOverlay()
virtual void MouseMove(const MouseEvent &rMEvt) override
std::unique_ptr< sdr::overlay::OverlayObjectList > mpOOSparklineGroup
void updateOtherKitSelections() const
Fetch the selection ranges for other views into the LibreOfficeKit selection, map them into our view ...
std::unique_ptr< sdr::overlay::OverlayObjectList > mpOOShrink
void DPLaunchFieldPopupMenu(const Point &rScrPos, const Size &rScrSize, const ScAddress &rPos, ScDPObject *pDPObj)
bool IsMyModel(const SdrEditView *pSdrView)
std::unique_ptr< ScDPFieldButton > mpFilterButton
void ImpDestroyOverlayObjects()
virtual void dispose() override
OString getCellCursor() const
get Cell cursor in this view's co-ordinate system
void RFMouseMove(const MouseEvent &rMEvt, bool bUp)
bool ShowNoteMarker(SCCOL nPosX, SCROW nPosY, bool bKeyboard)
void DeleteCopySourceOverlay()
void GetRectsAnyFor(const ScMarkData &rMarkData, ::std::vector< tools::Rectangle > &rRects, bool bInPrintTwips) const
MapMode GetDrawMapMode(bool bForce=false)
MapMode for the drawinglayer objects.
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
void DeleteSparklineGroupOverlay()
ScDDComboBoxButton aComboButton
void UpdateAutoFillOverlay()
void UpdateHeaderOverlay()
void DeleteDragRectOverlay()
const std::vector< editeng::MisspellRanges > * GetAutoSpellData(SCCOL nPosX, SCROW nPosY)
void ShowFilterMenu(weld::Window *pParent, const tools::Rectangle &rCellRect, bool bLayoutRTL)
void UpdateKitSelection(const std::vector< tools::Rectangle > &rRectangles, std::vector< tools::Rectangle > *pLogicRects=nullptr)
Turn the selection ranges rRectangles into the LibreOfficeKit selection, and send to other views.
void SetAutoSpellContext(const std::shared_ptr< sc::SpellCheckContext > &ctx)
void ResetAutoSpellForContentChange()
bool TestMouse(const MouseEvent &rMEvt, bool bAction)
sal_Int8 ExecutePrivateDrop(const ExecuteDropEvent &rEvt, const ScDragData &rData)
tools::Rectangle GetListValButtonRect(const ScAddress &rButtonPos)
void dumpGraphicInformation()
bool HasScenarioButton(const Point &rPosPixel, ScRange &rScenRange)
ScViewData & getViewData()
void updateKitCellCursor(const SfxViewShell *pOtherShell) const
std::optional< tools::Rectangle > mpAutoFillRect
InsCellCmd meDragInsertMode
void DoPushPivotToggle(SCCOL nCol, SCROW nRow, const MouseEvent &rMEvt)
RfCorner aRFSelectedCorned
void notifyKitCellCursor() const
void DeleteAutoFillOverlay()
void GetCellSelection(std::vector< tools::Rectangle > &rLogicRects)
Get the cell selection, coordinates are in logic units.
bool GetEditUrl(const Point &rPos, OUString *pName=nullptr, OUString *pUrl=nullptr, OUString *pTarget=nullptr)
void SetAutoSpellData(SCCOL nPosX, SCROW nPosY, const std::vector< editeng::MisspellRanges > *pRanges)
sal_Int8 DropTransferObj(ScTransferObj *pTransObj, SCCOL nDestPosX, SCROW nDestPosY, const Point &rLogicPos, sal_Int8 nDndAction)
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
void updateLOKInputHelp(const OUString &title, const OUString &content) const
tools::Rectangle aRepaintPixel
virtual void Tracking(const TrackingEvent &rTEvt) override
virtual OUString GetSurroundingText() const override
bool InsideVisibleRange(SCCOL nPosX, SCROW nPosY)
std::shared_ptr< sc::SpellCheckContext > mpSpellCheckCxt
sal_Int8 AcceptPrivateDrop(const AcceptDropEvent &rEvt, const ScDragData &rData)
virtual void KeyInput(const KeyEvent &rKEvt) override
void UpdateSparklineGroupOverlay()
void RefreshAutoFilterButton(const ScAddress &rPos)
virtual void Command(const CommandEvent &rCEvt) override
void PasteSelection(const Point &rPosPixel)
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
void UpdateInputContext()
std::unique_ptr< sdr::overlay::OverlayObjectList > mpOOAutoFill
void UpdateAutoFilterFromMenu(AutoFilterMode eMode)
void FilterSelect(sal_uLong nSel)
virtual void GetFocus() override
void UpdateDragRectOverlay()
void LaunchDPFieldMenu(SCCOL nCol, SCROW nRow)
sal_uInt16 nCursorHideCount
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
rtl::Reference< sdr::overlay::OverlayManager > getOverlayManager() const
void HandleMouseButtonDown(const MouseEvent &rMEvt, MouseEventState &rState)
bool HitRangeFinder(const Point &rMouse, RfCorner &rCorner, sal_uInt16 *pIndex, SCCOL *pAddX, SCROW *pAddY)
void DoPushPivotButton(SCCOL nCol, SCROW nRow, const MouseEvent &rMEvt, bool bButton, bool bPopup, bool bMultiField)
bool DrawCommand(const CommandEvent &rCEvt)
void ImpCreateOverlayObjects()
void SelectForContextMenu(const Point &rPosPixel, SCCOL nCellX, SCROW nCellY)
void ScrollPixel(tools::Long nDifX, tools::Long nDifY)
void UpdateCursorOverlay()
void updateKitOtherCursors() const
notify this view with new positions for other view's cursors (after zoom)
virtual bool DeleteSurroundingText(const Selection &rSelection) override
void LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
void UpdateCopySourceOverlay()
void UpdateListValPos(bool bVisible, const ScAddress &rPos)
bool DrawMouseButtonDown(const MouseEvent &rMEvt)
void PagebreakMove(const MouseEvent &rMEvt, bool bUp)
void updateLOKValListButton(bool bVisible, const ScAddress &rPos) const
void LaunchDataSelectMenu(SCCOL nCol, SCROW nRow)
std::unique_ptr< ScNoteMarker, o3tl::default_delete< ScNoteMarker > > mpNoteMarker
void DPMouseMove(const MouseEvent &rMEvt)
void dumpCellProperties()
void flushOverlayManager()
std::unique_ptr< ScCheckListMenuControl > mpDPFieldPopup
virtual bool PreNotify(NotifyEvent &rNEvt) override
virtual Selection GetSurroundingTextSelection() const override
std::unique_ptr< ScCheckListMenuControl > mpAutoFilterPopup
void LaunchPageFieldMenu(SCCOL nCol, SCROW nRow)
void UpdateAutoFillMark(bool bMarked, const ScRange &rMarkRange)
bool IsAutoFilterActive(SCCOL nCol, SCROW nRow, SCTAB nTab)
void notifyKitCellFollowJump() const
sal_uInt16 HitPageBreak(const Point &rMouse, ScRange *pSource, SCCOLROW *pBreak, SCCOLROW *pPrev)
void GetSelectionRectsPrintTwips(::std::vector< tools::Rectangle > &rRects) const
virtual void StartDrag(sal_Int8 nAction, const Point &rPosPixel) override
bool DrawKeyInput(const KeyEvent &rKEvt, vcl::Window *pWin)
sal_uInt16 nPagebreakMouse
void DeleteCursorOverlay()
void notifyKitCellViewCursor(const SfxViewShell *pForShell) const
void dumpColumnInformationHmm()
void dumpColumnCellStorage()
bool DrawMouseButtonUp(const MouseEvent &rMEvt)
void UpdateFormulas(SCCOL nX1=-1, SCROW nY1=-1, SCCOL nX2=-1, SCROW nY2=-1)
void GetPixelRectsFor(const ScMarkData &rMarkData, ::std::vector< tools::Rectangle > &rPixelRects) const
convert rMarkData into pixel rectangles for this view
void MoveMouseStatus(ScGridWindow &rDestWin)
ScNestedButtonState nNestedButtonState
void ExecDataSelect(SCCOL nCol, SCROW nRow, const OUString &rStr)
std::unique_ptr< sdr::overlay::OverlayObjectList > mpOOSelection
bool DoAutoFilterButton(SCCOL nCol, SCROW nRow, const MouseEvent &rMEvt)
void UpdateShrinkOverlay()
std::shared_ptr< ScFilterListBox > mpFilterBox
void DoScenarioMenu(const ScRange &rScenRange)
void DrawMarkDropObj(SdrObject *pObj)
Timer maShowPageBreaksTimer
void GetSelectionRects(::std::vector< tools::Rectangle > &rPixelRects) const
VisibleRange maVisibleRange
void DeleteHeaderOverlay()
std::unique_ptr< sdr::overlay::OverlayObjectList > mpOOCursors
virtual FactoryFunction GetUITestFactory() const override
std::unique_ptr< sdr::overlay::OverlayObjectList > mpOOHeader
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
const ScRange & GetMarkArea() const
bool IsMultiMarked() const
void FillRangeListWithMarks(ScRangeList *pList, bool bClear, SCTAB nForTab=-1) const
Create a range list of marks.
void SetMarking(bool bFlag)
bool GetTableSelect(SCTAB nTab) const
bool IsCellMarked(SCCOL nCol, SCROW nRow, bool bNoSimple=false) const
SCCOL GetColMerge() const
SCROW GetRowMerge() const
bool HasPivotToggle() const
bool HasPivotButton() const
bool HasAutoFilter() const
bool IsOverlapped() const
bool HasPivotMultiFieldPopupButton() const
bool HasPivotPopupButton() const
ScInputHandler * GetInputHdl(ScTabViewShell *pViewSh=nullptr, bool bUseRef=true)
Input-Handler.
bool IsModalMode(SfxObjectShell *pDocSh=nullptr)
bool GetIsWaterCan() const
void SetInExecuteDrop(bool bNew)
void SetInputMode(ScInputMode eMode, const OUString *pInitText=nullptr)
void InputChanged(const EditView *pView)
const ScDragData & GetDragData() const
void SetInEditCommand(bool bNew)
SC_DLLPUBLIC void InputEnterHandler(ScEnterMode nBlockMode=ScEnterMode::NORMAL, bool bBeforeSavingInLOK=false)
void InputSelection(const EditView *pView)
static LanguageType GetOptDigitLanguage()
void SetMirrorWidth(tools::Long nNew)
vcl::Region GetChangedAreaRegion()
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
void FillEditItemSet(SfxItemSet *pEditSet, const SfxItemSet *pCondSet=nullptr) const
Converts all Calc items contained in the own item set to edit engine items and puts them into pEditSe...
static SvxCellOrientation GetCellOrientation(const SfxItemSet &rItemSet, const SfxItemSet *pCondSet)
Additional class containing cell annotation data.
SdrCaptionObj * GetCaption() const
Returns an existing note caption object.
bool GetProtection() const
ScRangeFindData & GetObject(size_t nIndex)
const OUString & GetDocName() const
bool Move(SCCOL aDeltaX, SCROW aDeltaY, SCTAB aDeltaZ, ScRange &rErrorRange, const ScDocument &rDoc)
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 Contains(const ScAddress &) const
is Address& fully in Range?
ScDrawTransferObj * GetDrawData()
ScTransferObj * GetCellData()
SfxStyleSheetBase * GetActualStyleSheet()
bool MousePressed(const css::awt::MouseEvent &e)
bool IsMouseListening() const
bool MouseReleased(const css::awt::MouseEvent &e)
virtual SfxPrinter * GetPrinter(bool bCreate=false) override
static css::uno::Reference< css::datatransfer::XTransferable2 > GetClipData(vcl::Window *pWin)
bool IsAuditShell() const
static bool isAnyEditViewInRange(const SfxViewShell *pForViewShell, bool bColumns, SCCOLROW nStart, SCCOLROW nEnd)
void UpdateInputHandler(bool bForce=false, bool bStopEditing=true)
bool TabKeyInput(const KeyEvent &rKEvt)
void BroadcastAccessibility(const SfxHint &rHint)
bool HasAccessibilityObjects() const
void SetFormShellAtTop(bool bSet)
static ScTabViewShell * GetActiveViewShell()
bool ShouldDisableEditHyperlink() const
return true if "Edit Hyperlink" in context menu should be disabled
const ScInputHandler * GetInputHandler() const
void EnableEditHyperlink()
force "Edit Hyperlink" to true, with the expectation that SID_EDIT_HYPERLINK is later Invalidated to ...
void SetDrawShell(bool bActive)
bool IsRefInputMode() const
SCROW GetLOKStartHeaderRow() const
void InitBlockMode(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, bool bTestNeg=false, bool bCols=false, bool bRows=false, bool bForceNeg=false)
bool MoveCursorKeyInput(const KeyEvent &rKeyEvent)
void ResetBrushDocument()
SCROW GetLOKEndHeaderRow() const
void DoneBlockMode(bool bContinue=false)
bool ScrollCommand(const CommandEvent &rCEvt, ScSplitPos ePos)
ScDocument * GetBrushDocument() const
ScViewFunctionSet & GetFunctionSet()
void SelectionChanged(bool bFromPaste=false)
void MarkRange(const ScRange &rRange, bool bSetCursor=true, bool bContinue=false)
bool SelMouseButtonDown(const MouseEvent &rMEvt)
SCCOL GetLOKStartHeaderCol() const
ScViewSelectionEngine * GetSelEngine()
bool IsInActivatePart() const
void MarkCursor(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, bool bCols=false, bool bRows=false, bool bCellSelection=false)
SC_DLLPUBLIC void MoveCursorAbs(SCCOL nCurX, SCROW nCurY, ScFollowMode eMode, bool bShift, bool bControl, bool bKeepOld=false, bool bKeepSel=false)
ScViewData & GetViewData()
SC_DLLPUBLIC void SetCursor(SCCOL nPosX, SCROW nPosY, bool bNew=false)
void ScrollX(tools::Long nDeltaX, ScHSplitPos eWhich, bool bUpdBars=true)
void SetTimer(ScGridWindow *pWin, const MouseEvent &rMEvt)
void UpdateCopySourceOverlay()
SC_DLLPUBLIC void CellContentChanged()
ScDrawView * GetScDrawView()
void ActivatePart(ScSplitPos eWhich)
bool IsDrawSelMode() const
bool IsPaintBrushLocked() const
void ScrollY(tools::Long nDeltaY, ScVSplitPos eWhich, bool bUpdBars=true)
SCCOL GetLOKEndHeaderCol() const
SC_DLLPUBLIC void SetTabNo(SCTAB nTab, bool bNew=false, bool bExtendSelection=false, bool bSameTabButMoved=false)
bool GestureZoomCommand(const CommandEvent &rCEvt)
bool HasPaintBrush() const
sheet protection state container
bool isOptionEnabled(Option eOption) const
virtual bool isProtected() const override
bool HasFilteredRows() const
ScMarkData GetSourceMarkData() const
SCCOL GetSourceCursorX() const
SCROW GetSourceCursorY() const
const ScRange & GetRange() const
void SetDragWasInternal()
ScDocument * GetDocument() const
ScDocShell * GetSourceDocShell()
SCTAB GetVisibleTab() const
SCROW GetDragHandleY() const
ScDocument * GetSourceDocument()
ScDragSrc GetDragSourceFlags() const
SCCOL GetDragHandleX() const
SCROW GetNonFilteredRows() const
static SC_DLLPUBLIC ScTransferObj * GetOwnClipboard(const css::uno::Reference< css::datatransfer::XTransferable2 > &)
bool WasSourceCursorInSelection() const
SfxDispatcher & GetDispatcher()
void SetFillMode(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Point GetPrintTwipsPos(SCCOL nCol, SCROW nRow) const
returns the position (top-left corner) of the requested cell in print twips coordinates.
SCCOL GetEditEndCol() const
SCROW GetEditEndRow() const
ScFillMode GetFillMode() const
bool GetMergeSizePixel(SCCOL nX, SCROW nY, tools::Long &rSizeXPix, tools::Long &rSizeYPix) const
SCCOL GetEditViewCol() const
ScMarkData & GetMarkData()
const Size & GetScenButSize() const
const Fraction & GetZoomY() const
ScDocument & GetDocument() const
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
SCCOL GetRefStartX() const
ScSplitMode GetHSplitMode() const
const MapMode & GetLogicMode(ScSplitPos eWhich)
ScDocShell * GetDocShell() const
ScGridWindow * GetActiveWin()
bool ShowPasteSource() const
OString describeCellCursorAt(SCCOL nCol, SCROW nRow, bool bPixelAligned=true) const
void GetPosFromPixel(tools::Long nClickX, tools::Long nClickY, ScSplitPos eWhich, SCCOL &rPosX, SCROW &rPosY, bool bTestMerge=true, bool bRepair=false, SCTAB nForTab=-1)
ScTabViewShell * GetViewShell() const
ScMarkType GetSimpleArea(SCCOL &rStartCol, SCROW &rStartRow, SCTAB &rStartTab, SCCOL &rEndCol, SCROW &rEndRow, SCTAB &rEndTab) const
static tools::Long ToPixel(sal_uInt16 nTwips, double nFactor)
ScDBFunc * GetView() const
void GetFillData(SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow)
SCROW VisibleCellsY(ScVSplitPos eWhichY) const
ScSplitPos GetActivePart() const
void GetEditView(ScSplitPos eWhich, EditView *&rViewPtr, SCCOL &rCol, SCROW &rRow)
Point GetScrPos(SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, bool bAllowNeg=false, SCTAB nForTab=-1) const
SCTAB GetRefStartZ() const
bool GetDelMark(ScRange &rRange) const
void SetDragMode(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScFillMode nMode)
void SetPasteMode(ScPasteFlags nFlags)
bool IsThemedCursor() const
SCROW GetRefStartY() const
SCCOL VisibleCellsX(ScHSplitPos eWhichX) const
OString describeCellCursorInPrintTwips() const
ScSplitMode GetVSplitMode() const
const Fraction & GetZoomX() const
SCTAB GetRefTabNo() const
tools::Rectangle GetEditArea(ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, vcl::Window *pWin, const ScPatternAttr *pPattern, bool bForceToTop, bool bInPrintTwips=false)
bool IsPagebreakMode() const
SCROW GetEditViewRow() const
OString describeCellCursor() const
return json for our cursor position.
SfxObjectShell * GetSfxDocShell() const
ScAddress GetCurPos() const
const tools::Rectangle & getLOKVisibleArea() const
The visible area in the client (set by setClientVisibleArea).
SfxBindings & GetBindings()
bool HasEditView(ScSplitPos eWhich) const
bool IsAnyFillMode() const
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
void EnterData(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const EditTextObject *pData=nullptr, bool bMatrixExpand=false)
void SetStyleSheetToMarked(const SfxStyleSheet *pStyleSheet)
void InsertAreaLink(const OUString &rFile, const OUString &rFilter, const OUString &rOptions, const OUString &rSource)
void FillCrossDblClick()
Downward fill of selected cell(s) by double-clicking cross-hair cursor.
void DeleteContents(InsertDeleteFlags nFlags)
void ImportTables(ScDocShell *pSrcShell, SCTAB nCount, const SCTAB *pSrcTabs, bool bLink, SCTAB nTab)
bool PasteOnDrawObjectLinked(const css::uno::Reference< css::datatransfer::XTransferable > &rxTransferable, SdrObject &rHitObj)
bool PasteDataFormat(SotClipboardFormatId nFormatId, const css::uno::Reference< css::datatransfer::XTransferable > &rxTransferable, SCCOL nPosX, SCROW nPosY, const Point *pLogicPos, bool bLink=false, bool bAllowDialogs=false)
void EnterMatrix(const OUString &rString, ::formula::FormulaGrammar::Grammar eGram)
SC_DLLPUBLIC bool PasteFromClip(InsertDeleteFlags nFlags, ScDocument *pClipDoc, ScPasteFunc nFunction=ScPasteFunc::NONE, bool bSkipEmptyCells=false, bool bTranspose=false, bool bAsLink=false, InsCellCmd eMoveMode=INS_NONE, InsertDeleteFlags nUndoExtraFlags=InsertDeleteFlags::NONE, bool bAllowDialogs=false)
void InsertTableLink(const OUString &rFile, const OUString &rFilter, const OUString &rOptions, std::u16string_view rTabName)
void InsertBookmark(const OUString &rDescription, const OUString &rURL, SCCOL nPosX, SCROW nPosY, const OUString *pTarget=nullptr, bool bTryReplace=false)
bool LinkBlock(const ScRange &rSource, const ScAddress &rDestPos)
bool MoveBlockTo(const ScRange &rSource, const ScAddress &rDestPos, bool bCut)
void UseScenario(const OUString &rName)
void SetAnchorFlag(bool bSet)
bool CheckRefBounds(SCCOL nPosX, SCROW nPosY)
void SetWhich(ScSplitPos eNew)
static bool HasFiltered(const ScRange &rRange, const ScDocument &rDoc)
bool IsMarkedObjHit(const Point &rPnt, short nTol=-2) const
bool AreObjectsMarked() const
SdrObject * GetMarkedObjectByIndex(size_t nNum) const
tools::Rectangle GetAllMarkedBoundRect() const
size_t GetMarkedObjectCount() const
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
SdrTextObj * GetTextEditObject() const
const OutlinerView * GetTextEditOutlinerView() const
virtual const tools::Rectangle & GetLogicRect() const
SdrPageWindow * FindPageWindow(const SdrPaintWindow &rPaintWindow) const
rtl::Reference< sdr::overlay::OverlayManager > const & GetOverlayManager() const
SdrPageView * GetSdrPageView() const
virtual bool MouseButtonUp(const MouseEvent &rMEvt, OutputDevice *pWin) override
bool Command(const CommandEvent &rCEvt)
bool SelMouseMove(const MouseEvent &rMEvt)
void SetWindow(vcl::Window *)
void SetVisibleArea(const tools::Rectangle &rNewArea)
bool SelMouseButtonUp(const MouseEvent &rMEvt)
void Invalidate(sal_uInt16 nId)
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
void ExecutePopup(const OUString &rResName, vcl::Window *pWin=nullptr, const Point *pPos=nullptr)
css::uno::Reference< css::frame::XController > GetController() const
bool IsObjectInPlaceActive() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
static LOKDeviceFormFactor getDeviceFormFactor()
static void notifyOtherView(const SfxViewShell *pThisView, SfxViewShell const *pOtherView, int nType, std::string_view rKey, const OString &rPayload)
static void notifyOtherViews(const SfxViewShell *pThisView, int nType, std::string_view rKey, const OString &rPayload)
const OUString & GetName() const
static OUString CreateShellID(const SfxObjectShell *pShell)
SfxProgress * GetProgress() const
SfxMedium * GetMedium() const
OUString GetTitle(sal_uInt16 nMaxLen=0) const
SfxDispatcher * GetDispatcher() const
const OUString & GetName() const
SfxStyleFamily GetFamily() const
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId)
virtual size_t GetUndoActionCount(bool const i_currentLevel=CurrentLevel) const
SfxUndoAction * GetUndoAction(size_t nNo=0) const
SfxBindings & GetBindings()
SfxFrame & GetFrame() const
bool isLOKMobilePhone() const
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
ViewShellDocId GetDocId() const override
ViewShellId GetViewShellId() const override
SfxViewFrame & GetViewFrame() const
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
SfxInPlaceClient * GetIPClient() const
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
constexpr tools::Long Width() const
const Color & GetAccentColor() const
const Color & GetHighlightColor() const
const Color & GetDisableColor() const
const Size & GetListBoxPreviewDefaultPixelSize() const
virtual sal_Int32 GetClassId() const
const SvxFieldData * GetField() const
const OUString & GetRepresentation() const
const OUString & GetTargetFrame() const
const OUString & GetURL() const
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
bool IsTrackingEnded() const
bool IsTrackingCanceled() const
const MouseEvent & GetMouseEvent() const
bool GetTransferableObjectDescriptor(SotClipboardFormatId nFormat, TransferableObjectDescriptor &rDesc)
static TransferableDataHelper CreateFromPrimarySelection()
bool GetSotStorageStream(SotClipboardFormatId nFormat, tools::SvRef< SotTempStream > &rStreamRef) const
bool HasFormat(SotClipboardFormatId nFormat) const
const css::uno::Reference< css::datatransfer::XTransferable > & GetTransferable() const
static UITestLogger & getInstance()
void logEvent(const EventDescription &rDescription)
const OUString & GetName() const
static XColorListRef AsColorList(rtl::Reference< XPropertyList > const &plist)
static XPropertyListRef CreatePropertyListFromURL(XPropertyListType t, std::u16string_view rUrl)
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
#define SO3_SWWEB_CLASSID
std::vector< std::shared_ptr< Sparkline > > getSparklinesFor(std::shared_ptr< SparklineGroup > const &pSparklineGroup)
SharedString intern(const OUString &rStr)
const OUString & getString() const
const Point & GetPos() const
tools::Long GetHeight() const
tools::Long GetWidth() const
virtual void SetPointer(PointerStyle) override
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
Point OutputToScreenPixel(const Point &rPos) const
virtual void dispose() override
void SetCursorRect(const tools::Rectangle *pRect=nullptr, tools::Long nExtTextInputWidth=0)
float GetDPIScaleFactor() const
void SetInputContext(const InputContext &rInputContext)
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
bool IsMouseCaptured() const
Point LogicToPixel(const Point &rLogicPt) const
void EndTracking(TrackingEventFlags nFlags=TrackingEventFlags::NONE)
PointerState GetPointerState()
void set_id(const OUString &rID)
virtual void EnableRTL(bool bEnable=true)
const AllSettings & GetSettings() const
const MapMode & GetMapMode() const
::OutputDevice const * GetOutDev() const
virtual css::uno::Reference< css::awt::XVclWindowPeer > GetComponentInterface(bool bCreate=true)
virtual void Scroll(tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags=ScrollFlags::NONE)
Point PixelToLogic(const Point &rDevicePt) const
virtual Size GetSizePixel() const
Size GetOutputSizePixel() const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
weld::Window * GetFrameWeld() const
css::uno::Reference< css::datatransfer::clipboard::XClipboard > GetClipboard()
void SetDialogControlFlags(DialogControlFlags nFlags)
void SetUseFrameData(bool bUseFrameData)
void EnableChildTransparentMode(bool bEnable=true)
void SetHelpId(const OUString &)
virtual int find_text(const OUString &rText) const=0
virtual OUString get_text(int row, int col=-1) const=0
void append_text(const OUString &rStr)
virtual int n_children() const=0
virtual int get_height_rows(int nRows) const=0
virtual void select(int pos)=0
virtual void set_cursor(int pos)=0
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
ScXMLEditAttributeMap::Entry const aEntries[]
SfxViewShell * pScActiveViewShell
sal_uInt16 nScClickMouseModifier
sal_uInt16 nScFillModeMouseModifier
@ ATTRIB
Internal use only (d&d undo): do not delete caption objects of cell notes.
constexpr sal_Int32 STD_COL_WIDTH
static void lcl_PaintRefChanged(ScDocShell *pDocSh, const ScRange &rOldUn, const ScRange &rNewUn)
static void lcl_PaintOneRange(ScDocShell *pDocSh, const ScRange &rRange, sal_uInt16 nEdges)
static ScRange lcl_MakeDropRange(const ScDocument &rDoc, SCCOL nPosX, SCROW nPosY, SCTAB nTab, const ScRange &rSource)
static SotClipboardFormatId lcl_GetDropFormatId(const uno::Reference< datatransfer::XTransferable > &xTransfer, bool bPreferText)
static void lcl_SetTextCursorPos(ScViewData &rViewData, ScSplitPos eWhich, vcl::Window *pWin)
#define SC_FILTERLISTBOX_LINES
static std::vector< tools::Rectangle > convertPixelToLogical(const ScViewData &rViewData, const std::vector< tools::Rectangle > &rRectangles, tools::Rectangle &rBoundingBox)
static SotClipboardFormatId lcl_GetDropLinkId(const uno::Reference< datatransfer::XTransferable > &xTransfer)
static OString rectanglesToString(const std::vector< tools::Rectangle > &rLogicRects)
static void lcl_UnLockComment(ScDrawView *pView, const Point &rPos, const ScViewData &rViewData)
static void lcl_GetMirror(Point &rPoint, tools::Rectangle &rRect, const tools::Long nWidth)
static bool lcl_IsEditableMatrix(ScDocument &rDoc, const ScRange &rRange)
static bool lcl_TestScenarioRedliningDrop(const ScDocument *pDoc, const ScRange &aDragRange)
static bool lcl_GetHyperlinkCell(ScDocument &rDoc, SCCOL &rPosX, SCROW nPosY, SCTAB nTab, ScRefCellValue &rCell, OUString &rURL)
IMPL_LINK_NOARG(ScFilterListBox, SelectHdl, weld::TreeView &, bool)
IMPL_LINK(ScFilterListBox, KeyInputHdl, const KeyEvent &, rKeyEvent, bool)
static void lcl_InitMouseEvent(css::awt::MouseEvent &rEvent, const MouseEvent &rEvt)
constexpr OUStringLiteral HID_SC_WIN_GRIDWIN
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
constexpr sal_uInt16 KEY_RETURN
constexpr sal_uInt16 KEY_F2
constexpr sal_uInt16 KEY_MOD2
constexpr sal_uInt16 KEY_ESCAPE
constexpr sal_uInt16 KEY_MOD1
constexpr sal_uInt16 KEY_BRACKETRIGHT
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_F6
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_F10
constexpr sal_uInt16 KEY_F7
constexpr sal_uInt16 KEY_F1
constexpr sal_uInt16 KEY_BRACKETLEFT
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_F8
constexpr sal_uInt16 KEY_F12
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_F11
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_INFO(area, stream)
std::unique_ptr< sal_Int32[]> pData
constexpr OUStringLiteral aData
SC_DLLPUBLIC void PasteFromClipboard(ScViewData &rViewData, ScTabViewShell *pTabViewShell, bool bShowDialog)
bool isCompatFlagSet(Compat flag)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
bool IsInPopupMenuExecute()
weld::Window * GetPopupParent(vcl::Window &rOutWin, tools::Rectangle &rRect)
#define SFX_TITLE_FULLNAME
#define SC_SCENARIO_HSPACE
OUString ScResId(TranslateId aId)
constexpr TypedWhichId< ScMergeFlagAttr > ATTR_MERGE_FLAG(145)
constexpr TypedWhichId< SfxStringItem > ATTR_HYPERLINK(155)
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
constexpr TypedWhichId< ScLineBreakCell > ATTR_LINEBREAK(139)
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALIDDATA(153)
std::map< OUString, OUString > aParameters
const css::datatransfer::dnd::DropTargetDropEvent maDropEvent
This struct stores general clipboard parameters associated with a ScDocument instance created in clip...
ScDocument * pJumpLocalDoc
ScTransferObj * pCellTransfer
ScDrawTransferObj * pDrawTransfer
std::set< Color > & getTextColors()
std::set< Color > & getBackgroundColors()
std::vector< ScTypedStrData >::size_type size() const
std::vector< ScTypedStrData > maStrData
std::vector< ScTypedStrData >::iterator begin()
std::vector< ScTypedStrData >::iterator end()
bool set(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
bool isInside(SCCOL nCol, SCROW nRow) const
VisibleRange(const ScDocument &)
svl::SharedString maString
Each instance of this struct represents a single filtering criteria.
void SetQueryByBackgroundColor(Color color)
const Item & GetQueryItem() const
void SetQueryByNonEmpty()
std::vector< Item > QueryItemsType
void SetQueryByTextColor(Color color)
QueryItemsType & GetQueryItems()
ScQueryEntry * FindEntryByField(SCCOLROW nField, bool bNew)
std::vector< ScQueryEntry * > FindAllEntriesByField(SCCOLROW nField)
utl::SearchParam::SearchType eSearchType
SC_DLLPUBLIC void RemoveAllEntriesByField(SCCOLROW nField)
This is very similar to ScCellValue, except that it references the original value instead of copying ...
ScFormulaCell * getFormula() const
const EditTextObject * getEditText() const
void assign(ScDocument &rDoc, const ScAddress &rPos)
Take cell value from specified position in specified document.
::std::vector< ScSortKeyState > maKeyState
ScDataAreaExtras aDataAreaExtras
sal_uInt16 GetSortKeyCount() const
Reference< XController > xController
#define DND_ACTION_COPYMOVE
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
ScHSplitPos WhichH(ScSplitPos ePos)
ScVSplitPos WhichV(ScSplitPos ePos)
WinBits const WB_DIALOGCONTROL
WinBits const WB_CLIPCHILDREN
VclPtr< vcl::Window > mpWindow