grfsh.cxx (395b75f9) grfsh.cxx (261e9a4b)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 366 unchanged lines hidden (view full) ---

375 SfxItemSet aGrfSet( GetShell().GetAttrPool(), RES_GRFATR_BEGIN,
376 RES_GRFATR_END -1 );
377 const SfxItemSet *pArgs = rReq.GetArgs();
378 const SfxPoolItem* pItem;
379 sal_uInt16 nSlot = rReq.GetSlot();
380 if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, sal_False, &pItem ))
381 pItem = 0;
382
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 366 unchanged lines hidden (view full) ---

375 SfxItemSet aGrfSet( GetShell().GetAttrPool(), RES_GRFATR_BEGIN,
376 RES_GRFATR_END -1 );
377 const SfxItemSet *pArgs = rReq.GetArgs();
378 const SfxPoolItem* pItem;
379 sal_uInt16 nSlot = rReq.GetSlot();
380 if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, sal_False, &pItem ))
381 pItem = 0;
382
383 switch( nSlot )
384 {
385 case FN_FLIP_VERT_GRAFIC:
386 case FN_FLIP_HORZ_GRAFIC:
383 switch( nSlot )
384 {
387 case SID_FLIP_VERTICAL:
388 case SID_FLIP_HORIZONTAL:
385 case SID_FLIP_VERTICAL:
386 case SID_FLIP_HORIZONTAL:
389 {
387 {
390 GetShell().GetCurAttr( aGrfSet );
388 GetShell().GetCurAttr( aGrfSet );
391 SwMirrorGrf aMirror( (SwMirrorGrf&)aGrfSet.Get(
392 RES_GRFATR_MIRRORGRF ) );
393 sal_uInt16 nMirror = aMirror.GetValue();
394 if( FN_FLIP_VERT_GRAFIC == nSlot || nSlot==SID_FLIP_VERTICAL )
395 switch( nMirror )
396 {
389 SwMirrorGrf aMirror( (SwMirrorGrf&)aGrfSet.Get( RES_GRFATR_MIRRORGRF ) );
390 sal_uInt16 nMirror = aMirror.GetValue();
391 if ( nSlot==SID_FLIP_HORIZONTAL )
392 switch( nMirror )
393 {
397 case RES_MIRROR_GRAPH_DONT: nMirror = RES_MIRROR_GRAPH_VERT;
394 case RES_MIRROR_GRAPH_DONT: nMirror = RES_MIRROR_GRAPH_VERT;
398 break;
395 break;
399 case RES_MIRROR_GRAPH_HOR: nMirror = RES_MIRROR_GRAPH_BOTH;
396 case RES_MIRROR_GRAPH_HOR: nMirror = RES_MIRROR_GRAPH_BOTH;
400 break;
397 break;
401 case RES_MIRROR_GRAPH_VERT: nMirror = RES_MIRROR_GRAPH_DONT;
398 case RES_MIRROR_GRAPH_VERT: nMirror = RES_MIRROR_GRAPH_DONT;
402 break;
399 break;
403 case RES_MIRROR_GRAPH_BOTH: nMirror = RES_MIRROR_GRAPH_HOR;
400 case RES_MIRROR_GRAPH_BOTH: nMirror = RES_MIRROR_GRAPH_HOR;
404 break;
405 }
406 else
407 switch( nMirror )
408 {
401 break;
402 }
403 else
404 switch( nMirror )
405 {
409 case RES_MIRROR_GRAPH_DONT: nMirror = RES_MIRROR_GRAPH_HOR;
406 case RES_MIRROR_GRAPH_DONT: nMirror = RES_MIRROR_GRAPH_HOR;
410 break;
407 break;
411 case RES_MIRROR_GRAPH_VERT: nMirror = RES_MIRROR_GRAPH_BOTH;
408 case RES_MIRROR_GRAPH_VERT: nMirror = RES_MIRROR_GRAPH_BOTH;
412 break;
409 break;
413 case RES_MIRROR_GRAPH_HOR: nMirror = RES_MIRROR_GRAPH_DONT;
410 case RES_MIRROR_GRAPH_HOR: nMirror = RES_MIRROR_GRAPH_DONT;
414 break;
411 break;
415 case RES_MIRROR_GRAPH_BOTH: nMirror = RES_MIRROR_GRAPH_VERT;
412 case RES_MIRROR_GRAPH_BOTH: nMirror = RES_MIRROR_GRAPH_VERT;
416 break;
417 }
418 aMirror.SetValue( nMirror );
419 aGrfSet.ClearItem();
420 aGrfSet.Put( aMirror );
421 }
422 break;
413 break;
414 }
415 aMirror.SetValue( nMirror );
416 aGrfSet.ClearItem();
417 aGrfSet.Put( aMirror );
418 }
419 break;
423
424 case SID_ATTR_GRAF_LUMINANCE:
425 if( pItem )
426 aGrfSet.Put( SwLuminanceGrf(
427 ((SfxInt16Item*)pItem)->GetValue() ));
428 break;
429 case SID_ATTR_GRAF_CONTRAST:
430 if( pItem )

--- 116 unchanged lines hidden (view full) ---

547 else
548 {
549 svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME );
550 rSet.Put( SfxBoolItem( nWhich, aToolboxAccess.isToolboxVisible() ) );
551 }
552 break;
553 }
554
420
421 case SID_ATTR_GRAF_LUMINANCE:
422 if( pItem )
423 aGrfSet.Put( SwLuminanceGrf(
424 ((SfxInt16Item*)pItem)->GetValue() ));
425 break;
426 case SID_ATTR_GRAF_CONTRAST:
427 if( pItem )

