LibreOffice Module sd (master) 1
optsitem.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 <sal/config.h>
21
22#include <o3tl/any.hxx>
23#include <svx/svdmodel.hxx>
24#include <svx/svxids.hrc>
25#include <tools/debug.hxx>
26#include <tools/helpers.hxx>
29#include <osl/diagnose.h>
30
31#include <optsitem.hxx>
32#include <FrameView.hxx>
33#include <sdattr.hrc>
34
35using namespace ::utl;
36using namespace ::com::sun::star::uno;
37
38template< class T > static T getSafeValue( const Any& rAny )
39{
40 T value = T();
41 bool bOk = (rAny >>= value);
42
43 DBG_ASSERT( bOk, "SdOptionsItem, wrong type from configuration!" );
44
45 return value;
46}
47
48
49SdOptionsItem::SdOptionsItem( const SdOptionsGeneric& rParent, const OUString& rSubTree ) :
50 ConfigItem ( rSubTree ),
51 mrParent ( rParent )
52{
53}
54
56{
57}
58
60{
61 if( IsModified() )
62 mrParent.Commit( *this );
63};
64
65void SdOptionsItem::Notify( const css::uno::Sequence<OUString>& )
66{}
67
68Sequence< Any > SdOptionsItem::GetProperties( const Sequence< OUString >& rNames )
69{
70 return ConfigItem::GetProperties( rNames );
71}
72
73bool SdOptionsItem::PutProperties( const Sequence< OUString >& rNames, const Sequence< Any>& rValues )
74{
75 return ConfigItem::PutProperties( rNames, rValues );
76}
77
78SdOptionsGeneric::SdOptionsGeneric(bool bImpress, const OUString& rSubTree)
79 : maSubTree(rSubTree)
80 , mbImpress(bImpress)
81 , mbInit(rSubTree.isEmpty())
82 , mbEnableModify(false)
83{
84}
85
87{
88 operator=(rSource);
89}
90
92{
93 if (this != &rSource)
94 {
95 maSubTree = rSource.maSubTree;
96 mpCfgItem.reset(rSource.mpCfgItem ? new SdOptionsItem(*rSource.mpCfgItem) : nullptr );
97 mbImpress = rSource.mbImpress;
98 mbInit = rSource.mbInit;
100 }
101 return *this;
102}
103
105{
106 if( mbInit )
107 return;
108
109 SdOptionsGeneric* pThis = const_cast<SdOptionsGeneric*>(this);
110
111 if( !mpCfgItem )
112 pThis->mpCfgItem.reset( new SdOptionsItem( *this, maSubTree ) );
113 assert(mpCfgItem && "mpCfgItem is set by now");
114
115 const Sequence< OUString > aNames( GetPropertyNames() );
116 const Sequence< Any > aValues = mpCfgItem->GetProperties( aNames );
117
118 if( aNames.hasElements() && ( aValues.getLength() == aNames.getLength() ) )
119 {
120 const Any* pValues = aValues.getConstArray();
121
122 pThis->EnableModify( false );
123 pThis->mbInit = pThis->ReadData( pValues );
124 pThis->EnableModify( true );
125 }
126 else
127 pThis->mbInit = true;
128}
129
131{
132}
133
135{
136 const Sequence< OUString > aNames( GetPropertyNames() );
137 Sequence< Any > aValues( aNames.getLength() );
138
139 if( aNames.hasElements() )
140 {
141 if( WriteData( aValues.getArray() ) )
142 rCfgItem.PutProperties( aNames, aValues );
143 else
144 {
145 OSL_FAIL( "PutProperties failed" );
146 }
147 }
148}
149
150Sequence< OUString > SdOptionsGeneric::GetPropertyNames() const
151{
153 const char** ppPropNames;
154
155 GetPropNameArray( ppPropNames, nCount );
156
157 Sequence< OUString > aNames( nCount );
158 OUString* pNames = aNames.getArray();
159
160 for( sal_uLong i = 0; i < nCount; i++ )
161 pNames[ i ] = OUString::createFromAscii( ppPropNames[ i ] );
162
163 return aNames;
164}
165
167{
168 if( mpCfgItem )
169 mpCfgItem->Commit();
170}
171
173{
174 SvtSysLocale aSysLocale;
176
177 return ( eSys == MeasurementSystem::Metric );
178}
179
180/*************************************************************************
181|*
182|* SdOptionsLayout
183|*
184\************************************************************************/
185
186SdOptionsLayout::SdOptionsLayout(bool bImpress, bool bUseConfig) :
187 SdOptionsGeneric( bImpress, bUseConfig ?
188 ( bImpress ?
189 OUString( "Office.Impress/Layout" ) :
190 OUString( "Office.Draw/Layout" ) ) :
191 OUString() ),
192 bRuler( true ),
193 bMoveOutline( true ),
194 bDragStripes( false ),
195 bHandlesBezier( false ),
196 bHelplines( true ),
197 nMetric(static_cast<sal_uInt16>(isMetricSystem() ? FieldUnit::CM : FieldUnit::INCH)),
198 nDefTab( 1250 )
199{
200 EnableModify( true );
201}
202
204{
205 return( IsRulerVisible() == rOpt.IsRulerVisible() &&
206 IsMoveOutline() == rOpt.IsMoveOutline() &&
207 IsDragStripes() == rOpt.IsDragStripes() &&
208 IsHandlesBezier() == rOpt.IsHandlesBezier() &&
209 IsHelplines() == rOpt.IsHelplines() &&
210 GetMetric() == rOpt.GetMetric() &&
211 GetDefTab() == rOpt.GetDefTab() );
212}
213
214void SdOptionsLayout::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
215{
216 if( isMetricSystem() )
217 {
218 static const char* aPropNamesMetric[] =
219 {
220 "Display/Ruler",
221 "Display/Bezier",
222 "Display/Contour",
223 "Display/Guide",
224 "Display/Helpline",
225 "Other/MeasureUnit/Metric",
226 "Other/TabStop/Metric"
227 };
228 ppNames = aPropNamesMetric;
229 rCount = SAL_N_ELEMENTS(aPropNamesMetric);
230 }
231 else
232 {
233 static const char* aPropNamesNonMetric[] =
234 {
235 "Display/Ruler",
236 "Display/Bezier",
237 "Display/Contour",
238 "Display/Guide",
239 "Display/Helpline",
240 "Other/MeasureUnit/NonMetric",
241 "Other/TabStop/NonMetric"
242 };
243 ppNames = aPropNamesNonMetric;
244 rCount = SAL_N_ELEMENTS(aPropNamesNonMetric);
245 }
246}
247
248bool SdOptionsLayout::ReadData( const Any* pValues )
249{
250 if( pValues[0].hasValue() ) SetRulerVisible( *o3tl::doAccess<bool>(pValues[ 0 ]) );
251 if( pValues[1].hasValue() ) SetHandlesBezier( *o3tl::doAccess<bool>(pValues[ 1 ]) );
252 if( pValues[2].hasValue() ) SetMoveOutline( *o3tl::doAccess<bool>(pValues[ 2 ]) );
253 if( pValues[3].hasValue() ) SetDragStripes( *o3tl::doAccess<bool>(pValues[ 3 ]) );
254 if( pValues[4].hasValue() ) SetHelplines( *o3tl::doAccess<bool>(pValues[ 4 ]) );
255 if( pValues[5].hasValue() ) SetMetric( static_cast<sal_uInt16>(*o3tl::doAccess<sal_Int32>(pValues[ 5 ])) );
256 if( pValues[6].hasValue() ) SetDefTab( static_cast<sal_uInt16>(*o3tl::doAccess<sal_Int32>(pValues[ 6 ])) );
257
258 return true;
259}
260
261bool SdOptionsLayout::WriteData( Any* pValues ) const
262{
263 pValues[ 0 ] <<= IsRulerVisible();
264 pValues[ 1 ] <<= IsHandlesBezier();
265 pValues[ 2 ] <<= IsMoveOutline();
266 pValues[ 3 ] <<= IsDragStripes();
267 pValues[ 4 ] <<= IsHelplines();
268 pValues[ 5 ] <<= static_cast<sal_Int32>(GetMetric());
269 pValues[ 6 ] <<= static_cast<sal_Int32>(GetDefTab());
270
271 return true;
272}
273
274/*************************************************************************
275|*
276|* SdOptionsLayoutItem
277|*
278\************************************************************************/
279
281: SfxPoolItem ( ATTR_OPTIONS_LAYOUT )
282, maOptionsLayout ( false, false )
283{
284}
285
287: SfxPoolItem ( ATTR_OPTIONS_LAYOUT )
288, maOptionsLayout ( false, false )
289{
290 if( pOpts )
291 {
294 }
295
296 if( pView )
297 {
303 }
304 else if( pOpts )
305 {
311 }
312}
313
315{
316 return new SdOptionsLayoutItem( *this );
317}
318
320{
321 assert(SfxPoolItem::operator==(rAttr));
322 return maOptionsLayout == static_cast<const SdOptionsLayoutItem&>(rAttr).maOptionsLayout;
323}
324
326{
327 if( pOpts )
328 {
336 }
337}
338
339/*************************************************************************
340|*
341|* SdOptionsContents
342|*
343\************************************************************************/
344
346 SdOptionsGeneric( bImpress, bImpress ?
347 OUString( "Office.Impress/Content" ) :
348 OUString( "Office.Draw/Content" ) )
349{
350 EnableModify( true );
351}
352
354{
355 return true;
356}
357
358void SdOptionsContents::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
359{
360 static const char* aPropNames[] =
361 {
362 "Display/PicturePlaceholder",
363 "Display/ContourMode",
364 "Display/LineContour",
365 "Display/TextPlaceholder"
366 };
367
368 rCount = SAL_N_ELEMENTS(aPropNames);
369 ppNames = aPropNames;
370}
371
373{
374 return true;
375}
376
377bool SdOptionsContents::WriteData( Any* pValues ) const
378{
379 //#i80528# no draft anymore
380 pValues[ 0 ] <<= false;
381 pValues[ 1 ] <<= false;
382 pValues[ 2 ] <<= false;
383 pValues[ 3 ] <<= false;
384
385 return true;
386}
387/*************************************************************************
388|*
389|* SdOptionsMisc
390|*
391\************************************************************************/
392
393SdOptionsMisc::SdOptionsMisc( bool bImpress, bool bUseConfig ) :
394 SdOptionsGeneric( bImpress, bUseConfig ?
395 ( bImpress ?
396 OUString( "Office.Impress/Misc" ) :
397 OUString( "Office.Draw/Misc" ) ) :
398 OUString() ),
399 nDefaultObjectSizeWidth(8000),
400 nDefaultObjectSizeHeight(5000),
401 bStartWithTemplate( false ),
402 bMarkedHitMovesAlways( true ),
403 bMoveOnlyDragging( false ),
404 bCrookNoContortion( false ),
405 bQuickEdit( IsImpress() ),
406 bMasterPageCache( true ),
407 bDragWithCopy( false ),
408 bPickThrough( true ),
409 bDoubleClickTextEdit( true ),
410 bClickChangeRotation( false ),
411 bEnableSdremote( false ),
412 bEnablePresenterScreen( true ),
413 bPresenterScreenFullScreen( true ),
414 bSolidDragging( true ),
415 bSummationOfParagraphs( false ),
416 bTabBarVisible( true ),
417 bShowUndoDeleteWarning( true ),
418 bSlideshowRespectZOrder( true ),
419 bShowComments( true ),
420 bPreviewNewEffects( true ),
421 bPreviewChangedEffects( false ),
422 bPreviewTransitions( true ),
423 mnDisplay( 0 ),
424 mnPenColor( 0xff0000 ),
425 mnPenWidth( 150.0 ),
426
427 // The default for 6.1-and-above documents is to use printer-independent
428 // formatting.
429 mnPrinterIndependentLayout (1),
430 mnDragThresholdPixels(6)
431{
432 EnableModify( true );
433}
434
436{
437 return( IsStartWithTemplate() == rOpt.IsStartWithTemplate() &&
441 IsQuickEdit() == rOpt.IsQuickEdit() &&
443 IsDragWithCopy() == rOpt.IsDragWithCopy() &&
444 IsPickThrough() == rOpt.IsPickThrough() &&
451 IsTabBarVisible() == rOpt.IsTabBarVisible() &&
452 IsSolidDragging() == rOpt.IsSolidDragging() &&
458
462 GetDisplay() == rOpt.GetDisplay() &&
463 IsShowComments() == rOpt.IsShowComments() &&
467 );
468}
469
470void SdOptionsMisc::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
471{
472 static const char* aPropNames[] =
473 {
474 "ObjectMoveable",
475 "NoDistort",
476 "TextObject/QuickEditing",
477 "BackgroundCache",
478 "CopyWhileMoving",
479 "TextObject/Selectable",
480 "DclickTextedit",
481 "RotateClick",
482 "Preview",
483 "ModifyWithAttributes",
484 "DefaultObjectSize/Width",
485 "DefaultObjectSize/Height",
486
487 "Compatibility/PrinterIndependentLayout",
488
489 "ShowComments",
490 "DragThresholdPixels",
491
492 // just for impress
493 "NewDoc/AutoPilot",
494 "Compatibility/AddBetween",
495 "ShowUndoDeleteWarning",
496 "SlideshowRespectZOrder",
497
498 "PreviewNewEffects",
499 "PreviewChangedEffects",
500 "PreviewTransitions",
501
502 "Display",
503
504 "PenColor",
505 "PenWidth",
506 "Start/EnableSdremote",
507 "Start/EnablePresenterScreen",
508 "Start/PresenterScreenFullScreen",
509 "TabBarVisible"
510 };
511
512 rCount = ( IsImpress() ? SAL_N_ELEMENTS(aPropNames) : 15 );
513 ppNames = aPropNames;
514}
515
516bool SdOptionsMisc::ReadData( const Any* pValues )
517{
518 if( pValues[0].hasValue() ) SetMarkedHitMovesAlways( *o3tl::doAccess<bool>(pValues[ 0 ]) );
519 if( pValues[1].hasValue() ) SetCrookNoContortion( *o3tl::doAccess<bool>(pValues[ 1 ]) );
520 if( pValues[2].hasValue() ) SetQuickEdit( *o3tl::doAccess<bool>(pValues[ 2 ]) );
521 if( pValues[3].hasValue() ) SetMasterPagePaintCaching( *o3tl::doAccess<bool>(pValues[ 3 ]) );
522 if( pValues[4].hasValue() ) SetDragWithCopy( *o3tl::doAccess<bool>(pValues[ 4 ]) );
523 if( pValues[5].hasValue() ) SetPickThrough( *o3tl::doAccess<bool>(pValues[ 5 ]) );
524 if( pValues[6].hasValue() ) SetDoubleClickTextEdit( *o3tl::doAccess<bool>(pValues[ 6 ]) );
525 if( pValues[7].hasValue() ) SetClickChangeRotation( *o3tl::doAccess<bool>(pValues[ 7 ]) );
526 if( pValues[9].hasValue() ) SetSolidDragging( *o3tl::doAccess<bool>(pValues[ 9 ]) );
527 if( pValues[10].hasValue() ) SetDefaultObjectSizeWidth( *o3tl::doAccess<sal_Int32>(pValues[ 10 ]) );
528 if( pValues[11].hasValue() ) SetDefaultObjectSizeHeight( *o3tl::doAccess<sal_Int32>(pValues[ 11 ]) );
529 if( pValues[12].hasValue() ) SetPrinterIndependentLayout( *o3tl::doAccess<sal_uInt16>(pValues[ 12 ]) );
530
531 if( pValues[13].hasValue() )
532 SetShowComments( *o3tl::doAccess<bool>(pValues[ 13 ]) );
533 if (pValues[14].hasValue())
534 SetDragThreshold(*o3tl::doAccess<sal_Int32>(pValues[ 14 ]));
535
536 // just for Impress
537 if (IsImpress())
538 {
539 if( pValues[15].hasValue() )
540 SetStartWithTemplate( *o3tl::doAccess<bool>(pValues[ 15 ]) );
541 if( pValues[16].hasValue() )
542 SetSummationOfParagraphs( *o3tl::doAccess<bool>(pValues[ 16 ]) );
543 if( pValues[17].hasValue() )
544 SetShowUndoDeleteWarning( *o3tl::doAccess<bool>(pValues[ 17 ]) );
545
546 if( pValues[18].hasValue() )
547 SetSlideshowRespectZOrder(*o3tl::doAccess<bool>(pValues[ 18 ]));
548
549 if( pValues[19].hasValue() )
550 SetPreviewNewEffects(*o3tl::doAccess<bool>(pValues[ 19 ]));
551
552 if( pValues[20].hasValue() )
553 SetPreviewChangedEffects(*o3tl::doAccess<bool>(pValues[ 20 ]));
554
555 if( pValues[21].hasValue() )
556 SetPreviewTransitions(*o3tl::doAccess<bool>(pValues[ 21 ]));
557
558 if( pValues[22].hasValue() )
559 SetDisplay(*o3tl::doAccess<sal_Int32>(pValues[ 22 ]));
560
561 if( pValues[23].hasValue() )
562 SetPresentationPenColor( getSafeValue< sal_Int32 >( pValues[ 23 ] ) );
563
564 if( pValues[24].hasValue() )
565 SetPresentationPenWidth( getSafeValue< double >( pValues[ 24 ] ) );
566
567 if( pValues[25].hasValue() )
568 SetEnableSdremote( *o3tl::doAccess<bool>(pValues[ 25 ]) );
569
570 if( pValues[26].hasValue() )
571 SetEnablePresenterScreen( *o3tl::doAccess<bool>(pValues[ 26 ]) );
572
573 if (pValues[27].hasValue() )
574 SetPresenterScreenFullScreen( *o3tl::doAccess<bool>(pValues[ 27 ]) );
575
576 if( pValues[28].hasValue() ) {
577 SetTabBarVisible( *o3tl::doAccess<bool>(pValues[ 28 ]) );
578 }
579 }
580
581 return true;
582}
583
584bool SdOptionsMisc::WriteData( Any* pValues ) const
585{
587 pValues[ 1 ] <<= IsCrookNoContortion();
588 pValues[ 2 ] <<= IsQuickEdit();
590 pValues[ 4 ] <<= IsDragWithCopy();
591 pValues[ 5 ] <<= IsPickThrough();
594 // The preview is not supported anymore. Use a dummy value.
595 pValues[ 8 ] <<= double(0);// GetPreviewQuality();
596 pValues[ 9 ] <<= IsSolidDragging();
600 pValues[ 13 ] <<= IsShowComments();
602
603 // just for Impress
604 if (IsImpress())
605 {
606 pValues[ 15 ] <<= IsStartWithTemplate();
610
611 pValues[ 19 ] <<= IsPreviewNewEffects();
613 pValues[ 21 ] <<= IsPreviewTransitions();
614
615 pValues[ 22 ] <<= GetDisplay();
616
619 pValues[ 25 ] <<= IsEnableSdremote();
622 pValues[ 28 ] <<= IsTabBarVisible();
623
624 }
625
626 return true;
627}
628
629/*************************************************************************
630|*
631|* SdOptionsMiscItem
632|*
633\************************************************************************/
634
636: SfxPoolItem ( ATTR_OPTIONS_MISC )
637, maOptionsMisc ( false, false )
638{
639}
640
642: SfxPoolItem ( ATTR_OPTIONS_MISC )
643, maOptionsMisc ( false, false )
644{
645 if( pOpts )
646 {
657
661
664
667 }
668
669 if( pView )
670 {
675
676 // #i26631#
678
685 }
686 else if( pOpts )
687 {
699 }
700}
701
703{
704 return new SdOptionsMiscItem( *this );
705}
706
708{
709 assert(SfxPoolItem::operator==(rAttr));
710 return maOptionsMisc == static_cast<const SdOptionsMiscItem&>(rAttr).maOptionsMisc;
711}
712
714{
715 if( !pOpts )
716 return;
717
733
740
744
746
749
751}
752
753/*************************************************************************
754|*
755|* SdOptionsSnap
756|*
757\************************************************************************/
758
759SdOptionsSnap::SdOptionsSnap( bool bImpress, bool bUseConfig ) :
760 SdOptionsGeneric( bImpress, bUseConfig ?
761 ( bImpress ?
762 OUString( "Office.Impress/Snap" ) :
763 OUString( "Office.Draw/Snap" ) ) :
764 OUString() ),
765 bSnapHelplines( true ),
766 bSnapBorder( true ),
767 bSnapFrame( false ),
768 bSnapPoints( false ),
769 bOrtho( false ),
770 bBigOrtho( true ),
771 bRotate( false ),
772 nSnapArea( 5 ),
773 nAngle( 1500 ),
774 nBezAngle( 1500 )
775
776{
777 EnableModify( true );
778}
779
781{
782 return( IsSnapHelplines() == rOpt.IsSnapHelplines() &&
783 IsSnapBorder() == rOpt.IsSnapBorder() &&
784 IsSnapFrame() == rOpt.IsSnapFrame() &&
785 IsSnapPoints() == rOpt.IsSnapPoints() &&
786 IsOrtho() == rOpt.IsOrtho() &&
787 IsBigOrtho() == rOpt.IsBigOrtho() &&
788 IsRotate() == rOpt.IsRotate() &&
789 GetSnapArea() == rOpt.GetSnapArea() &&
790 GetAngle() == rOpt.GetAngle() &&
792}
793
794void SdOptionsSnap::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
795{
796 static const char* aPropNames[] =
797 {
798 "Object/SnapLine",
799 "Object/PageMargin",
800 "Object/ObjectFrame",
801 "Object/ObjectPoint",
802 "Position/CreatingMoving",
803 "Position/ExtendEdges",
804 "Position/Rotating",
805 "Object/Range",
806 "Position/RotatingValue",
807 "Position/PointReduction"
808 };
809
810 rCount = SAL_N_ELEMENTS(aPropNames);
811 ppNames = aPropNames;
812}
813
814bool SdOptionsSnap::ReadData( const Any* pValues )
815{
816 if( pValues[0].hasValue() ) SetSnapHelplines( *o3tl::doAccess<bool>(pValues[ 0 ]) );
817 if( pValues[1].hasValue() ) SetSnapBorder( *o3tl::doAccess<bool>(pValues[ 1 ]) );
818 if( pValues[2].hasValue() ) SetSnapFrame( *o3tl::doAccess<bool>(pValues[ 2 ]) );
819 if( pValues[3].hasValue() ) SetSnapPoints( *o3tl::doAccess<bool>(pValues[ 3 ]) );
820 if( pValues[4].hasValue() ) SetOrtho( *o3tl::doAccess<bool>(pValues[ 4 ]) );
821 if( pValues[5].hasValue() ) SetBigOrtho( *o3tl::doAccess<bool>(pValues[ 5 ]) );
822 if( pValues[6].hasValue() ) SetRotate( *o3tl::doAccess<bool>(pValues[ 6 ]) );
823 if( pValues[7].hasValue() ) SetSnapArea( static_cast<sal_Int16>(*o3tl::doAccess<sal_Int32>(pValues[ 7 ])) );
824 if( pValues[8].hasValue() ) SetAngle( Degree100(*o3tl::doAccess<sal_Int32>(pValues[ 8 ])) );
825 if( pValues[9].hasValue() ) SetEliminatePolyPointLimitAngle( Degree100(*o3tl::doAccess<sal_Int32>(pValues[ 9 ])) );
826
827 return true;
828}
829
830bool SdOptionsSnap::WriteData( Any* pValues ) const
831{
832 pValues[ 0 ] <<= IsSnapHelplines();
833 pValues[ 1 ] <<= IsSnapBorder();
834 pValues[ 2 ] <<= IsSnapFrame();
835 pValues[ 3 ] <<= IsSnapPoints();
836 pValues[ 4 ] <<= IsOrtho();
837 pValues[ 5 ] <<= IsBigOrtho();
838 pValues[ 6 ] <<= IsRotate();
839 pValues[ 7 ] <<= static_cast<sal_Int32>(GetSnapArea());
840 pValues[ 8 ] <<= static_cast<sal_Int32>(GetAngle().get());
841 pValues[ 9 ] <<= static_cast<sal_Int32>(GetEliminatePolyPointLimitAngle().get());
842
843 return true;
844}
845
846/*************************************************************************
847|*
848|* SdOptionsSnapItem
849|*
850\************************************************************************/
851
853: SfxPoolItem ( ATTR_OPTIONS_SNAP )
854, maOptionsSnap ( false, false )
855{
856}
857
859: SfxPoolItem ( ATTR_OPTIONS_SNAP )
860, maOptionsSnap ( false, false )
861{
862 if( pView )
863 {
868 maOptionsSnap.SetOrtho( pView->IsOrtho() );
874 }
875 else if( pOpts )
876 {
881 maOptionsSnap.SetOrtho( pOpts->IsOrtho() );
883 maOptionsSnap.SetRotate( pOpts->IsRotate() );
885 maOptionsSnap.SetAngle( pOpts->GetAngle() );
887 }
888}
889
891{
892 return new SdOptionsSnapItem( *this );
893}
894
896{
897 assert(SfxPoolItem::operator==(rAttr));
898 return maOptionsSnap == static_cast<const SdOptionsSnapItem&>(rAttr).maOptionsSnap;
899}
900
902{
903 if( !pOpts )
904 return;
905
910 pOpts->SetOrtho( maOptionsSnap.IsOrtho() );
912 pOpts->SetRotate( maOptionsSnap.IsRotate() );
914 pOpts->SetAngle( maOptionsSnap.GetAngle() );
916}
917
918/*************************************************************************
919|*
920|* SdOptionsZoom
921|*
922\************************************************************************/
923
925 SdOptionsGeneric( bImpress, bImpress ?
926 OUString() :
927 OUString("Office.Draw/Zoom") ),
928 nX( 1 ),
929 nY( 1 )
930
931{
932 EnableModify( true );
933}
934
935void SdOptionsZoom::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
936{
937 static const char* aPropNames[] =
938 {
939 "ScaleX",
940 "ScaleY"
941 };
942
943 rCount = !IsImpress() ? SAL_N_ELEMENTS(aPropNames) : 0;
944 ppNames = aPropNames;
945}
946
947bool SdOptionsZoom::ReadData( const Any* pValues )
948{
949 sal_Int32 x = 1, y = 1;
950
951 if( pValues[0].hasValue() ) x = *o3tl::doAccess<sal_Int32>(pValues[ 0 ]);
952 if( pValues[1].hasValue() ) y = *o3tl::doAccess<sal_Int32>(pValues[ 1 ]);
953
954 SetScale( x, y );
955
956 return true;
957}
958
959bool SdOptionsZoom::WriteData( Any* pValues ) const
960{
961 sal_Int32 x, y;
962
963 GetScale( x, y );
964
965 pValues[ 0 ] <<= x;
966 pValues[ 1 ] <<= y;
967
968 return true;
969}
970
971/*************************************************************************
972|*
973|* SdOptionsGrid
974|*
975\************************************************************************/
976
978 SdOptionsGeneric( bImpress,
979 bImpress ?
980 OUString( "Office.Impress/Grid" ) :
981 OUString( "Office.Draw/Grid" )
982 )
983{
984 EnableModify( false );
985 SetDefaults();
986 EnableModify( true );
987}
988
990{
991}
992
994{
995 const sal_uInt32 nVal = 1000;
996
997 SetFieldDivisionX( nVal );
998 SetFieldDivisionY( nVal );
999 SetFieldDrawX( nVal );
1000 SetFieldDrawY( nVal );
1001 SetFieldSnapX( nVal );
1002 SetFieldSnapY( nVal );
1003 SetUseGridSnap( false );
1004 SetSynchronize( true );
1005 SetGridVisible( false );
1006 SetEqualGrid( true );
1007}
1008
1009void SdOptionsGrid::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
1010{
1011 if( isMetricSystem() )
1012 {
1013 static const char* aPropNamesMetric[] =
1014 {
1015 "Resolution/XAxis/Metric",
1016 "Resolution/YAxis/Metric",
1017 "Subdivision/XAxis",
1018 "Subdivision/YAxis",
1019 "SnapGrid/XAxis/Metric",
1020 "SnapGrid/YAxis/Metric",
1021 "Option/SnapToGrid",
1022 "Option/Synchronize",
1023 "Option/VisibleGrid",
1024 "SnapGrid/Size"
1025 };
1026 ppNames = aPropNamesMetric;
1027 rCount = SAL_N_ELEMENTS(aPropNamesMetric);
1028 }
1029 else
1030 {
1031 static const char* aPropNamesNonMetric[] =
1032 {
1033 "Resolution/XAxis/NonMetric",
1034 "Resolution/YAxis/NonMetric",
1035 "Subdivision/XAxis",
1036 "Subdivision/YAxis",
1037 "SnapGrid/XAxis/NonMetric",
1038 "SnapGrid/YAxis/NonMetric",
1039 "Option/SnapToGrid",
1040 "Option/Synchronize",
1041 "Option/VisibleGrid",
1042 "SnapGrid/Size"
1043 };
1044 ppNames = aPropNamesNonMetric;
1045 rCount = SAL_N_ELEMENTS(aPropNamesNonMetric);
1046 }
1047}
1048
1049bool SdOptionsGrid::ReadData( const Any* pValues )
1050{
1051 if( pValues[0].hasValue() ) SetFieldDrawX( *o3tl::doAccess<sal_Int32>(pValues[ 0 ]) );
1052 if( pValues[1].hasValue() ) SetFieldDrawY( *o3tl::doAccess<sal_Int32>(pValues[ 1 ]) );
1053
1054 if( pValues[2].hasValue() )
1055 {
1056 const sal_uInt32 nDivX = FRound( *o3tl::doAccess<double>(pValues[ 2 ]) );
1058 }
1059
1060 if( pValues[3].hasValue() )
1061 {
1062 const sal_uInt32 nDivY = FRound( *o3tl::doAccess<double>(pValues[ 3 ]) );
1064 }
1065
1066 if( pValues[4].hasValue() ) SetFieldSnapX( *o3tl::doAccess<sal_Int32>(pValues[ 4 ]) );
1067 if( pValues[5].hasValue() ) SetFieldSnapY( *o3tl::doAccess<sal_Int32>(pValues[ 5 ]) );
1068 if( pValues[6].hasValue() ) SetUseGridSnap( *o3tl::doAccess<bool>(pValues[ 6 ]) );
1069 if( pValues[7].hasValue() ) SetSynchronize( *o3tl::doAccess<bool>(pValues[ 7 ]) );
1070 if( pValues[8].hasValue() ) SetGridVisible( *o3tl::doAccess<bool>(pValues[ 8 ]) );
1071 if( pValues[9].hasValue() ) SetEqualGrid( *o3tl::doAccess<bool>(pValues[ 9 ]) );
1072
1073 return true;
1074}
1075
1076bool SdOptionsGrid::WriteData( Any* pValues ) const
1077{
1078 pValues[ 0 ] <<= static_cast<sal_Int32>(GetFieldDrawX());
1079 pValues[ 1 ] <<= static_cast<sal_Int32>(GetFieldDrawY());
1080 pValues[ 2 ] <<= ( GetFieldDivisionX() ? ( static_cast<double>(GetFieldDrawX()) / GetFieldDivisionX() - 1.0 ) : double(0) );
1081 pValues[ 3 ] <<= ( GetFieldDivisionY() ? ( static_cast<double>(GetFieldDrawY()) / GetFieldDivisionY() - 1.0 ) : double(0) );
1082 pValues[ 4 ] <<= static_cast<sal_Int32>(GetFieldSnapX());
1083 pValues[ 5 ] <<= static_cast<sal_Int32>(GetFieldSnapY());
1084 pValues[ 6 ] <<= IsUseGridSnap();
1085 pValues[ 7 ] <<= IsSynchronize();
1086 pValues[ 8 ] <<= IsGridVisible();
1087 pValues[ 9 ] <<= IsEqualGrid();
1088
1089 return true;
1090}
1091
1092/*************************************************************************
1093|*
1094|* SdOptionsGridItem
1095|*
1096\************************************************************************/
1097
1099 SvxGridItem( SID_ATTR_GRID_OPTIONS )
1100{
1101 SetSynchronize( pOpts->IsSynchronize() );
1102 SetEqualGrid( pOpts->IsEqualGrid() );
1103
1104 SetFieldDrawX( pOpts->GetFieldDrawX() );
1105 SetFieldDrawY( pOpts->GetFieldDrawY() );
1106 SetFieldDivisionX( pOpts->GetFieldDivisionX() ? ( pOpts->GetFieldDrawX() / pOpts->GetFieldDivisionX() - 1 ) : 0 );
1107 SetFieldDivisionY( pOpts->GetFieldDivisionY() ? ( pOpts->GetFieldDrawY() / pOpts->GetFieldDivisionY() - 1 ) : 0 );
1108 SetFieldSnapX( pOpts->GetFieldSnapX() );
1109 SetFieldSnapY( pOpts->GetFieldSnapY() );
1110 SetUseGridSnap( pOpts->IsUseGridSnap() );
1111 SetGridVisible( pOpts->IsGridVisible() );
1112}
1113
1115{
1116 pOpts->SetFieldDrawX( GetFieldDrawX() );
1117 pOpts->SetFieldDivisionX( GetFieldDrawX() / ( GetFieldDivisionX() + 1 ) );
1118 pOpts->SetFieldDrawY( GetFieldDrawY() );
1119 pOpts->SetFieldDivisionY( GetFieldDrawY() / ( GetFieldDivisionY() + 1 ) );
1120 pOpts->SetFieldSnapX( GetFieldSnapX() );
1121 pOpts->SetFieldSnapY( GetFieldSnapY() );
1122 pOpts->SetUseGridSnap( GetUseGridSnap() );
1123 pOpts->SetSynchronize( GetSynchronize() );
1124 pOpts->SetGridVisible( GetGridVisible() );
1125 pOpts->SetEqualGrid( GetEqualGrid() );
1126}
1127
1128/*************************************************************************
1129|*
1130|* SdOptionsPrint
1131|*
1132\************************************************************************/
1133
1134SdOptionsPrint::SdOptionsPrint( bool bImpress, bool bUseConfig ) :
1135 SdOptionsGeneric( bImpress, bUseConfig ?
1136 ( bImpress ?
1137 OUString( "Office.Impress/Print" ) :
1138 OUString( "Office.Draw/Print" ) ) :
1139 OUString() ),
1140 bDraw( true ),
1141 bNotes( false ),
1142 bHandout( false ),
1143 bOutline( false ),
1144 bDate( false ),
1145 bTime( false ),
1146 bPagename( false ),
1147 bHiddenPages( true ),
1148 bPagesize( false ),
1149 bPagetile( false ),
1150 bWarningPrinter( true ),
1151 bWarningSize( false ),
1152 bWarningOrientation( false ),
1153 bBooklet( false ),
1154 bFront( true ),
1155 bBack( true ),
1156 bCutPage( false ),
1157 bPaperbin( false ),
1158 mbHandoutHorizontal( true ),
1159 mnHandoutPages( 6 ),
1160 nQuality( 0 )
1161{
1162 EnableModify( true );
1163}
1164
1166{
1167 return( IsDraw() == rOpt.IsDraw() &&
1168 IsNotes() == rOpt.IsNotes() &&
1169 IsHandout() == rOpt.IsHandout() &&
1170 IsOutline() == rOpt.IsOutline() &&
1171 IsDate() == rOpt.IsDate() &&
1172 IsTime() == rOpt.IsTime() &&
1173 IsPagename() == rOpt.IsPagename() &&
1174 IsHiddenPages() == rOpt.IsHiddenPages() &&
1175 IsPagesize() == rOpt.IsPagesize() &&
1176 IsPagetile() == rOpt.IsPagetile() &&
1177 IsWarningPrinter() == rOpt.IsWarningPrinter() &&
1178 IsWarningSize() == rOpt.IsWarningSize() &&
1180 IsBooklet() == rOpt.IsBooklet() &&
1181 IsFrontPage() == rOpt.IsFrontPage() &&
1182 IsBackPage() == rOpt.IsBackPage() &&
1183 IsCutPage() == rOpt.IsCutPage() &&
1184 IsPaperbin() == rOpt.IsPaperbin() &&
1185 GetOutputQuality() == rOpt.GetOutputQuality() &&
1187 GetHandoutPages() == rOpt.GetHandoutPages() );
1188}
1189
1190void SdOptionsPrint::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
1191{
1192 if (IsImpress())
1193 {
1194 static const char* aImpressPropNames[] =
1195 {
1196 "Other/Date",
1197 "Other/Time",
1198 "Other/PageName",
1199 "Other/HiddenPage",
1200 "Page/PageSize",
1201 "Page/PageTile",
1202 // bWarningPrinter
1203 // bWarningSize
1204 // bWarningOrientation
1205 "Page/Booklet",
1206 "Page/BookletFront",
1207 "Page/BookletBack",
1208 // bCutPage
1209 "Other/FromPrinterSetup",
1210 "Other/Quality",
1211 "Content/Presentation",
1212 "Content/Note",
1213 "Content/Handout",
1214 "Content/Outline",
1215 "Other/HandoutHorizontal",
1216 "Other/PagesPerHandout"
1217 };
1218 rCount = SAL_N_ELEMENTS(aImpressPropNames);
1219 ppNames = aImpressPropNames;
1220 }
1221 else
1222 {
1223 static const char* aDrawPropNames[] =
1224 {
1225 "Other/Date",
1226 "Other/Time",
1227 "Other/PageName",
1228 "Other/HiddenPage",
1229 "Page/PageSize",
1230 "Page/PageTile",
1231 // bWarningPrinter
1232 // bWarningSize
1233 // bWarningOrientation
1234 "Page/Booklet",
1235 "Page/BookletFront",
1236 "Page/BookletBack",
1237 // bCutPage
1238 "Other/FromPrinterSetup",
1239 "Other/Quality",
1240 "Content/Drawing",
1241 };
1242 rCount = SAL_N_ELEMENTS(aDrawPropNames);
1243 ppNames = aDrawPropNames;
1244 }
1245}
1246
1247bool SdOptionsPrint::ReadData( const Any* pValues )
1248{
1249 if( pValues[0].hasValue() ) SetDate( *o3tl::doAccess<bool>(pValues[ 0 ]) );
1250 if( pValues[1].hasValue() ) SetTime( *o3tl::doAccess<bool>(pValues[ 1 ]) );
1251 if( pValues[2].hasValue() ) SetPagename( *o3tl::doAccess<bool>(pValues[ 2 ]) );
1252 if( pValues[3].hasValue() ) SetHiddenPages( *o3tl::doAccess<bool>(pValues[ 3 ]) );
1253 if( pValues[4].hasValue() ) SetPagesize( *o3tl::doAccess<bool>(pValues[ 4 ]) );
1254 if( pValues[5].hasValue() ) SetPagetile( *o3tl::doAccess<bool>(pValues[ 5 ]) );
1255 if( pValues[6].hasValue() ) SetBooklet( *o3tl::doAccess<bool>(pValues[ 6 ]) );
1256 if( pValues[7].hasValue() ) SetFrontPage( *o3tl::doAccess<bool>(pValues[ 7 ]) );
1257 if( pValues[8].hasValue() ) SetBackPage( *o3tl::doAccess<bool>(pValues[ 8 ]) );
1258 if( pValues[9].hasValue() ) SetPaperbin( *o3tl::doAccess<bool>(pValues[ 9 ]) );
1259 if( pValues[10].hasValue() ) SetOutputQuality( static_cast<sal_uInt16>(*o3tl::doAccess<sal_Int32>(pValues[ 10 ])) );
1260 if( pValues[11].hasValue() ) SetDraw( *o3tl::doAccess<bool>(pValues[ 11 ]) );
1261
1262 // just for impress
1263 if (IsImpress())
1264 {
1265 if( pValues[12].hasValue() ) SetNotes( *o3tl::doAccess<bool>(pValues[ 12 ]) );
1266 if( pValues[13].hasValue() ) SetHandout( *o3tl::doAccess<bool>(pValues[ 13 ]) );
1267 if( pValues[14].hasValue() ) SetOutline( *o3tl::doAccess<bool>(pValues[ 14 ]) );
1268 if( pValues[15].hasValue() ) SetHandoutHorizontal( *o3tl::doAccess<bool>(pValues[15]) );
1269 if( pValues[16].hasValue() ) SetHandoutPages( static_cast<sal_uInt16>(*o3tl::doAccess<sal_Int32>(pValues[16])) );
1270 }
1271
1272 return true;
1273}
1274
1275bool SdOptionsPrint::WriteData( Any* pValues ) const
1276{
1277 pValues[ 0 ] <<= IsDate();
1278 pValues[ 1 ] <<= IsTime();
1279 pValues[ 2 ] <<= IsPagename();
1280 pValues[ 3 ] <<= IsHiddenPages();
1281 pValues[ 4 ] <<= IsPagesize();
1282 pValues[ 5 ] <<= IsPagetile();
1283 pValues[ 6 ] <<= IsBooklet();
1284 pValues[ 7 ] <<= IsFrontPage();
1285 pValues[ 8 ] <<= IsBackPage();
1286 pValues[ 9 ] <<= IsPaperbin();
1287 pValues[ 10 ] <<= static_cast<sal_Int32>(GetOutputQuality());
1288 pValues[ 11 ] <<= IsDraw();
1289
1290 // just for impress
1291 if (IsImpress())
1292 {
1293 pValues[ 12 ] <<= IsNotes();
1294 pValues[ 13 ] <<= IsHandout();
1295 pValues[ 14 ] <<= IsOutline();
1296 pValues[ 15 ] <<= IsHandoutHorizontal();
1297 pValues[ 16 ] <<= GetHandoutPages();
1298 }
1299
1300 return true;
1301}
1302
1303/*************************************************************************
1304|*
1305|* SdOptionsPrintItem
1306|*
1307\************************************************************************/
1308
1310: SfxPoolItem ( ATTR_OPTIONS_PRINT )
1311, maOptionsPrint ( false, false )
1312{
1313}
1314
1316: SfxPoolItem ( ATTR_OPTIONS_PRINT )
1317, maOptionsPrint ( false, false )
1318{
1319 if( !pOpts )
1320 return;
1321
1322 maOptionsPrint.SetDraw( pOpts->IsDraw() );
1323 maOptionsPrint.SetNotes( pOpts->IsNotes() );
1326 maOptionsPrint.SetDate( pOpts->IsDate() );
1327 maOptionsPrint.SetTime( pOpts->IsTime() );
1341}
1342
1344{
1345 return new SdOptionsPrintItem( *this );
1346}
1347
1349{
1350 assert(SfxPoolItem::operator==(rAttr));
1351 return maOptionsPrint == static_cast<const SdOptionsPrintItem&>(rAttr).maOptionsPrint;
1352}
1353
1355{
1356 if( !pOpts )
1357 return;
1358
1359 pOpts->SetDraw( maOptionsPrint.IsDraw() );
1360 pOpts->SetNotes( maOptionsPrint.IsNotes() );
1363 pOpts->SetDate( maOptionsPrint.IsDate() );
1364 pOpts->SetTime( maOptionsPrint.IsTime() );
1378}
1379
1380/*************************************************************************
1381|*
1382|* SdOptions
1383|*
1384\************************************************************************/
1385
1386SdOptions::SdOptions(bool bImpress) :
1387 SdOptionsLayout( bImpress, true ),
1388 SdOptionsContents( bImpress ),
1389 SdOptionsMisc( bImpress, true ),
1390 SdOptionsSnap( bImpress, true ),
1391 SdOptionsZoom( bImpress ),
1392 SdOptionsGrid( bImpress ),
1393 SdOptionsPrint( bImpress, true )
1394{
1395}
1396
1398{
1399}
1400
1402{
1410}
1411
1413{
1414 Init();
1415 return mnDragThresholdPixels;
1416}
1417
1418void SdOptionsMisc::SetDragThreshold(sal_Int32 nDragThresholdPixels)
1419{
1420 if (mnDragThresholdPixels != nDragThresholdPixels)
1421 {
1423 mnDragThresholdPixels = nDragThresholdPixels;
1424 }
1425}
1426
1428{
1429 Init();
1430 return mnDisplay;
1431}
1432
1433void SdOptionsMisc::SetDisplay( sal_Int32 nDisplay )
1434{
1435 if( mnDisplay != nDisplay )
1436 {
1438 mnDisplay = nDisplay;
1439 }
1440}
1441
1442/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const PropertyValue * pValues
BaseContainerNodeSharedPtr & mrParent
MeasurementSystem getMeasurementSystemEnum() const
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
Definition: optsitem.cxx:358
bool operator==(const SdOptionsContents &rOpt) const
Definition: optsitem.cxx:353
SdOptionsContents(bool bImpress)
Definition: optsitem.cxx:345
virtual bool WriteData(css::uno::Any *pValues) const override
Definition: optsitem.cxx:377
virtual bool ReadData(const css::uno::Any *pValues) override
Definition: optsitem.cxx:372
friend class SdOptionsItem
Definition: optsitem.hxx:66
bool IsImpress() const
Definition: optsitem.hxx:99
virtual bool WriteData(css::uno::Any *pValues) const =0
std::unique_ptr< SdOptionsItem > mpCfgItem
Definition: optsitem.hxx:72
SdOptionsGeneric(bool bImpress, const OUString &rSubTree)
Definition: optsitem.cxx:78
SAL_DLLPRIVATE css::uno::Sequence< OUString > GetPropertyNames() const
Definition: optsitem.cxx:150
static bool isMetricSystem()
Definition: optsitem.cxx:172
void Init() const
Definition: optsitem.cxx:104
virtual bool ReadData(const css::uno::Any *pValues)=0
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const =0
void OptionsChanged()
Definition: optsitem.hxx:83
SAL_DLLPRIVATE void Commit(SdOptionsItem &rCfgItem) const
Definition: optsitem.cxx:134
void EnableModify(bool bModify)
Definition: optsitem.hxx:101
SdOptionsGeneric & operator=(SdOptionsGeneric const &)
Definition: optsitem.cxx:91
OUString maSubTree
Definition: optsitem.hxx:70
virtual ~SdOptionsGeneric()
Definition: optsitem.cxx:130
void SetOptions(SdOptions *pOpts) const
Definition: optsitem.cxx:1114
SdOptionsGridItem(SdOptions const *pOpts)
Definition: optsitem.cxx:1098
sal_uInt32 GetFieldDrawX() const
Definition: optsitem.hxx:443
sal_uInt32 GetFieldDivisionX() const
Definition: optsitem.hxx:444
sal_uInt32 GetFieldSnapY() const
Definition: optsitem.hxx:448
void SetFieldDrawY(sal_uInt32 nSet)
Definition: optsitem.hxx:456
void SetFieldDrawX(sal_uInt32 nSet)
Definition: optsitem.hxx:454
virtual ~SdOptionsGrid() override
Definition: optsitem.cxx:989
void SetFieldSnapY(sal_uInt32 nSet)
Definition: optsitem.hxx:459
void SetDefaults()
Definition: optsitem.cxx:993
virtual bool ReadData(const css::uno::Any *pValues) override
Definition: optsitem.cxx:1049
sal_uInt32 GetFieldSnapX() const
Definition: optsitem.hxx:447
void SetFieldDivisionX(sal_uInt32 nSet)
Definition: optsitem.hxx:455
bool IsGridVisible() const
Definition: optsitem.hxx:451
bool IsUseGridSnap() const
Definition: optsitem.hxx:449
virtual bool WriteData(css::uno::Any *pValues) const override
Definition: optsitem.cxx:1076
sal_uInt32 GetFieldDivisionY() const
Definition: optsitem.hxx:446
void SetFieldDivisionY(sal_uInt32 nSet)
Definition: optsitem.hxx:457
void SetEqualGrid(bool bSet)
Definition: optsitem.hxx:463
SdOptionsGrid(bool bImpress)
Definition: optsitem.cxx:977
void SetUseGridSnap(bool bSet)
Definition: optsitem.hxx:460
sal_uInt32 GetFieldDrawY() const
Definition: optsitem.hxx:445
bool IsSynchronize() const
Definition: optsitem.hxx:450
void SetSynchronize(bool bSet)
Definition: optsitem.hxx:461
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
Definition: optsitem.cxx:1009
bool IsEqualGrid() const
Definition: optsitem.hxx:452
void SetGridVisible(bool bSet)
Definition: optsitem.hxx:462
void SetFieldSnapX(sal_uInt32 nSet)
Definition: optsitem.hxx:458
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: optsitem.cxx:65
css::uno::Sequence< css::uno::Any > GetProperties(const css::uno::Sequence< OUString > &rNames)
Definition: optsitem.cxx:68
const SdOptionsGeneric & mrParent
Definition: optsitem.hxx:42
virtual void ImplCommit() override
Definition: optsitem.cxx:59
bool PutProperties(const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues)
Definition: optsitem.cxx:73
virtual ~SdOptionsItem() override
Definition: optsitem.cxx:55
SdOptionsItem(const SdOptionsGeneric &rParent, const OUString &rSubTree)
Definition: optsitem.cxx:49
virtual SdOptionsLayoutItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: optsitem.cxx:314
SdOptionsLayout maOptionsLayout
Definition: optsitem.hxx:162
virtual bool operator==(const SfxPoolItem &) const override
Definition: optsitem.cxx:319
void SetOptions(SdOptions *pOpts) const
Definition: optsitem.cxx:325
void SetMetric(sal_uInt16 nInMetric)
Definition: optsitem.hxx:144
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
Definition: optsitem.cxx:214
virtual bool ReadData(const css::uno::Any *pValues) override
Definition: optsitem.cxx:248
bool IsMoveOutline() const
Definition: optsitem.hxx:132
bool IsRulerVisible() const
Definition: optsitem.hxx:131
void SetHandlesBezier(bool bOn)
Definition: optsitem.hxx:142
virtual bool WriteData(css::uno::Any *pValues) const override
Definition: optsitem.cxx:261
sal_uInt16 GetDefTab() const
Definition: optsitem.hxx:137
SdOptionsLayout(bool bImpress, bool bUseConfig)
Definition: optsitem.cxx:186
bool IsDragStripes() const
Definition: optsitem.hxx:133
bool IsHelplines() const
Definition: optsitem.hxx:135
void SetDragStripes(bool bOn)
Definition: optsitem.hxx:141
sal_uInt16 GetMetric() const
Definition: optsitem.hxx:136
bool IsHandlesBezier() const
Definition: optsitem.hxx:134
void SetMoveOutline(bool bOn)
Definition: optsitem.hxx:140
void SetRulerVisible(bool bOn)
Definition: optsitem.hxx:139
bool operator==(const SdOptionsLayout &rOpt) const
Definition: optsitem.cxx:203
void SetHelplines(bool bOn)
Definition: optsitem.hxx:143
void SetDefTab(sal_uInt16 nTab)
Definition: optsitem.hxx:145
SdOptionsMisc maOptionsMisc
Definition: optsitem.hxx:337
virtual SdOptionsMiscItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: optsitem.cxx:702
virtual bool operator==(const SfxPoolItem &) const override
Definition: optsitem.cxx:707
void SetOptions(SdOptions *pOpts) const
Definition: optsitem.cxx:713
bool IsPreviewChangedEffects() const
Definition: optsitem.hxx:271
bool IsMasterPagePaintCaching() const
Definition: optsitem.hxx:247
bool IsCrookNoContortion() const
Definition: optsitem.hxx:245
void SetDragThreshold(sal_Int32 nDragThresholdPixels)
Definition: optsitem.cxx:1418
bool operator==(const SdOptionsMisc &rOpt) const
Definition: optsitem.cxx:435
void SetShowUndoDeleteWarning(bool bOn)
Definition: optsitem.hxx:309
void SetSummationOfParagraphs(bool bOn)
Definition: optsitem.hxx:299
void SetDefaultObjectSizeHeight(sal_Int32 nHeight)
Definition: optsitem.hxx:312
void SetPresentationPenColor(sal_Int32 nPenColor)
Definition: optsitem.hxx:278
bool IsShowUndoDeleteWarning() const
Definition: optsitem.hxx:265
void SetSlideshowRespectZOrder(bool bOn)
Definition: optsitem.hxx:310
bool IsShowComments() const
Definition: optsitem.hxx:318
bool IsEnableSdremote() const
Definition: optsitem.hxx:252
bool IsSlideshowRespectZOrder() const
Definition: optsitem.hxx:266
bool IsDragWithCopy() const
Definition: optsitem.hxx:248
void SetPreviewChangedEffects(bool bOn)
Definition: optsitem.hxx:315
bool IsDoubleClickTextEdit() const
Definition: optsitem.hxx:250
bool IsPresenterScreenFullScreen() const
Definition: optsitem.hxx:254
void SetPrinterIndependentLayout(sal_uInt16 nOn)
Set the printer independent layout mode.
Definition: optsitem.hxx:307
bool IsEnablePresenterScreen() const
Definition: optsitem.hxx:253
void SetPresenterScreenFullScreen(bool bOn)
Definition: optsitem.hxx:298
bool IsMarkedHitMovesAlways() const
Definition: optsitem.hxx:243
double GetPresentationPenWidth() const
Definition: optsitem.hxx:280
sal_Int32 mnDisplay
Definition: optsitem.hxx:214
virtual bool ReadData(const css::uno::Any *pValues) override
Definition: optsitem.cxx:516
bool IsStartWithTemplate() const
Definition: optsitem.hxx:242
void SetDisplay(sal_Int32 nDisplay)
Definition: optsitem.cxx:1433
bool IsPreviewNewEffects() const
Definition: optsitem.hxx:270
void SetMarkedHitMovesAlways(bool bOn)
Definition: optsitem.hxx:287
void SetShowComments(bool bShow)
Definition: optsitem.hxx:319
sal_Int32 mnDragThresholdPixels
Minimum mouse move distance for it to register as a drag action.
Definition: optsitem.hxx:227
bool IsQuickEdit() const
Definition: optsitem.hxx:246
sal_Int32 GetDisplay() const
Definition: optsitem.cxx:1427
void SetDoubleClickTextEdit(bool bOn)
Definition: optsitem.hxx:294
bool IsSummationOfParagraphs() const
Definition: optsitem.hxx:256
void SetStartWithTemplate(bool bOn)
Definition: optsitem.hxx:286
sal_Int32 GetDefaultObjectSizeWidth() const
Definition: optsitem.hxx:267
void SetDefaultObjectSizeWidth(sal_Int32 nWidth)
Definition: optsitem.hxx:311
bool IsTabBarVisible() const
Definition: optsitem.hxx:257
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
Definition: optsitem.cxx:470
void SetSolidDragging(bool bOn)
Definition: optsitem.hxx:308
void SetCrookNoContortion(bool bOn)
Definition: optsitem.hxx:289
bool IsPreviewTransitions() const
Definition: optsitem.hxx:272
sal_Int32 GetDefaultObjectSizeHeight() const
Definition: optsitem.hxx:268
void SetQuickEdit(bool bOn)
Definition: optsitem.hxx:290
SdOptionsMisc(bool bImpress, bool bUseConfig)
Definition: optsitem.cxx:393
void SetPresentationPenWidth(double nPenWidth)
Definition: optsitem.hxx:281
void SetMasterPagePaintCaching(bool bOn)
Definition: optsitem.hxx:291
void SetEnablePresenterScreen(bool bOn)
Definition: optsitem.hxx:297
void SetEnableSdremote(bool bOn)
Definition: optsitem.hxx:296
virtual bool WriteData(css::uno::Any *pValues) const override
Definition: optsitem.cxx:584
bool IsMoveOnlyDragging() const
Definition: optsitem.hxx:244
void SetPreviewTransitions(bool bOn)
Definition: optsitem.hxx:316
void SetDragWithCopy(bool bOn)
Definition: optsitem.hxx:292
void SetTabBarVisible(bool bOn)
Definition: optsitem.hxx:300
void SetPickThrough(bool bOn)
Definition: optsitem.hxx:293
void SetMoveOnlyDragging(bool bOn)
Definition: optsitem.hxx:288
void SetClickChangeRotation(bool bOn)
Definition: optsitem.hxx:295
void SetPreviewNewEffects(bool bOn)
Definition: optsitem.hxx:314
sal_uInt16 GetPrinterIndependentLayout() const
Return the currently selected printer independent layout mode.
Definition: optsitem.hxx:264
sal_Int32 GetPresentationPenColor() const
Definition: optsitem.hxx:277
bool IsPickThrough() const
Definition: optsitem.hxx:249
bool IsClickChangeRotation() const
Definition: optsitem.hxx:251
bool IsSolidDragging() const
Definition: optsitem.hxx:255
sal_Int32 GetDragThresholdPixels() const
Definition: optsitem.cxx:1412
virtual SdOptionsPrintItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: optsitem.cxx:1343
virtual bool operator==(const SfxPoolItem &) const override
Definition: optsitem.cxx:1348
void SetOptions(SdOptions *pOpts) const
Definition: optsitem.cxx:1354
SdOptionsPrint maOptionsPrint
Definition: optsitem.hxx:573
bool IsBooklet() const
Definition: optsitem.hxx:526
sal_uInt16 GetHandoutPages() const
Definition: optsitem.hxx:533
bool IsCutPage() const
Definition: optsitem.hxx:529
bool IsTime() const
Definition: optsitem.hxx:518
void SetWarningPrinter(bool bOn)
Definition: optsitem.hxx:545
void SetPaperbin(bool bOn)
Definition: optsitem.hxx:552
void SetHandoutHorizontal(bool bHandoutHorizontal)
Definition: optsitem.hxx:554
bool IsDate() const
Definition: optsitem.hxx:517
bool IsNotes() const
Definition: optsitem.hxx:514
void SetNotes(bool bOn)
Definition: optsitem.hxx:536
void SetFrontPage(bool bOn)
Definition: optsitem.hxx:549
void SetCutPage(bool bOn)
Definition: optsitem.hxx:551
void SetDate(bool bOn)
Definition: optsitem.hxx:539
bool IsHandout() const
Definition: optsitem.hxx:515
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
Definition: optsitem.cxx:1190
bool operator==(const SdOptionsPrint &rOpt) const
Definition: optsitem.cxx:1165
void SetBackPage(bool bOn)
Definition: optsitem.hxx:550
void SetBooklet(bool bOn)
Definition: optsitem.hxx:548
void SetPagesize(bool bOn)
Definition: optsitem.hxx:543
void SetWarningSize(bool bOn)
Definition: optsitem.hxx:546
void SetHiddenPages(bool bOn)
Definition: optsitem.hxx:542
virtual bool WriteData(css::uno::Any *pValues) const override
Definition: optsitem.cxx:1275
bool IsWarningSize() const
Definition: optsitem.hxx:524
bool IsOutline() const
Definition: optsitem.hxx:516
void SetDraw(bool bOn)
Definition: optsitem.hxx:535
bool IsFrontPage() const
Definition: optsitem.hxx:527
void SetTime(bool bOn)
Definition: optsitem.hxx:540
bool IsPagename() const
Definition: optsitem.hxx:519
void SetPagename(bool bOn)
Definition: optsitem.hxx:541
void SetWarningOrientation(bool bOn)
Definition: optsitem.hxx:547
void SetOutline(bool bOn)
Definition: optsitem.hxx:538
bool IsWarningOrientation() const
Definition: optsitem.hxx:525
bool IsPagetile() const
Definition: optsitem.hxx:522
void SetOutputQuality(sal_uInt16 nInQuality)
Definition: optsitem.hxx:553
bool IsPagesize() const
Definition: optsitem.hxx:521
bool IsHandoutHorizontal() const
Definition: optsitem.hxx:532
bool IsWarningPrinter() const
Definition: optsitem.hxx:523
SdOptionsPrint(bool bImpress, bool bUseConfig)
Definition: optsitem.cxx:1134
void SetPagetile(bool bOn)
Definition: optsitem.hxx:544
void SetHandoutPages(sal_uInt16 nHandoutPages)
Definition: optsitem.hxx:555
bool IsPaperbin() const
Definition: optsitem.hxx:530
bool IsHiddenPages() const
Definition: optsitem.hxx:520
bool IsDraw() const
Definition: optsitem.hxx:513
void SetHandout(bool bOn)
Definition: optsitem.hxx:537
bool IsBackPage() const
Definition: optsitem.hxx:528
sal_uInt16 GetOutputQuality() const
Definition: optsitem.hxx:531
virtual bool ReadData(const css::uno::Any *pValues) override
Definition: optsitem.cxx:1247
void SetOptions(SdOptions *pOpts) const
Definition: optsitem.cxx:901
SdOptionsSnap maOptionsSnap
Definition: optsitem.hxx:404
virtual bool operator==(const SfxPoolItem &) const override
Definition: optsitem.cxx:895
virtual SdOptionsSnapItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: optsitem.cxx:890
void SetAngle(Degree100 nIn)
Definition: optsitem.hxx:386
void SetRotate(bool bOn)
Definition: optsitem.hxx:384
void SetSnapFrame(bool bOn)
Definition: optsitem.hxx:380
bool IsBigOrtho() const
Definition: optsitem.hxx:372
void SetSnapArea(sal_Int16 nIn)
Definition: optsitem.hxx:385
void SetSnapPoints(bool bOn)
Definition: optsitem.hxx:381
SdOptionsSnap(bool bImpress, bool bUseConfig)
Definition: optsitem.cxx:759
bool IsSnapHelplines() const
Definition: optsitem.hxx:367
void SetSnapHelplines(bool bOn)
Definition: optsitem.hxx:378
void SetEliminatePolyPointLimitAngle(Degree100 nIn)
Definition: optsitem.hxx:387
bool IsSnapPoints() const
Definition: optsitem.hxx:370
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
Definition: optsitem.cxx:794
Degree100 GetAngle() const
Definition: optsitem.hxx:375
bool IsOrtho() const
Definition: optsitem.hxx:371
void SetSnapBorder(bool bOn)
Definition: optsitem.hxx:379
bool IsSnapBorder() const
Definition: optsitem.hxx:368
virtual bool WriteData(css::uno::Any *pValues) const override
Definition: optsitem.cxx:830
virtual bool ReadData(const css::uno::Any *pValues) override
Definition: optsitem.cxx:814
Degree100 GetEliminatePolyPointLimitAngle() const
Definition: optsitem.hxx:376
void SetBigOrtho(bool bOn)
Definition: optsitem.hxx:383
sal_Int16 GetSnapArea() const
Definition: optsitem.hxx:374
void SetOrtho(bool bOn)
Definition: optsitem.hxx:382
bool IsSnapFrame() const
Definition: optsitem.hxx:369
bool operator==(const SdOptionsSnap &rOpt) const
Definition: optsitem.cxx:780
bool IsRotate() const
Definition: optsitem.hxx:373
virtual void GetPropNameArray(const char **&ppNames, sal_uLong &rCount) const override
Definition: optsitem.cxx:935
void GetScale(sal_Int32 &rX, sal_Int32 &rY) const
Definition: optsitem.hxx:424
virtual bool WriteData(css::uno::Any *pValues) const override
Definition: optsitem.cxx:959
void SetScale(sal_Int32 nInX, sal_Int32 nInY)
Definition: optsitem.hxx:425
SdOptionsZoom(bool bImpress)
Definition: optsitem.cxx:924
virtual bool ReadData(const css::uno::Any *pValues) override
Definition: optsitem.cxx:947
void StoreConfig()
Definition: optsitem.cxx:1401
virtual ~SdOptions() override
Definition: optsitem.cxx:1397
SdOptions(bool bImpress)
Definition: optsitem.cxx:1386
sal_Int32 GetDragThresholdPixels() const
bool IsSolidDragging() const
bool IsDragWithCopy() const
bool IsNoDragXorPolys() const
bool IsDragStripes() const
bool IsMarkedHitMovesAlways() const
bool IsPlusHandlesAlwaysVisible() const
bool IsPickThroughTransparentTextFrames() const
bool IsHlplVisible() const
SdrModel & GetModel() const
bool IsCrookNoContortion() const
Degree100 GetEliminatePolyPointLimitAngle() const
bool IsBigOrtho() const
bool IsOrtho() const
bool IsHlplSnap() const
bool IsAngleSnapEnabled() const
bool IsOFrmSnap() const
Degree100 GetSnapAngle() const
bool IsOPntSnap() const
bool IsMoveOnlyDragging() const
bool IsBordSnap() const
sal_uInt16 GetSnapMagneticPixel() const
bool IsMasterPagePaintCaching() const
const LocaleDataWrapper & GetLocaleData() const
bool GetGridVisible() const
bool GetUseGridSnap() const
sal_uInt32 GetFieldSnapY() const
void SetFieldSnapY(sal_uInt32 nSet)
void SetFieldDrawX(sal_uInt32 nSet)
void SetUseGridSnap(bool bSet)
void SetFieldDrawY(sal_uInt32 nSet)
sal_uInt32 GetFieldDivisionY() const
bool GetSynchronize() const
void SetSynchronize(bool bSet)
void SetEqualGrid(bool bSet)
sal_uInt32 GetFieldDrawY() const
void SetGridVisible(bool bSet)
void SetFieldSnapX(sal_uInt32 nSet)
void SetFieldDivisionY(sal_uInt32 nSet)
sal_uInt32 GetFieldSnapX() const
bool GetEqualGrid() const
void SetFieldDivisionX(sal_uInt32 nSet)
sal_uInt32 GetFieldDrawX() const
sal_uInt32 GetFieldDivisionX() const
View for MDIFrame.
Definition: FrameView.hxx:36
bool HasRuler() const
Definition: FrameView.hxx:71
bool IsClickChangeRotation() const
Definition: FrameView.hxx:130
bool IsDoubleClickTextEdit() const
Definition: FrameView.hxx:127
bool IsQuickEdit() const
Definition: FrameView.hxx:124
bool IsModified() const
Any value
int nCount
#define DBG_ASSERT(sCon, aError)
float y
float x
FieldUnit
tools::Long FRound(double fVal)
MeasurementSystem
#define SAL_N_ELEMENTS(arr)
int i
static T getSafeValue(const Any &rAny)
Definition: optsitem.cxx:38
const PropertyStruct aPropNames[]
sal_uIntPtr sal_uLong
UNDERLYING_TYPE get() const