From bf42b6f9f51b4bc66e267ae24c87ac79122825cc Mon Sep 17 00:00:00 2001 From: Philipp Riemer Date: Sat, 31 Aug 2013 17:50:25 +0200 Subject: fdo#62475 - remove visual noise This is a follow up commit to - 22d1beb78a475e4846af945afde1c4d6c263b5d6 - 1c7af455ab9345304a7ac48ce2e0310de2ac8a75 Change-Id: I102685391125f3b4f7bdf838f8bd17a2283d558d --- sw/source/ui/shells/grfsh.cxx | 26 +++++++++++++++++++++++--- sw/source/ui/uiview/swcli.cxx | 1 - sw/source/ui/uiview/viewtab.cxx | 10 ---------- 3 files changed, 23 insertions(+), 14 deletions(-) (limited to 'sw/source/ui') diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index 5b4bad2a62fc..a24bae455889 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -66,7 +66,9 @@ #include #include #include + #define SwGrfShell + #include #include "swslots.hxx" @@ -110,6 +112,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) GetView().ExecuteScan( rReq ); break; } + case SID_SAVE_GRAPHIC: { const Graphic *pGraphic; @@ -122,6 +125,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) } } break; + case SID_COMPRESS_GRAPHIC: { const Graphic* pGraphic = rSh.GetGraphic(); @@ -166,6 +170,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) } } break; + case SID_EXTERNAL_EDIT: { // When the graphic is selected to be opened via some external tool @@ -178,6 +183,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) } } break; + case SID_INSERT_GRAPHIC: case FN_FORMAT_GRAFIC_DLG: case FN_DRAW_WRAP_DLG: @@ -485,26 +491,31 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq ) aGrfSet.Put( SwLuminanceGrf( ((SfxInt16Item*)pItem)->GetValue() )); break; + case SID_ATTR_GRAF_CONTRAST: if( pItem ) aGrfSet.Put( SwContrastGrf( ((SfxInt16Item*)pItem)->GetValue() )); break; + case SID_ATTR_GRAF_RED: if( pItem ) aGrfSet.Put( SwChannelRGrf( ((SfxInt16Item*)pItem)->GetValue() )); break; + case SID_ATTR_GRAF_GREEN: if( pItem ) aGrfSet.Put( SwChannelGGrf( ((SfxInt16Item*)pItem)->GetValue() )); break; + case SID_ATTR_GRAF_BLUE: if( pItem ) aGrfSet.Put( SwChannelBGrf( ((SfxInt16Item*)pItem)->GetValue() )); break; + case SID_ATTR_GRAF_GAMMA: if( pItem ) { @@ -512,11 +523,13 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq ) aGrfSet.Put( SwGammaGrf(fVal/100. )); } break; + case SID_ATTR_GRAF_TRANSPARENCE: if( pItem ) aGrfSet.Put( SwTransparencyGrf( static_cast< sal_Int8 >( ( (SfxUInt16Item*)pItem )->GetValue() ) ) ); break; + case SID_ATTR_GRAF_INVERT: if( pItem ) aGrfSet.Put( SwInvertGrf( @@ -535,6 +548,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq ) aToolboxAccess.toggleToolbox(); break; } + case SID_GRFFILTER: case SID_GRFFILTER_INVERT: case SID_GRFFILTER_SMOOTH: @@ -565,6 +579,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq ) default: OSL_ENSURE(!this, "wrong dispatcher"); } + if( aGrfSet.Count() ) GetShell().SetAttr( aGrfSet ); } @@ -594,11 +609,13 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) if( bParentCntProt || !bIsGrfCntnt ) bDisable = true; break; + case SID_SAVE_GRAPHIC: case SID_EXTERNAL_EDIT: if( rSh.GetGraphicType() == GRAPHIC_NONE ) bDisable = true; break; + case SID_COLOR_SETTINGS: { if ( bParentCntProt || !bIsGrfCntnt ) @@ -633,27 +650,30 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) } break; - case SID_ATTR_GRAF_LUMINANCE: if( !bParentCntProt ) rSet.Put( SfxInt16Item( nWhich, ((SwLuminanceGrf&) aCoreSet.Get(RES_GRFATR_LUMINANCE)).GetValue() )); break; + case SID_ATTR_GRAF_CONTRAST: if( !bParentCntProt ) rSet.Put( SfxInt16Item( nWhich, ((SwContrastGrf&) aCoreSet.Get(RES_GRFATR_CONTRAST)).GetValue() )); break; + case SID_ATTR_GRAF_RED: if( !bParentCntProt ) rSet.Put( SfxInt16Item( nWhich, ((SwChannelRGrf&) aCoreSet.Get(RES_GRFATR_CHANNELR)).GetValue() )); break; + case SID_ATTR_GRAF_GREEN: if( !bParentCntProt ) rSet.Put( SfxInt16Item( nWhich, ((SwChannelGGrf&) aCoreSet.Get(RES_GRFATR_CHANNELG)).GetValue() )); break; + case SID_ATTR_GRAF_BLUE: if( !bParentCntProt ) rSet.Put( SfxInt16Item( nWhich, ((SwChannelBGrf&) @@ -665,6 +685,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) rSet.Put( SfxUInt32Item( nWhich, static_cast< sal_uInt32 >( ( (SwGammaGrf&)aCoreSet.Get( RES_GRFATR_GAMMA ) ).GetValue() * 100 ) ) ); break; + case SID_ATTR_GRAF_TRANSPARENCE: if( !bParentCntProt ) { @@ -681,6 +702,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet) } } break; + case SID_ATTR_GRAF_INVERT: if( !bParentCntProt ) rSet.Put( SfxBoolItem( nWhich, ((SwInvertGrf&) @@ -838,10 +860,8 @@ void SwGrfShell::GetAttrStateForRotation(SfxItemSet &rSet) SetGetStateSet( 0 ); } - SwGrfShell::SwGrfShell(SwView &_rView) : SwBaseShell(_rView) - { SetName(OUString("Graphic")); SetHelpId(SW_GRFSHELL); diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx index ab0d7180c034..817c660d7be0 100644 --- a/sw/source/ui/uiview/swcli.cxx +++ b/sw/source/ui/uiview/swcli.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include #include #include diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index c0fc69dab3f3..2be6825398f7 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include #include "uitool.hxx" #include @@ -59,10 +58,7 @@ using namespace ::com::sun::star; -// Debug Method - // Pack columns - static void lcl_FillSvxColumn(const SwFmtCol& rCol, sal_uInt16 nTotalWidth, SvxColumnItem& rColItem, @@ -102,7 +98,6 @@ static void lcl_FillSvxColumn(const SwFmtCol& rCol, } // Transfer ColumnItem in ColumnInfo - static void lcl_ConvertToCols(const SvxColumnItem& rColItem, sal_uInt16 nTotalWidth, SwFmtCol& rCols) @@ -151,7 +146,6 @@ static void lcl_ConvertToCols(const SvxColumnItem& rColItem, } // Delete tabs - static void lcl_EraseDefTabs(SvxTabStopItem& rTabStops) { // Delete DefTabs @@ -169,7 +163,6 @@ static void lcl_EraseDefTabs(SvxTabStopItem& rTabStops) } // Flip page margin - void SwView::SwapPageMargin(const SwPageDesc& rDesc, SvxLRSpaceItem& rLRSpace) { sal_uInt16 nPhyPage, nVirPage; @@ -185,7 +178,6 @@ void SwView::SwapPageMargin(const SwPageDesc& rDesc, SvxLRSpaceItem& rLRSpace) // If the frame border is moved, the column separator // should stay in the same absolute position. - static void lcl_Scale(long& nVal, long nScale) { nVal *= nScale; @@ -233,7 +225,6 @@ void ResizeFrameCols(SwFmtCol& rCol, } // Here all changes to the tab bar will be shot again into the model. - void SwView::ExecTabWin( SfxRequest& rReq ) { SwWrtShell &rSh = GetWrtShell(); @@ -973,7 +964,6 @@ void SwView::ExecTabWin( SfxRequest& rReq ) // Here the status of the tab bar will be determined. // This means that all relevant attributes at the CursorPos // will be submittet to the tab bar. - void SwView::StateTabWin(SfxItemSet& rSet) { SwWrtShell &rSh = GetWrtShell(); -- cgit