--- 116 unchanged lines hidden (view full) ---

544 else
545 {
546 svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME );
547 rSet.Put( SfxBoolItem( nWhich, aToolboxAccess.isToolboxVisible() ) );
548 }
549 break;
550 }
551
555 case FN_FLIP_VERT_GRAFIC:
556 if( !bParentCntProt )
557 {
552 case SID_FLIP_HORIZONTAL:
553 if( !bParentCntProt )
554 {
558 MirrorGraph nState = static_cast< MirrorGraph >(((const SwMirrorGrf &) aCoreSet.Get(
559 RES_GRFATR_MIRRORGRF )).GetValue());
560
561 rSet.Put(SfxBoolItem( nWhich, nState == RES_MIRROR_GRAPH_VERT ||
562 nState == RES_MIRROR_GRAPH_BOTH));
555 MirrorGraph nState = static_cast< MirrorGraph >(((const SwMirrorGrf &) aCoreSet.Get(
556 RES_GRFATR_MIRRORGRF )).GetValue());
557
558 rSet.Put(SfxBoolItem( nWhich, nState == RES_MIRROR_GRAPH_VERT ||
559 nState == RES_MIRROR_GRAPH_BOTH));
563 }
564 break;
560 }
561 break;
565
562
566 case FN_FLIP_HORZ_GRAFIC:
567 if( !bParentCntProt )
568 {
563 case SID_FLIP_VERTICAL:
564 if( !bParentCntProt )
565 {
569 MirrorGraph nState = static_cast< MirrorGraph >(((const SwMirrorGrf &) aCoreSet.Get(
570 RES_GRFATR_MIRRORGRF )).GetValue());
571
572 rSet.Put(SfxBoolItem( nWhich, nState == RES_MIRROR_GRAPH_HOR ||
573 nState == RES_MIRROR_GRAPH_BOTH));
566 MirrorGraph nState = static_cast< MirrorGraph >(((const SwMirrorGrf &) aCoreSet.Get(
567 RES_GRFATR_MIRRORGRF )).GetValue());
568
569 rSet.Put(SfxBoolItem( nWhich, nState == RES_MIRROR_GRAPH_HOR ||
570 nState == RES_MIRROR_GRAPH_BOTH));
574 }
575 break;
571 }
572 break;
576
577
578 case SID_ATTR_GRAF_LUMINANCE:
579 if( !bParentCntProt )
580 rSet.Put( SfxInt16Item( nWhich, ((SwLuminanceGrf&)
581 aCoreSet.Get(RES_GRFATR_LUMINANCE)).GetValue() ));
582 break;
583 case SID_ATTR_GRAF_CONTRAST:

--- 118 unchanged lines hidden ---
573
574
575 case SID_ATTR_GRAF_LUMINANCE:
576 if( !bParentCntProt )
577 rSet.Put( SfxInt16Item( nWhich, ((SwLuminanceGrf&)
578 aCoreSet.Get(RES_GRFATR_LUMINANCE)).GetValue() ));
579 break;
580 case SID_ATTR_GRAF_CONTRAST:

--- 118 unchanged lines hidden ---