LibreOffice Module sc (master) 1
editutil.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <scitems.hxx>
22#include <editeng/eeitem.hxx>
23
24#include <svx/algitem.hxx>
25#include <svtools/colorcfg.hxx>
26#include <editeng/editstat.hxx>
27#include <editeng/flditem.hxx>
28#include <editeng/numitem.hxx>
30#include <editeng/editobj.hxx>
31#include <vcl/outdev.hxx>
32#include <svl/numformat.hxx>
33#include <svl/inethist.hxx>
34#include <sfx2/objsh.hxx>
35#include <comphelper/lok.hxx>
36#include <osl/diagnose.h>
37
38#include <com/sun/star/text/textfield/Type.hpp>
39#include <com/sun/star/document/XDocumentProperties.hpp>
40
41#include <editutil.hxx>
42#include <global.hxx>
43#include <attrib.hxx>
44#include <document.hxx>
45#include <docpool.hxx>
46#include <patattr.hxx>
47#include <scmod.hxx>
48#include <inputopt.hxx>
49#include <compiler.hxx>
50#include <mutex>
51
52using namespace com::sun::star;
53
54// delimiters additionally to EditEngine default:
55
57 const Point& rCellPos,
58 OutputDevice* pDevice, double nScaleX, double nScaleY,
59 const Fraction& rX, const Fraction& rY, bool bPrintTwips ) :
60 pDoc(pDocument),nCol(nX),nRow(nY),nTab(nZ),
61 aCellPos(rCellPos),pDev(pDevice),
62 nPPTX(nScaleX),nPPTY(nScaleY),aZoomX(rX),aZoomY(rY),
63 bInPrintTwips(bPrintTwips) {}
64
65OUString ScEditUtil::ModifyDelimiters( const OUString& rOld )
66{
67 // underscore is used in function argument names
68 OUString aRet = rOld.replaceAll("_", "") +
69 "=()+-*/^&<>" +
70 ScCompiler::GetNativeSymbol(ocSep); // argument separator is localized.
71 return aRet;
72}
73
74static OUString lcl_GetDelimitedString( const EditEngine& rEngine, const char c )
75{
76 sal_Int32 nParCount = rEngine.GetParagraphCount();
77 // avoid creating a new string if possible
78 if (nParCount == 0)
79 return OUString();
80 else if (nParCount == 1)
81 return rEngine.GetText(0);
82 OUStringBuffer aRet( nParCount * 80 );
83 for (sal_Int32 nPar=0; nPar<nParCount; nPar++)
84 {
85 if (nPar > 0)
86 aRet.append(c);
87 aRet.append( rEngine.GetText( nPar ));
88 }
89 return aRet.makeStringAndClear();
90}
91
92static OUString lcl_GetDelimitedString( const EditTextObject& rEdit, const char c )
93{
94 sal_Int32 nParCount = rEdit.GetParagraphCount();
95 OUStringBuffer aRet( nParCount * 80 );
96 for (sal_Int32 nPar=0; nPar<nParCount; nPar++)
97 {
98 if (nPar > 0)
99 aRet.append(c);
100 aRet.append( rEdit.GetText( nPar ));
101 }
102 return aRet.makeStringAndClear();
103}
104
106{
107 return lcl_GetDelimitedString(rEngine, ' ');
108}
110{
111 return lcl_GetDelimitedString(rEngine, '\n');
112}
113
115{
116 return lcl_GetDelimitedString(rEdit, '\n');
117}
118
119OUString ScEditUtil::GetString( const EditTextObject& rEditText, const ScDocument* pDoc )
120{
121 if( !rEditText.HasField())
122 return GetMultilineString( rEditText );
123
124 static std::mutex aMutex;
125 std::scoped_lock aGuard( aMutex);
126 // ScFieldEditEngine is needed to resolve field contents.
127 if (pDoc)
128 {
129 /* TODO: make ScDocument::GetEditEngine() const? Most likely it's only
130 * not const because of the pointer assignment, make that mutable, and
131 * then remove the ugly const_cast here. */
132 EditEngine& rEE = const_cast<ScDocument*>(pDoc)->GetEditEngine();
133 rEE.SetText( rEditText);
134 return GetMultilineString( rEE);
135 }
136 else
137 {
139 rEE.SetText( rEditText);
140 return GetMultilineString( rEE);
141 }
142}
143
144std::unique_ptr<EditTextObject> ScEditUtil::CreateURLObjectFromURL( ScDocument& rDoc, const OUString& rURL, const OUString& rText )
145{
146 SvxURLField aUrlField( rURL, rText, SvxURLFormat::AppDefault);
147 EditEngine& rEE = rDoc.GetEditEngine();
148 rEE.SetText( OUString() );
151
152 return rEE.CreateTextObject();
153}
154
156{
157 static const struct {
158 sal_uInt16 nAttrType;
159 sal_uInt16 nCharType;
160 } AttrTypeMap[] = {
178 };
179
180 const SfxItemSet& rSet = rAttr.GetItemSet();
181 const SfxPoolItem* pItem;
182 for (size_t i = 0; i < SAL_N_ELEMENTS(AttrTypeMap); ++i)
183 {
184 if ( rSet.GetItemState(AttrTypeMap[i].nAttrType, false, &pItem) == SfxItemState::SET )
185 rEditText.RemoveCharAttribs(AttrTypeMap[i].nCharType);
186 }
187}
188
189std::unique_ptr<EditTextObject> ScEditUtil::Clone( const EditTextObject& rObj, ScDocument& rDestDoc )
190{
191 std::unique_ptr<EditTextObject> pNew;
192
193 EditEngine& rEngine = rDestDoc.GetEditEngine();
194 if (rObj.HasOnlineSpellErrors())
195 {
196 EEControlBits nControl = rEngine.GetControlWord();
197 const EEControlBits nSpellControl = EEControlBits::ONLINESPELLING | EEControlBits::ALLOWBIGOBJS;
198 bool bNewControl = ( (nControl & nSpellControl) != nSpellControl );
199 if (bNewControl)
200 rEngine.SetControlWord(nControl | nSpellControl);
201 rEngine.SetText(rObj);
202 pNew = rEngine.CreateTextObject();
203 if (bNewControl)
204 rEngine.SetControlWord(nControl);
205 }
206 else
207 {
208 rEngine.SetText(rObj);
209 pNew = rEngine.CreateTextObject();
210 }
211
212 return pNew;
213}
214
216 const SvxFieldData& rFieldData, const ScDocument* pDoc, std::optional<Color>* ppTextColor, std::optional<FontLineStyle>* ppFldLineStyle )
217{
218 OUString aRet;
219 switch (rFieldData.GetClassId())
220 {
221 case text::textfield::Type::URL:
222 {
223 const SvxURLField& rField = static_cast<const SvxURLField&>(rFieldData);
224 const OUString& aURL = rField.GetURL();
225
226 switch (rField.GetFormat())
227 {
228 case SvxURLFormat::AppDefault: //TODO: configurable with App???
229 case SvxURLFormat::Repr:
230 aRet = rField.GetRepresentation();
231 break;
232 case SvxURLFormat::Url:
233 aRet = aURL;
234 break;
235 default:
236 ;
237 }
238
241
242 if (ppTextColor)
243 *ppTextColor = SC_MOD()->GetColorConfig().GetColorValue(eEntry).nColor;
244
245 if (ppFldLineStyle)
246 *ppFldLineStyle = FontLineStyle::LINESTYLE_SINGLE;
247 }
248 break;
249 case text::textfield::Type::EXTENDED_TIME:
250 {
251 const SvxExtTimeField& rField = static_cast<const SvxExtTimeField&>(rFieldData);
252 if (pDoc)
254 else
255 {
256 /* TODO: quite expensive, we could have a global formatter? */
258 aRet = rField.GetFormatted(aFormatter, ScGlobal::eLnge);
259 }
260 }
261 break;
263 {
264 Date aDate(Date::SYSTEM);
265 aRet = ScGlobal::getLocaleData().getDate(aDate);
266 }
267 break;
268 case text::textfield::Type::DOCINFO_TITLE:
269 {
270 if (pDoc)
271 {
272 SfxObjectShell* pDocShell = pDoc->GetDocumentShell();
273 if (pDocShell)
274 {
275 aRet = pDocShell->getDocProperties()->getTitle();
276 if (aRet.isEmpty())
277 aRet = pDocShell->GetTitle();
278 }
279 }
280 if (aRet.isEmpty())
281 aRet = "?";
282 }
283 break;
285 {
286 const SvxTableField& rField = static_cast<const SvxTableField&>(rFieldData);
287 SCTAB nTab = rField.GetTab();
288 OUString aName;
289 if (pDoc && pDoc->GetName(nTab, aName))
290 aRet = aName;
291 else
292 aRet = "?";
293 }
294 break;
295 default:
296 aRet = "?";
297 }
298
299 if (aRet.isEmpty()) // empty is yuck
300 aRet = " "; // space is default of EditEngine
301
302 return aRet;
303}
304
306{
307 if (!pPattern)
308 pPattern = pDoc->GetPattern( nCol, nRow, nTab );
309
310 if ( pPattern->GetItem(ATTR_HOR_JUSTIFY).GetValue() ==
311 SvxCellHorJustify::Left )
312 {
313 tools::Long nIndent = pPattern->GetItem(ATTR_INDENT).GetValue();
314 if (!bInPrintTwips)
315 nIndent = static_cast<tools::Long>(nIndent * nPPTX);
316 return nIndent;
317 }
318
319 return 0;
320}
321
322void ScEditUtil::GetMargins(const ScPatternAttr* pPattern, tools::Long& nLeftMargin, tools::Long& nTopMargin,
323 tools::Long& nRightMargin, tools::Long& nBottomMargin) const
324{
325 if (!pPattern)
326 pPattern = pDoc->GetPattern( nCol, nRow, nTab );
327
328 const SvxMarginItem* pMargin = &pPattern->GetItem(ATTR_MARGIN);
329 if (!pMargin)
330 return;
331
332 nLeftMargin = bInPrintTwips ? pMargin->GetLeftMargin() : static_cast<tools::Long>(pMargin->GetLeftMargin() * nPPTX);
333 nRightMargin = bInPrintTwips ? pMargin->GetRightMargin() : static_cast<tools::Long>(pMargin->GetRightMargin() * nPPTX);
334 nTopMargin = bInPrintTwips ? pMargin->GetTopMargin() : static_cast<tools::Long>(pMargin->GetTopMargin() * nPPTY);
335 nBottomMargin = bInPrintTwips ? pMargin->GetBottomMargin() : static_cast<tools::Long>(pMargin->GetBottomMargin() * nPPTY);
336}
337
338tools::Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToTop )
339{
340 // bForceToTop = always align to top, for editing
341 // (sal_False for querying URLs etc.)
342
343 if (!pPattern)
344 pPattern = pDoc->GetPattern( nCol, nRow, nTab );
345
346 Point aStartPos = aCellPos;
347 bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
348
349 bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
350 tools::Long nLayoutSign = (bLayoutRTL && !bIsTiledRendering) ? -1 : 1;
351
352 const ScMergeAttr* pMerge = &pPattern->GetItem(ATTR_MERGE);
354 if (!bInPrintTwips)
355 nCellX = static_cast<tools::Long>( nCellX * nPPTX );
356 if ( pMerge->GetColMerge() > 1 )
357 {
358 SCCOL nCountX = pMerge->GetColMerge();
359 for (SCCOL i=1; i<nCountX; i++)
360 {
361 tools::Long nColWidth = pDoc->GetColWidth(nCol+i,nTab);
362 nCellX += (bInPrintTwips ? nColWidth : static_cast<tools::Long>( nColWidth * nPPTX ));
363 }
364 }
366 if (!bInPrintTwips)
367 nCellY = static_cast<tools::Long>( nCellY * nPPTY );
368 if ( pMerge->GetRowMerge() > 1 )
369 {
370 SCROW nCountY = pMerge->GetRowMerge();
371 if (bInPrintTwips)
372 nCellY += pDoc->GetRowHeight(nRow + 1, nRow + nCountY - 1, nTab);
373 else
374 nCellY += pDoc->GetScaledRowHeight( nRow+1, nRow+nCountY-1, nTab, nPPTY);
375 }
376
380 tools::Long nDifX = 0;
381 {
383 bool bInPrintTwipsOrig = bInPrintTwips;
384 bInPrintTwips = true;
385 tools::Long nIndent = GetIndent(pPattern);
387 bInPrintTwips = bInPrintTwipsOrig;
388 // Here rounding may be done only on the sum, ie nDifX,
389 // so need to get margin and indent in twips.
390 nDifX = nLeftMargin + nIndent;
391 if (!bInPrintTwips)
392 {
393 nDifX = static_cast<tools::Long>(nDifX * nPPTX);
394 nRightMargin = static_cast<tools::Long>(nRightMargin * nPPTX);
395 nTopMargin = static_cast<tools::Long>(nTopMargin * nPPTY);
397 }
398 }
399
400
401 aStartPos.AdjustX(nDifX * nLayoutSign );
402 nCellX -= nDifX + nRightMargin; // due to line feed, etc.
403
404 // align vertical position to the one in the table
405
406 tools::Long nDifY;
407 SvxCellVerJustify eJust = pPattern->GetItem(ATTR_VER_JUSTIFY).GetValue();
408
409 // asian vertical is always edited top-aligned
410 bool bAsianVertical = pPattern->GetItem( ATTR_STACKED ).GetValue() &&
411 pPattern->GetItem( ATTR_VERTICAL_ASIAN ).GetValue();
412
413 if ( eJust == SvxCellVerJustify::Top ||
414 ( bForceToTop && ( SC_MOD()->GetInputOptions().GetTextWysiwyg() || bAsianVertical ) ) )
415 nDifY = nTopMargin;
416 else
417 {
418 MapMode aMode = pDev->GetMapMode();
419 pDev->SetMapMode(MapMode(bInPrintTwips ? MapUnit::MapTwip : MapUnit::MapPixel));
420
421 tools::Long nTextHeight = pDoc->GetNeededSize( nCol, nRow, nTab,
422 pDev, nPPTX, nPPTY, aZoomX, aZoomY, false /* bWidth */,
423 false /* bTotalSize */, bInPrintTwips );
424 if (!nTextHeight)
425 { // empty cell
426 vcl::Font aFont;
427 // font color doesn't matter here
428 pPattern->fillFontOnly(aFont, pDev, &aZoomY );
429 pDev->SetFont(aFont);
430 nTextHeight = pDev->GetTextHeight() + nTopMargin + nBottomMargin;
431 }
432
433 pDev->SetMapMode(aMode);
434
435 if ( nTextHeight > nCellY + nTopMargin || bForceToTop )
436 nDifY = 0; // too large -> begin at the top
437 else
438 {
439 if ( eJust == SvxCellVerJustify::Center )
440 nDifY = nTopMargin + ( nCellY - nTextHeight ) / 2;
441 else
442 nDifY = nCellY - nTextHeight + nTopMargin; // JUSTIFY_BOTTOM
443 }
444 }
445
446 aStartPos.AdjustY(nDifY );
447 nCellY -= nDifY;
448
449 if ( bLayoutRTL && !bIsTiledRendering )
450 aStartPos.AdjustX( -(nCellX - 2) ); // excluding grid on both sides
451
452 // -1 -> don't overwrite grid
453 return tools::Rectangle( aStartPos, Size(nCellX-1,nCellY-1) );
454}
455
457 bNeedsObject( false ),
458 bNeedsCellAttr( false )
459{
460 if ( pEngine->GetParagraphCount() > 1 )
461 {
462 bNeedsObject = true; //TODO: find cell attributes ?
463 }
464 else
465 {
466 const SfxPoolItem* pItem = nullptr;
467 pEditAttrs.reset( new SfxItemSet( pEngine->GetAttribs(
468 ESelection(0,0,0,pEngine->GetTextLen(0)), EditEngineAttribs::OnlyHard ) ) );
469 const SfxItemSet& rEditDefaults = pEngine->GetDefaults();
470
471 for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bNeedsObject; nId++)
472 {
473 SfxItemState eState = pEditAttrs->GetItemState( nId, false, &pItem );
474 if (eState == SfxItemState::DONTCARE)
475 bNeedsObject = true;
476 else if (eState == SfxItemState::SET)
477 {
480 {
481 // Escapement and kerning are kept in EditEngine because there are no
482 // corresponding cell format items. User defined attributes are kept in
483 // EditEngine because "user attributes applied to all the text" is different
484 // from "user attributes applied to the cell".
485
486 if ( *pItem != rEditDefaults.Get(nId) )
487 bNeedsObject = true;
488 }
489 else
490 if (!bNeedsCellAttr)
491 if ( *pItem != rEditDefaults.Get(nId) )
492 bNeedsCellAttr = true;
493 // rEditDefaults contains the defaults from the cell format
494 }
495 }
496
497 // contains field commands?
498
499 SfxItemState eFieldState = pEditAttrs->GetItemState( EE_FEATURE_FIELD, false );
500 if ( eFieldState == SfxItemState::DONTCARE || eFieldState == SfxItemState::SET )
501 bNeedsObject = true;
502
503 // not converted characters?
504
505 SfxItemState eConvState = pEditAttrs->GetItemState( EE_FEATURE_NOTCONV, false );
506 if ( eConvState == SfxItemState::DONTCARE || eConvState == SfxItemState::SET )
507 bNeedsObject = true;
508 }
509}
510
512{
513}
514
516 bool bDeleteEnginePoolP )
517 :
518 pEnginePool( pEnginePoolP ),
519 pDefaults( nullptr ),
520 bDeleteEnginePool( bDeleteEnginePoolP ),
521 bDeleteDefaults( false )
522{
523}
524
526 :
527 pEnginePool( rOrg.bDeleteEnginePool ? rOrg.pEnginePool->Clone() : rOrg.pEnginePool ),
528 pDefaults( nullptr ),
529 bDeleteEnginePool( rOrg.bDeleteEnginePool ),
530 bDeleteDefaults( false )
531{
532}
533
535{
536 if ( bDeleteDefaults )
537 delete pDefaults;
538}
539
541 bool bDeleteEnginePoolP )
542 :
543 ScEnginePoolHelper( pEnginePoolP, bDeleteEnginePoolP ),
544 EditEngine( pEnginePoolP )
545{
546 // All EditEngines use ScGlobal::GetEditDefaultLanguage as DefaultLanguage.
547 // DefaultLanguage for InputHandler's EditEngine is updated later.
548
550}
551
553 :
554 ScEnginePoolHelper( rOrg ),
555 EditEngine( pEnginePool.get() )
556{
558}
559
561{
562}
563
564void ScEditEngineDefaulter::SetDefaults( const SfxItemSet& rSet, bool bRememberCopy )
565{
566 if ( bRememberCopy )
567 {
568 if ( bDeleteDefaults )
569 delete pDefaults;
570 pDefaults = new SfxItemSet( rSet );
571 bDeleteDefaults = true;
572 }
573 const SfxItemSet& rNewSet = bRememberCopy ? *pDefaults : rSet;
574 bool bUndo = IsUndoEnabled();
575 EnableUndo( false );
576 bool bUpdateMode = SetUpdateLayout( false );
577 sal_Int32 nPara = GetParagraphCount();
578 for ( sal_Int32 j=0; j<nPara; j++ )
579 {
580 SetParaAttribs( j, rNewSet );
581 }
582 if ( bUpdateMode )
583 SetUpdateLayout( true );
584 if ( bUndo )
585 EnableUndo( true );
586}
587
588void ScEditEngineDefaulter::SetDefaults( std::unique_ptr<SfxItemSet> pSet )
589{
590 if ( bDeleteDefaults )
591 delete pDefaults;
592 pDefaults = pSet.release();
593 bDeleteDefaults = true;
594 if ( pDefaults )
595 SetDefaults( *pDefaults, false );
596}
597
599{
600 if ( !pDefaults )
601 {
603 bDeleteDefaults = true;
604 }
605 pDefaults->Put( rItem );
606 SetDefaults( *pDefaults, false );
607}
608
610{
611 if ( !pDefaults )
612 {
614 bDeleteDefaults = true;
615 }
616 return *pDefaults;
617}
618
620{
621 bool bUpdateMode = SetUpdateLayout( false );
622 SetText( rTextObject );
623 if ( pDefaults )
624 SetDefaults( *pDefaults, false );
625 if ( bUpdateMode )
626 SetUpdateLayout( true );
627}
628
630 const SfxItemSet& rSet, bool bRememberCopy )
631{
632 bool bUpdateMode = SetUpdateLayout( false );
633 SetText( rTextObject );
634 SetDefaults( rSet, bRememberCopy );
635 if ( bUpdateMode )
636 SetUpdateLayout( true );
637}
638
640{
641 bool bUpdateMode = SetUpdateLayout( false );
642 SetText( rText );
643 if ( pDefaults )
644 SetDefaults( *pDefaults, false );
645 if ( bUpdateMode )
646 SetUpdateLayout( true );
647}
648
650 const SfxItemSet& rSet )
651{
652 bool bUpdateMode = SetUpdateLayout( false );
653 SetText( rText );
654 SetDefaults( rSet );
655 if ( bUpdateMode )
656 SetUpdateLayout( true );
657}
658
660{
661 if ( pDefaults )
662 {
663 sal_Int32 nPara = GetParagraphCount();
664 for ( sal_Int32 j=0; j<nPara; j++ )
666 }
667}
668
670{
671 std::optional<SfxItemSet> pCharItems;
672 bool bUpdateMode = SetUpdateLayout( false );
673 sal_Int32 nParCount = GetParagraphCount();
674 for (sal_Int32 nPar=0; nPar<nParCount; nPar++)
675 {
676 const SfxItemSet& rParaAttribs = GetParaAttribs( nPar );
677 sal_uInt16 nWhich;
678 for (nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich ++)
679 {
680 const SfxPoolItem* pParaItem;
681 if ( rParaAttribs.GetItemState( nWhich, false, &pParaItem ) == SfxItemState::SET )
682 {
683 // if defaults are set, use only items that are different from default
684 if ( !pDefaults || *pParaItem != pDefaults->Get(nWhich) )
685 {
686 if (!pCharItems)
687 pCharItems.emplace( GetEmptyItemSet() );
688 pCharItems->Put( *pParaItem );
689 }
690 }
691 }
692
693 if ( pCharItems )
694 {
695 std::vector<sal_Int32> aPortions;
696 GetPortions( nPar, aPortions );
697
698 // loop through the portions of the paragraph, and set only those items
699 // that are not overridden by existing character attributes
700
701 sal_Int32 nStart = 0;
702 for ( const sal_Int32 nEnd : aPortions )
703 {
704 ESelection aSel( nPar, nStart, nPar, nEnd );
705 SfxItemSet aOldCharAttrs = GetAttribs( aSel );
706 SfxItemSet aNewCharAttrs = *pCharItems;
707 for (nWhich = EE_CHAR_START; nWhich <= EE_CHAR_END; nWhich ++)
708 {
709 // Clear those items that are different from existing character attributes.
710 // Where no character attributes are set, GetAttribs returns the paragraph attributes.
711 const SfxPoolItem* pItem;
712 if ( aNewCharAttrs.GetItemState( nWhich, false, &pItem ) == SfxItemState::SET &&
713 *pItem != aOldCharAttrs.Get(nWhich) )
714 {
715 aNewCharAttrs.ClearItem(nWhich);
716 }
717 }
718 if ( aNewCharAttrs.Count() )
719 QuickSetAttribs( aNewCharAttrs, aSel );
720
721 nStart = nEnd;
722 }
723
724 pCharItems.reset();
725 }
726
727 if ( rParaAttribs.Count() )
728 {
729 // clear all paragraph attributes (including defaults),
730 // so they are not contained in resulting EditTextObjects
731
732 SetParaAttribs( nPar, SfxItemSet( *rParaAttribs.GetPool(), rParaAttribs.GetRanges() ) );
733 }
734 }
735 if ( bUpdateMode )
736 SetUpdateLayout( true );
737}
738
740 : ScFieldEditEngine( pDoc, pDoc->GetEnginePool() )
741{
744}
745
747 SfxItemPool* pEngineItemPool, ScDocument* pDoc, SfxItemPool* pTextObjectPool )
748 : ScFieldEditEngine( pDoc, pEngineItemPool, pTextObjectPool )
749{
750 if ( pTextObjectPool )
751 SetEditTextObjectPool( pTextObjectPool );
752 Init( rPattern );
753}
754
756{
757 SetRefMapMode(MapMode(MapUnit::Map100thMM));
758 auto pEditDefaults = std::make_unique<SfxItemSet>( GetEmptyItemSet() );
759 rPattern.FillEditItemSet( pEditDefaults.get() );
760 SetDefaults( std::move(pEditDefaults) );
761 // we have no StyleSheets for text
762 SetControlWord( GetControlWord() & ~EEControlBits::RTFSTYLESHEETS );
763}
764
765// field commands for header and footer
766
767// numbers from \sw\source\core\doc\numbers.cxx
768
769static OUString lcl_GetCharStr( sal_Int32 nNo )
770{
771 OSL_ENSURE( nNo, "0 is an invalid number !!" );
772 OUString aStr;
773
774 const sal_Int32 coDiff = 'Z' - 'A' +1;
775 sal_Int32 nCalc;
776
777 do {
778 nCalc = nNo % coDiff;
779 if( !nCalc )
780 nCalc = coDiff;
781 aStr = OUStringChar( sal_Unicode('a' - 1 + nCalc) ) + aStr;
782 nNo = sal::static_int_cast<sal_Int32>( nNo - nCalc );
783 if( nNo )
784 nNo /= coDiff;
785 } while( nNo );
786 return aStr;
787}
788
789static OUString lcl_GetNumStr(sal_Int32 nNo, SvxNumType eType)
790{
791 OUString aTmpStr('0');
792 if( nNo )
793 {
794 switch( eType )
795 {
796 case css::style::NumberingType::CHARS_UPPER_LETTER:
797 case css::style::NumberingType::CHARS_LOWER_LETTER:
798 aTmpStr = lcl_GetCharStr( nNo );
799 break;
800
801 case css::style::NumberingType::ROMAN_UPPER:
802 case css::style::NumberingType::ROMAN_LOWER:
803 if( nNo < 4000 )
804 aTmpStr = SvxNumberFormat::CreateRomanString( nNo, ( eType == css::style::NumberingType::ROMAN_UPPER ) );
805 else
806 aTmpStr.clear();
807 break;
808
809 case css::style::NumberingType::NUMBER_NONE:
810 aTmpStr.clear();
811 break;
812
813// CHAR_SPECIAL:
814// ????
815
816// case ARABIC: is default now
817 default:
818 aTmpStr = OUString::number(nNo);
819 break;
820 }
821
822 if( css::style::NumberingType::CHARS_UPPER_LETTER == eType )
823 aTmpStr = aTmpStr.toAsciiUpperCase();
824 }
825 return aTmpStr;
826}
827
829 : aDateTime ( DateTime::EMPTY )
830{
831 nPageNo = nTotalPages = 0;
833}
834
836 : ScEditEngineDefaulter( pEnginePoolP,true/*bDeleteEnginePoolP*/ )
837{
838}
839
841 sal_Int32 /* nPara */, sal_Int32 /* nPos */,
842 std::optional<Color>& /* rTxtColor */, std::optional<Color>& /* rFldColor */,
843 std::optional<FontLineStyle>& /*rFldLineStyle*/ )
844{
845 const SvxFieldData* pFieldData = rField.GetField();
846 if (!pFieldData)
847 return "?";
848
849 OUString aRet;
850 sal_Int32 nClsId = pFieldData->GetClassId();
851 switch (nClsId)
852 {
853 case text::textfield::Type::PAGE:
855 break;
856 case text::textfield::Type::PAGES:
858 break;
859 case text::textfield::Type::EXTENDED_TIME:
860 case text::textfield::Type::TIME:
861 // For now, time field in the header / footer is always dynamic.
863 break;
864 case text::textfield::Type::DOCINFO_TITLE:
865 aRet = aData.aTitle;
866 break;
867 case text::textfield::Type::EXTENDED_FILE:
868 {
869 switch (static_cast<const SvxExtFileField*>(pFieldData)->GetFormat())
870 {
871 case SvxFileFormat::PathFull :
872 aRet = aData.aLongDocName;
873 break;
874 default:
875 aRet = aData.aShortDocName;
876 }
877 }
878 break;
880 aRet = aData.aTabName;
881 break;
884 break;
885 default:
886 aRet = "?";
887 }
888
889 return aRet;
890}
891
892// field data
893
895 ScDocument* pDoc, SfxItemPool* pEnginePoolP,
896 SfxItemPool* pTextObjectPool, bool bDeleteEnginePoolP) :
897 ScEditEngineDefaulter( pEnginePoolP, bDeleteEnginePoolP ),
898 mpDoc(pDoc), bExecuteURL(true)
899{
900 if ( pTextObjectPool )
901 SetEditTextObjectPool( pTextObjectPool );
902 SetControlWord( EEControlBits(GetControlWord() | EEControlBits::MARKFIELDS) & ~EEControlBits::RTFSTYLESHEETS );
903}
904
906 sal_Int32 /* nPara */, sal_Int32 /* nPos */,
907 std::optional<Color>& rTxtColor, std::optional<Color>& /* rFldColor */,
908 std::optional<FontLineStyle>& rFldLineStyle )
909{
910 const SvxFieldData* pFieldData = rField.GetField();
911
912 if (!pFieldData)
913 return " ";
914
915 return ScEditUtil::GetCellFieldValue(*pFieldData, mpDoc, &rTxtColor, &rFldLineStyle);
916}
917
919{
920 if (!bExecuteURL)
921 return false;
922
923 if (const SvxURLField* pURLField = dynamic_cast<const SvxURLField*>(rField.GetField()))
924 {
925 ScGlobal::OpenURL(pURLField->GetURL(), pURLField->GetTargetFrame());
926 return true;
927 }
928 return false;
929}
930
932 SfxItemPool* pTextObjectPool ) :
933 ScEditEngineDefaulter( pEnginePoolP, false/*bDeleteEnginePoolP*/ )
934{
935 if ( pTextObjectPool )
936 SetEditTextObjectPool( pTextObjectPool );
937 SetControlWord( EEControlBits(GetControlWord() | EEControlBits::MARKFIELDS) & ~EEControlBits::RTFSTYLESHEETS );
938}
939
940/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void GetPortions(sal_Int32 nPara, std::vector< sal_Int32 > &rList)
OUString GetText(LineEnd eEnd=LINEEND_LF) const
std::unique_ptr< EditTextObject > CreateTextObject()
void SetText(const OUString &rStr)
bool SetUpdateLayout(bool bUpdate, bool bRestoring=false)
void SetEditTextObjectPool(SfxItemPool *pPool)
EEControlBits GetControlWord() const
sal_Int32 GetParagraphCount() const
void EnableUndo(bool bEnable)
void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel)
bool IsUndoEnabled() const
SfxItemSet GetAttribs(sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags=GetAttribsFlags::ALL) const
sal_Int32 GetTextLen() const
void SetRefMapMode(const MapMode &rMapMode)
const SfxItemSet & GetEmptyItemSet() const
void SetControlWord(EEControlBits nWord)
void SetDefaultLanguage(LanguageType eLang)
void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel)
virtual void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &rSet)
const SfxItemSet & GetParaAttribs(sal_Int32 nPara) const
virtual sal_Int32 GetParagraphCount() const=0
virtual OUString GetText(sal_Int32 nPara) const=0
virtual bool HasField(sal_Int32 nType=css::text::textfield::Type::UNSPECIFIED) const=0
virtual bool HasOnlineSpellErrors() const=0
virtual bool RemoveCharAttribs(sal_uInt16 nWhich)=0
static INetURLHistory * GetOrCreate()
bool QueryUrl(const INetURLObject &rUrl) const
OUString getDate(const Date &rDate) const
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4161
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4122
tools::Long GetScaledRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale) const
Definition: document.cxx:4198
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6050
SC_DLLPUBLIC ScFieldEditEngine & GetEditEngine()
Definition: documen2.cxx:483
SC_DLLPUBLIC SfxItemPool * GetEditPool() const
Definition: documen2.cxx:473
SfxObjectShell * GetDocumentShell() const
Definition: document.hxx:1083
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
Definition: documen2.cxx:467
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
Definition: document.cxx:974
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
Definition: document.cxx:204
tools::Long GetNeededSize(SCCOL nCol, SCROW nRow, SCTAB nTab, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY, bool bWidth, bool bTotalSize=false, bool bInPrintTwips=false)
Definition: document.cxx:4253
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4719
std::unique_ptr< SfxItemSet > pEditAttrs
Definition: editutil.hxx:94
ScEditAttrTester(ScEditEngineDefaulter *pEng)
Definition: editutil.cxx:456
void RemoveParaAttribs()
Paragraph attributes that are not defaults are copied to character attributes and all paragraph attri...
Definition: editutil.cxx:669
void SetText(const OUString &rStr)
ScEditEngineDefaulter(SfxItemPool *pEnginePool, bool bDeleteEnginePool=false)
bDeleteEnginePool: Engine becomes the owner of the pool and deletes it on destruction
Definition: editutil.cxx:540
void SetDefaults(const SfxItemSet &rDefaults, bool bRememberCopy=true)
Creates a copy of SfxItemSet if bRememberCopy set.
Definition: editutil.cxx:564
void SetTextCurrentDefaults(const EditTextObject &rTextObject)
SetText and apply defaults already set.
Definition: editutil.cxx:619
void RepeatDefaults()
Re-apply existing defaults if set, same as in SetText, but without EnableUndo/SetUpdateMode.
Definition: editutil.cxx:659
void SetDefaultItem(const SfxPoolItem &rItem)
Set the item in the default ItemSet which is created if it doesn't exist yet.
Definition: editutil.cxx:598
virtual ~ScEditEngineDefaulter() override
Definition: editutil.cxx:560
const SfxItemSet & GetDefaults()
Returns the stored defaults, used to find non-default character attributes.
Definition: editutil.cxx:609
void SetTextNewDefaults(const EditTextObject &rTextObject, const SfxItemSet &rDefaults, bool bRememberCopy=true)
Current defaults are not applied, new defaults are applied.
Definition: editutil.cxx:629
Point aCellPos
Definition: editutil.hxx:42
static void RemoveCharAttribs(EditTextObject &rEditText, const ScPatternAttr &rAttr)
Definition: editutil.cxx:155
ScEditUtil(ScDocument *pDocument, SCCOL nX, SCROW nY, SCTAB nZ, const Point &rCellPos, OutputDevice *pDevice, double nScaleX, double nScaleY, const Fraction &rX, const Fraction &rY, bool bPrintTwips=false)
Definition: editutil.cxx:56
void GetMargins(const ScPatternAttr *pPattern, tools::Long &nLeftMargin, tools::Long &nTopMargin, tools::Long &nRightMargin, tools::Long &BottomMargin) const
Definition: editutil.cxx:322
Fraction aZoomY
Definition: editutil.hxx:47
static OUString GetCellFieldValue(const SvxFieldData &rFieldData, const ScDocument *pDoc, std::optional< Color > *ppTextColor, std::optional< FontLineStyle > *ppFldLineStyle)
Definition: editutil.cxx:215
ScDocument * pDoc
Definition: editutil.hxx:38
bool bInPrintTwips
Definition: editutil.hxx:48
SCTAB nTab
Definition: editutil.hxx:41
static std::unique_ptr< EditTextObject > CreateURLObjectFromURL(ScDocument &rDoc, const OUString &rURL, const OUString &rText)
Definition: editutil.cxx:144
static OUString ModifyDelimiters(const OUString &rOld)
Definition: editutil.cxx:65
double nPPTX
Definition: editutil.hxx:44
double nPPTY
Definition: editutil.hxx:45
tools::Rectangle GetEditArea(const ScPatternAttr *pPattern, bool bForceToTop)
Definition: editutil.cxx:338
tools::Long GetIndent(const ScPatternAttr *pPattern) const
Definition: editutil.cxx:305
Fraction aZoomX
Definition: editutil.hxx:46
static OUString GetMultilineString(const EditEngine &rEngine)
Retrieves string with paragraphs delimited by new lines (' ').
Definition: editutil.cxx:109
VclPtr< OutputDevice > pDev
Definition: editutil.hxx:43
SCROW nRow
Definition: editutil.hxx:40
static std::unique_ptr< EditTextObject > Clone(const EditTextObject &rSrc, ScDocument &rDestDoc)
Definition: editutil.cxx:189
static OUString GetSpaceDelimitedString(const EditEngine &rEngine)
Retrieves string with paragraphs delimited by spaces.
Definition: editutil.cxx:105
static SC_DLLPUBLIC OUString GetString(const EditTextObject &rEditText, const ScDocument *pDoc)
Retrieves string with paragraphs delimited by new lines (' ').
Definition: editutil.cxx:119
SCCOL nCol
Definition: editutil.hxx:39
virtual ~ScEnginePoolHelper()
Definition: editutil.cxx:534
ScEnginePoolHelper(SfxItemPool *pEnginePool, bool bDeleteEnginePool)
Definition: editutil.cxx:515
SfxItemSet * pDefaults
Definition: editutil.hxx:112
ScDocument * mpDoc
Definition: editutil.hxx:173
virtual bool FieldClicked(const SvxFieldItem &rField) override
Definition: editutil.cxx:918
ScFieldEditEngine(ScDocument *pDoc, SfxItemPool *pEnginePool, SfxItemPool *pTextObjectPool=nullptr, bool bDeleteEnginePool=false)
Definition: editutil.cxx:894
virtual OUString CalcFieldValue(const SvxFieldItem &rField, sal_Int32 nPara, sal_Int32 nPos, std::optional< Color > &rTxtColor, std::optional< Color > &rFldColor, std::optional< FontLineStyle > &rFldLineStyle) override
Definition: editutil.cxx:905
static LanguageType GetEditDefaultLanguage()
Definition: global.cxx:909
static void OpenURL(const OUString &rURL, const OUString &rTarget, bool bIgnoreSettings=false)
Open the specified URL.
Definition: global.cxx:810
static SC_DLLPUBLIC LanguageType eLnge
Definition: global.hxx:560
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
Definition: global.cxx:1055
static ScFieldEditEngine & GetStaticFieldEditEngine()
A static instance of ScFieldEditEngine not capable of resolving document specific fields,...
Definition: global.cxx:1127
ScHeaderEditEngine(SfxItemPool *pEnginePool)
Definition: editutil.cxx:835
ScHeaderFieldData aData
Definition: editutil.hxx:217
virtual OUString CalcFieldValue(const SvxFieldItem &rField, sal_Int32 nPara, sal_Int32 nPos, std::optional< Color > &rTxtColor, std::optional< Color > &rFldColor, std::optional< FontLineStyle > &rFldLineStyle) override
Definition: editutil.cxx:840
SCCOL GetColMerge() const
Definition: attrib.hxx:71
SCROW GetRowMerge() const
Definition: attrib.hxx:72
ScNoteEditEngine(SfxItemPool *pEnginePool, SfxItemPool *pTextObjectPool)
Definition: editutil.cxx:931
SfxItemSet & GetItemSet()
Definition: patattr.hxx:192
static void fillFontOnly(vcl::Font &rFont, const SfxItemSet &rItemSet, const OutputDevice *pOutDev=nullptr, const Fraction *pScale=nullptr, const SfxItemSet *pCondSet=nullptr, SvtScriptType nScript=SvtScriptType::NONE)
Static helper function to fill a font object from the passed item set.
Definition: patattr.cxx:266
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
Definition: patattr.hxx:73
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...
Definition: patattr.cxx:868
ScTabEditEngine(ScDocument *pDoc)
Definition: editutil.cxx:739
void Init(const ScPatternAttr &rPattern)
Definition: editutil.cxx:755
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
const WhichRangesContainer & GetRanges() const
SfxItemPool * GetPool() const
sal_uInt16 Count() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
css::uno::Reference< css::document::XDocumentProperties > getDocProperties() const
OUString GetTitle(sal_uInt16 nMaxLen=0) const
OUString GetFormatted(SvNumberFormatter &rFormatter, LanguageType eLanguage) const
virtual sal_Int32 GetClassId() const
const SvxFieldData * GetField() const
sal_Int16 GetRightMargin() const
sal_Int16 GetTopMargin() const
sal_Int16 GetBottomMargin() const
sal_Int16 GetLeftMargin() const
static OUString CreateRomanString(sal_Int32 nNo, bool bUpper)
int GetTab() const
const OUString & GetRepresentation() const
SvxURLFormat GetFormat() const
const OUString & GetURL() const
static const OUString & GetNativeSymbol(OpCode eOp)
constexpr double nPPTX
constexpr double nPPTY
URL aURL
virtual SotClipboardFormatId GetFormat(const TransferableDataHelper &aHelper) override
#define EE_TEXTPOS_MAX_COUNT
#define EE_PARA_MAX_COUNT
EEControlBits
static OUString lcl_GetDelimitedString(const EditEngine &rEngine, const char c)
Definition: editutil.cxx:74
static OUString lcl_GetNumStr(sal_Int32 nNo, SvxNumType eType)
Definition: editutil.cxx:789
static OUString lcl_GetCharStr(sal_Int32 nNo)
Definition: editutil.cxx:769
constexpr TypedWhichId< SvxContourItem > EE_CHAR_OUTLINE(EE_CHAR_START+8)
constexpr TypedWhichId< SvxKerningItem > EE_CHAR_KERNING(EE_CHAR_START+12)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CJK(EE_CHAR_START+17)
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
constexpr TypedWhichId< SvxUnderlineItem > EE_CHAR_UNDERLINE(EE_CHAR_START+5)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxAutoKernItem > EE_CHAR_PAIRKERNING(EE_CHAR_START+11)
constexpr TypedWhichId< SvxShadowedItem > EE_CHAR_SHADOW(EE_CHAR_START+9)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT(EE_CHAR_START+4)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_COLOR(EE_CHAR_START+0)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT_CTL(EE_CHAR_START+22)
constexpr TypedWhichId< SvxCrossedOutItem > EE_CHAR_STRIKEOUT(EE_CHAR_START+6)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC(EE_CHAR_START+7)
constexpr sal_uInt16 EE_CHAR_START(EE_PARA_END+1)
constexpr sal_uInt16 EE_FEATURE_NOTCONV(EE_FEATURE_LINEBR+1)
constexpr TypedWhichId< SvxEscapementItem > EE_CHAR_ESCAPEMENT(EE_CHAR_START+10)
constexpr sal_uInt16 EE_CHAR_END(EE_CHAR_START+32)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CTL(EE_CHAR_START+20)
constexpr TypedWhichId< SvxWeightItem > EE_CHAR_WEIGHT_CJK(EE_CHAR_START+21)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC_CJK(EE_CHAR_START+23)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CTL(EE_CHAR_START+18)
constexpr TypedWhichId< SvxPostureItem > EE_CHAR_ITALIC_CTL(EE_CHAR_START+24)
constexpr TypedWhichId< SvXMLAttrContainerItem > EE_CHAR_XMLATTRIBS(EE_CHAR_START+28)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CJK(EE_CHAR_START+19)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
DocumentType eType
OUString aName
#define SAL_N_ELEMENTS(arr)
aStr
tools::Long const nRightMargin
tools::Long const nBottomMargin
tools::Long const nTopMargin
tools::Long const nLeftMargin
Reference< XComponentContext > getProcessComponentContext()
int i
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
constexpr OUStringLiteral EMPTY
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
long Long
std::mutex aMutex
sal_Int16 nId
ocSep
SfxItemState
constexpr TypedWhichId< ScIndentItem > ATTR_INDENT(131)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< SfxBoolItem > ATTR_VERTICAL_ASIAN(137)
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
constexpr TypedWhichId< ScPatternAttr > ATTR_PATTERN(156)
constexpr TypedWhichId< SvxPostureItem > ATTR_CTL_FONT_POSTURE(119)
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CJK_FONT_HEIGHT(112)
constexpr TypedWhichId< SvxPostureItem > ATTR_FONT_POSTURE(103)
constexpr TypedWhichId< SvxWeightItem > ATTR_FONT_WEIGHT(102)
constexpr TypedWhichId< SvxColorItem > ATTR_FONT_COLOR(109)
constexpr TypedWhichId< SvxWeightItem > ATTR_CJK_FONT_WEIGHT(113)
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
constexpr TypedWhichId< SvxShadowedItem > ATTR_FONT_SHADOWED(108)
constexpr TypedWhichId< SvxContourItem > ATTR_FONT_CONTOUR(107)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
constexpr TypedWhichId< SvxCrossedOutItem > ATTR_FONT_CROSSEDOUT(106)
constexpr TypedWhichId< SvxMarginItem > ATTR_MARGIN(143)
constexpr TypedWhichId< ScVerticalStackCell > ATTR_STACKED(134)
constexpr TypedWhichId< SvxVerJustifyItem > ATTR_VER_JUSTIFY(132)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
constexpr TypedWhichId< SvxWeightItem > ATTR_CTL_FONT_WEIGHT(118)
constexpr TypedWhichId< SvxPostureItem > ATTR_CJK_FONT_POSTURE(114)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CTL_FONT_HEIGHT(117)
constexpr TypedWhichId< SvxUnderlineItem > ATTR_FONT_UNDERLINE(104)
#define SC_MOD()
Definition: scmod.hxx:247
static SfxItemSet & rSet
OUString aLongDocName
Definition: editutil.hxx:202
tools::Long nPageNo
Definition: editutil.hxx:206
DateTime aDateTime
Definition: editutil.hxx:205
OUString aShortDocName
Definition: editutil.hxx:203
OUString aTabName
Definition: editutil.hxx:204
SvxNumType eNumType
Definition: editutil.hxx:208
tools::Long nTotalPages
Definition: editutil.hxx:207
SvxCellVerJustify
SvxNumType
SVX_NUM_ARABIC
sal_uInt16 sal_Unicode
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
@ TABLE
Definition: xmldpimp.hxx:43