12ee96f1cSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 32ee96f1cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 42ee96f1cSAndrew Rist * or more contributor license agreements. See the NOTICE file 52ee96f1cSAndrew Rist * distributed with this work for additional information 62ee96f1cSAndrew Rist * regarding copyright ownership. The ASF licenses this file 72ee96f1cSAndrew Rist * to you under the Apache License, Version 2.0 (the 82ee96f1cSAndrew Rist * "License"); you may not use this file except in compliance 92ee96f1cSAndrew Rist * with the License. You may obtain a copy of the License at 102ee96f1cSAndrew Rist * 112ee96f1cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 122ee96f1cSAndrew Rist * 132ee96f1cSAndrew Rist * Unless required by applicable law or agreed to in writing, 142ee96f1cSAndrew Rist * software distributed under the License is distributed on an 152ee96f1cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 162ee96f1cSAndrew Rist * KIND, either express or implied. See the License for the 172ee96f1cSAndrew Rist * specific language governing permissions and limitations 182ee96f1cSAndrew Rist * under the License. 192ee96f1cSAndrew Rist * 202ee96f1cSAndrew Rist *************************************************************/ 212ee96f1cSAndrew Rist 222ee96f1cSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_cui.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir // include --------------------------------------------------------------- 28cdf0e10cSrcweir 29cdf0e10cSrcweir #ifndef _SVX_SIZEITEM_HXX //autogen 30cdf0e10cSrcweir 31cdf0e10cSrcweir #include <editeng/sizeitem.hxx> 32cdf0e10cSrcweir #endif 33cdf0e10cSrcweir #include <tools/shl.hxx> 34cdf0e10cSrcweir #include <tools/urlobj.hxx> 35cdf0e10cSrcweir #include <sfx2/app.hxx> 36cdf0e10cSrcweir #include <sfx2/module.hxx> 37cdf0e10cSrcweir 38cdf0e10cSrcweir #define _SVX_TPLINE_CXX 39cdf0e10cSrcweir 40cdf0e10cSrcweir #include <cuires.hrc> 41cdf0e10cSrcweir #include "tabline.hrc" 42cdf0e10cSrcweir #include "svx/xattr.hxx" 43cdf0e10cSrcweir #include <svx/xpool.hxx> 44cdf0e10cSrcweir #include <svx/xtable.hxx> 45cdf0e10cSrcweir #include "svx/drawitem.hxx" 46cdf0e10cSrcweir #include "cuitabline.hxx" 47cdf0e10cSrcweir #include "dlgname.hxx" 48cdf0e10cSrcweir #include <dialmgr.hxx> 49cdf0e10cSrcweir #include "svx/dlgutil.hxx" 50cdf0e10cSrcweir #include <svx/svdmodel.hxx> 51cdf0e10cSrcweir #include "svx/svxgrahicitem.hxx" 52cdf0e10cSrcweir //#include "linectrl.hrc" 53cdf0e10cSrcweir #include <sfx2/request.hxx> 54cdf0e10cSrcweir #include "svx/ofaitem.hxx" 55cdf0e10cSrcweir #include <svx/svdobj.hxx> 56cdf0e10cSrcweir #include <svx/svdview.hxx> 57cdf0e10cSrcweir #include <svx/svdmodel.hxx> 58cdf0e10cSrcweir #include <svx/numvset.hxx> 59cdf0e10cSrcweir #include <vcl/msgbox.hxx> 60cdf0e10cSrcweir #include <editeng/numitem.hxx> 61cdf0e10cSrcweir #include <editeng/svxenum.hxx> 62cdf0e10cSrcweir #include <sfx2/objsh.hxx> 63cdf0e10cSrcweir #include <editeng/brshitem.hxx> 64cdf0e10cSrcweir #include <svx/gallery.hxx> 65cdf0e10cSrcweir #include <unotools/localfilehelper.hxx> 66cdf0e10cSrcweir #include "paragrph.hrc" 67cdf0e10cSrcweir #include "sfx2/opengrf.hxx" 68cdf0e10cSrcweir #include <svx/dialmgr.hxx> 69cdf0e10cSrcweir #include <svx/dialogs.hrc> 70cdf0e10cSrcweir 71cdf0e10cSrcweir #define MAX_BMP_WIDTH 16 72cdf0e10cSrcweir #define MAX_BMP_HEIGHT 16 73cdf0e10cSrcweir // define ---------------------------------------------------------------- 74cdf0e10cSrcweir 75cdf0e10cSrcweir #define DLGWIN this->GetParent()->GetParent() 76cdf0e10cSrcweir 77cdf0e10cSrcweir #define BITMAP_WIDTH 32 78cdf0e10cSrcweir #define BITMAP_HEIGHT 12 79cdf0e10cSrcweir #define XOUT_WIDTH 150 80cdf0e10cSrcweir 81cdf0e10cSrcweir // static ---------------------------------------------------------------- 82cdf0e10cSrcweir 83cdf0e10cSrcweir static sal_uInt16 pLineRanges[] = 84cdf0e10cSrcweir { 85cdf0e10cSrcweir XATTR_LINETRANSPARENCE, 86cdf0e10cSrcweir XATTR_LINETRANSPARENCE, 87cdf0e10cSrcweir SID_ATTR_LINE_STYLE, 88cdf0e10cSrcweir SID_ATTR_LINE_ENDCENTER, 89cdf0e10cSrcweir 0 90cdf0e10cSrcweir }; 91cdf0e10cSrcweir 92cdf0e10cSrcweir /************************************************************************* 93cdf0e10cSrcweir |* 94cdf0e10cSrcweir |* Dialog zum Aendern der Linien 95cdf0e10cSrcweir |* 96cdf0e10cSrcweir \************************************************************************/ 97cdf0e10cSrcweir 98cdf0e10cSrcweir SvxLineTabPage::SvxLineTabPage 99cdf0e10cSrcweir ( 100cdf0e10cSrcweir Window* pParent, 101cdf0e10cSrcweir const SfxItemSet& rInAttrs 102cdf0e10cSrcweir ) : 103cdf0e10cSrcweir SvxTabPage ( pParent, CUI_RES( RID_SVXPAGE_LINE ), rInAttrs ), 104cdf0e10cSrcweir aFlLine ( this, CUI_RES( FL_LINE ) ), 105cdf0e10cSrcweir aFtLineStyle ( this, CUI_RES( FT_LINE_STYLE ) ), 106cdf0e10cSrcweir aLbLineStyle ( this, CUI_RES( LB_LINE_STYLE ) ), 107cdf0e10cSrcweir aFtColor ( this, CUI_RES( FT_COLOR ) ), 108cdf0e10cSrcweir aLbColor ( this, CUI_RES( LB_COLOR ) ), 109cdf0e10cSrcweir aFtLineWidth ( this, CUI_RES( FT_LINE_WIDTH ) ), 110cdf0e10cSrcweir aMtrLineWidth ( this, CUI_RES( MTR_FLD_LINE_WIDTH ) ), 111cdf0e10cSrcweir aFtTransparent ( this, CUI_RES( FT_TRANSPARENT ) ), 112cdf0e10cSrcweir aMtrTransparent ( this, CUI_RES( MTR_LINE_TRANSPARENT ) ), 113cdf0e10cSrcweir aFlLineEnds ( this, CUI_RES( FL_LINE_ENDS ) ), 114cdf0e10cSrcweir aLbStartStyle ( this, CUI_RES( LB_START_STYLE ) ), 115cdf0e10cSrcweir aMtrStartWidth ( this, CUI_RES( MTR_FLD_START_WIDTH ) ), 116cdf0e10cSrcweir aTsbCenterStart ( this, CUI_RES( TSB_CENTER_START ) ), 117cdf0e10cSrcweir aFtLineEndsStyle ( this, CUI_RES( FT_LINE_ENDS_STYLE ) ), 118cdf0e10cSrcweir aLbEndStyle ( this, CUI_RES( LB_END_STYLE ) ), 119cdf0e10cSrcweir aFtLineEndsWidth ( this, CUI_RES( FT_LINE_ENDS_WIDTH ) ), 120cdf0e10cSrcweir aMtrEndWidth ( this, CUI_RES( MTR_FLD_END_WIDTH ) ), 121cdf0e10cSrcweir aTsbCenterEnd ( this, CUI_RES( TSB_CENTER_END ) ), 122cdf0e10cSrcweir aCbxSynchronize ( this, CUI_RES( CBX_SYNCHRONIZE ) ), 123cdf0e10cSrcweir aFLSeparator ( this, CUI_RES( FL_SEPARATOR ) ), 124cdf0e10cSrcweir aCtlPreview ( this, CUI_RES( CTL_PREVIEW ) ), 125cdf0e10cSrcweir 126cdf0e10cSrcweir // #116827# 127cdf0e10cSrcweir maFLEdgeStyle ( this, CUI_RES( FL_EDGE_STYLE ) ), 128cdf0e10cSrcweir maFTEdgeStyle ( this, CUI_RES( FT_EDGE_STYLE ) ), 129cdf0e10cSrcweir maLBEdgeStyle ( this, CUI_RES( LB_EDGE_STYLE ) ), 130cdf0e10cSrcweir 1315aaf853bSArmin Le Grand // LineCaps 1325aaf853bSArmin Le Grand maFTCapStyle ( this, CUI_RES( FT_CAP_STYLE ) ), 1335aaf853bSArmin Le Grand maLBCapStyle ( this, CUI_RES( LB_CAP_STYLE ) ), 1345aaf853bSArmin Le Grand 135cdf0e10cSrcweir pSymbolList(NULL), 136cdf0e10cSrcweir bNewSize(false), 137cdf0e10cSrcweir nNumMenuGalleryItems(0), 138cdf0e10cSrcweir nSymbolType(SVX_SYMBOLTYPE_UNKNOWN), //unbekannt bzw. unchanged 139cdf0e10cSrcweir pSymbolAttr(NULL), 140cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart) 141cdf0e10cSrcweir aFlSymbol ( this, CUI_RES(FL_SYMBOL_FORMAT)), 142cdf0e10cSrcweir aSymbolMB ( this, CUI_RES(MB_SYMBOL_BITMAP)), 143cdf0e10cSrcweir aSymbolWidthFT ( this, CUI_RES(FT_SYMBOL_WIDTH)), 144cdf0e10cSrcweir aSymbolWidthMF ( this, CUI_RES(MF_SYMBOL_WIDTH)), 145cdf0e10cSrcweir aSymbolHeightFT ( this, CUI_RES(FT_SYMBOL_HEIGHT)), 146cdf0e10cSrcweir aSymbolHeightMF ( this, CUI_RES(MF_SYMBOL_HEIGHT)), 147cdf0e10cSrcweir aSymbolRatioCB ( this, CUI_RES(CB_SYMBOL_RATIO)), 148cdf0e10cSrcweir 149cdf0e10cSrcweir bLastWidthModified(sal_False), 150cdf0e10cSrcweir aSymbolLastSize(Size(0,0)), 151cdf0e10cSrcweir bSymbols(sal_False), 152cdf0e10cSrcweir 153cdf0e10cSrcweir rOutAttrs ( rInAttrs ), 154cdf0e10cSrcweir bObjSelected( sal_False ), 155cdf0e10cSrcweir 156cdf0e10cSrcweir pXPool ( (XOutdevItemPool*) rInAttrs.GetPool() ), 157cdf0e10cSrcweir aXLStyle ( XLINE_DASH ), 158cdf0e10cSrcweir aXWidth ( 1 ), 159cdf0e10cSrcweir aXDash ( String(), XDash( XDASH_RECT, 3, 7, 2, 40, 15 ) ), 160cdf0e10cSrcweir aXColor ( String(), COL_LIGHTRED ), 161cdf0e10cSrcweir aXLineAttr ( pXPool ), 162cdf0e10cSrcweir rXLSet ( aXLineAttr.GetItemSet() ), 163cdf0e10cSrcweir pnLineEndListState( 0 ), 164cdf0e10cSrcweir pnDashListState( 0 ), 165cdf0e10cSrcweir pnColorTableState( 0 ), 166cdf0e10cSrcweir nPageType ( 0 )//CHINA001 pPageType ( NULL ), 167cdf0e10cSrcweir { 168cdf0e10cSrcweir aLbEndStyle.SetAccessibleName(String(CUI_RES(STR_STYLE))); 169cdf0e10cSrcweir aLbStartStyle.SetAccessibleName(String(CUI_RES( STR_LB_START_STYLE ) ) ); 170cdf0e10cSrcweir aMtrStartWidth.SetAccessibleName(String(CUI_RES( STR_MTR_FLD_START_WIDTH ) ) ); 171cdf0e10cSrcweir aLbEndStyle.SetAccessibleName(String(CUI_RES( STR_LB_END_STYLE ) ) ); 172cdf0e10cSrcweir aMtrEndWidth.SetAccessibleName(String(CUI_RES( STR_MTR_FLD_END_WIDTH ) ) ); 173cdf0e10cSrcweir aTsbCenterStart.SetAccessibleName(String(CUI_RES( STR_CENTER_START ) ) ); 174cdf0e10cSrcweir aTsbCenterEnd.SetAccessibleName(String(CUI_RES( STR_CENTER_END ) ) ); 175cdf0e10cSrcweir 176cdf0e10cSrcweir FreeResource(); 177cdf0e10cSrcweir 178cdf0e10cSrcweir aCtlPreview.SetAccessibleName(String(CUI_RES(STR_EXAMPLE))); 179cdf0e10cSrcweir 180cdf0e10cSrcweir // diese Page braucht ExchangeSupport 181cdf0e10cSrcweir SetExchangeSupport(); 182cdf0e10cSrcweir 183cdf0e10cSrcweir // Metrik einstellen 184cdf0e10cSrcweir FieldUnit eFUnit = GetModuleFieldUnit( rInAttrs ); 185cdf0e10cSrcweir 186cdf0e10cSrcweir switch ( eFUnit ) 187cdf0e10cSrcweir { 188cdf0e10cSrcweir case FUNIT_M: 189cdf0e10cSrcweir case FUNIT_KM: 190cdf0e10cSrcweir eFUnit = FUNIT_MM; 191cdf0e10cSrcweir // no break -> we now have mm 192cdf0e10cSrcweir case FUNIT_MM: 193cdf0e10cSrcweir aMtrLineWidth.SetSpinSize( 50 ); 194cdf0e10cSrcweir aMtrStartWidth.SetSpinSize( 50 ); 195cdf0e10cSrcweir aMtrEndWidth.SetSpinSize( 50 ); 196cdf0e10cSrcweir break; 197cdf0e10cSrcweir 198cdf0e10cSrcweir case FUNIT_INCH: 199cdf0e10cSrcweir aMtrLineWidth.SetSpinSize( 2 ); 200cdf0e10cSrcweir aMtrStartWidth.SetSpinSize( 2 ); 201cdf0e10cSrcweir aMtrEndWidth.SetSpinSize( 2 ); 202cdf0e10cSrcweir break; 203cdf0e10cSrcweir default: ;//prevent warning 204cdf0e10cSrcweir } 205cdf0e10cSrcweir SetFieldUnit( aMtrLineWidth, eFUnit ); 206cdf0e10cSrcweir SetFieldUnit( aMtrStartWidth, eFUnit ); 207cdf0e10cSrcweir SetFieldUnit( aMtrEndWidth, eFUnit ); 208cdf0e10cSrcweir 209cdf0e10cSrcweir // PoolUnit ermitteln 210cdf0e10cSrcweir SfxItemPool* pPool = rOutAttrs.GetPool(); 211cdf0e10cSrcweir DBG_ASSERT( pPool, "Wo ist der Pool?" ); 212cdf0e10cSrcweir ePoolUnit = pPool->GetMetric( SID_ATTR_LINE_WIDTH ); 213cdf0e10cSrcweir 214cdf0e10cSrcweir aLbLineStyle.SetSelectHdl( 215cdf0e10cSrcweir LINK( this, SvxLineTabPage, ClickInvisibleHdl_Impl ) ); 216cdf0e10cSrcweir aLbColor.SetSelectHdl( 217cdf0e10cSrcweir LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) ); 218cdf0e10cSrcweir aMtrLineWidth.SetModifyHdl( 219cdf0e10cSrcweir LINK( this, SvxLineTabPage, ChangePreviewHdl_Impl ) ); 220cdf0e10cSrcweir aMtrTransparent.SetModifyHdl( 221cdf0e10cSrcweir LINK( this, SvxLineTabPage, ChangeTransparentHdl_Impl ) ); 222cdf0e10cSrcweir 223cdf0e10cSrcweir Link aStart = LINK( this, SvxLineTabPage, ChangeStartHdl_Impl ); 224cdf0e10cSrcweir Link aEnd = LINK( this, SvxLineTabPage, ChangeEndHdl_Impl ); 225cdf0e10cSrcweir aLbStartStyle.SetSelectHdl( aStart ); 226cdf0e10cSrcweir aLbEndStyle.SetSelectHdl( aEnd ); 227cdf0e10cSrcweir aMtrStartWidth.SetModifyHdl( aStart ); 228cdf0e10cSrcweir aMtrEndWidth.SetModifyHdl( aEnd ); 229cdf0e10cSrcweir aTsbCenterStart.SetClickHdl( aStart ); 230cdf0e10cSrcweir aTsbCenterEnd.SetClickHdl( aEnd ); 231cdf0e10cSrcweir 232cdf0e10cSrcweir pColorTab = NULL; 233cdf0e10cSrcweir pDashList = NULL; 234cdf0e10cSrcweir pLineEndList = NULL; 235cdf0e10cSrcweir 236cdf0e10cSrcweir // #116827# 237cdf0e10cSrcweir Link aEdgeStyle = LINK( this, SvxLineTabPage, ChangeEdgeStyleHdl_Impl ); 238cdf0e10cSrcweir maLBEdgeStyle.SetSelectHdl( aEdgeStyle ); 239cdf0e10cSrcweir 2405aaf853bSArmin Le Grand // LineCaps 2415aaf853bSArmin Le Grand Link aCapStyle = LINK( this, SvxLineTabPage, ChangeCapStyleHdl_Impl ); 2425aaf853bSArmin Le Grand maLBCapStyle.SetSelectHdl( aCapStyle ); 2435aaf853bSArmin Le Grand 244cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart) , MB-Handler setzen 245cdf0e10cSrcweir aSymbolMB.SetSelectHdl(LINK(this, SvxLineTabPage, GraphicHdl_Impl)); 246cdf0e10cSrcweir aSymbolMB.SetActivateHdl(LINK(this, SvxLineTabPage, MenuCreateHdl_Impl)); 247cdf0e10cSrcweir aSymbolWidthMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl)); 248cdf0e10cSrcweir aSymbolHeightMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl)); 249cdf0e10cSrcweir aSymbolRatioCB.SetClickHdl(LINK(this, SvxLineTabPage, RatioHdl_Impl)); 250cdf0e10cSrcweir 251cdf0e10cSrcweir aSymbolRatioCB.Check(sal_True); 252cdf0e10cSrcweir ShowSymbolControls(sal_False); 253cdf0e10cSrcweir 254cdf0e10cSrcweir // #63083# 255cdf0e10cSrcweir nActLineWidth = -1; 256cdf0e10cSrcweir } 257cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart) , Symbol-Controls aktivieren 258cdf0e10cSrcweir void SvxLineTabPage::ShowSymbolControls(sal_Bool bOn) 259cdf0e10cSrcweir { 260cdf0e10cSrcweir bSymbols=bOn; 261cdf0e10cSrcweir aSymbolWidthFT.Show(bOn); 262cdf0e10cSrcweir aSymbolWidthMF.Show(bOn); 263cdf0e10cSrcweir aSymbolHeightFT.Show(bOn); 264cdf0e10cSrcweir aSymbolHeightMF.Show(bOn); 265cdf0e10cSrcweir aFlSymbol.Show(bOn); 266cdf0e10cSrcweir aSymbolRatioCB.Show(bOn); 267cdf0e10cSrcweir aSymbolMB.Show(bOn); 268cdf0e10cSrcweir aCtlPreview.ShowSymbol(bOn); 269cdf0e10cSrcweir } 270cdf0e10cSrcweir // ----------------------------------------------------------------------- 271cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart) , dtor neu! 272cdf0e10cSrcweir SvxLineTabPage::~SvxLineTabPage() 273cdf0e10cSrcweir { 274cdf0e10cSrcweir delete aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY ); 275cdf0e10cSrcweir 276cdf0e10cSrcweir if(pSymbolList) 277cdf0e10cSrcweir delete aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ); 278cdf0e10cSrcweir 279cdf0e10cSrcweir String* pStr = (String*)aGrfNames.First(); 280cdf0e10cSrcweir while( pStr ) 281cdf0e10cSrcweir { 282cdf0e10cSrcweir delete pStr; 283cdf0e10cSrcweir pStr = (String*)aGrfNames.Next(); 284cdf0e10cSrcweir } 285cdf0e10cSrcweir SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.First(); 286cdf0e10cSrcweir while( pInfo ) 287cdf0e10cSrcweir { 288cdf0e10cSrcweir delete pInfo->pBrushItem; 289cdf0e10cSrcweir delete pInfo; 290cdf0e10cSrcweir pInfo = (SvxBmpItemInfo*)aGrfBrushItems.Next(); 291cdf0e10cSrcweir } 292cdf0e10cSrcweir } 293cdf0e10cSrcweir void SvxLineTabPage::Construct() 294cdf0e10cSrcweir { 295cdf0e10cSrcweir // Farbtabelle 296cdf0e10cSrcweir aLbColor.Fill( pColorTab ); 297cdf0e10cSrcweir FillListboxes(); 298cdf0e10cSrcweir } 299cdf0e10cSrcweir 300cdf0e10cSrcweir void SvxLineTabPage::FillListboxes() 301cdf0e10cSrcweir { 302cdf0e10cSrcweir // Linienstile 303cdf0e10cSrcweir sal_uInt16 nOldSelect = aLbLineStyle.GetSelectEntryPos(); 304cdf0e10cSrcweir aLbLineStyle.FillStyles(); 305cdf0e10cSrcweir aLbLineStyle.Fill( pDashList ); 306cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( nOldSelect ); 307cdf0e10cSrcweir 308cdf0e10cSrcweir // LinienEndenStile 309cdf0e10cSrcweir String sNone( SVX_RES( RID_SVXSTR_NONE ) ); 310cdf0e10cSrcweir nOldSelect = aLbStartStyle.GetSelectEntryPos(); 311cdf0e10cSrcweir aLbStartStyle.Clear(); 312cdf0e10cSrcweir aLbStartStyle.InsertEntry( sNone ); 313cdf0e10cSrcweir aLbStartStyle.Fill( pLineEndList ); 314cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( nOldSelect ); 315cdf0e10cSrcweir nOldSelect = aLbEndStyle.GetSelectEntryPos(); 316cdf0e10cSrcweir aLbEndStyle.Clear(); 317cdf0e10cSrcweir aLbEndStyle.InsertEntry( sNone ); 318cdf0e10cSrcweir aLbEndStyle.Fill( pLineEndList, sal_False ); 319cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( nOldSelect ); 320cdf0e10cSrcweir } 321cdf0e10cSrcweir 322cdf0e10cSrcweir // ----------------------------------------------------------------------- 323cdf0e10cSrcweir 324cdf0e10cSrcweir void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) 325cdf0e10cSrcweir { 326cdf0e10cSrcweir SFX_ITEMSET_ARG (&rSet,pPageTypeItem,CntUInt16Item,SID_PAGE_TYPE,sal_False); //add CHINA001 begin 327cdf0e10cSrcweir if (pPageTypeItem) 328cdf0e10cSrcweir SetPageType(pPageTypeItem->GetValue()); //add CHINA001 end 329cdf0e10cSrcweir if( nDlgType == 0 && pDashList ) //CHINA001 if( *pDlgType == 0 && pDashList ) // Linien-Dialog 330cdf0e10cSrcweir { 331cdf0e10cSrcweir sal_uInt16 nPos; 332cdf0e10cSrcweir sal_uInt16 nCount; 333cdf0e10cSrcweir 334cdf0e10cSrcweir // Dashliste 335cdf0e10cSrcweir if( ( *pnDashListState & CT_MODIFIED ) || 336cdf0e10cSrcweir ( *pnDashListState & CT_CHANGED ) ) 337cdf0e10cSrcweir { 338cdf0e10cSrcweir if( *pnDashListState & CT_CHANGED ) 339cdf0e10cSrcweir pDashList = ( (SvxLineTabDialog*) DLGWIN )-> 340cdf0e10cSrcweir GetNewDashList(); 341cdf0e10cSrcweir *pnDashListState = CT_NONE; 342cdf0e10cSrcweir 343cdf0e10cSrcweir // Styleliste 344cdf0e10cSrcweir nPos = aLbLineStyle.GetSelectEntryPos(); 345cdf0e10cSrcweir 346cdf0e10cSrcweir aLbLineStyle.Clear(); 347cdf0e10cSrcweir aLbLineStyle.InsertEntry( 348cdf0e10cSrcweir SVX_RESSTR( RID_SVXSTR_INVISIBLE ) ); 349cdf0e10cSrcweir aLbLineStyle.InsertEntry( 350cdf0e10cSrcweir SVX_RESSTR( RID_SVXSTR_SOLID ) ); 351cdf0e10cSrcweir aLbLineStyle.Fill( pDashList ); 352cdf0e10cSrcweir nCount = aLbLineStyle.GetEntryCount(); 353cdf0e10cSrcweir 354cdf0e10cSrcweir if ( nCount == 0 ) 355cdf0e10cSrcweir ; // Dieser Fall sollte nicht auftreten 356cdf0e10cSrcweir else if( nCount <= nPos ) 357cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( 0 ); 358cdf0e10cSrcweir else 359cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( nPos ); 360cdf0e10cSrcweir // SelectStyleHdl_Impl( this ); 361cdf0e10cSrcweir } 362cdf0e10cSrcweir 363cdf0e10cSrcweir INetURLObject aDashURL( pDashList->GetPath() ); 364cdf0e10cSrcweir 365cdf0e10cSrcweir aDashURL.Append( pDashList->GetName() ); 366cdf0e10cSrcweir DBG_ASSERT( aDashURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); 367cdf0e10cSrcweir /* // Ermitteln (evtl. abschneiden) des Namens und in 368cdf0e10cSrcweir // der GroupBox darstellen 369cdf0e10cSrcweir String aString( ResId( RID_SVXSTR_TABLE, pMgr ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); 370cdf0e10cSrcweir 371cdf0e10cSrcweir if ( aDashURL.getBase().Len() > 18 ) 372cdf0e10cSrcweir { 373cdf0e10cSrcweir aString += aDashURL.getBase().Copy( 0, 15 ); 374cdf0e10cSrcweir aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) ); 375cdf0e10cSrcweir } 376cdf0e10cSrcweir else 377cdf0e10cSrcweir aString += aDashURL.getBase(); 378cdf0e10cSrcweir 379cdf0e10cSrcweir aGrpLine.SetText( aString ); 380cdf0e10cSrcweir */ 381cdf0e10cSrcweir // LineEndliste 382cdf0e10cSrcweir if( ( *pnLineEndListState & CT_MODIFIED ) || 383cdf0e10cSrcweir ( *pnLineEndListState & CT_CHANGED ) ) 384cdf0e10cSrcweir { 385cdf0e10cSrcweir if( *pnLineEndListState & CT_CHANGED ) 386cdf0e10cSrcweir pLineEndList = ( (SvxLineTabDialog*) DLGWIN )-> 387cdf0e10cSrcweir GetNewLineEndList(); 388cdf0e10cSrcweir *pnLineEndListState = CT_NONE; 389cdf0e10cSrcweir 390cdf0e10cSrcweir nPos = aLbLineStyle.GetSelectEntryPos(); 391cdf0e10cSrcweir String sNone( SVX_RES( RID_SVXSTR_NONE ) ); 392cdf0e10cSrcweir aLbStartStyle.Clear(); 393cdf0e10cSrcweir aLbStartStyle.InsertEntry( sNone ); 394cdf0e10cSrcweir 395cdf0e10cSrcweir aLbStartStyle.Fill( pLineEndList ); 396cdf0e10cSrcweir nCount = aLbStartStyle.GetEntryCount(); 397cdf0e10cSrcweir if( nCount == 0 ) 398cdf0e10cSrcweir ; // Dieser Fall sollte nicht auftreten 399cdf0e10cSrcweir else if( nCount <= nPos ) 400cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( 0 ); 401cdf0e10cSrcweir else 402cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( nPos ); 403cdf0e10cSrcweir 404cdf0e10cSrcweir aLbEndStyle.Clear(); 405cdf0e10cSrcweir aLbEndStyle.InsertEntry( sNone ); 406cdf0e10cSrcweir 407cdf0e10cSrcweir aLbEndStyle.Fill( pLineEndList, sal_False ); 408cdf0e10cSrcweir nCount = aLbEndStyle.GetEntryCount(); 409cdf0e10cSrcweir 410cdf0e10cSrcweir if( nCount == 0 ) 411cdf0e10cSrcweir ; // Dieser Fall sollte nicht auftreten 412cdf0e10cSrcweir else if( nCount <= nPos ) 413cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( 0 ); 414cdf0e10cSrcweir else 415cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( nPos ); 416cdf0e10cSrcweir } 417cdf0e10cSrcweir INetURLObject aLineURL( pLineEndList->GetPath() ); 418cdf0e10cSrcweir 419cdf0e10cSrcweir aLineURL.Append( pLineEndList->GetName() ); 420cdf0e10cSrcweir DBG_ASSERT( aLineURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); 421cdf0e10cSrcweir /* // Ermitteln (evtl. abschneiden) des Namens und in 422cdf0e10cSrcweir // der GroupBox darstellen 423cdf0e10cSrcweir aString = String( ResId( RID_SVXSTR_TABLE, pMgr ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); 424cdf0e10cSrcweir 425cdf0e10cSrcweir if ( aLineURL.getBase().Len() > 18 ) 426cdf0e10cSrcweir { 427cdf0e10cSrcweir aString += aLineURL.getBase().Copy( 0, 15 ); 428cdf0e10cSrcweir aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) ); 429cdf0e10cSrcweir } 430cdf0e10cSrcweir else 431cdf0e10cSrcweir aString += aLineURL.getBase(); 432cdf0e10cSrcweir 433cdf0e10cSrcweir aGrpLineEnds.SetText( aString ); 434cdf0e10cSrcweir */ 435cdf0e10cSrcweir // Auswertung, ob von einer anderen TabPage ein anderer Fuelltyp gesetzt wurde 436cdf0e10cSrcweir if( aLbLineStyle.GetSelectEntryPos() != 0 ) 437cdf0e10cSrcweir { 438cdf0e10cSrcweir if( nPageType == 2 ) // 1//CHINA001 if( *pPageType == 2 ) // 1 439cdf0e10cSrcweir { 440cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( *pPosDashLb + 2 ); // +2 wegen SOLID und INVLISIBLE 441cdf0e10cSrcweir ChangePreviewHdl_Impl( this ); 442cdf0e10cSrcweir } 443cdf0e10cSrcweir if( nPageType == 3 )//CHINA001 if( *pPageType == 3 ) 444cdf0e10cSrcweir { 445cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( *pPosLineEndLb + 1 );// +1 wegen SOLID 446cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( *pPosLineEndLb + 1 );// +1 wegen SOLID 447cdf0e10cSrcweir ChangePreviewHdl_Impl( this ); 448cdf0e10cSrcweir } 449cdf0e10cSrcweir } 450cdf0e10cSrcweir 451cdf0e10cSrcweir // ColorTable 452cdf0e10cSrcweir if( *pnColorTableState ) 453cdf0e10cSrcweir { 454cdf0e10cSrcweir if( *pnColorTableState & CT_CHANGED ) 455cdf0e10cSrcweir pColorTab = ( (SvxLineTabDialog*) DLGWIN )-> 456cdf0e10cSrcweir GetNewColorTable(); 457cdf0e10cSrcweir // aLbColor 458cdf0e10cSrcweir sal_uInt16 nColorPos = aLbColor.GetSelectEntryPos(); 459cdf0e10cSrcweir aLbColor.Clear(); 460cdf0e10cSrcweir aLbColor.Fill( pColorTab ); 461cdf0e10cSrcweir nCount = aLbColor.GetEntryCount(); 462cdf0e10cSrcweir if( nCount == 0 ) 463cdf0e10cSrcweir ; // This case should never occur 464cdf0e10cSrcweir else if( nCount <= nColorPos ) 465cdf0e10cSrcweir aLbColor.SelectEntryPos( 0 ); 466cdf0e10cSrcweir else 467cdf0e10cSrcweir aLbColor.SelectEntryPos( nColorPos ); 468cdf0e10cSrcweir 469cdf0e10cSrcweir ChangePreviewHdl_Impl( this ); 470cdf0e10cSrcweir } 471cdf0e10cSrcweir 472cdf0e10cSrcweir nPageType = 0;//CHINA001 *pPageType = 0; 473cdf0e10cSrcweir } 474cdf0e10cSrcweir // Seite existiert im Ctor noch nicht, deswegen hier! 475cdf0e10cSrcweir 476cdf0e10cSrcweir else if ( nDlgType == 1100 || // Chart-Dialog//CHINA001 else if ( *pDlgType == 1100 || // Chart-Dialog 477cdf0e10cSrcweir nDlgType == 1101 )//CHINA001 *pDlgType == 1101 ) 478cdf0e10cSrcweir { 479cdf0e10cSrcweir aFtLineEndsStyle.Hide(); 480cdf0e10cSrcweir aFtLineEndsWidth.Hide(); 481cdf0e10cSrcweir aLbStartStyle.Hide(); 482cdf0e10cSrcweir aMtrStartWidth.Hide(); 483cdf0e10cSrcweir aTsbCenterStart.Hide(); 484cdf0e10cSrcweir aLbEndStyle.Hide(); 485cdf0e10cSrcweir aMtrEndWidth.Hide(); 486cdf0e10cSrcweir aTsbCenterEnd.Hide(); 487cdf0e10cSrcweir aCbxSynchronize.Hide(); 488cdf0e10cSrcweir aFlLineEnds.Hide(); 489cdf0e10cSrcweir 490cdf0e10cSrcweir // #116827# 491cdf0e10cSrcweir maFLEdgeStyle.Hide(); 492cdf0e10cSrcweir maFTEdgeStyle.Hide(); 493cdf0e10cSrcweir maLBEdgeStyle.Hide(); 4945aaf853bSArmin Le Grand 4955aaf853bSArmin Le Grand // LineCaps 4965aaf853bSArmin Le Grand maFTCapStyle.Hide(); 4975aaf853bSArmin Le Grand maLBCapStyle.Hide(); 498cdf0e10cSrcweir } 499cdf0e10cSrcweir } 500cdf0e10cSrcweir 501cdf0e10cSrcweir // ----------------------------------------------------------------------- 502cdf0e10cSrcweir 503cdf0e10cSrcweir int SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet ) 504cdf0e10cSrcweir { 505cdf0e10cSrcweir if( nDlgType == 0 ) // Linien-Dialog//CHINA001 if( *pDlgType == 0 ) // Linien-Dialog 506cdf0e10cSrcweir { 507cdf0e10cSrcweir nPageType = 1; // evtl. fuer Erweiterungen//CHINA001 *pPageType = 1; // evtl. fuer Erweiterungen 508cdf0e10cSrcweir *pPosDashLb = aLbLineStyle.GetSelectEntryPos() - 2;// erster Eintrag SOLID !!! 509cdf0e10cSrcweir sal_uInt16 nPos = aLbStartStyle.GetSelectEntryPos(); 510cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND ) 511cdf0e10cSrcweir nPos--; 512cdf0e10cSrcweir *pPosLineEndLb = nPos; 513cdf0e10cSrcweir } 514cdf0e10cSrcweir 515cdf0e10cSrcweir if( _pSet ) 516cdf0e10cSrcweir FillItemSet( *_pSet ); 517cdf0e10cSrcweir 518cdf0e10cSrcweir return( LEAVE_PAGE ); 519cdf0e10cSrcweir } 520cdf0e10cSrcweir 521cdf0e10cSrcweir // ----------------------------------------------------------------------- 522cdf0e10cSrcweir 523cdf0e10cSrcweir sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs ) 524cdf0e10cSrcweir { 525cdf0e10cSrcweir const SfxPoolItem* pOld = NULL; 526cdf0e10cSrcweir sal_uInt16 nPos; 527cdf0e10cSrcweir sal_Bool bModified = sal_False; 528cdf0e10cSrcweir 529cdf0e10cSrcweir // Um evtl. Modifikationen der Liste vorzubeugen 530cdf0e10cSrcweir // werden Items anderer Seiten nicht gesetzt 531cdf0e10cSrcweir if( nDlgType != 0 || nPageType != 2 )//CHINA001 if( *pDlgType != 0 || *pPageType != 2 ) 532cdf0e10cSrcweir { 533cdf0e10cSrcweir nPos = aLbLineStyle.GetSelectEntryPos(); 534cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND && 535cdf0e10cSrcweir nPos != aLbLineStyle.GetSavedValue() ) 536cdf0e10cSrcweir { 537cdf0e10cSrcweir XLineStyleItem* pStyleItem = NULL; 538cdf0e10cSrcweir 539cdf0e10cSrcweir if( nPos == 0 ) 540cdf0e10cSrcweir pStyleItem = new XLineStyleItem( XLINE_NONE ); 541cdf0e10cSrcweir else if( nPos == 1 ) 542cdf0e10cSrcweir pStyleItem = new XLineStyleItem( XLINE_SOLID ); 543cdf0e10cSrcweir else 544cdf0e10cSrcweir { 545cdf0e10cSrcweir pStyleItem = new XLineStyleItem( XLINE_DASH ); 546cdf0e10cSrcweir 547cdf0e10cSrcweir // Zusaetzliche Sicherheit 548cdf0e10cSrcweir if( pDashList->Count() > (long) ( nPos - 2 ) ) 549cdf0e10cSrcweir { 550cdf0e10cSrcweir XLineDashItem aDashItem( aLbLineStyle.GetSelectEntry(), 551cdf0e10cSrcweir pDashList->GetDash( nPos - 2 )->GetDash() ); 552cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEDASH ); 553cdf0e10cSrcweir if ( !pOld || !( *(const XLineDashItem*)pOld == aDashItem ) ) 554cdf0e10cSrcweir { 555cdf0e10cSrcweir rAttrs.Put( aDashItem ); 556cdf0e10cSrcweir bModified = sal_True; 557cdf0e10cSrcweir } 558cdf0e10cSrcweir } 559cdf0e10cSrcweir } 560cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINESTYLE ); 561cdf0e10cSrcweir if ( !pOld || !( *(const XLineStyleItem*)pOld == *pStyleItem ) ) 562cdf0e10cSrcweir { 563cdf0e10cSrcweir rAttrs.Put( *pStyleItem ); 564cdf0e10cSrcweir bModified = sal_True; 565cdf0e10cSrcweir } 566cdf0e10cSrcweir delete pStyleItem; 567cdf0e10cSrcweir } 568cdf0e10cSrcweir } 569cdf0e10cSrcweir // Linienbreite 570cdf0e10cSrcweir // GetSavedValue() liefert String! 571cdf0e10cSrcweir if( aMtrLineWidth.GetText() != aMtrLineWidth.GetSavedValue() ) 572cdf0e10cSrcweir { 573cdf0e10cSrcweir XLineWidthItem aItem( GetCoreValue( aMtrLineWidth, ePoolUnit ) ); 574cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEWIDTH ); 575cdf0e10cSrcweir if ( !pOld || !( *(const XLineWidthItem*)pOld == aItem ) ) 576cdf0e10cSrcweir { 577cdf0e10cSrcweir rAttrs.Put( aItem ); 578cdf0e10cSrcweir bModified = sal_True; 579cdf0e10cSrcweir } 580cdf0e10cSrcweir } 581cdf0e10cSrcweir //Breite Linienanfang 582cdf0e10cSrcweir if( aMtrStartWidth.GetText() != aMtrStartWidth.GetSavedValue() ) 583cdf0e10cSrcweir { 584cdf0e10cSrcweir XLineStartWidthItem aItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) ); 585cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINESTARTWIDTH ); 586cdf0e10cSrcweir if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) ) 587cdf0e10cSrcweir { 588cdf0e10cSrcweir rAttrs.Put( aItem ); 589cdf0e10cSrcweir bModified = sal_True; 590cdf0e10cSrcweir } 591cdf0e10cSrcweir } 592cdf0e10cSrcweir //Breite Linienende 593cdf0e10cSrcweir if( aMtrEndWidth.GetText() != aMtrEndWidth.GetSavedValue() ) 594cdf0e10cSrcweir { 595cdf0e10cSrcweir XLineEndWidthItem aItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) ); 596cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEENDWIDTH ); 597cdf0e10cSrcweir if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) ) 598cdf0e10cSrcweir { 599cdf0e10cSrcweir rAttrs.Put( aItem ); 600cdf0e10cSrcweir bModified = sal_True; 601cdf0e10cSrcweir } 602cdf0e10cSrcweir } 603cdf0e10cSrcweir 604cdf0e10cSrcweir // Linienfarbe 605cdf0e10cSrcweir if( aLbColor.GetSelectEntryPos() != aLbColor.GetSavedValue() ) 606cdf0e10cSrcweir { 607cdf0e10cSrcweir XLineColorItem aItem( aLbColor.GetSelectEntry(), 608cdf0e10cSrcweir aLbColor.GetSelectEntryColor() ); 609cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINECOLOR ); 610cdf0e10cSrcweir if ( !pOld || !( *(const XLineColorItem*)pOld == aItem ) ) 611cdf0e10cSrcweir { 612cdf0e10cSrcweir rAttrs.Put( aItem ); 613cdf0e10cSrcweir bModified = sal_True; 614cdf0e10cSrcweir } 615cdf0e10cSrcweir } 616cdf0e10cSrcweir 617cdf0e10cSrcweir if( nDlgType != 0 || nPageType != 3 )//CHINA001 if( *pDlgType != 0 || *pPageType != 3 ) 618cdf0e10cSrcweir { 619cdf0e10cSrcweir // Linienanfang 620cdf0e10cSrcweir nPos = aLbStartStyle.GetSelectEntryPos(); 621cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND && 622cdf0e10cSrcweir nPos != aLbStartStyle.GetSavedValue() ) 623cdf0e10cSrcweir { 624cdf0e10cSrcweir XLineStartItem* pItem = NULL; 625cdf0e10cSrcweir if( nPos == 0 ) 626cdf0e10cSrcweir pItem = new XLineStartItem(); 627cdf0e10cSrcweir else if( pLineEndList->Count() > (long) ( nPos - 1 ) ) 628cdf0e10cSrcweir pItem = new XLineStartItem( aLbStartStyle.GetSelectEntry(), 629cdf0e10cSrcweir pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ); 630cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINESTART ); 631cdf0e10cSrcweir if( pItem && 632cdf0e10cSrcweir ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) ) 633cdf0e10cSrcweir { 634cdf0e10cSrcweir rAttrs.Put( *pItem ); 635cdf0e10cSrcweir bModified = sal_True; 636cdf0e10cSrcweir } 637cdf0e10cSrcweir delete pItem; 638cdf0e10cSrcweir } 639cdf0e10cSrcweir // Linienende 640cdf0e10cSrcweir nPos = aLbEndStyle.GetSelectEntryPos(); 641cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND && 642cdf0e10cSrcweir nPos != aLbEndStyle.GetSavedValue() ) 643cdf0e10cSrcweir { 644cdf0e10cSrcweir XLineEndItem* pItem = NULL; 645cdf0e10cSrcweir if( nPos == 0 ) 646cdf0e10cSrcweir pItem = new XLineEndItem(); 647cdf0e10cSrcweir else if( pLineEndList->Count() > (long) ( nPos - 1 ) ) 648cdf0e10cSrcweir pItem = new XLineEndItem( aLbEndStyle.GetSelectEntry(), 649cdf0e10cSrcweir pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ); 650cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEEND ); 651cdf0e10cSrcweir if( pItem && 652cdf0e10cSrcweir ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) ) 653cdf0e10cSrcweir { 654cdf0e10cSrcweir rAttrs.Put( *pItem ); 655cdf0e10cSrcweir bModified = sal_True; 656cdf0e10cSrcweir } 657cdf0e10cSrcweir delete pItem; 658cdf0e10cSrcweir } 659cdf0e10cSrcweir } 660cdf0e10cSrcweir 661cdf0e10cSrcweir // Linienenden zentriert 662cdf0e10cSrcweir TriState eState = aTsbCenterStart.GetState(); 663cdf0e10cSrcweir if( eState != aTsbCenterStart.GetSavedValue() ) 664cdf0e10cSrcweir { 665cdf0e10cSrcweir XLineStartCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); 666cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINESTARTCENTER ); 667cdf0e10cSrcweir if ( !pOld || !( *(const XLineStartCenterItem*)pOld == aItem ) ) 668cdf0e10cSrcweir { 669cdf0e10cSrcweir rAttrs.Put( aItem ); 670cdf0e10cSrcweir bModified = sal_True; 671cdf0e10cSrcweir } 672cdf0e10cSrcweir } 673cdf0e10cSrcweir eState = aTsbCenterEnd.GetState(); 674cdf0e10cSrcweir if( eState != aTsbCenterEnd.GetSavedValue() ) 675cdf0e10cSrcweir { 676cdf0e10cSrcweir XLineEndCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) ); 677cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEENDCENTER ); 678cdf0e10cSrcweir if ( !pOld || !( *(const XLineEndCenterItem*)pOld == aItem ) ) 679cdf0e10cSrcweir { 680cdf0e10cSrcweir rAttrs.Put( aItem ); 681cdf0e10cSrcweir bModified = sal_True; 682cdf0e10cSrcweir } 683cdf0e10cSrcweir } 684cdf0e10cSrcweir 685cdf0e10cSrcweir //Breite Linienanfang 686cdf0e10cSrcweir if( aMtrStartWidth.GetText() != aMtrStartWidth.GetSavedValue() ) 687cdf0e10cSrcweir { 688cdf0e10cSrcweir XLineStartWidthItem aItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) ); 689cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINESTARTWIDTH ); 690cdf0e10cSrcweir if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) ) 691cdf0e10cSrcweir { 692cdf0e10cSrcweir rAttrs.Put( aItem ); 693cdf0e10cSrcweir bModified = sal_True; 694cdf0e10cSrcweir } 695cdf0e10cSrcweir } 696cdf0e10cSrcweir //Breite Linienende 697cdf0e10cSrcweir if( aMtrEndWidth.GetText() != aMtrEndWidth.GetSavedValue() ) 698cdf0e10cSrcweir { 699cdf0e10cSrcweir XLineEndWidthItem aItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) ); 700cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEENDWIDTH ); 701cdf0e10cSrcweir if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) ) 702cdf0e10cSrcweir { 703cdf0e10cSrcweir rAttrs.Put( aItem ); 704cdf0e10cSrcweir bModified = sal_True; 705cdf0e10cSrcweir } 706cdf0e10cSrcweir } 707cdf0e10cSrcweir 708cdf0e10cSrcweir // Transparenz 709cdf0e10cSrcweir sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); 710cdf0e10cSrcweir if( nVal != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() ) 711cdf0e10cSrcweir { 712cdf0e10cSrcweir XLineTransparenceItem aItem( nVal ); 713cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINETRANSPARENCE ); 714cdf0e10cSrcweir if ( !pOld || !( *(const XLineTransparenceItem*)pOld == aItem ) ) 715cdf0e10cSrcweir { 716cdf0e10cSrcweir rAttrs.Put( aItem ); 717cdf0e10cSrcweir bModified = sal_True; 718cdf0e10cSrcweir } 719cdf0e10cSrcweir } 720cdf0e10cSrcweir 721cdf0e10cSrcweir // #116827# 722cdf0e10cSrcweir nPos = maLBEdgeStyle.GetSelectEntryPos(); 723cdf0e10cSrcweir if( LISTBOX_ENTRY_NOTFOUND != nPos && nPos != maLBEdgeStyle.GetSavedValue() ) 724cdf0e10cSrcweir { 725cdf0e10cSrcweir XLineJointItem* pNew = 0L; 726cdf0e10cSrcweir 727cdf0e10cSrcweir switch(nPos) 728cdf0e10cSrcweir { 729cdf0e10cSrcweir case 0: // Rounded, default 730cdf0e10cSrcweir { 731*d5370dc8SArmin Le Grand pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_ROUND); 732cdf0e10cSrcweir break; 733cdf0e10cSrcweir } 734cdf0e10cSrcweir case 1: // - none - 735cdf0e10cSrcweir { 736*d5370dc8SArmin Le Grand pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_NONE); 737cdf0e10cSrcweir break; 738cdf0e10cSrcweir } 739cdf0e10cSrcweir case 2: // Miter 740cdf0e10cSrcweir { 741*d5370dc8SArmin Le Grand pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_MITER); 742cdf0e10cSrcweir break; 743cdf0e10cSrcweir } 744cdf0e10cSrcweir case 3: // Bevel 745cdf0e10cSrcweir { 746*d5370dc8SArmin Le Grand pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_BEVEL); 747cdf0e10cSrcweir break; 748cdf0e10cSrcweir } 749cdf0e10cSrcweir } 750cdf0e10cSrcweir 751cdf0e10cSrcweir if(pNew) 752cdf0e10cSrcweir { 753cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEJOINT ); 754cdf0e10cSrcweir 755cdf0e10cSrcweir if(!pOld || !(*(const XLineJointItem*)pOld == *pNew)) 756cdf0e10cSrcweir { 757cdf0e10cSrcweir rAttrs.Put( *pNew ); 758cdf0e10cSrcweir bModified = sal_True; 759cdf0e10cSrcweir } 760cdf0e10cSrcweir 761cdf0e10cSrcweir delete pNew; 762cdf0e10cSrcweir } 763cdf0e10cSrcweir } 764cdf0e10cSrcweir 7655aaf853bSArmin Le Grand // LineCaps 7665aaf853bSArmin Le Grand nPos = maLBCapStyle.GetSelectEntryPos(); 7675aaf853bSArmin Le Grand if( LISTBOX_ENTRY_NOTFOUND != nPos && nPos != maLBCapStyle.GetSavedValue() ) 7685aaf853bSArmin Le Grand { 7695aaf853bSArmin Le Grand XLineCapItem* pNew = 0L; 7705aaf853bSArmin Le Grand 7715aaf853bSArmin Le Grand switch(nPos) 7725aaf853bSArmin Le Grand { 7735aaf853bSArmin Le Grand case 0: // Butt (=Flat), default 7745aaf853bSArmin Le Grand { 7755aaf853bSArmin Le Grand pNew = new XLineCapItem(com::sun::star::drawing::LineCap_BUTT); 7765aaf853bSArmin Le Grand break; 7775aaf853bSArmin Le Grand } 7785aaf853bSArmin Le Grand case 1: // Round 7795aaf853bSArmin Le Grand { 7805aaf853bSArmin Le Grand pNew = new XLineCapItem(com::sun::star::drawing::LineCap_ROUND); 7815aaf853bSArmin Le Grand break; 7825aaf853bSArmin Le Grand } 7835aaf853bSArmin Le Grand case 2: // Square 7845aaf853bSArmin Le Grand { 7855aaf853bSArmin Le Grand pNew = new XLineCapItem(com::sun::star::drawing::LineCap_SQUARE); 7865aaf853bSArmin Le Grand break; 7875aaf853bSArmin Le Grand } 7885aaf853bSArmin Le Grand } 7895aaf853bSArmin Le Grand 7905aaf853bSArmin Le Grand if(pNew) 7915aaf853bSArmin Le Grand { 7925aaf853bSArmin Le Grand pOld = GetOldItem( rAttrs, XATTR_LINECAP ); 7935aaf853bSArmin Le Grand 7945aaf853bSArmin Le Grand if(!pOld || !(*(const XLineCapItem*)pOld == *pNew)) 7955aaf853bSArmin Le Grand { 7965aaf853bSArmin Le Grand rAttrs.Put( *pNew ); 7975aaf853bSArmin Le Grand bModified = sal_True; 7985aaf853bSArmin Le Grand } 7995aaf853bSArmin Le Grand 8005aaf853bSArmin Le Grand delete pNew; 8015aaf853bSArmin Le Grand } 8025aaf853bSArmin Le Grand } 8035aaf853bSArmin Le Grand 804cdf0e10cSrcweir if(nSymbolType!=SVX_SYMBOLTYPE_UNKNOWN || bNewSize) 805cdf0e10cSrcweir { 806cdf0e10cSrcweir //wurde also per Auswahl gesetzt oder Gr��e ist anders 807cdf0e10cSrcweir SvxSizeItem aSItem(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),aSymbolSize); 808cdf0e10cSrcweir const SfxPoolItem* pSOld = GetOldItem( rAttrs, rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE) ); 809cdf0e10cSrcweir bNewSize = pSOld ? *(const SvxSizeItem *)pSOld != aSItem : bNewSize ; 810cdf0e10cSrcweir if(bNewSize) 811cdf0e10cSrcweir { 812cdf0e10cSrcweir rAttrs.Put(aSItem); 813cdf0e10cSrcweir bModified=sal_True; 814cdf0e10cSrcweir } 815cdf0e10cSrcweir 816cdf0e10cSrcweir SfxInt32Item aTItem(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),nSymbolType); 817cdf0e10cSrcweir const SfxPoolItem* pTOld = GetOldItem( rAttrs, rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE) ); 818cdf0e10cSrcweir bool bNewType = pTOld == NULL || *(const SfxInt32Item*)pTOld != aTItem; 819cdf0e10cSrcweir if(bNewType && nSymbolType==SVX_SYMBOLTYPE_UNKNOWN) 820cdf0e10cSrcweir bNewType=false;//kleine Korrektur, Typ wurde garnicht gesetzt -> kein Type-Item erzeugen! 821cdf0e10cSrcweir if(bNewType) 822cdf0e10cSrcweir { 823cdf0e10cSrcweir rAttrs.Put(aTItem); 824cdf0e10cSrcweir bModified=sal_True; 825cdf0e10cSrcweir } 826cdf0e10cSrcweir 827cdf0e10cSrcweir if(nSymbolType!=SVX_SYMBOLTYPE_NONE) 828cdf0e10cSrcweir { 829cdf0e10cSrcweir SvxBrushItem aBItem(aSymbolGraphic,GPOS_MM,rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH)); 830cdf0e10cSrcweir const SfxPoolItem* pBOld = GetOldItem( rAttrs, rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH) ); 831cdf0e10cSrcweir bool bNewBrush = 832cdf0e10cSrcweir pBOld == NULL || *(const SvxBrushItem*)pBOld != aBItem; 833cdf0e10cSrcweir if(bNewBrush) 834cdf0e10cSrcweir { 835cdf0e10cSrcweir rAttrs.Put(aBItem); 836cdf0e10cSrcweir bModified=sal_True; 837cdf0e10cSrcweir } 838cdf0e10cSrcweir } 839cdf0e10cSrcweir } 840cdf0e10cSrcweir rAttrs.Put (CntUInt16Item(SID_PAGE_TYPE,nPageType));//add CHINA001 841cdf0e10cSrcweir return( bModified ); 842cdf0e10cSrcweir } 843cdf0e10cSrcweir 844cdf0e10cSrcweir // ----------------------------------------------------------------------- 845cdf0e10cSrcweir 846cdf0e10cSrcweir sal_Bool SvxLineTabPage::FillXLSet_Impl() 847cdf0e10cSrcweir { 848cdf0e10cSrcweir sal_uInt16 nPos; 849cdf0e10cSrcweir 850cdf0e10cSrcweir if( aLbLineStyle.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND ) 851cdf0e10cSrcweir { 852cdf0e10cSrcweir //rXLSet.Put( XLineDashItem ( rOutAttrs.Get( GetWhich( XATTR_LINEDASH ) ) ) ); 853cdf0e10cSrcweir rXLSet.Put( XLineStyleItem( XLINE_NONE ) ); 854cdf0e10cSrcweir } 855cdf0e10cSrcweir else if( aLbLineStyle.IsEntryPosSelected( 0 ) ) 856cdf0e10cSrcweir rXLSet.Put( XLineStyleItem( XLINE_NONE ) ); 857cdf0e10cSrcweir else if( aLbLineStyle.IsEntryPosSelected( 1 ) ) 858cdf0e10cSrcweir rXLSet.Put( XLineStyleItem( XLINE_SOLID ) ); 859cdf0e10cSrcweir else 860cdf0e10cSrcweir { 861cdf0e10cSrcweir rXLSet.Put( XLineStyleItem( XLINE_DASH ) ); 862cdf0e10cSrcweir 863cdf0e10cSrcweir nPos = aLbLineStyle.GetSelectEntryPos(); 864cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND ) 865cdf0e10cSrcweir { 866cdf0e10cSrcweir rXLSet.Put( XLineDashItem( aLbLineStyle.GetSelectEntry(), 867cdf0e10cSrcweir pDashList->GetDash( nPos - 2 )->GetDash() ) ); 868cdf0e10cSrcweir } 869cdf0e10cSrcweir } 870cdf0e10cSrcweir 871cdf0e10cSrcweir nPos = aLbStartStyle.GetSelectEntryPos(); 872cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND ) 873cdf0e10cSrcweir { 874cdf0e10cSrcweir if( nPos == 0 ) 875cdf0e10cSrcweir rXLSet.Put( XLineStartItem() ); 876cdf0e10cSrcweir else 877cdf0e10cSrcweir rXLSet.Put( XLineStartItem( aLbStartStyle.GetSelectEntry(), 878cdf0e10cSrcweir pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) ); 879cdf0e10cSrcweir } 880cdf0e10cSrcweir nPos = aLbEndStyle.GetSelectEntryPos(); 881cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND ) 882cdf0e10cSrcweir { 883cdf0e10cSrcweir if( nPos == 0 ) 884cdf0e10cSrcweir rXLSet.Put( XLineEndItem() ); 885cdf0e10cSrcweir else 886cdf0e10cSrcweir rXLSet.Put( XLineEndItem( aLbEndStyle.GetSelectEntry(), 887cdf0e10cSrcweir pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) ); 888cdf0e10cSrcweir } 889cdf0e10cSrcweir 890cdf0e10cSrcweir // #116827# 891cdf0e10cSrcweir nPos = maLBEdgeStyle.GetSelectEntryPos(); 892cdf0e10cSrcweir if(LISTBOX_ENTRY_NOTFOUND != nPos) 893cdf0e10cSrcweir { 894cdf0e10cSrcweir switch(nPos) 895cdf0e10cSrcweir { 896cdf0e10cSrcweir case 0: // Rounded, default 897cdf0e10cSrcweir { 898*d5370dc8SArmin Le Grand rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_ROUND)); 899cdf0e10cSrcweir break; 900cdf0e10cSrcweir } 901cdf0e10cSrcweir case 1: // - none - 902cdf0e10cSrcweir { 903*d5370dc8SArmin Le Grand rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_NONE)); 904cdf0e10cSrcweir break; 905cdf0e10cSrcweir } 906cdf0e10cSrcweir case 2: // Miter 907cdf0e10cSrcweir { 908*d5370dc8SArmin Le Grand rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_MITER)); 909cdf0e10cSrcweir break; 910cdf0e10cSrcweir } 911cdf0e10cSrcweir case 3: // Bevel 912cdf0e10cSrcweir { 913*d5370dc8SArmin Le Grand rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_BEVEL)); 914cdf0e10cSrcweir break; 915cdf0e10cSrcweir } 916cdf0e10cSrcweir } 917cdf0e10cSrcweir } 918cdf0e10cSrcweir 9195aaf853bSArmin Le Grand // LineCaps 9205aaf853bSArmin Le Grand nPos = maLBCapStyle.GetSelectEntryPos(); 9215aaf853bSArmin Le Grand if(LISTBOX_ENTRY_NOTFOUND != nPos) 9225aaf853bSArmin Le Grand { 9235aaf853bSArmin Le Grand switch(nPos) 9245aaf853bSArmin Le Grand { 9255aaf853bSArmin Le Grand case 0: // Butt (=Flat), default 9265aaf853bSArmin Le Grand { 9275aaf853bSArmin Le Grand rXLSet.Put(XLineCapItem(com::sun::star::drawing::LineCap_BUTT)); 9285aaf853bSArmin Le Grand break; 9295aaf853bSArmin Le Grand } 9305aaf853bSArmin Le Grand case 1: // Round 9315aaf853bSArmin Le Grand { 9325aaf853bSArmin Le Grand rXLSet.Put(XLineCapItem(com::sun::star::drawing::LineCap_ROUND)); 9335aaf853bSArmin Le Grand break; 9345aaf853bSArmin Le Grand } 9355aaf853bSArmin Le Grand case 2: // Square 9365aaf853bSArmin Le Grand { 9375aaf853bSArmin Le Grand rXLSet.Put(XLineCapItem(com::sun::star::drawing::LineCap_SQUARE)); 9385aaf853bSArmin Le Grand break; 9395aaf853bSArmin Le Grand } 9405aaf853bSArmin Le Grand } 9415aaf853bSArmin Le Grand } 9425aaf853bSArmin Le Grand 943cdf0e10cSrcweir rXLSet.Put( XLineStartWidthItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) ) ); 944cdf0e10cSrcweir rXLSet.Put( XLineEndWidthItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) ) ); 945cdf0e10cSrcweir 946cdf0e10cSrcweir rXLSet.Put( XLineWidthItem( GetCoreValue( aMtrLineWidth, ePoolUnit ) ) ); 947cdf0e10cSrcweir rXLSet.Put( XLineColorItem( aLbColor.GetSelectEntry(), 948cdf0e10cSrcweir aLbColor.GetSelectEntryColor() ) ); 949cdf0e10cSrcweir 950cdf0e10cSrcweir // Linienenden zentriert 951cdf0e10cSrcweir if( aTsbCenterStart.GetState() == STATE_CHECK ) 952cdf0e10cSrcweir rXLSet.Put( XLineStartCenterItem( sal_True ) ); 953cdf0e10cSrcweir else if( aTsbCenterStart.GetState() == STATE_NOCHECK ) 954cdf0e10cSrcweir rXLSet.Put( XLineStartCenterItem( sal_False ) ); 955cdf0e10cSrcweir 956cdf0e10cSrcweir if( aTsbCenterEnd.GetState() == STATE_CHECK ) 957cdf0e10cSrcweir rXLSet.Put( XLineEndCenterItem( sal_True ) ); 958cdf0e10cSrcweir else if( aTsbCenterEnd.GetState() == STATE_NOCHECK ) 959cdf0e10cSrcweir rXLSet.Put( XLineEndCenterItem( sal_False ) ); 960cdf0e10cSrcweir 961cdf0e10cSrcweir // Transparenz 962cdf0e10cSrcweir sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); 963cdf0e10cSrcweir rXLSet.Put( XLineTransparenceItem( nVal ) ); 964cdf0e10cSrcweir 965cdf0e10cSrcweir // #116827# 966cdf0e10cSrcweir aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet()); 967cdf0e10cSrcweir 968cdf0e10cSrcweir return( sal_True ); 969cdf0e10cSrcweir } 970cdf0e10cSrcweir 971cdf0e10cSrcweir // ----------------------------------------------------------------------- 972cdf0e10cSrcweir 973cdf0e10cSrcweir void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) 974cdf0e10cSrcweir { 975cdf0e10cSrcweir String aString; 976cdf0e10cSrcweir XLineStyle eXLS; // XLINE_NONE, XLINE_SOLID, XLINE_DASH 977cdf0e10cSrcweir 978cdf0e10cSrcweir // Linienstil 979cdf0e10cSrcweir /* 980cdf0e10cSrcweir if( bObjSelected && 981cdf0e10cSrcweir rAttrs.GetItemState( GetWhich( XATTR_LINESTYLE ) ) == SFX_ITEM_DEFAULT ) 982cdf0e10cSrcweir { 983cdf0e10cSrcweir aLbLineStyle.Disable(); 984cdf0e10cSrcweir } 985cdf0e10cSrcweir */ 986cdf0e10cSrcweir const SfxPoolItem *pPoolItem; 987cdf0e10cSrcweir long nSymType=SVX_SYMBOLTYPE_UNKNOWN; 988cdf0e10cSrcweir sal_Bool bPrevSym=sal_False; 989cdf0e10cSrcweir sal_Bool bEnable=sal_True; 990cdf0e10cSrcweir sal_Bool bIgnoreGraphic=sal_False; 991cdf0e10cSrcweir sal_Bool bIgnoreSize=sal_False; 992cdf0e10cSrcweir if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),sal_True,&pPoolItem) == SFX_ITEM_SET) 993cdf0e10cSrcweir { 994cdf0e10cSrcweir nSymType=((const SfxInt32Item *)pPoolItem)->GetValue(); 995cdf0e10cSrcweir } 996cdf0e10cSrcweir 997cdf0e10cSrcweir if(nSymType == SVX_SYMBOLTYPE_AUTO) 998cdf0e10cSrcweir { 999cdf0e10cSrcweir aSymbolGraphic=aAutoSymbolGraphic; 1000cdf0e10cSrcweir aSymbolSize=aSymbolLastSize=aAutoSymbolGraphic.GetPrefSize(); 1001cdf0e10cSrcweir bPrevSym=sal_True; 1002cdf0e10cSrcweir } 1003cdf0e10cSrcweir else if(nSymType == SVX_SYMBOLTYPE_NONE) 1004cdf0e10cSrcweir { 1005cdf0e10cSrcweir bEnable=sal_False; 1006cdf0e10cSrcweir bIgnoreGraphic=sal_True; 1007cdf0e10cSrcweir bIgnoreSize=sal_True; 1008cdf0e10cSrcweir } 1009cdf0e10cSrcweir else if(nSymType >= 0) 1010cdf0e10cSrcweir { 1011cdf0e10cSrcweir VirtualDevice aVDev; 1012cdf0e10cSrcweir aVDev.SetMapMode(MapMode(MAP_100TH_MM)); 1013cdf0e10cSrcweir 1014cdf0e10cSrcweir SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS); 1015cdf0e10cSrcweir pModel->GetItemPool().FreezeIdRanges(); 1016cdf0e10cSrcweir SdrPage* pPage = new SdrPage( *pModel, sal_False ); 1017cdf0e10cSrcweir pPage->SetSize(Size(1000,1000)); 1018cdf0e10cSrcweir pModel->InsertPage( pPage, 0 ); 1019cdf0e10cSrcweir SdrView* pView = new SdrView( pModel, &aVDev ); 1020cdf0e10cSrcweir pView->hideMarkHandles(); 10213c42630dSArmin Le Grand /*SdrPageView* pPageView = */pView->ShowSdrPage(pPage); 1022cdf0e10cSrcweir SdrObject *pObj=NULL; 1023cdf0e10cSrcweir long nSymTmp=nSymType; 1024cdf0e10cSrcweir if(pSymbolList) 1025cdf0e10cSrcweir { 1026cdf0e10cSrcweir if(pSymbolList->GetObjCount()) 1027cdf0e10cSrcweir { 1028cdf0e10cSrcweir nSymTmp=nSymTmp%pSymbolList->GetObjCount(); //Liste wird als cyclisch betrachtet!!! 1029cdf0e10cSrcweir pObj=pSymbolList->GetObj(nSymTmp); 1030cdf0e10cSrcweir if(pObj) 1031cdf0e10cSrcweir { 1032cdf0e10cSrcweir pObj=pObj->Clone(); 1033cdf0e10cSrcweir if(pSymbolAttr) 1034cdf0e10cSrcweir { 1035cdf0e10cSrcweir pObj->SetMergedItemSet(*pSymbolAttr); 1036cdf0e10cSrcweir } 1037cdf0e10cSrcweir else 1038cdf0e10cSrcweir { 1039cdf0e10cSrcweir pObj->SetMergedItemSet(rOutAttrs); 1040cdf0e10cSrcweir } 10413a5971bbSRegina Henschel 10423a5971bbSRegina Henschel pPage->NbcInsertObject(pObj); 10433a5971bbSRegina Henschel 10443a5971bbSRegina Henschel // Generate invisible square to give all symbol types a 10453a5971bbSRegina Henschel // bitmap size, which is indepedent from specific glyph 10463a5971bbSRegina Henschel SdrObject *pInvisibleSquare=pSymbolList->GetObj(0); 10473a5971bbSRegina Henschel pInvisibleSquare=pInvisibleSquare->Clone(); 10483a5971bbSRegina Henschel pPage->NbcInsertObject(pInvisibleSquare); 10493a5971bbSRegina Henschel pInvisibleSquare->SetMergedItem(XFillTransparenceItem(100)); 10503a5971bbSRegina Henschel pInvisibleSquare->SetMergedItem(XLineTransparenceItem(100)); 10513a5971bbSRegina Henschel 10523a5971bbSRegina Henschel pView->MarkAll(); 1053bb18ee55SArmin Le Grand GDIMetaFile aMeta(pView->GetMarkedObjMetaFile()); 1054cdf0e10cSrcweir 1055cdf0e10cSrcweir aSymbolGraphic=Graphic(aMeta); 1056cdf0e10cSrcweir aSymbolSize=pObj->GetSnapRect().GetSize(); 10573a5971bbSRegina Henschel aSymbolGraphic.SetPrefSize(pInvisibleSquare->GetSnapRect().GetSize()); 1058cdf0e10cSrcweir aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM); 1059cdf0e10cSrcweir bPrevSym=sal_True; 1060cdf0e10cSrcweir bEnable=sal_True; 1061cdf0e10cSrcweir bIgnoreGraphic=sal_True; 1062cdf0e10cSrcweir 1063cdf0e10cSrcweir pView->UnmarkAll(); 10643a5971bbSRegina Henschel pInvisibleSquare=pPage->RemoveObject(1); 10653a5971bbSRegina Henschel SdrObject::Free( pInvisibleSquare); 1066cdf0e10cSrcweir pObj=pPage->RemoveObject(0); 1067cdf0e10cSrcweir SdrObject::Free( pObj ); 1068cdf0e10cSrcweir } 1069cdf0e10cSrcweir } 1070cdf0e10cSrcweir } 1071cdf0e10cSrcweir delete pView; 1072cdf0e10cSrcweir delete pModel; 1073cdf0e10cSrcweir } 1074cdf0e10cSrcweir if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH),sal_True,&pPoolItem) == SFX_ITEM_SET) 1075cdf0e10cSrcweir { 1076cdf0e10cSrcweir const Graphic* pGraphic = ((const SvxBrushItem *)pPoolItem)->GetGraphic(); 1077cdf0e10cSrcweir if( pGraphic ) 1078cdf0e10cSrcweir { 1079cdf0e10cSrcweir if(!bIgnoreGraphic) 1080cdf0e10cSrcweir { 1081cdf0e10cSrcweir aSymbolGraphic=*pGraphic; 1082cdf0e10cSrcweir } 1083cdf0e10cSrcweir if(!bIgnoreSize) 1084cdf0e10cSrcweir { 1085cdf0e10cSrcweir aSymbolSize=OutputDevice::LogicToLogic( pGraphic->GetPrefSize(), 1086cdf0e10cSrcweir pGraphic->GetPrefMapMode(), 1087cdf0e10cSrcweir MAP_100TH_MM ); 1088cdf0e10cSrcweir } 1089cdf0e10cSrcweir bPrevSym=sal_True; 1090cdf0e10cSrcweir } 1091cdf0e10cSrcweir } 10923a5971bbSRegina Henschel 1093cdf0e10cSrcweir if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),sal_True,&pPoolItem) == SFX_ITEM_SET) 1094cdf0e10cSrcweir { 1095cdf0e10cSrcweir aSymbolSize = ((const SvxSizeItem *)pPoolItem)->GetSize(); 1096cdf0e10cSrcweir } 1097cdf0e10cSrcweir 1098cdf0e10cSrcweir aSymbolRatioCB.Enable(bEnable); 1099cdf0e10cSrcweir aSymbolHeightFT.Enable(bEnable); 1100cdf0e10cSrcweir aSymbolWidthFT.Enable(bEnable); 1101cdf0e10cSrcweir aSymbolWidthMF.Enable(bEnable); 1102cdf0e10cSrcweir aSymbolHeightMF.Enable(bEnable); 1103cdf0e10cSrcweir if(bPrevSym) 1104cdf0e10cSrcweir { 1105cdf0e10cSrcweir SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit); 1106cdf0e10cSrcweir SetMetricValue(aSymbolHeightMF, aSymbolSize.Height(),ePoolUnit); 1107cdf0e10cSrcweir aCtlPreview.SetSymbol(&aSymbolGraphic,aSymbolSize); 1108cdf0e10cSrcweir aSymbolLastSize=aSymbolSize; 1109cdf0e10cSrcweir } 1110cdf0e10cSrcweir 1111cdf0e10cSrcweir if( rAttrs.GetItemState( XATTR_LINESTYLE ) != SFX_ITEM_DONTCARE ) 1112cdf0e10cSrcweir { 1113cdf0e10cSrcweir eXLS = (XLineStyle) ( ( const XLineStyleItem& ) rAttrs.Get( XATTR_LINESTYLE ) ).GetValue(); 1114cdf0e10cSrcweir 1115cdf0e10cSrcweir switch( eXLS ) 1116cdf0e10cSrcweir { 1117cdf0e10cSrcweir case XLINE_NONE: 1118cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( 0 ); 1119cdf0e10cSrcweir break; 1120cdf0e10cSrcweir case XLINE_SOLID: 1121cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( 1 ); 1122cdf0e10cSrcweir break; 1123cdf0e10cSrcweir 1124cdf0e10cSrcweir case XLINE_DASH: 1125cdf0e10cSrcweir aLbLineStyle.SetNoSelection(); 1126cdf0e10cSrcweir aLbLineStyle.SelectEntry( ( ( const XLineDashItem& ) rAttrs. 1127cdf0e10cSrcweir Get( XATTR_LINEDASH ) ).GetName() ); 1128cdf0e10cSrcweir break; 1129cdf0e10cSrcweir 1130cdf0e10cSrcweir default: 1131cdf0e10cSrcweir break; 1132cdf0e10cSrcweir } 1133cdf0e10cSrcweir } 1134cdf0e10cSrcweir else 1135cdf0e10cSrcweir { 1136cdf0e10cSrcweir aLbLineStyle.SetNoSelection(); 1137cdf0e10cSrcweir } 1138cdf0e10cSrcweir 1139cdf0e10cSrcweir // Linienstaerke 1140cdf0e10cSrcweir /* 1141cdf0e10cSrcweir if( bObjSelected && 1142cdf0e10cSrcweir rAttrs.GetItemState( GetWhich( XATTR_LINEWIDTH ) ) == SFX_ITEM_DEFAULT ) 1143cdf0e10cSrcweir { 1144cdf0e10cSrcweir aMtrLineWidth.Disable(); 1145cdf0e10cSrcweir } 1146cdf0e10cSrcweir */ 1147cdf0e10cSrcweir if( rAttrs.GetItemState( XATTR_LINEWIDTH ) != SFX_ITEM_DONTCARE ) 1148cdf0e10cSrcweir { 1149cdf0e10cSrcweir SetMetricValue( aMtrLineWidth, ( ( const XLineWidthItem& ) rAttrs. 1150cdf0e10cSrcweir Get( XATTR_LINEWIDTH ) ).GetValue(), ePoolUnit ); 1151cdf0e10cSrcweir } 1152cdf0e10cSrcweir else 1153cdf0e10cSrcweir aMtrLineWidth.SetText( String() ); 1154cdf0e10cSrcweir 1155cdf0e10cSrcweir // Linienfarbe 1156cdf0e10cSrcweir /* 1157cdf0e10cSrcweir if( bObjSelected && 1158cdf0e10cSrcweir rAttrs.GetItemState( GetWhich( XATTR_LINECOLOR ) ) == SFX_ITEM_DEFAULT ) 1159cdf0e10cSrcweir { 1160cdf0e10cSrcweir aLbColor.Disable(); 1161cdf0e10cSrcweir } 1162cdf0e10cSrcweir */ 1163cdf0e10cSrcweir aLbColor.SetNoSelection(); 1164cdf0e10cSrcweir 1165cdf0e10cSrcweir if ( rAttrs.GetItemState( XATTR_LINECOLOR ) != SFX_ITEM_DONTCARE ) 1166cdf0e10cSrcweir { 1167cdf0e10cSrcweir Color aCol = ( ( const XLineColorItem& ) rAttrs.Get( XATTR_LINECOLOR ) ).GetColorValue(); 1168cdf0e10cSrcweir aLbColor.SelectEntry( aCol ); 1169cdf0e10cSrcweir if( aLbColor.GetSelectEntryCount() == 0 ) 1170cdf0e10cSrcweir { 1171cdf0e10cSrcweir aLbColor.InsertEntry( aCol, String() ); 1172cdf0e10cSrcweir aLbColor.SelectEntry( aCol ); 1173cdf0e10cSrcweir } 1174cdf0e10cSrcweir } 1175cdf0e10cSrcweir 1176cdf0e10cSrcweir // LinienAnfang 1177cdf0e10cSrcweir if( bObjSelected && 1178cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINESTART ) == SFX_ITEM_DEFAULT ) 1179cdf0e10cSrcweir { 1180cdf0e10cSrcweir aLbStartStyle.Disable(); 1181cdf0e10cSrcweir } 1182cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINESTART ) != SFX_ITEM_DONTCARE ) 1183cdf0e10cSrcweir { 1184cdf0e10cSrcweir // #86265# select entry using list and polygon, not string 1185cdf0e10cSrcweir sal_Bool bSelected(sal_False); 1186cdf0e10cSrcweir const basegfx::B2DPolyPolygon& rItemPolygon = ((const XLineStartItem&)rAttrs.Get(XATTR_LINESTART)).GetLineStartValue(); 1187cdf0e10cSrcweir 1188cdf0e10cSrcweir for(sal_Int32 a(0);!bSelected && a < pLineEndList->Count(); a++) 1189cdf0e10cSrcweir { 1190cdf0e10cSrcweir XLineEndEntry* pEntry = pLineEndList->GetLineEnd(a); 1191cdf0e10cSrcweir const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd(); 1192cdf0e10cSrcweir 1193cdf0e10cSrcweir if(rItemPolygon == rEntryPolygon) 1194cdf0e10cSrcweir { 1195cdf0e10cSrcweir // select this entry 1196cdf0e10cSrcweir aLbStartStyle.SelectEntryPos((sal_uInt16)a + 1); 1197cdf0e10cSrcweir bSelected = sal_True; 1198cdf0e10cSrcweir } 1199cdf0e10cSrcweir } 1200cdf0e10cSrcweir 1201cdf0e10cSrcweir if(!bSelected) 1202cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( 0 ); 1203cdf0e10cSrcweir } 1204cdf0e10cSrcweir else 1205cdf0e10cSrcweir { 1206cdf0e10cSrcweir aLbStartStyle.SetNoSelection(); 1207cdf0e10cSrcweir } 1208cdf0e10cSrcweir 1209cdf0e10cSrcweir // LinienEnde 1210cdf0e10cSrcweir if( bObjSelected && 1211cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINEEND ) == SFX_ITEM_DEFAULT ) 1212cdf0e10cSrcweir { 1213cdf0e10cSrcweir aLbEndStyle.Disable(); 1214cdf0e10cSrcweir } 1215cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINEEND ) != SFX_ITEM_DONTCARE ) 1216cdf0e10cSrcweir { 1217cdf0e10cSrcweir // #86265# select entry using list and polygon, not string 1218cdf0e10cSrcweir sal_Bool bSelected(sal_False); 1219cdf0e10cSrcweir const basegfx::B2DPolyPolygon& rItemPolygon = ((const XLineEndItem&)rAttrs.Get(XATTR_LINEEND)).GetLineEndValue(); 1220cdf0e10cSrcweir 1221cdf0e10cSrcweir for(sal_Int32 a(0);!bSelected && a < pLineEndList->Count(); a++) 1222cdf0e10cSrcweir { 1223cdf0e10cSrcweir XLineEndEntry* pEntry = pLineEndList->GetLineEnd(a); 1224cdf0e10cSrcweir const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd(); 1225cdf0e10cSrcweir 1226cdf0e10cSrcweir if(rItemPolygon == rEntryPolygon) 1227cdf0e10cSrcweir { 1228cdf0e10cSrcweir // select this entry 1229cdf0e10cSrcweir aLbEndStyle.SelectEntryPos((sal_uInt16)a + 1); 1230cdf0e10cSrcweir bSelected = sal_True; 1231cdf0e10cSrcweir } 1232cdf0e10cSrcweir } 1233cdf0e10cSrcweir 1234cdf0e10cSrcweir if(!bSelected) 1235cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( 0 ); 1236cdf0e10cSrcweir } 1237cdf0e10cSrcweir else 1238cdf0e10cSrcweir { 1239cdf0e10cSrcweir aLbEndStyle.SetNoSelection(); 1240cdf0e10cSrcweir } 1241cdf0e10cSrcweir 1242cdf0e10cSrcweir // LinienAnfang St"arke 1243cdf0e10cSrcweir if( bObjSelected && 1244cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINESTARTWIDTH ) == SFX_ITEM_DEFAULT ) 1245cdf0e10cSrcweir { 1246cdf0e10cSrcweir aMtrStartWidth.Disable(); 1247cdf0e10cSrcweir } 1248cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINESTARTWIDTH ) != SFX_ITEM_DONTCARE ) 1249cdf0e10cSrcweir { 1250cdf0e10cSrcweir SetMetricValue( aMtrStartWidth, ( ( const XLineStartWidthItem& ) rAttrs. 1251cdf0e10cSrcweir Get( XATTR_LINESTARTWIDTH ) ).GetValue(), ePoolUnit ); 1252cdf0e10cSrcweir } 1253cdf0e10cSrcweir else 1254cdf0e10cSrcweir aMtrStartWidth.SetText( String() ); 1255cdf0e10cSrcweir 1256cdf0e10cSrcweir // LinienEnde St"arke 1257cdf0e10cSrcweir if( bObjSelected && 1258cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINEENDWIDTH ) == SFX_ITEM_DEFAULT ) 1259cdf0e10cSrcweir { 1260cdf0e10cSrcweir aMtrEndWidth.Disable(); 1261cdf0e10cSrcweir } 1262cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINEENDWIDTH ) != SFX_ITEM_DONTCARE ) 1263cdf0e10cSrcweir { 1264cdf0e10cSrcweir SetMetricValue( aMtrEndWidth, ( ( const XLineEndWidthItem& ) rAttrs. 1265cdf0e10cSrcweir Get( XATTR_LINEENDWIDTH ) ).GetValue(), ePoolUnit ); 1266cdf0e10cSrcweir } 1267cdf0e10cSrcweir else 1268cdf0e10cSrcweir aMtrEndWidth.SetText( String() ); 1269cdf0e10cSrcweir 1270cdf0e10cSrcweir // Linienenden zentriert (Start) 1271cdf0e10cSrcweir if( bObjSelected && 1272cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINESTARTCENTER ) == SFX_ITEM_DEFAULT ) 1273cdf0e10cSrcweir { 1274cdf0e10cSrcweir aTsbCenterStart.Disable(); 1275cdf0e10cSrcweir } 1276cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINESTARTCENTER ) != SFX_ITEM_DONTCARE ) 1277cdf0e10cSrcweir { 1278cdf0e10cSrcweir aTsbCenterStart.EnableTriState( sal_False ); 1279cdf0e10cSrcweir 1280cdf0e10cSrcweir if( ( ( const XLineStartCenterItem& ) rAttrs.Get( XATTR_LINESTARTCENTER ) ).GetValue() ) 1281cdf0e10cSrcweir aTsbCenterStart.SetState( STATE_CHECK ); 1282cdf0e10cSrcweir else 1283cdf0e10cSrcweir aTsbCenterStart.SetState( STATE_NOCHECK ); 1284cdf0e10cSrcweir } 1285cdf0e10cSrcweir else 1286cdf0e10cSrcweir { 1287cdf0e10cSrcweir aTsbCenterStart.SetState( STATE_DONTKNOW ); 1288cdf0e10cSrcweir } 1289cdf0e10cSrcweir 1290cdf0e10cSrcweir // Linienenden zentriert (Ende) 1291cdf0e10cSrcweir if( bObjSelected && 1292cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINEENDCENTER ) == SFX_ITEM_DEFAULT ) 1293cdf0e10cSrcweir { 1294cdf0e10cSrcweir aTsbCenterEnd.Disable(); 1295cdf0e10cSrcweir } 1296cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINEENDCENTER ) != SFX_ITEM_DONTCARE ) 1297cdf0e10cSrcweir { 1298cdf0e10cSrcweir aTsbCenterEnd.EnableTriState( sal_False ); 1299cdf0e10cSrcweir 1300cdf0e10cSrcweir if( ( ( const XLineEndCenterItem& ) rAttrs.Get( XATTR_LINEENDCENTER ) ).GetValue() ) 1301cdf0e10cSrcweir aTsbCenterEnd.SetState( STATE_CHECK ); 1302cdf0e10cSrcweir else 1303cdf0e10cSrcweir aTsbCenterEnd.SetState( STATE_NOCHECK ); 1304cdf0e10cSrcweir } 1305cdf0e10cSrcweir else 1306cdf0e10cSrcweir { 1307cdf0e10cSrcweir aTsbCenterEnd.SetState( STATE_DONTKNOW ); 1308cdf0e10cSrcweir } 1309cdf0e10cSrcweir 1310cdf0e10cSrcweir // Transparenz 1311cdf0e10cSrcweir if( rAttrs.GetItemState( XATTR_LINETRANSPARENCE ) != SFX_ITEM_DONTCARE ) 1312cdf0e10cSrcweir { 1313cdf0e10cSrcweir sal_uInt16 nTransp = ( ( const XLineTransparenceItem& ) rAttrs. 1314cdf0e10cSrcweir Get( XATTR_LINETRANSPARENCE ) ).GetValue(); 1315cdf0e10cSrcweir aMtrTransparent.SetValue( nTransp ); 1316cdf0e10cSrcweir ChangeTransparentHdl_Impl( NULL ); 1317cdf0e10cSrcweir } 1318cdf0e10cSrcweir else 1319cdf0e10cSrcweir aMtrTransparent.SetText( String() ); 1320cdf0e10cSrcweir 1321cdf0e10cSrcweir if( !aLbStartStyle.IsEnabled() && 1322cdf0e10cSrcweir !aLbEndStyle.IsEnabled() && 1323cdf0e10cSrcweir !aMtrStartWidth.IsEnabled() && 1324cdf0e10cSrcweir !aMtrEndWidth.IsEnabled() && 1325cdf0e10cSrcweir !aTsbCenterStart.IsEnabled()&& 1326cdf0e10cSrcweir !aTsbCenterEnd.IsEnabled() ) 1327cdf0e10cSrcweir { 1328cdf0e10cSrcweir aCbxSynchronize.Disable(); 1329cdf0e10cSrcweir aFtLineEndsStyle.Disable(); 1330cdf0e10cSrcweir aFtLineEndsWidth.Disable(); 1331cdf0e10cSrcweir aFlLineEnds.Disable(); 1332cdf0e10cSrcweir } 1333cdf0e10cSrcweir 1334cdf0e10cSrcweir // Synchronisieren 1335cdf0e10cSrcweir // Jetzt wird der Wert aus der INI-Datei geholt (#42258#) 1336cdf0e10cSrcweir String aStr = GetUserData(); 1337cdf0e10cSrcweir aCbxSynchronize.Check( (sal_Bool)aStr.ToInt32() ); 1338cdf0e10cSrcweir 1339cdf0e10cSrcweir // #116827# 1340cdf0e10cSrcweir if(bObjSelected && SFX_ITEM_DEFAULT == rAttrs.GetItemState(XATTR_LINEJOINT)) 1341cdf0e10cSrcweir { 1342cdf0e10cSrcweir maFTEdgeStyle.Disable(); 1343cdf0e10cSrcweir maLBEdgeStyle.Disable(); 1344cdf0e10cSrcweir } 1345cdf0e10cSrcweir else if(SFX_ITEM_DONTCARE != rAttrs.GetItemState(XATTR_LINEJOINT)) 1346cdf0e10cSrcweir { 1347*d5370dc8SArmin Le Grand const com::sun::star::drawing::LineJoint eLineJoint = ((const XLineJointItem&)(rAttrs.Get(XATTR_LINEJOINT))).GetValue(); 1348cdf0e10cSrcweir 1349cdf0e10cSrcweir switch(eLineJoint) 1350cdf0e10cSrcweir { 1351*d5370dc8SArmin Le Grand case com::sun::star::drawing::LineJoint_MIDDLE : // fallback to round, unused value 1352*d5370dc8SArmin Le Grand case com::sun::star::drawing::LineJoint_ROUND : maLBEdgeStyle.SelectEntryPos(0); break; 1353*d5370dc8SArmin Le Grand case com::sun::star::drawing::LineJoint_NONE : maLBEdgeStyle.SelectEntryPos(1); break; 1354*d5370dc8SArmin Le Grand case com::sun::star::drawing::LineJoint_MITER : maLBEdgeStyle.SelectEntryPos(2); break; 1355*d5370dc8SArmin Le Grand case com::sun::star::drawing::LineJoint_BEVEL : maLBEdgeStyle.SelectEntryPos(3); break; 1356cdf0e10cSrcweir } 1357cdf0e10cSrcweir } 1358cdf0e10cSrcweir else 1359cdf0e10cSrcweir { 1360cdf0e10cSrcweir maLBEdgeStyle.SetNoSelection(); 1361cdf0e10cSrcweir } 1362cdf0e10cSrcweir 1363cdf0e10cSrcweir /* 1364cdf0e10cSrcweir if( aLbStartStyle.GetSelectEntryPos() == aLbEndStyle.GetSelectEntryPos() && 1365cdf0e10cSrcweir aMtrStartWidth.GetValue() == aMtrEndWidth.GetValue() && 1366cdf0e10cSrcweir aTsbCenterStart.GetState() == aTsbCenterEnd.GetState() ) 1367cdf0e10cSrcweir { 1368cdf0e10cSrcweir aCbxSynchronize.Check(); 1369cdf0e10cSrcweir } 1370cdf0e10cSrcweir */ 1371cdf0e10cSrcweir 13725aaf853bSArmin Le Grand // fdo#43209 13735aaf853bSArmin Le Grand if(bObjSelected && SFX_ITEM_DEFAULT == rAttrs.GetItemState(XATTR_LINECAP)) 13745aaf853bSArmin Le Grand { 13755aaf853bSArmin Le Grand maFTCapStyle.Disable(); 13765aaf853bSArmin Le Grand maLBCapStyle.Disable(); 13775aaf853bSArmin Le Grand } 13785aaf853bSArmin Le Grand else if(SFX_ITEM_DONTCARE != rAttrs.GetItemState(XATTR_LINECAP)) 13795aaf853bSArmin Le Grand { 13805aaf853bSArmin Le Grand const com::sun::star::drawing::LineCap eLineCap(((const XLineCapItem&)(rAttrs.Get(XATTR_LINECAP))).GetValue()); 13815aaf853bSArmin Le Grand 13825aaf853bSArmin Le Grand switch(eLineCap) 13835aaf853bSArmin Le Grand { 13845aaf853bSArmin Le Grand case com::sun::star::drawing::LineCap_ROUND: maLBCapStyle.SelectEntryPos(1); break; 13855aaf853bSArmin Le Grand case com::sun::star::drawing::LineCap_SQUARE : maLBCapStyle.SelectEntryPos(2); break; 13865aaf853bSArmin Le Grand default /*com::sun::star::drawing::LineCap_BUTT*/: maLBCapStyle.SelectEntryPos(0); break; 13875aaf853bSArmin Le Grand } 13885aaf853bSArmin Le Grand } 13895aaf853bSArmin Le Grand else 13905aaf853bSArmin Le Grand { 13915aaf853bSArmin Le Grand maLBCapStyle.SetNoSelection(); 13925aaf853bSArmin Le Grand } 13935aaf853bSArmin Le Grand 1394cdf0e10cSrcweir // Werte sichern 1395cdf0e10cSrcweir aLbLineStyle.SaveValue(); 1396cdf0e10cSrcweir aMtrLineWidth.SaveValue(); 1397cdf0e10cSrcweir aLbColor.SaveValue(); 1398cdf0e10cSrcweir aLbStartStyle.SaveValue(); 1399cdf0e10cSrcweir aLbEndStyle.SaveValue(); 1400cdf0e10cSrcweir aMtrStartWidth.SaveValue(); 1401cdf0e10cSrcweir aMtrEndWidth.SaveValue(); 1402cdf0e10cSrcweir aTsbCenterStart.SaveValue(); 1403cdf0e10cSrcweir aTsbCenterEnd.SaveValue(); 1404cdf0e10cSrcweir aMtrTransparent.SaveValue(); 1405cdf0e10cSrcweir 1406cdf0e10cSrcweir // #116827# 1407cdf0e10cSrcweir maLBEdgeStyle.SaveValue(); 1408cdf0e10cSrcweir 14095aaf853bSArmin Le Grand // LineCaps 14105aaf853bSArmin Le Grand maLBCapStyle.SaveValue(); 14115aaf853bSArmin Le Grand 1412cdf0e10cSrcweir ClickInvisibleHdl_Impl( this ); 1413cdf0e10cSrcweir //ClickMeasuringHdl_Impl( this ); 1414cdf0e10cSrcweir //aCtlPosition.Reset(); 1415cdf0e10cSrcweir 1416cdf0e10cSrcweir ChangePreviewHdl_Impl( NULL ); 1417cdf0e10cSrcweir } 1418cdf0e10cSrcweir 1419cdf0e10cSrcweir // ----------------------------------------------------------------------- 1420cdf0e10cSrcweir 1421cdf0e10cSrcweir SfxTabPage* SvxLineTabPage::Create( Window* pWindow, 1422cdf0e10cSrcweir const SfxItemSet& rAttrs ) 1423cdf0e10cSrcweir { 1424cdf0e10cSrcweir return( new SvxLineTabPage( pWindow, rAttrs ) ); 1425cdf0e10cSrcweir } 1426cdf0e10cSrcweir 1427cdf0e10cSrcweir //------------------------------------------------------------------------ 1428cdf0e10cSrcweir 1429cdf0e10cSrcweir sal_uInt16* SvxLineTabPage::GetRanges() 1430cdf0e10cSrcweir { 1431cdf0e10cSrcweir return( pLineRanges ); 1432cdf0e10cSrcweir } 1433cdf0e10cSrcweir 1434cdf0e10cSrcweir //------------------------------------------------------------------------ 1435cdf0e10cSrcweir 1436cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl ) 1437cdf0e10cSrcweir { 1438cdf0e10cSrcweir if(pCntrl == &aMtrLineWidth) 1439cdf0e10cSrcweir { 1440cdf0e10cSrcweir // Linienbreite und Start/EndBreite 1441cdf0e10cSrcweir sal_Int32 nNewLineWidth = GetCoreValue( aMtrLineWidth, ePoolUnit ); 1442cdf0e10cSrcweir if(nActLineWidth == -1) 1443cdf0e10cSrcweir { 1444cdf0e10cSrcweir // Noch nicht initialisiert, hole den Startwert 1445cdf0e10cSrcweir const SfxPoolItem* pOld = GetOldItem( rXLSet, XATTR_LINEWIDTH ); 1446cdf0e10cSrcweir sal_Int32 nStartLineWidth = 0; 1447cdf0e10cSrcweir if(pOld) 1448cdf0e10cSrcweir nStartLineWidth = (( const XLineWidthItem *)pOld)->GetValue(); 1449cdf0e10cSrcweir nActLineWidth = nStartLineWidth; 1450cdf0e10cSrcweir } 1451cdf0e10cSrcweir 1452cdf0e10cSrcweir if(nActLineWidth != nNewLineWidth) 1453cdf0e10cSrcweir { 1454cdf0e10cSrcweir // Anpassungen Start/EndWidth #63083# 1455cdf0e10cSrcweir sal_Int32 nValAct = GetCoreValue( aMtrStartWidth, ePoolUnit ); 1456cdf0e10cSrcweir sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); 1457cdf0e10cSrcweir if(nValNew < 0) 1458cdf0e10cSrcweir nValNew = 0; 1459cdf0e10cSrcweir SetMetricValue( aMtrStartWidth, nValNew, ePoolUnit ); 1460cdf0e10cSrcweir 1461cdf0e10cSrcweir nValAct = GetCoreValue( aMtrEndWidth, ePoolUnit ); 1462cdf0e10cSrcweir nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10); 1463cdf0e10cSrcweir if(nValNew < 0) 1464cdf0e10cSrcweir nValNew = 0; 1465cdf0e10cSrcweir SetMetricValue( aMtrEndWidth, nValNew, ePoolUnit ); 1466cdf0e10cSrcweir } 1467cdf0e10cSrcweir 1468cdf0e10cSrcweir // Aktuellen Wert merken 1469cdf0e10cSrcweir nActLineWidth = nNewLineWidth; 1470cdf0e10cSrcweir } 1471cdf0e10cSrcweir 1472cdf0e10cSrcweir FillXLSet_Impl(); 1473cdf0e10cSrcweir aCtlPreview.Invalidate(); 1474cdf0e10cSrcweir 1475cdf0e10cSrcweir // Transparenz entspr. zugaenglich machen 1476cdf0e10cSrcweir if( aLbLineStyle.GetSelectEntryPos() == 0 ) // unsichtbar 1477cdf0e10cSrcweir { 1478cdf0e10cSrcweir aFtTransparent.Disable(); 1479cdf0e10cSrcweir aMtrTransparent.Disable(); 1480cdf0e10cSrcweir } 1481cdf0e10cSrcweir else 1482cdf0e10cSrcweir { 1483cdf0e10cSrcweir aFtTransparent.Enable(); 1484cdf0e10cSrcweir aMtrTransparent.Enable(); 1485cdf0e10cSrcweir } 1486cdf0e10cSrcweir 1487cdf0e10cSrcweir const bool bHasLineStart = aLbStartStyle.GetSelectEntryPos() != 0; 1488cdf0e10cSrcweir const bool bHasLineEnd = aLbEndStyle.GetSelectEntryPos() != 0; 1489cdf0e10cSrcweir 1490cdf0e10cSrcweir aFtLineEndsWidth.Enable( bHasLineStart || bHasLineEnd ); 1491cdf0e10cSrcweir aMtrStartWidth.Enable( bHasLineStart ); 1492cdf0e10cSrcweir aTsbCenterStart.Enable( bHasLineStart ); 1493cdf0e10cSrcweir aMtrEndWidth.Enable( bHasLineEnd ); 1494cdf0e10cSrcweir aTsbCenterEnd.Enable( bHasLineEnd ); 1495cdf0e10cSrcweir 1496cdf0e10cSrcweir return( 0L ); 1497cdf0e10cSrcweir } 1498cdf0e10cSrcweir 1499cdf0e10cSrcweir //------------------------------------------------------------------------ 1500cdf0e10cSrcweir 1501cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ChangeStartHdl_Impl, void *, p ) 1502cdf0e10cSrcweir { 1503cdf0e10cSrcweir if( aCbxSynchronize.IsChecked() ) 1504cdf0e10cSrcweir { 1505cdf0e10cSrcweir if( p == &aMtrStartWidth ) 1506cdf0e10cSrcweir aMtrEndWidth.SetValue( aMtrStartWidth.GetValue() ); 1507cdf0e10cSrcweir if( p == &aLbStartStyle ) 1508cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( aLbStartStyle.GetSelectEntryPos() ); 1509cdf0e10cSrcweir if( p == &aTsbCenterStart ) 1510cdf0e10cSrcweir aTsbCenterEnd.SetState( aTsbCenterStart.GetState() ); 1511cdf0e10cSrcweir } 1512cdf0e10cSrcweir 1513cdf0e10cSrcweir ChangePreviewHdl_Impl( this ); 1514cdf0e10cSrcweir 1515cdf0e10cSrcweir return( 0L ); 1516cdf0e10cSrcweir } 1517cdf0e10cSrcweir 1518cdf0e10cSrcweir //------------------------------------------------------------------------ 1519cdf0e10cSrcweir // #116827# 1520cdf0e10cSrcweir 1521cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ChangeEdgeStyleHdl_Impl, void *, EMPTYARG ) 1522cdf0e10cSrcweir { 1523cdf0e10cSrcweir ChangePreviewHdl_Impl( this ); 1524cdf0e10cSrcweir 1525cdf0e10cSrcweir return( 0L ); 1526cdf0e10cSrcweir } 1527cdf0e10cSrcweir 15285aaf853bSArmin Le Grand //------------------------------------------------------------------------ 15295aaf853bSArmin Le Grand // fdo#43209 15305aaf853bSArmin Le Grand 15315aaf853bSArmin Le Grand IMPL_LINK( SvxLineTabPage, ChangeCapStyleHdl_Impl, void *, EMPTYARG ) 15325aaf853bSArmin Le Grand { 15335aaf853bSArmin Le Grand ChangePreviewHdl_Impl( this ); 15345aaf853bSArmin Le Grand 15355aaf853bSArmin Le Grand return( 0L ); 15365aaf853bSArmin Le Grand } 1537cdf0e10cSrcweir //------------------------------------------------------------------------ 1538cdf0e10cSrcweir 1539cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ClickInvisibleHdl_Impl, void *, EMPTYARG ) 1540cdf0e10cSrcweir { 1541cdf0e10cSrcweir if( aLbLineStyle.GetSelectEntryPos() == 0 ) // unsichtbar 1542cdf0e10cSrcweir { 1543cdf0e10cSrcweir aFtColor.Disable(); 1544cdf0e10cSrcweir if(!bSymbols) 1545cdf0e10cSrcweir aLbColor.Disable(); 1546cdf0e10cSrcweir aFtLineWidth.Disable(); 1547cdf0e10cSrcweir aMtrLineWidth.Disable(); 1548cdf0e10cSrcweir 1549cdf0e10cSrcweir if( aFlLineEnds.IsEnabled() ) 1550cdf0e10cSrcweir { 1551cdf0e10cSrcweir aFtLineEndsStyle.Disable(); 1552cdf0e10cSrcweir aFtLineEndsWidth.Disable(); 1553cdf0e10cSrcweir aLbStartStyle.Disable(); 1554cdf0e10cSrcweir aMtrStartWidth.Disable(); 1555cdf0e10cSrcweir aTsbCenterStart.Disable(); 1556cdf0e10cSrcweir aLbEndStyle.Disable(); 1557cdf0e10cSrcweir aMtrEndWidth.Disable(); 1558cdf0e10cSrcweir aTsbCenterEnd.Disable(); 1559cdf0e10cSrcweir aCbxSynchronize.Disable(); 1560cdf0e10cSrcweir 1561cdf0e10cSrcweir // #116827# 1562cdf0e10cSrcweir maFTEdgeStyle.Disable(); 1563cdf0e10cSrcweir maLBEdgeStyle.Disable(); 15645aaf853bSArmin Le Grand 15655aaf853bSArmin Le Grand // LineCaps 15665aaf853bSArmin Le Grand maFTCapStyle.Disable(); 15675aaf853bSArmin Le Grand maLBCapStyle.Disable(); 1568cdf0e10cSrcweir } 1569cdf0e10cSrcweir } 1570cdf0e10cSrcweir else 1571cdf0e10cSrcweir { 1572cdf0e10cSrcweir aFtColor.Enable(); 1573cdf0e10cSrcweir aLbColor.Enable(); 1574cdf0e10cSrcweir aFtLineWidth.Enable(); 1575cdf0e10cSrcweir aMtrLineWidth.Enable(); 1576cdf0e10cSrcweir 1577cdf0e10cSrcweir if( aFlLineEnds.IsEnabled() ) 1578cdf0e10cSrcweir { 1579cdf0e10cSrcweir aFtLineEndsStyle.Enable(); 1580cdf0e10cSrcweir aFtLineEndsWidth.Enable(); 1581cdf0e10cSrcweir aLbStartStyle.Enable(); 1582cdf0e10cSrcweir aMtrStartWidth.Enable(); 1583cdf0e10cSrcweir aTsbCenterStart.Enable(); 1584cdf0e10cSrcweir aLbEndStyle.Enable(); 1585cdf0e10cSrcweir aMtrEndWidth.Enable(); 1586cdf0e10cSrcweir aTsbCenterEnd.Enable(); 1587cdf0e10cSrcweir aCbxSynchronize.Enable(); 1588cdf0e10cSrcweir 1589cdf0e10cSrcweir // #116827# 1590cdf0e10cSrcweir maFTEdgeStyle.Enable(); 1591cdf0e10cSrcweir maLBEdgeStyle.Enable(); 15925aaf853bSArmin Le Grand 15935aaf853bSArmin Le Grand // LineCaps 15945aaf853bSArmin Le Grand maFTCapStyle.Enable(); 15955aaf853bSArmin Le Grand maLBCapStyle.Enable(); 1596cdf0e10cSrcweir } 1597cdf0e10cSrcweir } 1598cdf0e10cSrcweir ChangePreviewHdl_Impl( NULL ); 1599cdf0e10cSrcweir 1600cdf0e10cSrcweir return( 0L ); 1601cdf0e10cSrcweir } 1602cdf0e10cSrcweir 1603cdf0e10cSrcweir //------------------------------------------------------------------------ 1604cdf0e10cSrcweir 1605cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ChangeEndHdl_Impl, void *, p ) 1606cdf0e10cSrcweir { 1607cdf0e10cSrcweir if( aCbxSynchronize.IsChecked() ) 1608cdf0e10cSrcweir { 1609cdf0e10cSrcweir if( p == &aMtrEndWidth ) 1610cdf0e10cSrcweir aMtrStartWidth.SetValue( aMtrEndWidth.GetValue() ); 1611cdf0e10cSrcweir if( p == &aLbEndStyle ) 1612cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( aLbEndStyle.GetSelectEntryPos() ); 1613cdf0e10cSrcweir if( p == &aTsbCenterEnd ) 1614cdf0e10cSrcweir aTsbCenterStart.SetState( aTsbCenterEnd.GetState() ); 1615cdf0e10cSrcweir } 1616cdf0e10cSrcweir 1617cdf0e10cSrcweir ChangePreviewHdl_Impl( this ); 1618cdf0e10cSrcweir 1619cdf0e10cSrcweir return( 0L ); 1620cdf0e10cSrcweir } 1621cdf0e10cSrcweir 1622cdf0e10cSrcweir //------------------------------------------------------------------------ 1623cdf0e10cSrcweir /* 1624cdf0e10cSrcweir 1625cdf0e10cSrcweir long SvxLineTabPage::ClickMeasuringHdl_Impl( void* ) 1626cdf0e10cSrcweir { 1627cdf0e10cSrcweir if( aTsbShowMeasuring.GetState() == STATE_NOCHECK ) 1628cdf0e10cSrcweir { 1629cdf0e10cSrcweir aFtPosition.Disable(); 1630cdf0e10cSrcweir aCtlPosition.Disable(); 1631cdf0e10cSrcweir } 1632cdf0e10cSrcweir else 1633cdf0e10cSrcweir { 1634cdf0e10cSrcweir aFtPosition.Enable(); 1635cdf0e10cSrcweir aCtlPosition.Enable(); 1636cdf0e10cSrcweir } 1637cdf0e10cSrcweir aCtlPosition.Invalidate(); 1638cdf0e10cSrcweir 1639cdf0e10cSrcweir return( 0L ); 1640cdf0e10cSrcweir } 1641cdf0e10cSrcweir */ 1642cdf0e10cSrcweir //------------------------------------------------------------------------ 1643cdf0e10cSrcweir 1644cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ChangeTransparentHdl_Impl, void *, EMPTYARG ) 1645cdf0e10cSrcweir { 1646cdf0e10cSrcweir sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue(); 1647cdf0e10cSrcweir XLineTransparenceItem aItem( nVal ); 1648cdf0e10cSrcweir 1649cdf0e10cSrcweir rXLSet.Put( XLineTransparenceItem( aItem ) ); 1650cdf0e10cSrcweir 1651cdf0e10cSrcweir // #116827# 1652cdf0e10cSrcweir FillXLSet_Impl(); 1653cdf0e10cSrcweir 1654cdf0e10cSrcweir aCtlPreview.Invalidate(); 1655cdf0e10cSrcweir 1656cdf0e10cSrcweir return( 0L ); 1657cdf0e10cSrcweir } 1658cdf0e10cSrcweir 1659cdf0e10cSrcweir //------------------------------------------------------------------------ 1660cdf0e10cSrcweir 1661cdf0e10cSrcweir void SvxLineTabPage::PointChanged( Window*, RECT_POINT eRcPt ) 1662cdf0e10cSrcweir { 1663cdf0e10cSrcweir eRP = eRcPt; 1664cdf0e10cSrcweir } 1665cdf0e10cSrcweir 1666cdf0e10cSrcweir //------------------------------------------------------------------------ 1667cdf0e10cSrcweir 1668cdf0e10cSrcweir void SvxLineTabPage::FillUserData() 1669cdf0e10cSrcweir { 1670cdf0e10cSrcweir // Abgleich wird in der Ini-Datei festgehalten 1671cdf0e10cSrcweir UniString aStrUserData = UniString::CreateFromInt32( (sal_Int32) aCbxSynchronize.IsChecked() ); 1672cdf0e10cSrcweir SetUserData( aStrUserData ); 1673cdf0e10cSrcweir } 1674cdf0e10cSrcweir 1675cdf0e10cSrcweir 1676cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart) 1677cdf0e10cSrcweir //Handler f�r Popup-Menue der Symbolauswahl (NumMenueButton) 1678cdf0e10cSrcweir //der folgende Link stammt urspruenglich aus SvxNumOptionsTabPage 1679cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) 1680cdf0e10cSrcweir { 1681cdf0e10cSrcweir //Popup initialisieren 1682cdf0e10cSrcweir if(!pButton->GetPopupMenu()->GetPopupMenu( MN_GALLERY )) 1683cdf0e10cSrcweir { 1684cdf0e10cSrcweir // Gallery-Eintraege besorgen 1685cdf0e10cSrcweir GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames); 1686cdf0e10cSrcweir 1687cdf0e10cSrcweir PopupMenu* pPopup = new PopupMenu; 1688cdf0e10cSrcweir String aEmptyStr; 1689cdf0e10cSrcweir 1690cdf0e10cSrcweir nNumMenuGalleryItems=aGrfNames.Count(); 1691cdf0e10cSrcweir for(long i = 0; i < nNumMenuGalleryItems; i++) 1692cdf0e10cSrcweir { 1693cdf0e10cSrcweir const String* pGrfName = (const String*)aGrfNames.GetObject(i); 1694cdf0e10cSrcweir const String* pUIName = pGrfName; 1695cdf0e10cSrcweir 1696cdf0e10cSrcweir // convert URL encodings to UI characters (eg %20 for spaces) 1697cdf0e10cSrcweir String aPhysicalName; 1698cdf0e10cSrcweir if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( *pGrfName, aPhysicalName )) 1699cdf0e10cSrcweir pUIName = &aPhysicalName; 1700cdf0e10cSrcweir 1701cdf0e10cSrcweir SvxBrushItem* pBrushItem = new SvxBrushItem(*pGrfName, aEmptyStr, GPOS_AREA, SID_ATTR_BRUSH); 1702cdf0e10cSrcweir pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl)); 1703cdf0e10cSrcweir 1704cdf0e10cSrcweir SvxBmpItemInfo* pInfo = new SvxBmpItemInfo(); 1705cdf0e10cSrcweir pInfo->pBrushItem = pBrushItem; 1706cdf0e10cSrcweir pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i); 1707cdf0e10cSrcweir aGrfBrushItems.Insert(pInfo, i); 1708cdf0e10cSrcweir const Graphic* pGraphic = pBrushItem->GetGraphic(); 1709cdf0e10cSrcweir 1710cdf0e10cSrcweir if(pGraphic) 1711cdf0e10cSrcweir { 1712cdf0e10cSrcweir Bitmap aBitmap(pGraphic->GetBitmap()); 1713cdf0e10cSrcweir Size aSize(aBitmap.GetSizePixel()); 1714cdf0e10cSrcweir if(aSize.Width() > MAX_BMP_WIDTH || 1715cdf0e10cSrcweir aSize.Height() > MAX_BMP_HEIGHT) 1716cdf0e10cSrcweir { 1717cdf0e10cSrcweir sal_Bool bWidth = aSize.Width() > aSize.Height(); 1718cdf0e10cSrcweir double nScale = bWidth ? 1719cdf0e10cSrcweir (double)MAX_BMP_WIDTH / (double)aSize.Width(): 1720cdf0e10cSrcweir (double)MAX_BMP_HEIGHT / (double)aSize.Height(); 1721cdf0e10cSrcweir aBitmap.Scale(nScale, nScale); 1722cdf0e10cSrcweir 1723cdf0e10cSrcweir } 1724cdf0e10cSrcweir Image aImage(aBitmap); 1725cdf0e10cSrcweir pPopup->InsertItem(pInfo->nItemId, *pUIName, aImage ); 1726cdf0e10cSrcweir } 1727cdf0e10cSrcweir else 1728cdf0e10cSrcweir { 1729cdf0e10cSrcweir Image aImage; 1730cdf0e10cSrcweir pPopup->InsertItem(pInfo->nItemId, *pUIName, aImage ); 1731cdf0e10cSrcweir } 1732cdf0e10cSrcweir } 1733cdf0e10cSrcweir aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup ); 1734cdf0e10cSrcweir if(!aGrfNames.Count()) 1735cdf0e10cSrcweir aSymbolMB.GetPopupMenu()->EnableItem(MN_GALLERY, sal_False); 1736cdf0e10cSrcweir } 1737cdf0e10cSrcweir 1738cdf0e10cSrcweir if(!pButton->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ) && pSymbolList) 1739cdf0e10cSrcweir { 1740cdf0e10cSrcweir VirtualDevice aVDev; 1741cdf0e10cSrcweir aVDev.SetMapMode(MapMode(MAP_100TH_MM)); 1742cdf0e10cSrcweir SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS); 1743cdf0e10cSrcweir pModel->GetItemPool().FreezeIdRanges(); 1744cdf0e10cSrcweir // Page 1745cdf0e10cSrcweir SdrPage* pPage = new SdrPage( *pModel, sal_False ); 1746cdf0e10cSrcweir pPage->SetSize(Size(1000,1000)); 1747cdf0e10cSrcweir pModel->InsertPage( pPage, 0 ); 1748cdf0e10cSrcweir // 3D View 1749cdf0e10cSrcweir SdrView* pView = new SdrView( pModel, &aVDev ); 1750cdf0e10cSrcweir pView->hideMarkHandles(); 17513c42630dSArmin Le Grand /*SdrPageView* pPageView = */pView->ShowSdrPage(pPage); 1752cdf0e10cSrcweir 1753cdf0e10cSrcweir PopupMenu* pPopup = new PopupMenu; 1754cdf0e10cSrcweir String aEmptyStr; 17553a5971bbSRegina Henschel 17563a5971bbSRegina Henschel // Generate invisible square to give all symbols a 17573a5971bbSRegina Henschel // bitmap size, which is indepedent from specific glyph 17583a5971bbSRegina Henschel SdrObject *pInvisibleSquare=pSymbolList->GetObj(0); 17593a5971bbSRegina Henschel pInvisibleSquare=pInvisibleSquare->Clone(); 17603a5971bbSRegina Henschel pPage->NbcInsertObject(pInvisibleSquare); 17613a5971bbSRegina Henschel pInvisibleSquare->SetMergedItem(XFillTransparenceItem(100)); 17623a5971bbSRegina Henschel pInvisibleSquare->SetMergedItem(XLineTransparenceItem(100)); 17633a5971bbSRegina Henschel 1764cdf0e10cSrcweir for(long i=0;; ++i) 1765cdf0e10cSrcweir { 1766cdf0e10cSrcweir SdrObject *pObj=pSymbolList->GetObj(i); 1767cdf0e10cSrcweir if(pObj==NULL) 1768cdf0e10cSrcweir break; 1769cdf0e10cSrcweir pObj=pObj->Clone(); 1770cdf0e10cSrcweir //const String* pGrfName = (const String*)aGrfNames.GetObject(i); 1771cdf0e10cSrcweir String *pStr=new String();//String(i)); 1772cdf0e10cSrcweir aGrfNames.Insert(pStr,LIST_APPEND); 1773cdf0e10cSrcweir //Rectangle aRect(pObj->GetLogicRect()); 1774cdf0e10cSrcweir pPage->NbcInsertObject(pObj); 1775cdf0e10cSrcweir if(pSymbolAttr) 1776cdf0e10cSrcweir { 1777cdf0e10cSrcweir pObj->SetMergedItemSet(*pSymbolAttr); 1778cdf0e10cSrcweir } 1779cdf0e10cSrcweir else 1780cdf0e10cSrcweir { 1781cdf0e10cSrcweir pObj->SetMergedItemSet(rOutAttrs); 1782cdf0e10cSrcweir } 17833a5971bbSRegina Henschel pView->MarkAll(); 1784bb18ee55SArmin Le Grand BitmapEx aBitmapEx(pView->GetMarkedObjBitmapEx()); 1785bb18ee55SArmin Le Grand GDIMetaFile aMeta(pView->GetMarkedObjMetaFile()); 1786cdf0e10cSrcweir pView->UnmarkAll(); 17873a5971bbSRegina Henschel pObj=pPage->RemoveObject(1); 1788cdf0e10cSrcweir SdrObject::Free(pObj); 1789cdf0e10cSrcweir 1790cdf0e10cSrcweir SvxBrushItem* pBrushItem = new SvxBrushItem(Graphic(aMeta), GPOS_AREA, SID_ATTR_BRUSH); 1791cdf0e10cSrcweir pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl)); 1792cdf0e10cSrcweir 1793cdf0e10cSrcweir SvxBmpItemInfo* pInfo = new SvxBmpItemInfo(); 1794cdf0e10cSrcweir pInfo->pBrushItem = pBrushItem; 1795cdf0e10cSrcweir pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems); 1796cdf0e10cSrcweir aGrfBrushItems.Insert(pInfo, nNumMenuGalleryItems + i); 1797cdf0e10cSrcweir 1798bb18ee55SArmin Le Grand Size aSize(aBitmapEx.GetSizePixel()); 1799cdf0e10cSrcweir if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT) 1800cdf0e10cSrcweir { 1801cdf0e10cSrcweir sal_Bool bWidth = aSize.Width() > aSize.Height(); 1802cdf0e10cSrcweir double nScale = bWidth ? 1803cdf0e10cSrcweir (double)MAX_BMP_WIDTH / (double)aSize.Width(): 1804cdf0e10cSrcweir (double)MAX_BMP_HEIGHT / (double)aSize.Height(); 1805bb18ee55SArmin Le Grand aBitmapEx.Scale(nScale, nScale); 1806cdf0e10cSrcweir } 1807bb18ee55SArmin Le Grand Image aImage(aBitmapEx); 1808cdf0e10cSrcweir pPopup->InsertItem(pInfo->nItemId,*pStr,aImage); 1809cdf0e10cSrcweir } 18103a5971bbSRegina Henschel pInvisibleSquare=pPage->RemoveObject(0); 18113a5971bbSRegina Henschel SdrObject::Free(pInvisibleSquare); 18123a5971bbSRegina Henschel 1813cdf0e10cSrcweir aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup ); 1814cdf0e10cSrcweir if(!aGrfNames.Count()) 1815cdf0e10cSrcweir aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False); 1816cdf0e10cSrcweir 1817cdf0e10cSrcweir delete pView; 1818cdf0e10cSrcweir delete pModel; 1819cdf0e10cSrcweir } 1820cdf0e10cSrcweir return 0; 1821cdf0e10cSrcweir } 1822cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart) 1823cdf0e10cSrcweir //Handler f�r Popup-Menue der Symbolauswahl (NumMenueButton) 1824cdf0e10cSrcweir //der folgende Link stammt urspruenglich aus SvxNumOptionsTabPage: 1825cdf0e10cSrcweir IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem) 1826cdf0e10cSrcweir { 1827cdf0e10cSrcweir PopupMenu* pPopup = pThis->aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY ); 1828cdf0e10cSrcweir 1829cdf0e10cSrcweir SvxBmpItemInfo* pBmpInfo = 0; 1830cdf0e10cSrcweir for ( sal_uInt16 i = 0; i < pThis->aGrfBrushItems.Count(); i++ ) 1831cdf0e10cSrcweir { 1832cdf0e10cSrcweir SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)pThis->aGrfBrushItems.GetObject(i); 1833cdf0e10cSrcweir if( pInfo->pBrushItem == pItem ) 1834cdf0e10cSrcweir { 1835cdf0e10cSrcweir pBmpInfo = pInfo; break; 1836cdf0e10cSrcweir } 1837cdf0e10cSrcweir } 1838cdf0e10cSrcweir if( pBmpInfo ) 1839cdf0e10cSrcweir { 1840cdf0e10cSrcweir if( pItem->GetGraphic() ) 1841cdf0e10cSrcweir { 1842cdf0e10cSrcweir Bitmap aBitmap(pItem->GetGraphic()->GetBitmap()); 1843cdf0e10cSrcweir Size aSize(aBitmap.GetSizePixel()); 1844cdf0e10cSrcweir if(aSize.Width() > MAX_BMP_WIDTH || 1845cdf0e10cSrcweir aSize.Height() > MAX_BMP_HEIGHT) 1846cdf0e10cSrcweir { 1847cdf0e10cSrcweir sal_Bool bWidth = aSize.Width() > aSize.Height(); 1848cdf0e10cSrcweir double nScale = bWidth ? 1849cdf0e10cSrcweir (double)MAX_BMP_WIDTH / (double)aSize.Width(): 1850cdf0e10cSrcweir (double)MAX_BMP_HEIGHT / (double)aSize.Height(); 1851cdf0e10cSrcweir aBitmap.Scale(nScale, nScale); 1852cdf0e10cSrcweir } 1853cdf0e10cSrcweir Image aImage(aBitmap); 1854cdf0e10cSrcweir pPopup->SetItemImage( pBmpInfo->nItemId, aImage ); 1855cdf0e10cSrcweir } 1856cdf0e10cSrcweir } 1857cdf0e10cSrcweir 1858cdf0e10cSrcweir return 0; 1859cdf0e10cSrcweir } 1860cdf0e10cSrcweir 1861cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart) 1862cdf0e10cSrcweir //Handler f�r Menuebutton 1863cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton ) 1864cdf0e10cSrcweir { 1865cdf0e10cSrcweir sal_uInt16 nItemId = pButton->GetCurItemId(); 1866cdf0e10cSrcweir const Graphic* pGraphic = 0; 1867cdf0e10cSrcweir Graphic aGraphic; 1868cdf0e10cSrcweir String aGrfName; 1869cdf0e10cSrcweir sal_Bool bResetSize = sal_False; 1870cdf0e10cSrcweir sal_Bool bEnable=sal_True; 1871cdf0e10cSrcweir long nPreviousSymbolType = nSymbolType; 1872cdf0e10cSrcweir 1873cdf0e10cSrcweir if(nItemId >= MN_GALLERY_ENTRY) 1874cdf0e10cSrcweir { 1875cdf0e10cSrcweir if( (nItemId-MN_GALLERY_ENTRY) >= nNumMenuGalleryItems) 1876cdf0e10cSrcweir { 1877cdf0e10cSrcweir nSymbolType=nItemId-MN_GALLERY_ENTRY-nNumMenuGalleryItems; //Index der Liste 1878cdf0e10cSrcweir } 1879cdf0e10cSrcweir else 1880cdf0e10cSrcweir { 1881cdf0e10cSrcweir nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM; 1882cdf0e10cSrcweir bResetSize = sal_True; 1883cdf0e10cSrcweir } 1884cdf0e10cSrcweir SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.GetObject(nItemId - MN_GALLERY_ENTRY); 1885cdf0e10cSrcweir pGraphic = pInfo->pBrushItem->GetGraphic(); 1886cdf0e10cSrcweir } 1887cdf0e10cSrcweir else switch(nItemId) 1888cdf0e10cSrcweir { 1889cdf0e10cSrcweir case MN_SYMBOLS_AUTO: 1890cdf0e10cSrcweir { 1891cdf0e10cSrcweir pGraphic=&aAutoSymbolGraphic; 1892cdf0e10cSrcweir aAutoSymbolGraphic.SetPrefSize( Size(253,253) ); 1893cdf0e10cSrcweir nSymbolType=SVX_SYMBOLTYPE_AUTO; 1894cdf0e10cSrcweir } 1895cdf0e10cSrcweir break; 1896cdf0e10cSrcweir 1897cdf0e10cSrcweir case MN_SYMBOLS_NONE: 1898cdf0e10cSrcweir { 1899cdf0e10cSrcweir nSymbolType=SVX_SYMBOLTYPE_NONE; 1900cdf0e10cSrcweir pGraphic=NULL; 1901cdf0e10cSrcweir bEnable=sal_False; 1902cdf0e10cSrcweir } 1903cdf0e10cSrcweir break; 1904cdf0e10cSrcweir default: 1905cdf0e10cSrcweir { 1906cdf0e10cSrcweir SvxOpenGraphicDialog aGrfDlg(CUI_RES(RID_STR_EDIT_GRAPHIC)); 1907cdf0e10cSrcweir aGrfDlg.EnableLink(sal_False); 1908cdf0e10cSrcweir aGrfDlg.AsLink(sal_False); 1909cdf0e10cSrcweir if( !aGrfDlg.Execute() ) 1910cdf0e10cSrcweir { 1911cdf0e10cSrcweir // ausgewaehlten Filter merken 1912cdf0e10cSrcweir aGrfName = aGrfDlg.GetPath(); 1913cdf0e10cSrcweir if( !aGrfDlg.GetGraphic(aGraphic) ) 1914cdf0e10cSrcweir { 1915cdf0e10cSrcweir nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM; 1916cdf0e10cSrcweir pGraphic = &aGraphic; 1917cdf0e10cSrcweir bResetSize = sal_True; 1918cdf0e10cSrcweir } 1919cdf0e10cSrcweir } 1920cdf0e10cSrcweir if( !pGraphic ) 1921cdf0e10cSrcweir return 0; 1922cdf0e10cSrcweir } 1923cdf0e10cSrcweir break; 1924cdf0e10cSrcweir } 1925cdf0e10cSrcweir 1926cdf0e10cSrcweir if(pGraphic) 1927cdf0e10cSrcweir { 1928cdf0e10cSrcweir Size aSize = SvxNumberFormat::GetGraphicSizeMM100(pGraphic); 1929cdf0e10cSrcweir aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)ePoolUnit); 1930cdf0e10cSrcweir aSymbolGraphic=*pGraphic; 1931cdf0e10cSrcweir if( bResetSize ) 1932cdf0e10cSrcweir { 1933cdf0e10cSrcweir aSymbolSize=aSize; 1934cdf0e10cSrcweir } 1935cdf0e10cSrcweir else if( nPreviousSymbolType == SVX_SYMBOLTYPE_BRUSHITEM ) 1936cdf0e10cSrcweir { //#i31097# Data Point Symbol size changes when a different symbol is choosen(maoyg) 1937cdf0e10cSrcweir if( aSymbolSize.Width() != aSymbolSize.Height() ) 1938cdf0e10cSrcweir { 1939cdf0e10cSrcweir aSize.setWidth( (long)( aSymbolSize.Width() + aSymbolSize.Height() )/2 ); 1940cdf0e10cSrcweir aSize.setHeight( (long)( aSymbolSize.Width() + aSymbolSize.Height() )/2 ); 1941cdf0e10cSrcweir aSymbolSize = aSize; 1942cdf0e10cSrcweir } 1943cdf0e10cSrcweir } 1944cdf0e10cSrcweir aCtlPreview.SetSymbol(&aSymbolGraphic,aSymbolSize); 1945cdf0e10cSrcweir } 1946cdf0e10cSrcweir else 1947cdf0e10cSrcweir { 1948cdf0e10cSrcweir aSymbolGraphic=Graphic(); 1949cdf0e10cSrcweir aCtlPreview.SetSymbol(NULL,aSymbolSize); 1950cdf0e10cSrcweir bEnable=sal_False; 1951cdf0e10cSrcweir } 1952cdf0e10cSrcweir aSymbolLastSize=aSymbolSize; 1953cdf0e10cSrcweir SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit); 1954cdf0e10cSrcweir SetMetricValue(aSymbolHeightMF, aSymbolSize.Height(), ePoolUnit); 1955cdf0e10cSrcweir aSymbolRatioCB.Enable(bEnable); 1956cdf0e10cSrcweir aSymbolHeightFT.Enable(bEnable); 1957cdf0e10cSrcweir aSymbolWidthFT.Enable(bEnable); 1958cdf0e10cSrcweir aSymbolWidthMF.Enable(bEnable); 1959cdf0e10cSrcweir aSymbolHeightMF.Enable(bEnable); 1960cdf0e10cSrcweir aCtlPreview.Invalidate(); 1961cdf0e10cSrcweir 1962cdf0e10cSrcweir return 0; 1963cdf0e10cSrcweir } 1964cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, MetricField *, pField) 1965cdf0e10cSrcweir { 1966cdf0e10cSrcweir bNewSize=true; 1967cdf0e10cSrcweir sal_Bool bWidth = (sal_Bool)(pField == &aSymbolWidthMF); 1968cdf0e10cSrcweir bLastWidthModified = bWidth; 1969cdf0e10cSrcweir sal_Bool bRatio = aSymbolRatioCB.IsChecked(); 1970cdf0e10cSrcweir long nWidthVal = static_cast<long>(aSymbolWidthMF.Denormalize(aSymbolWidthMF.GetValue(FUNIT_100TH_MM))); 1971cdf0e10cSrcweir long nHeightVal= static_cast<long>(aSymbolHeightMF.Denormalize(aSymbolHeightMF.GetValue(FUNIT_100TH_MM))); 1972cdf0e10cSrcweir nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MAP_100TH_MM,(MapUnit)ePoolUnit ); 1973cdf0e10cSrcweir nHeightVal = OutputDevice::LogicToLogic(nHeightVal,MAP_100TH_MM,(MapUnit)ePoolUnit); 1974cdf0e10cSrcweir aSymbolSize=Size(nWidthVal,nHeightVal); 1975cdf0e10cSrcweir double fSizeRatio = (double)1; 1976cdf0e10cSrcweir 1977cdf0e10cSrcweir if(bRatio) 1978cdf0e10cSrcweir { 1979cdf0e10cSrcweir if (aSymbolLastSize.Height() && aSymbolLastSize.Width()) 1980cdf0e10cSrcweir fSizeRatio = (double)aSymbolLastSize.Width() / aSymbolLastSize.Height(); 1981cdf0e10cSrcweir } 1982cdf0e10cSrcweir 1983cdf0e10cSrcweir //Size aSymbolSize(aSymbolLastSize); 1984cdf0e10cSrcweir 1985cdf0e10cSrcweir if(bWidth) 1986cdf0e10cSrcweir { 1987cdf0e10cSrcweir long nDelta = nWidthVal - aSymbolLastSize.Width(); 1988cdf0e10cSrcweir aSymbolSize.Width() = nWidthVal; 1989cdf0e10cSrcweir if (bRatio) 1990cdf0e10cSrcweir { 1991cdf0e10cSrcweir aSymbolSize.Height() = aSymbolLastSize.Height() + (long)((double)nDelta / fSizeRatio); 1992cdf0e10cSrcweir aSymbolSize.Height() = OutputDevice::LogicToLogic( aSymbolSize.Height(),(MapUnit)ePoolUnit, MAP_100TH_MM ); 1993cdf0e10cSrcweir aSymbolHeightMF.SetUserValue(aSymbolHeightMF.Normalize(aSymbolSize.Height()), FUNIT_100TH_MM); 1994cdf0e10cSrcweir } 1995cdf0e10cSrcweir } 1996cdf0e10cSrcweir else 1997cdf0e10cSrcweir { 1998cdf0e10cSrcweir long nDelta = nHeightVal - aSymbolLastSize.Height(); 1999cdf0e10cSrcweir aSymbolSize.Height() = nHeightVal; 2000cdf0e10cSrcweir if (bRatio) 2001cdf0e10cSrcweir { 2002cdf0e10cSrcweir aSymbolSize.Width() = aSymbolLastSize.Width() + (long)((double)nDelta * fSizeRatio); 2003cdf0e10cSrcweir aSymbolSize.Width() = OutputDevice::LogicToLogic( aSymbolSize.Width(), 2004cdf0e10cSrcweir (MapUnit)ePoolUnit, MAP_100TH_MM ); 2005cdf0e10cSrcweir aSymbolWidthMF.SetUserValue(aSymbolWidthMF.Normalize(aSymbolSize.Width()), FUNIT_100TH_MM); 2006cdf0e10cSrcweir } 2007cdf0e10cSrcweir } 2008cdf0e10cSrcweir aCtlPreview.ResizeSymbol(aSymbolSize); 2009cdf0e10cSrcweir aSymbolLastSize=aSymbolSize; 2010cdf0e10cSrcweir return 0; 2011cdf0e10cSrcweir } 2012cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, RatioHdl_Impl, CheckBox *, pBox ) 2013cdf0e10cSrcweir { 2014cdf0e10cSrcweir if (pBox->IsChecked()) 2015cdf0e10cSrcweir { 2016cdf0e10cSrcweir if (bLastWidthModified) 2017cdf0e10cSrcweir SizeHdl_Impl(&aSymbolWidthMF); 2018cdf0e10cSrcweir else 2019cdf0e10cSrcweir SizeHdl_Impl(&aSymbolHeightMF); 2020cdf0e10cSrcweir } 2021cdf0e10cSrcweir return 0; 2022cdf0e10cSrcweir } 2023cdf0e10cSrcweir 2024cdf0e10cSrcweir 2025cdf0e10cSrcweir void SvxLineTabPage::DataChanged( const DataChangedEvent& rDCEvt ) 2026cdf0e10cSrcweir { 2027cdf0e10cSrcweir SvxTabPage::DataChanged( rDCEvt ); 2028cdf0e10cSrcweir 2029cdf0e10cSrcweir if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) 2030cdf0e10cSrcweir { 2031cdf0e10cSrcweir FillListboxes(); 2032cdf0e10cSrcweir } 2033cdf0e10cSrcweir } 2034cdf0e10cSrcweir 2035cdf0e10cSrcweir void SvxLineTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001 2036cdf0e10cSrcweir { 2037cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pColorTabItem,SvxColorTableItem,SID_COLOR_TABLE,sal_False); 2038cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pDashListItem,SvxDashListItem,SID_DASH_LIST,sal_False); 2039cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pLineEndListItem,SvxLineEndListItem,SID_LINEEND_LIST,sal_False); 2040cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False); 2041cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pDlgTypeItem,SfxUInt16Item,SID_DLG_TYPE,sal_False); 2042cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pSdrObjListItem,OfaPtrItem,SID_OBJECT_LIST,sal_False); 2043cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pSymbolAttrItem,SfxTabDialogItem,SID_ATTR_SET,sal_False); 2044cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pGraphicItem,SvxGraphicItem,SID_GRAPHIC,sal_False); 2045cdf0e10cSrcweir 2046cdf0e10cSrcweir if (pColorTabItem) 2047cdf0e10cSrcweir SetColorTable(pColorTabItem->GetColorTable()); 2048cdf0e10cSrcweir if (pDashListItem) 2049cdf0e10cSrcweir SetDashList(pDashListItem->GetDashList()); 2050cdf0e10cSrcweir if (pLineEndListItem) 2051cdf0e10cSrcweir SetLineEndList(pLineEndListItem->GetLineEndList()); 2052cdf0e10cSrcweir if (pPageTypeItem) 2053cdf0e10cSrcweir SetPageType(pPageTypeItem->GetValue()); 2054cdf0e10cSrcweir if (pDlgTypeItem) 2055cdf0e10cSrcweir SetDlgType(pDlgTypeItem->GetValue()); 2056cdf0e10cSrcweir Construct(); 2057cdf0e10cSrcweir 2058cdf0e10cSrcweir if(pSdrObjListItem) //symbols 2059cdf0e10cSrcweir { 2060cdf0e10cSrcweir ShowSymbolControls(sal_True); 2061cdf0e10cSrcweir pSymbolList = static_cast<SdrObjList*>(pSdrObjListItem->GetValue()); 2062cdf0e10cSrcweir if (pSymbolAttrItem) 2063cdf0e10cSrcweir pSymbolAttr = new SfxItemSet(pSymbolAttrItem->GetItemSet()); 2064cdf0e10cSrcweir if(pGraphicItem) 2065cdf0e10cSrcweir aAutoSymbolGraphic = pGraphicItem->GetGraphic(); 2066cdf0e10cSrcweir } 2067cdf0e10cSrcweir } 2068