1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_sd.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir #include <sfx2/bindings.hxx> 33*cdf0e10cSrcweir #include <svx/svxids.hrc> 34*cdf0e10cSrcweir #include <svx/grafctrl.hxx> 35*cdf0e10cSrcweir #include <svl/cjkoptions.hxx> 36*cdf0e10cSrcweir #include <sfx2/viewsh.hxx> 37*cdf0e10cSrcweir #ifndef _SFX_IMAGEMGR_HXX 38*cdf0e10cSrcweir #include <sfx2/imagemgr.hxx> 39*cdf0e10cSrcweir #endif 40*cdf0e10cSrcweir #include <rtl/ustring.hxx> 41*cdf0e10cSrcweir #include <rtl/ustrbuf.hxx> 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir #include "sddll.hxx" 44*cdf0e10cSrcweir #include "GraphicDocShell.hxx" 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir #include <vcl/toolbox.hxx> 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir #include "app.hxx" 49*cdf0e10cSrcweir #include "app.hrc" 50*cdf0e10cSrcweir #include "res_bmp.hrc" 51*cdf0e10cSrcweir #include "sdresid.hxx" 52*cdf0e10cSrcweir #include "tbx_ww.hxx" 53*cdf0e10cSrcweir #include "tbx_ww.hrc" 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir SFX_IMPL_TOOLBOX_CONTROL( SdTbxControl, TbxImageItem ) 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir /************************************************************************* 58*cdf0e10cSrcweir |* 59*cdf0e10cSrcweir |* PopUp-Window 60*cdf0e10cSrcweir |* 61*cdf0e10cSrcweir \************************************************************************/ 62*cdf0e10cSrcweir /* 63*cdf0e10cSrcweir SdPopupWindowTbx::SdPopupWindowTbx( sal_uInt16 nId, WindowAlign eAlign, 64*cdf0e10cSrcweir SdResId aRIdWin, SdResId aRIdTbx, 65*cdf0e10cSrcweir SfxBindings& rBindings ) : 66*cdf0e10cSrcweir SfxPopupWindow ( nId, aRIdWin, rBindings ), 67*cdf0e10cSrcweir aTbx ( this, GetBindings(), aRIdTbx ), 68*cdf0e10cSrcweir aSdResIdWin ( aRIdWin ), 69*cdf0e10cSrcweir aSdResIdTbx ( aRIdTbx ), 70*cdf0e10cSrcweir eTbxAlign ( eAlign ) 71*cdf0e10cSrcweir { 72*cdf0e10cSrcweir aTbx.UseDefault(); 73*cdf0e10cSrcweir aSelectLink = aTbx.GetToolBox().GetSelectHdl(); 74*cdf0e10cSrcweir aTbx.GetToolBox().SetSelectHdl( LINK( this, SdPopupWindowTbx, TbxSelectHdl ) ); 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir FreeResource(); 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir if( ( eAlign == WINDOWALIGN_TOP ) || ( eAlign == WINDOWALIGN_BOTTOM ) ) 79*cdf0e10cSrcweir { 80*cdf0e10cSrcweir if ( aSdResIdWin.GetId() != RID_TEXT ) 81*cdf0e10cSrcweir aTbx.GetToolBox().SetAlign( WINDOWALIGN_LEFT ); 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir SetText( String() ); 84*cdf0e10cSrcweir } 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir AdaptToCTL(); 87*cdf0e10cSrcweir } 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir 90*cdf0e10cSrcweir void SdPopupWindowTbx::AdaptToCTL (void) 91*cdf0e10cSrcweir { 92*cdf0e10cSrcweir Size aSize = aTbx.CalcWindowSizePixel(); 93*cdf0e10cSrcweir if (aSdResIdWin.GetId() == RID_TEXT) 94*cdf0e10cSrcweir { 95*cdf0e10cSrcweir SvtCJKOptions aCJKOptions; 96*cdf0e10cSrcweir if ( ! aCJKOptions.IsVerticalTextEnabled()) 97*cdf0e10cSrcweir { 98*cdf0e10cSrcweir ToolBox& aToolBox = aTbx.GetToolBox(); 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir // Iterate over all tool box items and remove those that are 101*cdf0e10cSrcweir // specific to complex text layout. 102*cdf0e10cSrcweir sal_uInt16 i=0; 103*cdf0e10cSrcweir while (i < aToolBox.GetItemCount()) 104*cdf0e10cSrcweir { 105*cdf0e10cSrcweir sal_uInt16 nIndex = aToolBox.GetItemId(i); 106*cdf0e10cSrcweir switch (nIndex) 107*cdf0e10cSrcweir { 108*cdf0e10cSrcweir case 0: // Line break. 109*cdf0e10cSrcweir case SID_ATTR_CHAR_VERTICAL: 110*cdf0e10cSrcweir case SID_TEXT_FITTOSIZE_VERTICAL: 111*cdf0e10cSrcweir case SID_DRAW_CAPTION_VERTICAL: 112*cdf0e10cSrcweir case SID_DRAW_FONTWORK_VERTICAL: 113*cdf0e10cSrcweir aToolBox.RemoveItem (i); 114*cdf0e10cSrcweir break; 115*cdf0e10cSrcweir 116*cdf0e10cSrcweir default: 117*cdf0e10cSrcweir // Leave the item unmodified. Advance to the next one. 118*cdf0e10cSrcweir i+=1; 119*cdf0e10cSrcweir } 120*cdf0e10cSrcweir } 121*cdf0e10cSrcweir aToolBox.RecalcItems(); 122*cdf0e10cSrcweir // Why is this necessary? 123*cdf0e10cSrcweir aToolBox.SetLineCount(1); 124*cdf0e10cSrcweir sal_uInt16 nLineCount = aToolBox.GetLineCount(); 125*cdf0e10cSrcweir aSize = aToolBox.CalcWindowSizePixel(nLineCount); 126*cdf0e10cSrcweir } 127*cdf0e10cSrcweir } 128*cdf0e10cSrcweir aTbx.SetPosSizePixel( Point(), aSize ); 129*cdf0e10cSrcweir SetOutputSizePixel( aSize ); 130*cdf0e10cSrcweir } 131*cdf0e10cSrcweir */ 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir /*-------------------------------------------------------------------------*/ 134*cdf0e10cSrcweir /* 135*cdf0e10cSrcweir SdPopupWindowTbx::~SdPopupWindowTbx() 136*cdf0e10cSrcweir { 137*cdf0e10cSrcweir } 138*cdf0e10cSrcweir */ 139*cdf0e10cSrcweir /*-------------------------------------------------------------------------*/ 140*cdf0e10cSrcweir /* 141*cdf0e10cSrcweir SfxPopupWindow* SdPopupWindowTbx::Clone() const 142*cdf0e10cSrcweir { 143*cdf0e10cSrcweir SfxBindings& rBindings = (SfxBindings&)GetBindings(); 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir return( new SdPopupWindowTbx( GetId(), eTbxAlign, 146*cdf0e10cSrcweir aSdResIdWin, aSdResIdTbx, rBindings ) ); 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir //return( SfxPopupWindow::Clone() ); 149*cdf0e10cSrcweir } 150*cdf0e10cSrcweir */ 151*cdf0e10cSrcweir /*-------------------------------------------------------------------------*/ 152*cdf0e10cSrcweir /* 153*cdf0e10cSrcweir void SdPopupWindowTbx::Update() 154*cdf0e10cSrcweir { 155*cdf0e10cSrcweir AdaptToCTL(); 156*cdf0e10cSrcweir 157*cdf0e10cSrcweir ToolBox *pBox = &aTbx.GetToolBox(); 158*cdf0e10cSrcweir aTbx.Activate( pBox ); 159*cdf0e10cSrcweir aTbx.Deactivate( pBox ); 160*cdf0e10cSrcweir } 161*cdf0e10cSrcweir */ 162*cdf0e10cSrcweir /*-------------------------------------------------------------------------*/ 163*cdf0e10cSrcweir /* 164*cdf0e10cSrcweir void SdPopupWindowTbx::PopupModeEnd() 165*cdf0e10cSrcweir { 166*cdf0e10cSrcweir aTbx.GetToolBox().EndSelection(); 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir SfxPopupWindow::PopupModeEnd(); 169*cdf0e10cSrcweir } 170*cdf0e10cSrcweir */ 171*cdf0e10cSrcweir /*-------------------------------------------------------------------------*/ 172*cdf0e10cSrcweir /* 173*cdf0e10cSrcweir IMPL_LINK( SdPopupWindowTbx, TbxSelectHdl, ToolBox*, pBox) 174*cdf0e10cSrcweir { 175*cdf0e10cSrcweir if( IsInPopupMode() ) 176*cdf0e10cSrcweir EndPopupMode(); 177*cdf0e10cSrcweir 178*cdf0e10cSrcweir aSelectLink.Call( &aTbx.GetToolBox() ); 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir if ( pBox->GetModifier() & KEY_MOD1 ) 181*cdf0e10cSrcweir { 182*cdf0e10cSrcweir // #99013# if selected with control key, return focus to current view 183*cdf0e10cSrcweir Window* pShellWnd = SfxViewShell::Current()->GetWindow(); 184*cdf0e10cSrcweir if ( pShellWnd ) 185*cdf0e10cSrcweir pShellWnd->GrabFocus(); 186*cdf0e10cSrcweir } 187*cdf0e10cSrcweir 188*cdf0e10cSrcweir return( 0L ); 189*cdf0e10cSrcweir } 190*cdf0e10cSrcweir */ 191*cdf0e10cSrcweir /************************************************************************* 192*cdf0e10cSrcweir |* 193*cdf0e10cSrcweir |* Klasse fuer Toolbox 194*cdf0e10cSrcweir |* 195*cdf0e10cSrcweir \************************************************************************/ 196*cdf0e10cSrcweir 197*cdf0e10cSrcweir SdTbxControl::SdTbxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : 198*cdf0e10cSrcweir SfxToolBoxControl( nSlotId, nId, rTbx ) 199*cdf0e10cSrcweir { 200*cdf0e10cSrcweir rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) ); 201*cdf0e10cSrcweir rTbx.Invalidate(); 202*cdf0e10cSrcweir } 203*cdf0e10cSrcweir 204*cdf0e10cSrcweir /*-------------------------------------------------------------------------*/ 205*cdf0e10cSrcweir 206*cdf0e10cSrcweir SfxPopupWindowType SdTbxControl::GetPopupWindowType() const 207*cdf0e10cSrcweir { 208*cdf0e10cSrcweir return( SFX_POPUPWINDOW_ONTIMEOUT ); 209*cdf0e10cSrcweir } 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir /************************************************************************* 212*cdf0e10cSrcweir |* 213*cdf0e10cSrcweir |* Hier wird das Fenster erzeugt 214*cdf0e10cSrcweir |* Lage der Toolbox mit GetToolBox() abfragbar 215*cdf0e10cSrcweir |* rItemRect sind die Screen-Koordinaten 216*cdf0e10cSrcweir |* 217*cdf0e10cSrcweir \************************************************************************/ 218*cdf0e10cSrcweir 219*cdf0e10cSrcweir SfxPopupWindow* SdTbxControl::CreatePopupWindow() 220*cdf0e10cSrcweir { 221*cdf0e10cSrcweir SfxPopupWindow *pWin = NULL; 222*cdf0e10cSrcweir rtl::OUString aToolBarResStr; 223*cdf0e10cSrcweir rtl::OUStringBuffer aTbxResName( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/" ))); 224*cdf0e10cSrcweir switch( GetSlotId() ) 225*cdf0e10cSrcweir { 226*cdf0e10cSrcweir case SID_OBJECT_ALIGN: 227*cdf0e10cSrcweir aTbxResName.appendAscii( "alignmentbar" ); 228*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 229*cdf0e10cSrcweir break; 230*cdf0e10cSrcweir case SID_ZOOM_TOOLBOX: 231*cdf0e10cSrcweir aTbxResName.appendAscii( "zoombar" ); 232*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 233*cdf0e10cSrcweir break; 234*cdf0e10cSrcweir case SID_OBJECT_CHOOSE_MODE: 235*cdf0e10cSrcweir aTbxResName.appendAscii( "choosemodebar" ); 236*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 237*cdf0e10cSrcweir break; 238*cdf0e10cSrcweir case SID_POSITION: 239*cdf0e10cSrcweir aTbxResName.appendAscii( "positionbar" ); 240*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 241*cdf0e10cSrcweir break; 242*cdf0e10cSrcweir case SID_DRAWTBX_TEXT: 243*cdf0e10cSrcweir aTbxResName.appendAscii( "textbar" ); 244*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 245*cdf0e10cSrcweir break; 246*cdf0e10cSrcweir case SID_DRAWTBX_RECTANGLES: 247*cdf0e10cSrcweir aTbxResName.appendAscii( "rectanglesbar" ); 248*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 249*cdf0e10cSrcweir break; 250*cdf0e10cSrcweir case SID_DRAWTBX_ELLIPSES: 251*cdf0e10cSrcweir aTbxResName.appendAscii( "ellipsesbar" ); 252*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 253*cdf0e10cSrcweir break; 254*cdf0e10cSrcweir case SID_DRAWTBX_LINES: 255*cdf0e10cSrcweir aTbxResName.appendAscii( "linesbar" ); 256*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 257*cdf0e10cSrcweir break; 258*cdf0e10cSrcweir case SID_DRAWTBX_ARROWS: 259*cdf0e10cSrcweir aTbxResName.appendAscii( "arrowsbar" ); 260*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 261*cdf0e10cSrcweir break; 262*cdf0e10cSrcweir case SID_DRAWTBX_3D_OBJECTS: 263*cdf0e10cSrcweir aTbxResName.appendAscii( "3dobjectsbar" ); 264*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 265*cdf0e10cSrcweir break; 266*cdf0e10cSrcweir case SID_DRAWTBX_CONNECTORS: 267*cdf0e10cSrcweir aTbxResName.appendAscii( "connectorsbar" ); 268*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 269*cdf0e10cSrcweir break; 270*cdf0e10cSrcweir case SID_DRAWTBX_INSERT: 271*cdf0e10cSrcweir aTbxResName.appendAscii( "insertbar" ); 272*cdf0e10cSrcweir aToolBarResStr = aTbxResName.makeStringAndClear(); 273*cdf0e10cSrcweir break; 274*cdf0e10cSrcweir } 275*cdf0e10cSrcweir 276*cdf0e10cSrcweir if ( aToolBarResStr.getLength() > 0 ) 277*cdf0e10cSrcweir createAndPositionSubToolBar( aToolBarResStr ); 278*cdf0e10cSrcweir 279*cdf0e10cSrcweir return( pWin ); 280*cdf0e10cSrcweir } 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir /*-------------------------------------------------------------------------*/ 283*cdf0e10cSrcweir 284*cdf0e10cSrcweir void SdTbxControl::StateChanged( sal_uInt16 nSId, 285*cdf0e10cSrcweir SfxItemState eState, const SfxPoolItem* pState ) 286*cdf0e10cSrcweir { 287*cdf0e10cSrcweir SfxToolBoxControl::StateChanged( nSId, eState, pState ); 288*cdf0e10cSrcweir 289*cdf0e10cSrcweir if( eState == SFX_ITEM_AVAILABLE ) 290*cdf0e10cSrcweir { 291*cdf0e10cSrcweir TbxImageItem* pItem = PTR_CAST( TbxImageItem, pState ); 292*cdf0e10cSrcweir //DBG_ASSERT( pItem, "TbxImageItem erwartet!" ); 293*cdf0e10cSrcweir // Im StarDesktop kann jetzt auch ein anderes Item ankommen, 294*cdf0e10cSrcweir // das nicht ausgewertet werden darf (#33802# und #33838#) 295*cdf0e10cSrcweir if( pItem ) 296*cdf0e10cSrcweir { 297*cdf0e10cSrcweir ToolBox& rTbx = GetToolBox(); 298*cdf0e10cSrcweir sal_uInt16 nImage = pItem->GetValue(); 299*cdf0e10cSrcweir if( nImage == 0 ) 300*cdf0e10cSrcweir { 301*cdf0e10cSrcweir if( rTbx.IsItemChecked( nSId ) ) 302*cdf0e10cSrcweir rTbx.CheckItem( nSId, sal_False ); 303*cdf0e10cSrcweir } 304*cdf0e10cSrcweir else 305*cdf0e10cSrcweir { 306*cdf0e10cSrcweir rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); 307*cdf0e10cSrcweir aSlotURL += rtl::OUString::valueOf( sal_Int32( nImage )); 308*cdf0e10cSrcweir Image aImage = GetImage( m_xFrame, 309*cdf0e10cSrcweir aSlotURL, 310*cdf0e10cSrcweir hasBigImages(), 311*cdf0e10cSrcweir GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode() ); 312*cdf0e10cSrcweir 313*cdf0e10cSrcweir // !-Operator prueft, ob Image nicht vorhanden ist 314*cdf0e10cSrcweir if( !!aImage ) 315*cdf0e10cSrcweir { 316*cdf0e10cSrcweir rTbx.SetItemImage( GetId(), aImage ); 317*cdf0e10cSrcweir rTbx.CheckItem( GetId(), IsCheckable( nImage ) ); 318*cdf0e10cSrcweir 319*cdf0e10cSrcweir if( nSId != SID_ZOOM_TOOLBOX && 320*cdf0e10cSrcweir nSId != SID_DRAWTBX_INSERT && 321*cdf0e10cSrcweir nSId != SID_POSITION && 322*cdf0e10cSrcweir nSId != SID_OBJECT_ALIGN ) 323*cdf0e10cSrcweir { 324*cdf0e10cSrcweir if( nSId != SID_OBJECT_CHOOSE_MODE && 325*cdf0e10cSrcweir rTbx.IsItemChecked( SID_OBJECT_CHOOSE_MODE ) ) 326*cdf0e10cSrcweir rTbx.CheckItem( SID_OBJECT_CHOOSE_MODE, sal_False ); 327*cdf0e10cSrcweir if( nSId != SID_DRAWTBX_TEXT && 328*cdf0e10cSrcweir rTbx.IsItemChecked( SID_DRAWTBX_TEXT ) ) 329*cdf0e10cSrcweir rTbx.CheckItem( SID_DRAWTBX_TEXT, sal_False ); 330*cdf0e10cSrcweir if( nSId != SID_DRAWTBX_RECTANGLES && 331*cdf0e10cSrcweir rTbx.IsItemChecked( SID_DRAWTBX_RECTANGLES ) ) 332*cdf0e10cSrcweir rTbx.CheckItem( SID_DRAWTBX_RECTANGLES, sal_False ); 333*cdf0e10cSrcweir if( nSId != SID_DRAWTBX_ELLIPSES && 334*cdf0e10cSrcweir rTbx.IsItemChecked( SID_DRAWTBX_ELLIPSES ) ) 335*cdf0e10cSrcweir rTbx.CheckItem( SID_DRAWTBX_ELLIPSES, sal_False ); 336*cdf0e10cSrcweir if( nSId != SID_DRAWTBX_LINES && 337*cdf0e10cSrcweir rTbx.IsItemChecked( SID_DRAWTBX_LINES ) ) 338*cdf0e10cSrcweir rTbx.CheckItem( SID_DRAWTBX_LINES, sal_False ); 339*cdf0e10cSrcweir if( nSId != SID_DRAWTBX_ARROWS && 340*cdf0e10cSrcweir rTbx.IsItemChecked( SID_DRAWTBX_ARROWS ) ) 341*cdf0e10cSrcweir rTbx.CheckItem( SID_DRAWTBX_ARROWS, sal_False ); 342*cdf0e10cSrcweir if( nSId != SID_DRAWTBX_3D_OBJECTS && 343*cdf0e10cSrcweir rTbx.IsItemChecked( SID_DRAWTBX_3D_OBJECTS ) ) 344*cdf0e10cSrcweir rTbx.CheckItem( SID_DRAWTBX_3D_OBJECTS, sal_False ); 345*cdf0e10cSrcweir if( nSId != SID_DRAWTBX_CONNECTORS && 346*cdf0e10cSrcweir rTbx.IsItemChecked( SID_DRAWTBX_CONNECTORS ) ) 347*cdf0e10cSrcweir rTbx.CheckItem( SID_DRAWTBX_CONNECTORS, sal_False ); 348*cdf0e10cSrcweir } 349*cdf0e10cSrcweir } 350*cdf0e10cSrcweir } 351*cdf0e10cSrcweir } 352*cdf0e10cSrcweir } 353*cdf0e10cSrcweir } 354*cdf0e10cSrcweir 355*cdf0e10cSrcweir /*-------------------------------------------------------------------------*/ 356*cdf0e10cSrcweir 357*cdf0e10cSrcweir sal_Bool SdTbxControl::IsCheckable( sal_uInt16 nSId ) 358*cdf0e10cSrcweir { 359*cdf0e10cSrcweir switch( nSId ) 360*cdf0e10cSrcweir { 361*cdf0e10cSrcweir case SID_OBJECT_ROTATE: 362*cdf0e10cSrcweir case SID_OBJECT_MIRROR: 363*cdf0e10cSrcweir case SID_OBJECT_CROP: 364*cdf0e10cSrcweir case SID_OBJECT_TRANSPARENCE: 365*cdf0e10cSrcweir case SID_OBJECT_GRADIENT: 366*cdf0e10cSrcweir case SID_OBJECT_SHEAR: 367*cdf0e10cSrcweir case SID_OBJECT_CROOK_ROTATE: 368*cdf0e10cSrcweir case SID_OBJECT_CROOK_SLANT: 369*cdf0e10cSrcweir case SID_OBJECT_CROOK_STRETCH: 370*cdf0e10cSrcweir case SID_CONVERT_TO_3D_LATHE: 371*cdf0e10cSrcweir 372*cdf0e10cSrcweir case SID_ATTR_CHAR: 373*cdf0e10cSrcweir case SID_ATTR_CHAR_VERTICAL: 374*cdf0e10cSrcweir case SID_TEXT_FITTOSIZE: 375*cdf0e10cSrcweir case SID_TEXT_FITTOSIZE_VERTICAL: 376*cdf0e10cSrcweir case SID_DRAW_CAPTION: 377*cdf0e10cSrcweir case SID_DRAW_CAPTION_VERTICAL: 378*cdf0e10cSrcweir case SID_DRAW_FONTWORK: 379*cdf0e10cSrcweir case SID_DRAW_FONTWORK_VERTICAL: 380*cdf0e10cSrcweir 381*cdf0e10cSrcweir case SID_DRAW_RECT: 382*cdf0e10cSrcweir case SID_DRAW_SQUARE: 383*cdf0e10cSrcweir case SID_DRAW_RECT_ROUND: 384*cdf0e10cSrcweir case SID_DRAW_SQUARE_ROUND: 385*cdf0e10cSrcweir case SID_DRAW_RECT_NOFILL: 386*cdf0e10cSrcweir case SID_DRAW_SQUARE_NOFILL: 387*cdf0e10cSrcweir case SID_DRAW_RECT_ROUND_NOFILL: 388*cdf0e10cSrcweir case SID_DRAW_SQUARE_ROUND_NOFILL: 389*cdf0e10cSrcweir 390*cdf0e10cSrcweir case SID_DRAW_ELLIPSE: 391*cdf0e10cSrcweir case SID_DRAW_CIRCLE: 392*cdf0e10cSrcweir case SID_DRAW_PIE: 393*cdf0e10cSrcweir case SID_DRAW_CIRCLEPIE: 394*cdf0e10cSrcweir case SID_DRAW_ELLIPSECUT: 395*cdf0e10cSrcweir case SID_DRAW_CIRCLECUT: 396*cdf0e10cSrcweir case SID_DRAW_ARC: 397*cdf0e10cSrcweir case SID_DRAW_CIRCLEARC: 398*cdf0e10cSrcweir case SID_DRAW_ELLIPSE_NOFILL: 399*cdf0e10cSrcweir case SID_DRAW_CIRCLE_NOFILL: 400*cdf0e10cSrcweir case SID_DRAW_PIE_NOFILL: 401*cdf0e10cSrcweir case SID_DRAW_CIRCLEPIE_NOFILL: 402*cdf0e10cSrcweir case SID_DRAW_ELLIPSECUT_NOFILL: 403*cdf0e10cSrcweir case SID_DRAW_CIRCLECUT_NOFILL: 404*cdf0e10cSrcweir 405*cdf0e10cSrcweir case SID_DRAW_BEZIER_NOFILL: 406*cdf0e10cSrcweir case SID_DRAW_POLYGON_NOFILL: 407*cdf0e10cSrcweir case SID_DRAW_XPOLYGON_NOFILL: 408*cdf0e10cSrcweir case SID_DRAW_BEZIER_FILL: 409*cdf0e10cSrcweir case SID_DRAW_POLYGON: 410*cdf0e10cSrcweir case SID_DRAW_XPOLYGON: 411*cdf0e10cSrcweir case SID_DRAW_FREELINE: 412*cdf0e10cSrcweir case SID_DRAW_FREELINE_NOFILL: 413*cdf0e10cSrcweir 414*cdf0e10cSrcweir case SID_DRAW_LINE: 415*cdf0e10cSrcweir case SID_DRAW_XLINE: 416*cdf0e10cSrcweir case SID_DRAW_MEASURELINE: 417*cdf0e10cSrcweir case SID_LINE_ARROW_START: 418*cdf0e10cSrcweir case SID_LINE_ARROW_END: 419*cdf0e10cSrcweir case SID_LINE_ARROWS: 420*cdf0e10cSrcweir case SID_LINE_ARROW_CIRCLE: 421*cdf0e10cSrcweir case SID_LINE_CIRCLE_ARROW: 422*cdf0e10cSrcweir case SID_LINE_ARROW_SQUARE: 423*cdf0e10cSrcweir case SID_LINE_SQUARE_ARROW: 424*cdf0e10cSrcweir 425*cdf0e10cSrcweir case SID_3D_CUBE: 426*cdf0e10cSrcweir case SID_3D_SPHERE: 427*cdf0e10cSrcweir case SID_3D_CYLINDER: 428*cdf0e10cSrcweir case SID_3D_CONE: 429*cdf0e10cSrcweir case SID_3D_PYRAMID: 430*cdf0e10cSrcweir case SID_3D_TORUS: 431*cdf0e10cSrcweir case SID_3D_SHELL: 432*cdf0e10cSrcweir case SID_3D_HALF_SPHERE: 433*cdf0e10cSrcweir 434*cdf0e10cSrcweir case SID_TOOL_CONNECTOR: 435*cdf0e10cSrcweir case SID_CONNECTOR_ARROW_START: 436*cdf0e10cSrcweir case SID_CONNECTOR_ARROW_END: 437*cdf0e10cSrcweir case SID_CONNECTOR_ARROWS: 438*cdf0e10cSrcweir case SID_CONNECTOR_CIRCLE_START: 439*cdf0e10cSrcweir case SID_CONNECTOR_CIRCLE_END: 440*cdf0e10cSrcweir case SID_CONNECTOR_CIRCLES: 441*cdf0e10cSrcweir case SID_CONNECTOR_LINE: 442*cdf0e10cSrcweir case SID_CONNECTOR_LINE_ARROW_START: 443*cdf0e10cSrcweir case SID_CONNECTOR_LINE_ARROW_END: 444*cdf0e10cSrcweir case SID_CONNECTOR_LINE_ARROWS: 445*cdf0e10cSrcweir case SID_CONNECTOR_LINE_CIRCLE_START: 446*cdf0e10cSrcweir case SID_CONNECTOR_LINE_CIRCLE_END: 447*cdf0e10cSrcweir case SID_CONNECTOR_LINE_CIRCLES: 448*cdf0e10cSrcweir case SID_CONNECTOR_CURVE: 449*cdf0e10cSrcweir case SID_CONNECTOR_CURVE_ARROW_START: 450*cdf0e10cSrcweir case SID_CONNECTOR_CURVE_ARROW_END: 451*cdf0e10cSrcweir case SID_CONNECTOR_CURVE_ARROWS: 452*cdf0e10cSrcweir case SID_CONNECTOR_CURVE_CIRCLE_START: 453*cdf0e10cSrcweir case SID_CONNECTOR_CURVE_CIRCLE_END: 454*cdf0e10cSrcweir case SID_CONNECTOR_CURVE_CIRCLES: 455*cdf0e10cSrcweir case SID_CONNECTOR_LINES: 456*cdf0e10cSrcweir case SID_CONNECTOR_LINES_ARROW_START: 457*cdf0e10cSrcweir case SID_CONNECTOR_LINES_ARROW_END: 458*cdf0e10cSrcweir case SID_CONNECTOR_LINES_ARROWS: 459*cdf0e10cSrcweir case SID_CONNECTOR_LINES_CIRCLE_START: 460*cdf0e10cSrcweir case SID_CONNECTOR_LINES_CIRCLE_END: 461*cdf0e10cSrcweir case SID_CONNECTOR_LINES_CIRCLES: 462*cdf0e10cSrcweir 463*cdf0e10cSrcweir 464*cdf0e10cSrcweir 465*cdf0e10cSrcweir //case SID_ZOOM_OUT: 466*cdf0e10cSrcweir return( sal_True ); 467*cdf0e10cSrcweir } 468*cdf0e10cSrcweir return( sal_False ); 469*cdf0e10cSrcweir } 470*cdf0e10cSrcweir 471*cdf0e10cSrcweir 472*cdf0e10cSrcweir 473