39 #include <document.hxx>
43 OUString aStrSelection;
47 aStrSelection =
pEditShell->GetSelectionText( bWholeWord );
65 if ( aIter.GetNext( nCol, nRow ) )
81 aRange.
GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
95 OUString aExportOUString;
97 aObj.
ExportString( aExportOUString, SotClipboardFormatId::STRING );
107 aStrSelection = aStrSelection.replaceAll(
"\r",
" ");
108 aStrSelection = aStrSelection.replaceAll(
"\t",
" ");
114 return aStrSelection;
145 SC_MOD()->InputEnterHandler();
164 SvxURLField aURLField( rURL, rName, SvxURLFormat::Repr );
172 bool bSelectFirst =
false;
192 OSL_ENSURE( pTopView || pTableView,
"No EditView" );
200 && pTableView && !sSeltext.isEmpty() && sSeltext == rName)
202 nSelInd = sSeltext.getLength();
233 sal_uInt16 nSlot = rReq.
GetSlot();
241 SfxItemState::SET == pReqArgs->
GetItemState(SID_SEARCH_ITEM,
false, &pItem) )
243 OSL_ENSURE( dynamic_cast<const SvxSearchItem*>( pItem) !=
nullptr,
"wrong Item" );
253 case SID_SEARCH_ITEM:
254 if (pReqArgs && SfxItemState::SET ==
258 OSL_ENSURE( dynamic_cast<const SvxSearchItem*>( pItem) !=
nullptr,
"wrong Item" );
263 OSL_FAIL(
"SID_SEARCH_ITEM without Parameter");
268 case FID_REPLACE_ALL:
271 if (pReqArgs && SfxItemState::SET == pReqArgs->
GetItemState(nSlot,
false, &pItem))
280 if(SfxItemState::SET == pReqArgs->
GetItemState(FN_PARAM_1,
false, &pItem))
281 aSearchItem.
SetReplaceString(static_cast<const SfxStringItem*>(pItem)->GetValue());
283 if (nSlot == FID_SEARCH)
285 else if(nSlot == FID_REPLACE)
286 aSearchItem.
SetCommand(SvxSearchCmd::REPLACE);
287 else if(nSlot == FID_REPLACE_ALL)
288 aSearchItem.
SetCommand(SvxSearchCmd::REPLACE_ALL);
290 aSearchItem.
SetCommand(SvxSearchCmd::FIND_ALL);
294 aSearchItem.
SetWhich(SID_SEARCH_ITEM);
296 rReq.
IsAPI() ? SfxCallMode::API|SfxCallMode::SYNCHRON :
303 SID_SEARCH_DLG, SfxCallMode::ASYNCHRON|SfxCallMode::RECORD );
307 case FID_REPEAT_SEARCH:
312 aSearchItem.
SetWhich(SID_SEARCH_ITEM);
314 rReq.
IsAPI() ? SfxCallMode::API|SfxCallMode::SYNCHRON :
OString stripEnd(const OString &rIn, char c)
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 SetTargetFrame(const OUString &rFrm)
TOOLS_DLLPUBLIC OString convertLineEnd(const OString &rIn, LineEnd eLineEnd)
bool ExportString(OUString &, SotClipboardFormatId)
void SetSearchString(const OUString &rNewString)
void Done(bool bRemove=false)
ScDocument & GetDocument() const
static void lcl_SelectFieldAfterInsert(EditView &rView)
const SfxItemSet * GetArgs() const
void SetReplaceString(const OUString &rNewString)
std::unique_ptr< ScEditShell > pEditShell
bool SelectionEditable(bool *pOnlyNotBecauseOfMatrix=nullptr)
virtual OUString GetSelectionText(bool bWholeWord=false) override
bool HasBookmarkAtCursor(SvxHyperlinkItem *pContent)
bool SearchAndReplace(const SvxSearchItem *pSearchItem, bool bAddUndo, bool bIsApi)
static SC_DLLPUBLIC void SetSearchItem(const SvxSearchItem &rNew)
ScViewData & GetViewData()
ScTabViewShell * GetViewShell() const
void InsertField(const SvxFieldItem &rFld)
void InsertURL(const OUString &rName, const OUString &rURL, const OUString &rTarget, sal_uInt16 nMode)
bool ShrinkToUsedDataArea(bool &o_bShrunk, SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bColumnsOnly, bool bStickyTopRow=false, bool bStickyLeftCol=false, bool bConsiderCellNotes=false, bool bConsiderCellDrawObjects=false) const
Shrink a range to only include used data area.
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void InsertBookmark(const OUString &rDescription, const OUString &rURL, SCCOL nPosX, SCROW nPosY, const OUString *pTarget=nullptr, bool bTryReplace=false)
void SetCommand(SvxSearchCmd nNewCommand)
void GetVars(SCCOL &nCol1, SCROW &nRow1, SCTAB &nTab1, SCCOL &nCol2, SCROW &nRow2, SCTAB &nTab2) const
void InsertURLField(const OUString &rName, const OUString &rURL, const OUString &rTarget)
void ExecSearch(SfxRequest &rReq)
void SetInputMode(ScInputMode eMode, const OUString *pInitText=nullptr)
sal_uInt16 GetSlot() const
SfxShell * GetMySubShell() const
void SetWhich(sal_uInt16 nId)
SfxDispatcher & GetDispatcher()
void SetSelection(const ESelection &rNewSel)
ESelection GetSelection() const
constexpr sal_uInt16 EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
ScInputHandler * GetInputHdl(ScTabViewShell *pViewSh=nullptr, bool bUseRef=true)
Input-Handler.
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
void InsertURLButton(const OUString &rName, const OUString &rURL, const OUString &rTarget, const Point *pInsPos)
static SC_DLLPUBLIC const SvxSearchItem & GetSearchItem()