LibreOffice Module sd (master) 1
futempl.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 <com/sun/star/style/XStyleFamiliesSupplier.hpp>
21#include <com/sun/star/beans/XPropertySet.hpp>
22#include <com/sun/star/container/XNameAccess.hpp>
23#include <com/sun/star/frame/XModel.hpp>
24
25#include <futempl.hxx>
26
27#include <svx/svxids.hrc>
28#include <sfx2/bindings.hxx>
29#include <sfx2/dispatch.hxx>
30#include <editeng/eeitem.hxx>
31#include <sfx2/request.hxx>
32#include <sfx2/sfxdlg.hxx>
33#include <editeng/numitem.hxx>
34#include <svx/svdopage.hxx>
35#include <editeng/colritem.hxx>
36#include <editeng/brushitem.hxx>
37#include <svx/svditer.hxx>
39#include <svl/intitem.hxx>
40
41#include <sfx2/viewfrm.hxx>
42#include <svx/xlndsit.hxx>
43#include <svx/xlnstit.hxx>
44#include <svx/xlnedit.hxx>
45#include <svx/xbtmpit.hxx>
46#include <svx/xflgrit.hxx>
47#include <svx/xflftrit.hxx>
48#include <svx/xflhtit.hxx>
49#include <o3tl/string_view.hxx>
50#include <app.hrc>
51#include <stlsheet.hxx>
52#include <sdpage.hxx>
53#include <stlpool.hxx>
54#include <sdmod.hxx>
55#include <View.hxx>
56#include <drawdoc.hxx>
57#include <DrawDocShell.hxx>
58#include <DrawViewShell.hxx>
59#include <ViewShell.hxx>
60
61#include <strings.hrc>
62#include <prlayout.hxx>
63#include <sdresid.hxx>
64#include <OutlineView.hxx>
65#include <sdabstdlg.hxx>
66#include <memory>
67
68using namespace com::sun::star::uno;
69using namespace com::sun::star::container;
70using namespace com::sun::star::beans;
71using namespace com::sun::star::style;
72
73namespace sd
74{
75
76
78 ViewShell* pViewSh,
79 ::sd::Window* pWin,
80 ::sd::View* pView,
81 SdDrawDocument* pDoc,
82 SfxRequest& rReq )
83 : FuPoor( pViewSh, pWin, pView, pDoc, rReq )
84{
85}
86
88{
89 rtl::Reference<FuPoor> xFunc( new FuTemplate( pViewSh, pWin, pView, pDoc, rReq ) );
90 xFunc->DoExecute(rReq);
91 return xFunc;
92}
93
95{
96 const SfxItemSet* pArgs = rReq.GetArgs();
97 sal_uInt16 nSId = rReq.GetSlot();
98
99 // get StyleSheet parameter
100 SfxStyleSheetBasePool* pSSPool = mpDoc->GetDocSh()->GetStyleSheetPool();
101 SfxStyleSheetBase* pStyleSheet = nullptr;
102
103 const SfxPoolItem* pItem;
104 SfxStyleFamily nFamily = SfxStyleFamily(USHRT_MAX);
105 if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY,
106 false, &pItem ))
107 {
108 nFamily = static_cast<SfxStyleFamily>( pArgs->Get( SID_STYLE_FAMILY ).GetValue());
109 }
110 else if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME,
111 false, &pItem ))
112 {
113 OUString sFamily = pArgs->Get( SID_STYLE_FAMILYNAME ).GetValue();
114 if (sFamily == "graphics")
115 nFamily = SfxStyleFamily::Para;
116 else
117 nFamily = SfxStyleFamily::Pseudo;
118 }
119
120 OUString aStyleName;
121 sal_uInt16 nRetMask = static_cast<sal_uInt16>(SfxStyleSearchBits::All);
122
123 switch( nSId )
124 {
125 case SID_STYLE_APPLY:
126 case SID_STYLE_EDIT:
127 case SID_STYLE_DELETE:
128 case SID_STYLE_HIDE:
129 case SID_STYLE_SHOW:
130 case SID_STYLE_FAMILY:
131 case SID_STYLE_NEW_BY_EXAMPLE:
132 {
133 const SfxStringItem* pNameItem = rReq.GetArg<SfxStringItem>(SID_APPLY_STYLE);
134 const SfxStringItem* pFamilyItem = rReq.GetArg<SfxStringItem>(SID_STYLE_FAMILYNAME);
135 if ( pFamilyItem && pNameItem )
136 {
137 try
138 {
139 Reference< XStyleFamiliesSupplier > xModel(mpDoc->GetDocSh()->GetModel(), UNO_QUERY_THROW );
140 Reference< XNameAccess > xCont( xModel->getStyleFamilies() );
141 Reference< XNameAccess > xStyles( xCont->getByName(pFamilyItem->GetValue()), UNO_QUERY_THROW );
142 Reference< XPropertySet > xInfo( xStyles->getByName( pNameItem->GetValue() ), UNO_QUERY_THROW );
143
144 OUString aUIName;
145 xInfo->getPropertyValue( "DisplayName" ) >>= aUIName;
146 if ( !aUIName.isEmpty() )
147 rReq.AppendItem( SfxStringItem( nSId, aUIName ) );
148 }
149 catch( Exception& )
150 {
151 }
152 }
153
154 if (pArgs && pArgs->GetItemState(nSId) == SfxItemState::SET)
155 aStyleName = static_cast<const SfxStringItem &>( pArgs->Get( nSId ) ).GetValue();
156 }
157 }
158
159 switch( nSId )
160 {
161 case SID_STYLE_NEW:
162 {
163 SfxStyleSheetBase *p = pSSPool->Find(aStyleName, nFamily );
164 if(p)
165 {
166 pSSPool->Remove(p);
167 p = nullptr;
168 }
169 pStyleSheet = &pSSPool->Make( aStyleName, nFamily, SfxStyleSearchBits::UserDefined );
170
171 if (pArgs && pArgs->GetItemState(SID_STYLE_REFERENCE) == SfxItemState::SET)
172 {
173 OUString aParentName( pArgs->Get(SID_STYLE_REFERENCE).GetValue());
174 pStyleSheet->SetParent(aParentName);
175 }
176 else
177 {
178 pStyleSheet->SetParent(SdResId(STR_STANDARD_STYLESHEET_NAME));
179 }
180 }
181 break;
182
183 case SID_STYLE_NEW_BY_EXAMPLE:
184 {
185 // at the moment, the dialog to enter the name of the template is still opened
186 SfxStyleSheetBase *p = pSSPool->Find(aStyleName, nFamily );
187 if(p)
188 {
189 pSSPool->Remove(p);
190 p = nullptr;
191 }
192 pStyleSheet = &pSSPool->Make( aStyleName, nFamily, SfxStyleSearchBits::UserDefined );
193 pStyleSheet->SetParent(SdResId(STR_STANDARD_STYLESHEET_NAME));
194 }
195 break;
196
197 case SID_STYLE_EDIT:
198 pStyleSheet = pSSPool->Find( aStyleName, nFamily);
199 break;
200
201 case SID_STYLE_DELETE:
202 pStyleSheet = pSSPool->Find( aStyleName, nFamily);
203 if( pStyleSheet )
204 {
205 pSSPool->Remove( pStyleSheet );
206 nRetMask = sal_uInt16(true);
207 mpDoc->SetChanged();
208 }
209 else
210 {
211 nRetMask = sal_uInt16(false);
212 }
213 break;
214
215 case SID_STYLE_HIDE:
216 case SID_STYLE_SHOW:
217 pStyleSheet = pSSPool->Find( aStyleName, nFamily);
218 pStyleSheet->SetHidden( nSId == SID_STYLE_HIDE );
219 nRetMask = sal_uInt16(true);
220 break;
221
222 case SID_STYLE_APPLY:
223 // apply the template to the document
224 pStyleSheet = pSSPool->Find( aStyleName, nFamily);
225
226 // do not set presentation styles, they will be set implicit
227 if ( pStyleSheet && pStyleSheet->GetFamily() != SfxStyleFamily::Pseudo )
228 {
229 SfxStyleSheet* pOldStyleSheet = mpView->GetStyleSheet();
230 OUString aStr;
231
232 if( // if the object had no style sheet, allow all
233 !pOldStyleSheet ||
234
235 // allow if old and new style sheet has same family
236 pStyleSheet->GetFamily() == pOldStyleSheet->GetFamily() ||
237
238 // allow if old was background objects and new is graphics
239 (pStyleSheet->GetFamily() == SfxStyleFamily::Para && pOldStyleSheet->GetHelpId( aStr ) == HID_PSEUDOSHEET_BACKGROUNDOBJECTS) ||
240
241 // allow if old was presentation and we are a drawing document
242 (pOldStyleSheet->GetFamily() == SfxStyleFamily::Page && mpDoc->GetDocumentType() == DocumentType::Draw) )
243 {
244 mpView->SetStyleSheet( static_cast<SfxStyleSheet*>(pStyleSheet));
245 mpDoc->SetChanged();
246 mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 );
247 }
248 }
249 break;
250
251 case SID_STYLE_WATERCAN:
252 {
253 if( !SD_MOD()->GetWaterCan() )
254 {
255 if (pArgs && pArgs->GetItemState( nSId ) == SfxItemState::SET)
256 {
257 aStyleName = static_cast<const SfxStringItem &>( pArgs->Get( nSId ) ).GetValue();
258 SD_MOD()->SetWaterCan( true );
259 pStyleSheet = pSSPool->Find( aStyleName, nFamily);
260 }
261 // no presentation object templates, they are only allowed implicitly
262 if( pStyleSheet && pStyleSheet->GetFamily() != SfxStyleFamily::Pseudo )
263 {
264 static_cast<SdStyleSheetPool*>( pSSPool )->SetActualStyleSheet( pStyleSheet );
265
266 // we switch explicitly into selection mode
267 mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_OBJECT_SELECT,
268 SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
269
270 }
271 else
272 SD_MOD()->SetWaterCan( false );
273 }
274 else
275 {
276 SD_MOD()->SetWaterCan( false );
277 // we have to re-enable to tools-bar
279 }
280 }
281 break;
282
283 default:
284 break;
285 }
286
287 switch( nSId )
288 {
289 case SID_STYLE_NEW:
290 case SID_STYLE_EDIT:
291 {
293
294 if( pStyleSheet )
295 {
299
300 SfxStyleFamily eFamily = pStyleSheet->GetFamily();
301
302 if (eFamily == SfxStyleFamily::Para)
303 {
304 pStdDlg.disposeAndReset(pFact ? pFact->CreateSdTabTemplateDlg(mpViewShell->GetFrameWeld(), mpDoc->GetDocSh(), *pStyleSheet, mpDoc, mpView) : nullptr);
305 }
306 else if (eFamily == SfxStyleFamily::Pseudo)
307 {
308 OUString aName(pStyleSheet->GetName());
309 bool bBackground = false;
310 bool bOldDocInOtherLanguage = false;
311
312 if (aName == SdResId(STR_PSEUDOSHEET_TITLE))
313 {
315 }
316 else if (aName == SdResId(STR_PSEUDOSHEET_SUBTITLE))
317 {
319 }
320 else if (aName ==
321 SdResId(STR_PSEUDOSHEET_BACKGROUND))
322 {
323 bBackground = true;
325 }
326 else if (aName ==
327 SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS))
328 {
330 }
331 else if (aName ==
332 SdResId(STR_PSEUDOSHEET_NOTES))
333 {
335 }
336 else if(aName.indexOf(SdResId(STR_PSEUDOSHEET_OUTLINE)) != -1)
337 {
338 OUString aOutlineStr(SdResId(STR_PSEUDOSHEET_OUTLINE));
339 // determine number, mind the blank between name and number
340 std::u16string_view aNumStr(aName.subView(aOutlineStr.getLength() + 1));
341 sal_uInt16 nLevel = static_cast<sal_uInt16>(o3tl::toInt32(aNumStr));
342 switch (nLevel)
343 {
344 case 1: ePO = PresentationObjects::Outline_1; break;
345 case 2: ePO = PresentationObjects::Outline_2; break;
346 case 3: ePO = PresentationObjects::Outline_3; break;
347 case 4: ePO = PresentationObjects::Outline_4; break;
348 case 5: ePO = PresentationObjects::Outline_5; break;
349 case 6: ePO = PresentationObjects::Outline_6; break;
350 case 7: ePO = PresentationObjects::Outline_7; break;
351 case 8: ePO = PresentationObjects::Outline_8; break;
352 case 9: ePO = PresentationObjects::Outline_9; break;
353 }
354 }
355 else
356 {
357 OSL_FAIL("StyleSheet from older version with different language");
358 bOldDocInOtherLanguage = true;
359 }
360
361 if( !bOldDocInOtherLanguage )
362 {
363 pPresDlg.disposeAndReset(pFact ? pFact->CreateSdPresLayoutTemplateDlg(mpDocSh, mpViewShell->GetFrameWeld(), bBackground, *pStyleSheet, ePO, pSSPool ) : nullptr);
364 }
365 }
366
367 sal_uInt16 nResult = RET_CANCEL;
368 const SfxItemSet* pOutSet = nullptr;
369 if (pStdDlg)
370 {
371 nResult = pStdDlg->Execute();
372 pOutSet = pStdDlg->GetOutputItemSet();
373 }
374 else if( pPresDlg )
375 {
376 nResult = pPresDlg->Execute();
377 pOutSet = pPresDlg->GetOutputItemSet();
378 }
379
380 switch( nResult )
381 {
382 case RET_OK:
383 {
384 nRetMask = static_cast<sal_uInt16>(pStyleSheet->GetMask());
385
386 if (eFamily == SfxStyleFamily::Pseudo)
387 {
388 SfxItemSet aTempSet(*pOutSet);
389 /* Extract SvxBrushItem out of set and insert SvxColorItem */
390 const SvxBrushItem* pBrushItem = aTempSet.GetItem<SvxBrushItem>( SID_ATTR_BRUSH_CHAR );
391
392 if ( pBrushItem )
393 {
394 SvxColorItem aBackColorItem(pBrushItem->GetColor(), EE_CHAR_BKGCOLOR);
395 aTempSet.ClearItem( EE_CHAR_BKGCOLOR );
396 aTempSet.Put( aBackColorItem );
397 }
398 static_cast<SdStyleSheet*>(pStyleSheet)->AdjustToFontHeight(aTempSet);
399
400 /* Special treatment: reset the INVALIDS to
401 NULL-Pointer (otherwise INVALIDs or pointer point
402 to DefaultItems in the template; both would
403 prevent the attribute inheritance) */
404 aTempSet.ClearInvalidItems();
405
406 // EE_PARA_NUMBULLET item is only valid in first outline template
408 {
409 if (aTempSet.GetItemState(EE_PARA_NUMBULLET) == SfxItemState::SET)
410 {
412
413 OUString sStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1");
414 SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( sStyleName, SfxStyleFamily::Pseudo);
415
416 if(pFirstStyleSheet)
417 {
418 pFirstStyleSheet->GetItemSet().Put( SvxNumBulletItem( aRule, EE_PARA_NUMBULLET ));
419 SdStyleSheet* pRealSheet = static_cast<SdStyleSheet*>(pFirstStyleSheet)->GetRealStyleSheet();
420 pRealSheet->Broadcast(SfxHint(SfxHintId::DataChanged));
421 }
422
423 aTempSet.ClearItem( EE_PARA_NUMBULLET );
424 }
425 }
426
427 pStyleSheet->GetItemSet().Put(aTempSet);
428 SdStyleSheet::BroadcastSdStyleSheetChange(pStyleSheet, ePO, pSSPool);
429 }
430
431 SfxItemSet& rAttr = pStyleSheet->GetItemSet();
432
434
435 // check for unique names of named items for xml
436 if( rAttr.GetItemState( XATTR_FILLBITMAP ) == SfxItemState::SET )
437 {
438 const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLBITMAP );
439 std::unique_ptr<SfxPoolItem> pNewItem = static_cast<const XFillBitmapItem*>(pOldItem)->checkForUniqueItem( mpDoc );
440 if( pNewItem )
441 {
442 rAttr.Put( std::move(pNewItem) );
443 }
444 }
445 if( rAttr.GetItemState( XATTR_LINEDASH ) == SfxItemState::SET )
446 {
447 const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINEDASH );
448 std::unique_ptr<SfxPoolItem> pNewItem = static_cast<const XLineDashItem*>(pOldItem)->checkForUniqueItem( mpDoc );
449 if( pNewItem )
450 {
451 rAttr.Put( std::move(pNewItem) );
452 }
453 }
454 if( rAttr.GetItemState( XATTR_LINESTART ) == SfxItemState::SET )
455 {
456 const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINESTART );
457 std::unique_ptr<SfxPoolItem> pNewItem = static_cast<const XLineStartItem*>(pOldItem)->checkForUniqueItem( mpDoc );
458 if( pNewItem )
459 {
460 rAttr.Put( std::move(pNewItem) );
461 }
462 }
463 if( rAttr.GetItemState( XATTR_LINEEND ) == SfxItemState::SET )
464 {
465 const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_LINEEND );
466 std::unique_ptr<SfxPoolItem> pNewItem = static_cast<const XLineEndItem*>(pOldItem)->checkForUniqueItem( mpDoc );
467 if( pNewItem )
468 {
469 rAttr.Put( std::move(pNewItem) );
470 }
471 }
472 if( rAttr.GetItemState( XATTR_FILLGRADIENT ) == SfxItemState::SET )
473 {
474 const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLGRADIENT );
475 std::unique_ptr<SfxPoolItem> pNewItem = static_cast<const XFillGradientItem*>(pOldItem)->checkForUniqueItem( mpDoc );
476 if( pNewItem )
477 {
478 rAttr.Put( std::move(pNewItem) );
479 }
480 }
481 if( rAttr.GetItemState( XATTR_FILLFLOATTRANSPARENCE ) == SfxItemState::SET )
482 {
483 const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLFLOATTRANSPARENCE );
484 std::unique_ptr<SfxPoolItem> pNewItem = static_cast<const XFillFloatTransparenceItem*>(pOldItem)->checkForUniqueItem( mpDoc );
485 if( pNewItem )
486 {
487 rAttr.Put( std::move(pNewItem) );
488 }
489 }
490 if( rAttr.GetItemState( XATTR_FILLHATCH ) == SfxItemState::SET )
491 {
492 const SfxPoolItem* pOldItem = rAttr.GetItem( XATTR_FILLHATCH );
493 std::unique_ptr<SfxPoolItem> pNewItem = static_cast<const XFillHatchItem*>(pOldItem)->checkForUniqueItem( mpDoc );
494 if( pNewItem )
495 {
496 rAttr.Put( std::move(pNewItem) );
497 }
498 }
499
500 static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SfxHintId::DataChanged ) );
501
502 DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >( mpViewShell );
503 if( pDrawViewShell )
504 {
505 PageKind ePageKind = pDrawViewShell->GetPageKind();
506 if( ePageKind == PageKind::Notes || ePageKind == PageKind::Handout )
507 {
508 SdPage* pPage = mpViewShell->GetActualPage();
509
510 if(pDrawViewShell->GetEditMode() == EditMode::MasterPage)
511 {
512 pPage = static_cast<SdPage*>((&(pPage->TRG_GetMasterPage())));
513 }
514
515 if( pPage )
516 {
517 SdrObjListIter aIter( pPage );
518 while( aIter.IsMore() )
519 {
520 SdrObject* pObj = aIter.Next();
521 if( dynamic_cast< const SdrPageObj *>( pObj ) != nullptr )
522 {
523 // repaint only
524 pObj->ActionChanged();
525 // pObj->SendRepaintBroadcast();
526 }
527 }
528 }
529 }
530 }
531
532 if( mpDoc->GetOnlineSpell() )
533 {
534 if( SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE, false ) ||
535 SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CJK, false ) ||
536 SfxItemState::SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CTL, false ) )
537 {
540 }
541 }
542
543 mpDoc->SetChanged();
544 }
545 break;
546
547 default:
548 {
549 if( nSId == SID_STYLE_NEW )
550 pSSPool->Remove( pStyleSheet );
551 }
552 return; // Cancel
553 }
554 }
555 }
556 break;
557
558 case SID_STYLE_NEW_BY_EXAMPLE:
559 {
560 if( pStyleSheet )
561 {
562 nRetMask = static_cast<sal_uInt16>(pStyleSheet->GetMask());
563 SfxItemSet aCoreSet( mpDoc->GetPool() );
564 mpView->GetAttributes( aCoreSet, true );
565
566 // if the object had a template, this becomes parent of the new template
567 SfxStyleSheet* pOldStyle = mpView->GetStyleSheet();
568
569 // if pOldStyle == pStyleSheet -> recursion
570 if( pOldStyle != pStyleSheet )
571 {
572 if (pOldStyle)
573 {
574 pStyleSheet->SetParent(pOldStyle->GetName());
575 }
576
577 SfxItemSet* pStyleSet = &pStyleSheet->GetItemSet();
578 pStyleSet->Put(aCoreSet);
579
580 /* apply template (but not when somebody is editing a text.
581 To do this, the edit engine had to be capable to use
582 templates on a character level. */
584 {
585 mpView->SetStyleSheet( static_cast<SfxStyleSheet*>(pStyleSheet));
586 }
587
588 static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SfxHintId::DataChanged ) );
589 mpDoc->SetChanged();
590
591 mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 );
592 }
593 }
594 }
595 break;
596
597 case SID_STYLE_UPDATE_BY_EXAMPLE:
598 {
600 dynamic_cast< const OutlineView *>( mpView ) != nullptr)
601 {
602 pStyleSheet = mpView->GetStyleSheet();
603
604 if( pStyleSheet )
605 {
606 nRetMask = static_cast<sal_uInt16>(pStyleSheet->GetMask());
607 SfxItemSet aCoreSet( mpDoc->GetPool() );
608 mpView->GetAttributes( aCoreSet );
609
610 SfxItemSet* pStyleSet = &pStyleSheet->GetItemSet();
611 pStyleSet->Put( aCoreSet );
612
613 mpView->SetStyleSheet( static_cast<SfxStyleSheet*>(pStyleSheet));
614
615 static_cast<SfxStyleSheet*>( pStyleSheet )->Broadcast( SfxHint( SfxHintId::DataChanged ) );
616 mpDoc->SetChanged();
617 mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 );
618 }
619 }
620 }
621 break;
622
623 }
624 if( nRetMask != static_cast<sal_uInt16>(SfxStyleSearchBits::All) )
625 rReq.SetReturnValue( SfxUInt16Item( nSId, nRetMask ) );
626}
627
629{
630}
631
633{
634}
635
636} // end of namespace sd
637
638/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const OUString & GetValue() const
void disposeAndReset(reference_type *pBody)
virtual VclPtr< SfxAbstractTabDialog > CreateSdTabTemplateDlg(weld::Window *pParent, const SfxObjectShell *pDocShell, SfxStyleSheetBase &rStyleBase, SdrModel *pModel, SdrView *pView)=0
virtual VclPtr< SfxAbstractTabDialog > CreateSdPresLayoutTemplateDlg(SfxObjectShell *pDocSh, weld::Window *pParent, bool bBackgroundDlg, SfxStyleSheetBase &rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool *pSSPool)=0
static SD_DLLPUBLIC SdAbstractDialogFactory * Create()
Definition: sdabstdlg.cxx:38
SAL_DLLPRIVATE void StopOnlineSpelling()
Definition: drawdoc4.cxx:717
SAL_DLLPRIVATE SfxItemPool & GetPool()
Definition: drawdoc.hxx:237
SAL_DLLPRIVATE bool GetOnlineSpell() const
Definition: drawdoc.hxx:431
SAL_DLLPRIVATE void StartOnlineSpelling(bool bForceSpelling=true)
Definition: drawdoc4.cxx:729
virtual SAL_DLLPRIVATE void SetChanged(bool bFlag=true) override
Definition: drawdoc.cxx:658
SAL_DLLPRIVATE::sd::DrawDocShell * GetDocSh() const
Definition: drawdoc.hxx:242
SAL_DLLPRIVATE DocumentType GetDocumentType() const
Definition: drawdoc.hxx:251
static void BroadcastSdStyleSheetChange(SfxStyleSheetBase const *pStyleSheet, PresentationObjects ePO, SfxStyleSheetBasePool *pSSPool)
Definition: stlsheet.cxx:1512
size_t GetMarkCount() const
const SdrMarkList & GetMarkedObjectList() const
bool AreObjectsMarked() const
SdrTextObj * GetTextEditObject() const
SdrObject * Next()
bool IsMore() const
void ActionChanged() const
SdrPage & TRG_GetMasterPage() const
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)
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
void ClearInvalidItems()
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void AppendItem(const SfxPoolItem &)
void SetReturnValue(const SfxPoolItem &)
virtual void Invalidate(sal_uInt16 nId=0)
virtual void Remove(SfxStyleSheetBase *)
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
SfxStyleSearchBits GetMask() const
const OUString & GetName() const
SfxStyleFamily GetFamily() const
virtual void SetHidden(bool bValue)
virtual sal_uLong GetHelpId(OUString &rFile)
virtual bool SetParent(const OUString &)
virtual SfxItemSet & GetItemSet()
SfxBindings & GetBindings()
SfxDispatcher * GetDispatcher()
const Color & GetColor() const
const SvxNumRule & GetNumRule() const
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
EditMode GetEditMode() const
PageKind GetPageKind() const
Base class for all functions.
Definition: fupoor.hxx:48
SdDrawDocument * mpDoc
Definition: fupoor.hxx:148
ViewShell * mpViewShell
Definition: fupoor.hxx:145
DrawDocShell * mpDocSh
Definition: fupoor.hxx:147
::sd::View * mpView
Definition: fupoor.hxx:144
virtual void Deactivate() override
deactivates the function
Definition: futempl.cxx:632
virtual void DoExecute(SfxRequest &rReq) override
Definition: futempl.cxx:94
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: futempl.cxx:87
FuTemplate(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: futempl.cxx:77
virtual void Activate() override
activates the function
Definition: futempl.cxx:628
Derivative of sd::View for the outline mode |* .
Definition: OutlineView.hxx:55
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
virtual SdPage * GetActualPage()=0
SD_DLLPUBLIC weld::Window * GetFrameWeld() const
Definition: viewshel.cxx:1582
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
Definition: viewshel.cxx:118
virtual bool SetStyleSheet(SfxStyleSheet *pStyleSheet, bool bDontRemoveHardAttr=false)
Definition: sdview.cxx:601
virtual void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
Definition: sdview.cxx:515
virtual SfxStyleSheet * GetStyleSheet() const
Definition: sdview4.cxx:634
An SdWindow contains the actual working area of ViewShell.
Definition: Window.hxx:45
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CTL(EE_CHAR_START+16)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CJK(EE_CHAR_START+15)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_BKGCOLOR(EE_CHAR_START+32)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
OUString aUIName
OUString aName
void * p
aStr
@ Exception
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
void CleanupFillProperties(SfxItemSet &rItemSet)
const char GetValue[]
PageKind
Definition: pres.hxx:45
PresentationObjects
Definition: prlayout.hxx:29
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83
#define SD_MOD()
Definition: sdmod.hxx:184
SfxStyleFamily
Reference< XModel > xModel
RET_OK
RET_CANCEL
constexpr TypedWhichId< XLineDashItem > XATTR_LINEDASH(XATTR_LINE_FIRST+1)
constexpr TypedWhichId< XLineEndItem > XATTR_LINEEND(XATTR_LINE_FIRST+5)
constexpr TypedWhichId< XLineStartItem > XATTR_LINESTART(XATTR_LINE_FIRST+4)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)