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
SvxLineTabPage(Window * pParent,const SfxItemSet & rInAttrs)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 // #116827#
233cdf0e10cSrcweir Link aEdgeStyle = LINK( this, SvxLineTabPage, ChangeEdgeStyleHdl_Impl );
234cdf0e10cSrcweir maLBEdgeStyle.SetSelectHdl( aEdgeStyle );
235cdf0e10cSrcweir
2365aaf853bSArmin Le Grand // LineCaps
2375aaf853bSArmin Le Grand Link aCapStyle = LINK( this, SvxLineTabPage, ChangeCapStyleHdl_Impl );
2385aaf853bSArmin Le Grand maLBCapStyle.SetSelectHdl( aCapStyle );
2395aaf853bSArmin Le Grand
240cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart) , MB-Handler setzen
241cdf0e10cSrcweir aSymbolMB.SetSelectHdl(LINK(this, SvxLineTabPage, GraphicHdl_Impl));
242cdf0e10cSrcweir aSymbolMB.SetActivateHdl(LINK(this, SvxLineTabPage, MenuCreateHdl_Impl));
243cdf0e10cSrcweir aSymbolWidthMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl));
244cdf0e10cSrcweir aSymbolHeightMF.SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl));
245cdf0e10cSrcweir aSymbolRatioCB.SetClickHdl(LINK(this, SvxLineTabPage, RatioHdl_Impl));
246cdf0e10cSrcweir
247cdf0e10cSrcweir aSymbolRatioCB.Check(sal_True);
248cdf0e10cSrcweir ShowSymbolControls(sal_False);
249cdf0e10cSrcweir
250cdf0e10cSrcweir // #63083#
251cdf0e10cSrcweir nActLineWidth = -1;
252cdf0e10cSrcweir }
253cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart) , Symbol-Controls aktivieren
ShowSymbolControls(sal_Bool bOn)254cdf0e10cSrcweir void SvxLineTabPage::ShowSymbolControls(sal_Bool bOn)
255cdf0e10cSrcweir {
256cdf0e10cSrcweir bSymbols=bOn;
257cdf0e10cSrcweir aSymbolWidthFT.Show(bOn);
258cdf0e10cSrcweir aSymbolWidthMF.Show(bOn);
259cdf0e10cSrcweir aSymbolHeightFT.Show(bOn);
260cdf0e10cSrcweir aSymbolHeightMF.Show(bOn);
261cdf0e10cSrcweir aFlSymbol.Show(bOn);
262cdf0e10cSrcweir aSymbolRatioCB.Show(bOn);
263cdf0e10cSrcweir aSymbolMB.Show(bOn);
264cdf0e10cSrcweir aCtlPreview.ShowSymbol(bOn);
265cdf0e10cSrcweir }
266cdf0e10cSrcweir // -----------------------------------------------------------------------
267cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart) , dtor neu!
~SvxLineTabPage()268cdf0e10cSrcweir SvxLineTabPage::~SvxLineTabPage()
269cdf0e10cSrcweir {
270cdf0e10cSrcweir delete aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
271cdf0e10cSrcweir
272cdf0e10cSrcweir if(pSymbolList)
273cdf0e10cSrcweir delete aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_SYMBOLS );
274cdf0e10cSrcweir
275cdf0e10cSrcweir String* pStr = (String*)aGrfNames.First();
276cdf0e10cSrcweir while( pStr )
277cdf0e10cSrcweir {
278cdf0e10cSrcweir delete pStr;
279cdf0e10cSrcweir pStr = (String*)aGrfNames.Next();
280cdf0e10cSrcweir }
281cdf0e10cSrcweir SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.First();
282cdf0e10cSrcweir while( pInfo )
283cdf0e10cSrcweir {
284cdf0e10cSrcweir delete pInfo->pBrushItem;
285cdf0e10cSrcweir delete pInfo;
286cdf0e10cSrcweir pInfo = (SvxBmpItemInfo*)aGrfBrushItems.Next();
287cdf0e10cSrcweir }
288cdf0e10cSrcweir }
Construct()289cdf0e10cSrcweir void SvxLineTabPage::Construct()
290cdf0e10cSrcweir {
291cdf0e10cSrcweir // Farbtabelle
292c7be74b1SArmin Le Grand aLbColor.Fill( maColorTab );
293cdf0e10cSrcweir FillListboxes();
294cdf0e10cSrcweir }
295cdf0e10cSrcweir
FillListboxes()296cdf0e10cSrcweir void SvxLineTabPage::FillListboxes()
297cdf0e10cSrcweir {
298cdf0e10cSrcweir // Linienstile
299cdf0e10cSrcweir sal_uInt16 nOldSelect = aLbLineStyle.GetSelectEntryPos();
30097e8a929SArmin Le Grand // aLbLineStyle.FillStyles();
301c7be74b1SArmin Le Grand aLbLineStyle.Fill( maDashList );
302cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( nOldSelect );
303cdf0e10cSrcweir
304cdf0e10cSrcweir // LinienEndenStile
305cdf0e10cSrcweir String sNone( SVX_RES( RID_SVXSTR_NONE ) );
306cdf0e10cSrcweir nOldSelect = aLbStartStyle.GetSelectEntryPos();
307cdf0e10cSrcweir aLbStartStyle.Clear();
308cdf0e10cSrcweir aLbStartStyle.InsertEntry( sNone );
309c7be74b1SArmin Le Grand aLbStartStyle.Fill( maLineEndList );
310cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( nOldSelect );
311cdf0e10cSrcweir nOldSelect = aLbEndStyle.GetSelectEntryPos();
312cdf0e10cSrcweir aLbEndStyle.Clear();
313cdf0e10cSrcweir aLbEndStyle.InsertEntry( sNone );
314c7be74b1SArmin Le Grand aLbEndStyle.Fill( maLineEndList, sal_False );
315cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( nOldSelect );
316cdf0e10cSrcweir }
317cdf0e10cSrcweir
318cdf0e10cSrcweir // -----------------------------------------------------------------------
319cdf0e10cSrcweir
ActivatePage(const SfxItemSet & rSet)320cdf0e10cSrcweir void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet )
321cdf0e10cSrcweir {
322cdf0e10cSrcweir SFX_ITEMSET_ARG (&rSet,pPageTypeItem,CntUInt16Item,SID_PAGE_TYPE,sal_False); //add CHINA001 begin
323cdf0e10cSrcweir if (pPageTypeItem)
324cdf0e10cSrcweir SetPageType(pPageTypeItem->GetValue()); //add CHINA001 end
325c7be74b1SArmin Le Grand if( nDlgType == 0 && maDashList.get() ) //CHINA001 if( *pDlgType == 0 && pDashList ) // Linien-Dialog
326cdf0e10cSrcweir {
327cdf0e10cSrcweir sal_uInt16 nPos;
328cdf0e10cSrcweir sal_uInt16 nCount;
329cdf0e10cSrcweir
330cdf0e10cSrcweir // Dashliste
331cdf0e10cSrcweir if( ( *pnDashListState & CT_MODIFIED ) ||
332cdf0e10cSrcweir ( *pnDashListState & CT_CHANGED ) )
333cdf0e10cSrcweir {
334cdf0e10cSrcweir if( *pnDashListState & CT_CHANGED )
335c7be74b1SArmin Le Grand maDashList = ( (SvxLineTabDialog*) DLGWIN )->GetNewDashList();
336cdf0e10cSrcweir *pnDashListState = CT_NONE;
337cdf0e10cSrcweir
338cdf0e10cSrcweir // Styleliste
339cdf0e10cSrcweir nPos = aLbLineStyle.GetSelectEntryPos();
340cdf0e10cSrcweir
341cdf0e10cSrcweir aLbLineStyle.Clear();
342cdf0e10cSrcweir aLbLineStyle.InsertEntry(
343cdf0e10cSrcweir SVX_RESSTR( RID_SVXSTR_INVISIBLE ) );
344cdf0e10cSrcweir aLbLineStyle.InsertEntry(
345cdf0e10cSrcweir SVX_RESSTR( RID_SVXSTR_SOLID ) );
346c7be74b1SArmin Le Grand aLbLineStyle.Fill( maDashList );
347cdf0e10cSrcweir nCount = aLbLineStyle.GetEntryCount();
348cdf0e10cSrcweir
349cdf0e10cSrcweir if ( nCount == 0 )
350cdf0e10cSrcweir ; // Dieser Fall sollte nicht auftreten
351cdf0e10cSrcweir else if( nCount <= nPos )
352cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( 0 );
353cdf0e10cSrcweir else
354cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( nPos );
355cdf0e10cSrcweir // SelectStyleHdl_Impl( this );
356cdf0e10cSrcweir }
357cdf0e10cSrcweir
358c7be74b1SArmin Le Grand INetURLObject aDashURL( maDashList->GetPath() );
359cdf0e10cSrcweir
360c7be74b1SArmin Le Grand aDashURL.Append( maDashList->GetName() );
361cdf0e10cSrcweir DBG_ASSERT( aDashURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
362cdf0e10cSrcweir /* // Ermitteln (evtl. abschneiden) des Namens und in
363cdf0e10cSrcweir // der GroupBox darstellen
364cdf0e10cSrcweir String aString( ResId( RID_SVXSTR_TABLE, pMgr ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
365cdf0e10cSrcweir
366cdf0e10cSrcweir if ( aDashURL.getBase().Len() > 18 )
367cdf0e10cSrcweir {
368cdf0e10cSrcweir aString += aDashURL.getBase().Copy( 0, 15 );
369cdf0e10cSrcweir aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
370cdf0e10cSrcweir }
371cdf0e10cSrcweir else
372cdf0e10cSrcweir aString += aDashURL.getBase();
373cdf0e10cSrcweir
374cdf0e10cSrcweir aGrpLine.SetText( aString );
375cdf0e10cSrcweir */
376cdf0e10cSrcweir // LineEndliste
377cdf0e10cSrcweir if( ( *pnLineEndListState & CT_MODIFIED ) ||
378cdf0e10cSrcweir ( *pnLineEndListState & CT_CHANGED ) )
379cdf0e10cSrcweir {
380cdf0e10cSrcweir if( *pnLineEndListState & CT_CHANGED )
381c7be74b1SArmin Le Grand maLineEndList = ( (SvxLineTabDialog*) DLGWIN )->GetNewLineEndList();
382cdf0e10cSrcweir *pnLineEndListState = CT_NONE;
383cdf0e10cSrcweir
384cdf0e10cSrcweir nPos = aLbLineStyle.GetSelectEntryPos();
385cdf0e10cSrcweir String sNone( SVX_RES( RID_SVXSTR_NONE ) );
386cdf0e10cSrcweir aLbStartStyle.Clear();
387cdf0e10cSrcweir aLbStartStyle.InsertEntry( sNone );
388cdf0e10cSrcweir
389c7be74b1SArmin Le Grand aLbStartStyle.Fill( maLineEndList );
390cdf0e10cSrcweir nCount = aLbStartStyle.GetEntryCount();
391cdf0e10cSrcweir if( nCount == 0 )
392cdf0e10cSrcweir ; // Dieser Fall sollte nicht auftreten
393cdf0e10cSrcweir else if( nCount <= nPos )
394cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( 0 );
395cdf0e10cSrcweir else
396cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( nPos );
397cdf0e10cSrcweir
398cdf0e10cSrcweir aLbEndStyle.Clear();
399cdf0e10cSrcweir aLbEndStyle.InsertEntry( sNone );
400cdf0e10cSrcweir
401c7be74b1SArmin Le Grand aLbEndStyle.Fill( maLineEndList, sal_False );
402cdf0e10cSrcweir nCount = aLbEndStyle.GetEntryCount();
403cdf0e10cSrcweir
404cdf0e10cSrcweir if( nCount == 0 )
405cdf0e10cSrcweir ; // Dieser Fall sollte nicht auftreten
406cdf0e10cSrcweir else if( nCount <= nPos )
407cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( 0 );
408cdf0e10cSrcweir else
409cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( nPos );
410cdf0e10cSrcweir }
411c7be74b1SArmin Le Grand INetURLObject aLineURL( maLineEndList->GetPath() );
412cdf0e10cSrcweir
413c7be74b1SArmin Le Grand aLineURL.Append( maLineEndList->GetName() );
414cdf0e10cSrcweir DBG_ASSERT( aLineURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
415cdf0e10cSrcweir /* // Ermitteln (evtl. abschneiden) des Namens und in
416cdf0e10cSrcweir // der GroupBox darstellen
417cdf0e10cSrcweir aString = String( ResId( RID_SVXSTR_TABLE, pMgr ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
418cdf0e10cSrcweir
419cdf0e10cSrcweir if ( aLineURL.getBase().Len() > 18 )
420cdf0e10cSrcweir {
421cdf0e10cSrcweir aString += aLineURL.getBase().Copy( 0, 15 );
422cdf0e10cSrcweir aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
423cdf0e10cSrcweir }
424cdf0e10cSrcweir else
425cdf0e10cSrcweir aString += aLineURL.getBase();
426cdf0e10cSrcweir
427cdf0e10cSrcweir aGrpLineEnds.SetText( aString );
428cdf0e10cSrcweir */
429cdf0e10cSrcweir // Auswertung, ob von einer anderen TabPage ein anderer Fuelltyp gesetzt wurde
430cdf0e10cSrcweir if( aLbLineStyle.GetSelectEntryPos() != 0 )
431cdf0e10cSrcweir {
432cdf0e10cSrcweir if( nPageType == 2 ) // 1//CHINA001 if( *pPageType == 2 ) // 1
433cdf0e10cSrcweir {
434cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( *pPosDashLb + 2 ); // +2 wegen SOLID und INVLISIBLE
435cdf0e10cSrcweir ChangePreviewHdl_Impl( this );
436cdf0e10cSrcweir }
437cdf0e10cSrcweir if( nPageType == 3 )//CHINA001 if( *pPageType == 3 )
438cdf0e10cSrcweir {
439cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( *pPosLineEndLb + 1 );// +1 wegen SOLID
440cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( *pPosLineEndLb + 1 );// +1 wegen SOLID
441cdf0e10cSrcweir ChangePreviewHdl_Impl( this );
442cdf0e10cSrcweir }
443cdf0e10cSrcweir }
444cdf0e10cSrcweir
445cdf0e10cSrcweir // ColorTable
446cdf0e10cSrcweir if( *pnColorTableState )
447cdf0e10cSrcweir {
448cdf0e10cSrcweir if( *pnColorTableState & CT_CHANGED )
449c7be74b1SArmin Le Grand maColorTab = ( (SvxLineTabDialog*) DLGWIN )->GetNewColorTable();
450cdf0e10cSrcweir // aLbColor
451cdf0e10cSrcweir sal_uInt16 nColorPos = aLbColor.GetSelectEntryPos();
452cdf0e10cSrcweir aLbColor.Clear();
453c7be74b1SArmin Le Grand aLbColor.Fill( maColorTab );
454cdf0e10cSrcweir nCount = aLbColor.GetEntryCount();
455cdf0e10cSrcweir if( nCount == 0 )
456cdf0e10cSrcweir ; // This case should never occur
457cdf0e10cSrcweir else if( nCount <= nColorPos )
458cdf0e10cSrcweir aLbColor.SelectEntryPos( 0 );
459cdf0e10cSrcweir else
460cdf0e10cSrcweir aLbColor.SelectEntryPos( nColorPos );
461cdf0e10cSrcweir
462cdf0e10cSrcweir ChangePreviewHdl_Impl( this );
463cdf0e10cSrcweir }
464cdf0e10cSrcweir
465cdf0e10cSrcweir nPageType = 0;//CHINA001 *pPageType = 0;
466cdf0e10cSrcweir }
467cdf0e10cSrcweir // Seite existiert im Ctor noch nicht, deswegen hier!
468cdf0e10cSrcweir
469cdf0e10cSrcweir else if ( nDlgType == 1100 || // Chart-Dialog//CHINA001 else if ( *pDlgType == 1100 || // Chart-Dialog
470cdf0e10cSrcweir nDlgType == 1101 )//CHINA001 *pDlgType == 1101 )
471cdf0e10cSrcweir {
472cdf0e10cSrcweir aFtLineEndsStyle.Hide();
473cdf0e10cSrcweir aFtLineEndsWidth.Hide();
474cdf0e10cSrcweir aLbStartStyle.Hide();
475cdf0e10cSrcweir aMtrStartWidth.Hide();
476cdf0e10cSrcweir aTsbCenterStart.Hide();
477cdf0e10cSrcweir aLbEndStyle.Hide();
478cdf0e10cSrcweir aMtrEndWidth.Hide();
479cdf0e10cSrcweir aTsbCenterEnd.Hide();
480cdf0e10cSrcweir aCbxSynchronize.Hide();
481cdf0e10cSrcweir aFlLineEnds.Hide();
482cdf0e10cSrcweir
483cdf0e10cSrcweir // #116827#
484cdf0e10cSrcweir maFLEdgeStyle.Hide();
485cdf0e10cSrcweir maFTEdgeStyle.Hide();
486cdf0e10cSrcweir maLBEdgeStyle.Hide();
4875aaf853bSArmin Le Grand
4885aaf853bSArmin Le Grand // LineCaps
4895aaf853bSArmin Le Grand maFTCapStyle.Hide();
4905aaf853bSArmin Le Grand maLBCapStyle.Hide();
491cdf0e10cSrcweir }
492cdf0e10cSrcweir }
493cdf0e10cSrcweir
494cdf0e10cSrcweir // -----------------------------------------------------------------------
495cdf0e10cSrcweir
DeactivatePage(SfxItemSet * _pSet)496cdf0e10cSrcweir int SvxLineTabPage::DeactivatePage( SfxItemSet* _pSet )
497cdf0e10cSrcweir {
498cdf0e10cSrcweir if( nDlgType == 0 ) // Linien-Dialog//CHINA001 if( *pDlgType == 0 ) // Linien-Dialog
499cdf0e10cSrcweir {
500cdf0e10cSrcweir nPageType = 1; // evtl. fuer Erweiterungen//CHINA001 *pPageType = 1; // evtl. fuer Erweiterungen
501cdf0e10cSrcweir *pPosDashLb = aLbLineStyle.GetSelectEntryPos() - 2;// erster Eintrag SOLID !!!
502cdf0e10cSrcweir sal_uInt16 nPos = aLbStartStyle.GetSelectEntryPos();
503cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND )
504cdf0e10cSrcweir nPos--;
505cdf0e10cSrcweir *pPosLineEndLb = nPos;
506cdf0e10cSrcweir }
507cdf0e10cSrcweir
508cdf0e10cSrcweir if( _pSet )
509cdf0e10cSrcweir FillItemSet( *_pSet );
510cdf0e10cSrcweir
511cdf0e10cSrcweir return( LEAVE_PAGE );
512cdf0e10cSrcweir }
513cdf0e10cSrcweir
514cdf0e10cSrcweir // -----------------------------------------------------------------------
515cdf0e10cSrcweir
FillItemSet(SfxItemSet & rAttrs)516cdf0e10cSrcweir sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs )
517cdf0e10cSrcweir {
518cdf0e10cSrcweir const SfxPoolItem* pOld = NULL;
519cdf0e10cSrcweir sal_uInt16 nPos;
520cdf0e10cSrcweir sal_Bool bModified = sal_False;
521cdf0e10cSrcweir
522cdf0e10cSrcweir // Um evtl. Modifikationen der Liste vorzubeugen
523cdf0e10cSrcweir // werden Items anderer Seiten nicht gesetzt
524cdf0e10cSrcweir if( nDlgType != 0 || nPageType != 2 )//CHINA001 if( *pDlgType != 0 || *pPageType != 2 )
525cdf0e10cSrcweir {
526cdf0e10cSrcweir nPos = aLbLineStyle.GetSelectEntryPos();
527cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND &&
528cdf0e10cSrcweir nPos != aLbLineStyle.GetSavedValue() )
529cdf0e10cSrcweir {
530cdf0e10cSrcweir XLineStyleItem* pStyleItem = NULL;
531cdf0e10cSrcweir
532cdf0e10cSrcweir if( nPos == 0 )
533cdf0e10cSrcweir pStyleItem = new XLineStyleItem( XLINE_NONE );
534cdf0e10cSrcweir else if( nPos == 1 )
535cdf0e10cSrcweir pStyleItem = new XLineStyleItem( XLINE_SOLID );
536cdf0e10cSrcweir else
537cdf0e10cSrcweir {
538cdf0e10cSrcweir pStyleItem = new XLineStyleItem( XLINE_DASH );
539cdf0e10cSrcweir
540cdf0e10cSrcweir // Zusaetzliche Sicherheit
541c7be74b1SArmin Le Grand if( maDashList->Count() > (long) ( nPos - 2 ) )
542cdf0e10cSrcweir {
543c7be74b1SArmin Le Grand XLineDashItem aDashItem( aLbLineStyle.GetSelectEntry(), maDashList->GetDash( nPos - 2 )->GetDash() );
544cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEDASH );
545cdf0e10cSrcweir if ( !pOld || !( *(const XLineDashItem*)pOld == aDashItem ) )
546cdf0e10cSrcweir {
547cdf0e10cSrcweir rAttrs.Put( aDashItem );
548cdf0e10cSrcweir bModified = sal_True;
549cdf0e10cSrcweir }
550cdf0e10cSrcweir }
551cdf0e10cSrcweir }
552cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINESTYLE );
553cdf0e10cSrcweir if ( !pOld || !( *(const XLineStyleItem*)pOld == *pStyleItem ) )
554cdf0e10cSrcweir {
555cdf0e10cSrcweir rAttrs.Put( *pStyleItem );
556cdf0e10cSrcweir bModified = sal_True;
557cdf0e10cSrcweir }
558cdf0e10cSrcweir delete pStyleItem;
559cdf0e10cSrcweir }
560cdf0e10cSrcweir }
561cdf0e10cSrcweir // Linienbreite
562cdf0e10cSrcweir // GetSavedValue() liefert String!
563cdf0e10cSrcweir if( aMtrLineWidth.GetText() != aMtrLineWidth.GetSavedValue() )
564cdf0e10cSrcweir {
565cdf0e10cSrcweir XLineWidthItem aItem( GetCoreValue( aMtrLineWidth, ePoolUnit ) );
566cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEWIDTH );
567cdf0e10cSrcweir if ( !pOld || !( *(const XLineWidthItem*)pOld == aItem ) )
568cdf0e10cSrcweir {
569cdf0e10cSrcweir rAttrs.Put( aItem );
570cdf0e10cSrcweir bModified = sal_True;
571cdf0e10cSrcweir }
572cdf0e10cSrcweir }
573cdf0e10cSrcweir //Breite Linienanfang
574cdf0e10cSrcweir if( aMtrStartWidth.GetText() != aMtrStartWidth.GetSavedValue() )
575cdf0e10cSrcweir {
576cdf0e10cSrcweir XLineStartWidthItem aItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) );
577cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINESTARTWIDTH );
578cdf0e10cSrcweir if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) )
579cdf0e10cSrcweir {
580cdf0e10cSrcweir rAttrs.Put( aItem );
581cdf0e10cSrcweir bModified = sal_True;
582cdf0e10cSrcweir }
583cdf0e10cSrcweir }
584cdf0e10cSrcweir //Breite Linienende
585cdf0e10cSrcweir if( aMtrEndWidth.GetText() != aMtrEndWidth.GetSavedValue() )
586cdf0e10cSrcweir {
587cdf0e10cSrcweir XLineEndWidthItem aItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) );
588cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEENDWIDTH );
589cdf0e10cSrcweir if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) )
590cdf0e10cSrcweir {
591cdf0e10cSrcweir rAttrs.Put( aItem );
592cdf0e10cSrcweir bModified = sal_True;
593cdf0e10cSrcweir }
594cdf0e10cSrcweir }
595cdf0e10cSrcweir
596cdf0e10cSrcweir // Linienfarbe
597cdf0e10cSrcweir if( aLbColor.GetSelectEntryPos() != aLbColor.GetSavedValue() )
598cdf0e10cSrcweir {
599cdf0e10cSrcweir XLineColorItem aItem( aLbColor.GetSelectEntry(),
600cdf0e10cSrcweir aLbColor.GetSelectEntryColor() );
601cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINECOLOR );
602cdf0e10cSrcweir if ( !pOld || !( *(const XLineColorItem*)pOld == aItem ) )
603cdf0e10cSrcweir {
604cdf0e10cSrcweir rAttrs.Put( aItem );
605cdf0e10cSrcweir bModified = sal_True;
606cdf0e10cSrcweir }
607cdf0e10cSrcweir }
608cdf0e10cSrcweir
609cdf0e10cSrcweir if( nDlgType != 0 || nPageType != 3 )//CHINA001 if( *pDlgType != 0 || *pPageType != 3 )
610cdf0e10cSrcweir {
611cdf0e10cSrcweir // Linienanfang
612cdf0e10cSrcweir nPos = aLbStartStyle.GetSelectEntryPos();
613cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND &&
614cdf0e10cSrcweir nPos != aLbStartStyle.GetSavedValue() )
615cdf0e10cSrcweir {
616cdf0e10cSrcweir XLineStartItem* pItem = NULL;
617cdf0e10cSrcweir if( nPos == 0 )
618cdf0e10cSrcweir pItem = new XLineStartItem();
619c7be74b1SArmin Le Grand else if( maLineEndList->Count() > (long) ( nPos - 1 ) )
620cdf0e10cSrcweir pItem = new XLineStartItem( aLbStartStyle.GetSelectEntry(),
621c7be74b1SArmin Le Grand maLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() );
622cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINESTART );
623cdf0e10cSrcweir if( pItem &&
624cdf0e10cSrcweir ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) )
625cdf0e10cSrcweir {
626cdf0e10cSrcweir rAttrs.Put( *pItem );
627cdf0e10cSrcweir bModified = sal_True;
628cdf0e10cSrcweir }
629cdf0e10cSrcweir delete pItem;
630cdf0e10cSrcweir }
631cdf0e10cSrcweir // Linienende
632cdf0e10cSrcweir nPos = aLbEndStyle.GetSelectEntryPos();
633cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND &&
634cdf0e10cSrcweir nPos != aLbEndStyle.GetSavedValue() )
635cdf0e10cSrcweir {
636cdf0e10cSrcweir XLineEndItem* pItem = NULL;
637cdf0e10cSrcweir if( nPos == 0 )
638cdf0e10cSrcweir pItem = new XLineEndItem();
639c7be74b1SArmin Le Grand else if( maLineEndList->Count() > (long) ( nPos - 1 ) )
640cdf0e10cSrcweir pItem = new XLineEndItem( aLbEndStyle.GetSelectEntry(),
641c7be74b1SArmin Le Grand maLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() );
642cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEEND );
643cdf0e10cSrcweir if( pItem &&
644cdf0e10cSrcweir ( !pOld || !( *(const XLineEndItem*)pOld == *pItem ) ) )
645cdf0e10cSrcweir {
646cdf0e10cSrcweir rAttrs.Put( *pItem );
647cdf0e10cSrcweir bModified = sal_True;
648cdf0e10cSrcweir }
649cdf0e10cSrcweir delete pItem;
650cdf0e10cSrcweir }
651cdf0e10cSrcweir }
652cdf0e10cSrcweir
653cdf0e10cSrcweir // Linienenden zentriert
654cdf0e10cSrcweir TriState eState = aTsbCenterStart.GetState();
655cdf0e10cSrcweir if( eState != aTsbCenterStart.GetSavedValue() )
656cdf0e10cSrcweir {
657cdf0e10cSrcweir XLineStartCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) );
658cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINESTARTCENTER );
659cdf0e10cSrcweir if ( !pOld || !( *(const XLineStartCenterItem*)pOld == aItem ) )
660cdf0e10cSrcweir {
661cdf0e10cSrcweir rAttrs.Put( aItem );
662cdf0e10cSrcweir bModified = sal_True;
663cdf0e10cSrcweir }
664cdf0e10cSrcweir }
665cdf0e10cSrcweir eState = aTsbCenterEnd.GetState();
666cdf0e10cSrcweir if( eState != aTsbCenterEnd.GetSavedValue() )
667cdf0e10cSrcweir {
668cdf0e10cSrcweir XLineEndCenterItem aItem( sal::static_int_cast< sal_Bool >( eState ) );
669cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEENDCENTER );
670cdf0e10cSrcweir if ( !pOld || !( *(const XLineEndCenterItem*)pOld == aItem ) )
671cdf0e10cSrcweir {
672cdf0e10cSrcweir rAttrs.Put( aItem );
673cdf0e10cSrcweir bModified = sal_True;
674cdf0e10cSrcweir }
675cdf0e10cSrcweir }
676cdf0e10cSrcweir
677cdf0e10cSrcweir //Breite Linienanfang
678cdf0e10cSrcweir if( aMtrStartWidth.GetText() != aMtrStartWidth.GetSavedValue() )
679cdf0e10cSrcweir {
680cdf0e10cSrcweir XLineStartWidthItem aItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) );
681cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINESTARTWIDTH );
682cdf0e10cSrcweir if ( !pOld || !( *(const XLineStartWidthItem*)pOld == aItem ) )
683cdf0e10cSrcweir {
684cdf0e10cSrcweir rAttrs.Put( aItem );
685cdf0e10cSrcweir bModified = sal_True;
686cdf0e10cSrcweir }
687cdf0e10cSrcweir }
688cdf0e10cSrcweir //Breite Linienende
689cdf0e10cSrcweir if( aMtrEndWidth.GetText() != aMtrEndWidth.GetSavedValue() )
690cdf0e10cSrcweir {
691cdf0e10cSrcweir XLineEndWidthItem aItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) );
692cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEENDWIDTH );
693cdf0e10cSrcweir if ( !pOld || !( *(const XLineEndWidthItem*)pOld == aItem ) )
694cdf0e10cSrcweir {
695cdf0e10cSrcweir rAttrs.Put( aItem );
696cdf0e10cSrcweir bModified = sal_True;
697cdf0e10cSrcweir }
698cdf0e10cSrcweir }
699cdf0e10cSrcweir
700cdf0e10cSrcweir // Transparenz
701cdf0e10cSrcweir sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue();
702cdf0e10cSrcweir if( nVal != (sal_uInt16)aMtrTransparent.GetSavedValue().ToInt32() )
703cdf0e10cSrcweir {
704cdf0e10cSrcweir XLineTransparenceItem aItem( nVal );
705cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINETRANSPARENCE );
706cdf0e10cSrcweir if ( !pOld || !( *(const XLineTransparenceItem*)pOld == aItem ) )
707cdf0e10cSrcweir {
708cdf0e10cSrcweir rAttrs.Put( aItem );
709cdf0e10cSrcweir bModified = sal_True;
710cdf0e10cSrcweir }
711cdf0e10cSrcweir }
712cdf0e10cSrcweir
713cdf0e10cSrcweir // #116827#
714cdf0e10cSrcweir nPos = maLBEdgeStyle.GetSelectEntryPos();
715cdf0e10cSrcweir if( LISTBOX_ENTRY_NOTFOUND != nPos && nPos != maLBEdgeStyle.GetSavedValue() )
716cdf0e10cSrcweir {
717cdf0e10cSrcweir XLineJointItem* pNew = 0L;
718cdf0e10cSrcweir
719cdf0e10cSrcweir switch(nPos)
720cdf0e10cSrcweir {
721cdf0e10cSrcweir case 0: // Rounded, default
722cdf0e10cSrcweir {
723d5370dc8SArmin Le Grand pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_ROUND);
724cdf0e10cSrcweir break;
725cdf0e10cSrcweir }
726cdf0e10cSrcweir case 1: // - none -
727cdf0e10cSrcweir {
728d5370dc8SArmin Le Grand pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_NONE);
729cdf0e10cSrcweir break;
730cdf0e10cSrcweir }
731cdf0e10cSrcweir case 2: // Miter
732cdf0e10cSrcweir {
733d5370dc8SArmin Le Grand pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_MITER);
734cdf0e10cSrcweir break;
735cdf0e10cSrcweir }
736cdf0e10cSrcweir case 3: // Bevel
737cdf0e10cSrcweir {
738d5370dc8SArmin Le Grand pNew = new XLineJointItem(com::sun::star::drawing::LineJoint_BEVEL);
739cdf0e10cSrcweir break;
740cdf0e10cSrcweir }
741cdf0e10cSrcweir }
742cdf0e10cSrcweir
743cdf0e10cSrcweir if(pNew)
744cdf0e10cSrcweir {
745cdf0e10cSrcweir pOld = GetOldItem( rAttrs, XATTR_LINEJOINT );
746cdf0e10cSrcweir
747cdf0e10cSrcweir if(!pOld || !(*(const XLineJointItem*)pOld == *pNew))
748cdf0e10cSrcweir {
749cdf0e10cSrcweir rAttrs.Put( *pNew );
750cdf0e10cSrcweir bModified = sal_True;
751cdf0e10cSrcweir }
752cdf0e10cSrcweir
753cdf0e10cSrcweir delete pNew;
754cdf0e10cSrcweir }
755cdf0e10cSrcweir }
756cdf0e10cSrcweir
7575aaf853bSArmin Le Grand // LineCaps
7585aaf853bSArmin Le Grand nPos = maLBCapStyle.GetSelectEntryPos();
7595aaf853bSArmin Le Grand if( LISTBOX_ENTRY_NOTFOUND != nPos && nPos != maLBCapStyle.GetSavedValue() )
7605aaf853bSArmin Le Grand {
7615aaf853bSArmin Le Grand XLineCapItem* pNew = 0L;
7625aaf853bSArmin Le Grand
7635aaf853bSArmin Le Grand switch(nPos)
7645aaf853bSArmin Le Grand {
7655aaf853bSArmin Le Grand case 0: // Butt (=Flat), default
7665aaf853bSArmin Le Grand {
7675aaf853bSArmin Le Grand pNew = new XLineCapItem(com::sun::star::drawing::LineCap_BUTT);
7685aaf853bSArmin Le Grand break;
7695aaf853bSArmin Le Grand }
7705aaf853bSArmin Le Grand case 1: // Round
7715aaf853bSArmin Le Grand {
7725aaf853bSArmin Le Grand pNew = new XLineCapItem(com::sun::star::drawing::LineCap_ROUND);
7735aaf853bSArmin Le Grand break;
7745aaf853bSArmin Le Grand }
7755aaf853bSArmin Le Grand case 2: // Square
7765aaf853bSArmin Le Grand {
7775aaf853bSArmin Le Grand pNew = new XLineCapItem(com::sun::star::drawing::LineCap_SQUARE);
7785aaf853bSArmin Le Grand break;
7795aaf853bSArmin Le Grand }
7805aaf853bSArmin Le Grand }
7815aaf853bSArmin Le Grand
7825aaf853bSArmin Le Grand if(pNew)
7835aaf853bSArmin Le Grand {
7845aaf853bSArmin Le Grand pOld = GetOldItem( rAttrs, XATTR_LINECAP );
7855aaf853bSArmin Le Grand
7865aaf853bSArmin Le Grand if(!pOld || !(*(const XLineCapItem*)pOld == *pNew))
7875aaf853bSArmin Le Grand {
7885aaf853bSArmin Le Grand rAttrs.Put( *pNew );
7895aaf853bSArmin Le Grand bModified = sal_True;
7905aaf853bSArmin Le Grand }
7915aaf853bSArmin Le Grand
7925aaf853bSArmin Le Grand delete pNew;
7935aaf853bSArmin Le Grand }
7945aaf853bSArmin Le Grand }
7955aaf853bSArmin Le Grand
796cdf0e10cSrcweir if(nSymbolType!=SVX_SYMBOLTYPE_UNKNOWN || bNewSize)
797cdf0e10cSrcweir {
798cdf0e10cSrcweir //wurde also per Auswahl gesetzt oder Gr��e ist anders
799cdf0e10cSrcweir SvxSizeItem aSItem(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),aSymbolSize);
800cdf0e10cSrcweir const SfxPoolItem* pSOld = GetOldItem( rAttrs, rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE) );
801cdf0e10cSrcweir bNewSize = pSOld ? *(const SvxSizeItem *)pSOld != aSItem : bNewSize ;
802cdf0e10cSrcweir if(bNewSize)
803cdf0e10cSrcweir {
804cdf0e10cSrcweir rAttrs.Put(aSItem);
805cdf0e10cSrcweir bModified=sal_True;
806cdf0e10cSrcweir }
807cdf0e10cSrcweir
808cdf0e10cSrcweir SfxInt32Item aTItem(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),nSymbolType);
809cdf0e10cSrcweir const SfxPoolItem* pTOld = GetOldItem( rAttrs, rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE) );
810cdf0e10cSrcweir bool bNewType = pTOld == NULL || *(const SfxInt32Item*)pTOld != aTItem;
811cdf0e10cSrcweir if(bNewType && nSymbolType==SVX_SYMBOLTYPE_UNKNOWN)
812cdf0e10cSrcweir bNewType=false;//kleine Korrektur, Typ wurde garnicht gesetzt -> kein Type-Item erzeugen!
813cdf0e10cSrcweir if(bNewType)
814cdf0e10cSrcweir {
815cdf0e10cSrcweir rAttrs.Put(aTItem);
816cdf0e10cSrcweir bModified=sal_True;
817cdf0e10cSrcweir }
818cdf0e10cSrcweir
819cdf0e10cSrcweir if(nSymbolType!=SVX_SYMBOLTYPE_NONE)
820cdf0e10cSrcweir {
821cdf0e10cSrcweir SvxBrushItem aBItem(aSymbolGraphic,GPOS_MM,rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH));
822cdf0e10cSrcweir const SfxPoolItem* pBOld = GetOldItem( rAttrs, rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH) );
823cdf0e10cSrcweir bool bNewBrush =
824cdf0e10cSrcweir pBOld == NULL || *(const SvxBrushItem*)pBOld != aBItem;
825cdf0e10cSrcweir if(bNewBrush)
826cdf0e10cSrcweir {
827cdf0e10cSrcweir rAttrs.Put(aBItem);
828cdf0e10cSrcweir bModified=sal_True;
829cdf0e10cSrcweir }
830cdf0e10cSrcweir }
831cdf0e10cSrcweir }
832cdf0e10cSrcweir rAttrs.Put (CntUInt16Item(SID_PAGE_TYPE,nPageType));//add CHINA001
833cdf0e10cSrcweir return( bModified );
834cdf0e10cSrcweir }
835cdf0e10cSrcweir
836cdf0e10cSrcweir // -----------------------------------------------------------------------
837cdf0e10cSrcweir
FillXLSet_Impl()838cdf0e10cSrcweir sal_Bool SvxLineTabPage::FillXLSet_Impl()
839cdf0e10cSrcweir {
840cdf0e10cSrcweir sal_uInt16 nPos;
841cdf0e10cSrcweir
842cdf0e10cSrcweir if( aLbLineStyle.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
843cdf0e10cSrcweir {
844cdf0e10cSrcweir //rXLSet.Put( XLineDashItem ( rOutAttrs.Get( GetWhich( XATTR_LINEDASH ) ) ) );
845cdf0e10cSrcweir rXLSet.Put( XLineStyleItem( XLINE_NONE ) );
846cdf0e10cSrcweir }
847cdf0e10cSrcweir else if( aLbLineStyle.IsEntryPosSelected( 0 ) )
848cdf0e10cSrcweir rXLSet.Put( XLineStyleItem( XLINE_NONE ) );
849cdf0e10cSrcweir else if( aLbLineStyle.IsEntryPosSelected( 1 ) )
850cdf0e10cSrcweir rXLSet.Put( XLineStyleItem( XLINE_SOLID ) );
851cdf0e10cSrcweir else
852cdf0e10cSrcweir {
853cdf0e10cSrcweir rXLSet.Put( XLineStyleItem( XLINE_DASH ) );
854cdf0e10cSrcweir
855cdf0e10cSrcweir nPos = aLbLineStyle.GetSelectEntryPos();
856cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND )
857cdf0e10cSrcweir {
858c7be74b1SArmin Le Grand rXLSet.Put( XLineDashItem( aLbLineStyle.GetSelectEntry(), maDashList->GetDash( nPos - 2 )->GetDash() ) );
859cdf0e10cSrcweir }
860cdf0e10cSrcweir }
861cdf0e10cSrcweir
862cdf0e10cSrcweir nPos = aLbStartStyle.GetSelectEntryPos();
863cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND )
864cdf0e10cSrcweir {
865cdf0e10cSrcweir if( nPos == 0 )
866cdf0e10cSrcweir rXLSet.Put( XLineStartItem() );
867cdf0e10cSrcweir else
868cdf0e10cSrcweir rXLSet.Put( XLineStartItem( aLbStartStyle.GetSelectEntry(),
869c7be74b1SArmin Le Grand maLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) );
870cdf0e10cSrcweir }
871cdf0e10cSrcweir nPos = aLbEndStyle.GetSelectEntryPos();
872cdf0e10cSrcweir if( nPos != LISTBOX_ENTRY_NOTFOUND )
873cdf0e10cSrcweir {
874cdf0e10cSrcweir if( nPos == 0 )
875cdf0e10cSrcweir rXLSet.Put( XLineEndItem() );
876cdf0e10cSrcweir else
877cdf0e10cSrcweir rXLSet.Put( XLineEndItem( aLbEndStyle.GetSelectEntry(),
878c7be74b1SArmin Le Grand maLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ) );
879cdf0e10cSrcweir }
880cdf0e10cSrcweir
881cdf0e10cSrcweir // #116827#
882cdf0e10cSrcweir nPos = maLBEdgeStyle.GetSelectEntryPos();
883cdf0e10cSrcweir if(LISTBOX_ENTRY_NOTFOUND != nPos)
884cdf0e10cSrcweir {
885cdf0e10cSrcweir switch(nPos)
886cdf0e10cSrcweir {
887cdf0e10cSrcweir case 0: // Rounded, default
888cdf0e10cSrcweir {
889d5370dc8SArmin Le Grand rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_ROUND));
890cdf0e10cSrcweir break;
891cdf0e10cSrcweir }
892cdf0e10cSrcweir case 1: // - none -
893cdf0e10cSrcweir {
894d5370dc8SArmin Le Grand rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_NONE));
895cdf0e10cSrcweir break;
896cdf0e10cSrcweir }
897cdf0e10cSrcweir case 2: // Miter
898cdf0e10cSrcweir {
899d5370dc8SArmin Le Grand rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_MITER));
900cdf0e10cSrcweir break;
901cdf0e10cSrcweir }
902cdf0e10cSrcweir case 3: // Bevel
903cdf0e10cSrcweir {
904d5370dc8SArmin Le Grand rXLSet.Put(XLineJointItem(com::sun::star::drawing::LineJoint_BEVEL));
905cdf0e10cSrcweir break;
906cdf0e10cSrcweir }
907cdf0e10cSrcweir }
908cdf0e10cSrcweir }
909cdf0e10cSrcweir
9105aaf853bSArmin Le Grand // LineCaps
9115aaf853bSArmin Le Grand nPos = maLBCapStyle.GetSelectEntryPos();
9125aaf853bSArmin Le Grand if(LISTBOX_ENTRY_NOTFOUND != nPos)
9135aaf853bSArmin Le Grand {
9145aaf853bSArmin Le Grand switch(nPos)
9155aaf853bSArmin Le Grand {
9165aaf853bSArmin Le Grand case 0: // Butt (=Flat), default
9175aaf853bSArmin Le Grand {
9185aaf853bSArmin Le Grand rXLSet.Put(XLineCapItem(com::sun::star::drawing::LineCap_BUTT));
9195aaf853bSArmin Le Grand break;
9205aaf853bSArmin Le Grand }
9215aaf853bSArmin Le Grand case 1: // Round
9225aaf853bSArmin Le Grand {
9235aaf853bSArmin Le Grand rXLSet.Put(XLineCapItem(com::sun::star::drawing::LineCap_ROUND));
9245aaf853bSArmin Le Grand break;
9255aaf853bSArmin Le Grand }
9265aaf853bSArmin Le Grand case 2: // Square
9275aaf853bSArmin Le Grand {
9285aaf853bSArmin Le Grand rXLSet.Put(XLineCapItem(com::sun::star::drawing::LineCap_SQUARE));
9295aaf853bSArmin Le Grand break;
9305aaf853bSArmin Le Grand }
9315aaf853bSArmin Le Grand }
9325aaf853bSArmin Le Grand }
9335aaf853bSArmin Le Grand
934cdf0e10cSrcweir rXLSet.Put( XLineStartWidthItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) ) );
935cdf0e10cSrcweir rXLSet.Put( XLineEndWidthItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) ) );
936cdf0e10cSrcweir
937cdf0e10cSrcweir rXLSet.Put( XLineWidthItem( GetCoreValue( aMtrLineWidth, ePoolUnit ) ) );
938cdf0e10cSrcweir rXLSet.Put( XLineColorItem( aLbColor.GetSelectEntry(),
939cdf0e10cSrcweir aLbColor.GetSelectEntryColor() ) );
940cdf0e10cSrcweir
941cdf0e10cSrcweir // Linienenden zentriert
942cdf0e10cSrcweir if( aTsbCenterStart.GetState() == STATE_CHECK )
943cdf0e10cSrcweir rXLSet.Put( XLineStartCenterItem( sal_True ) );
944cdf0e10cSrcweir else if( aTsbCenterStart.GetState() == STATE_NOCHECK )
945cdf0e10cSrcweir rXLSet.Put( XLineStartCenterItem( sal_False ) );
946cdf0e10cSrcweir
947cdf0e10cSrcweir if( aTsbCenterEnd.GetState() == STATE_CHECK )
948cdf0e10cSrcweir rXLSet.Put( XLineEndCenterItem( sal_True ) );
949cdf0e10cSrcweir else if( aTsbCenterEnd.GetState() == STATE_NOCHECK )
950cdf0e10cSrcweir rXLSet.Put( XLineEndCenterItem( sal_False ) );
951cdf0e10cSrcweir
952cdf0e10cSrcweir // Transparenz
953cdf0e10cSrcweir sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue();
954cdf0e10cSrcweir rXLSet.Put( XLineTransparenceItem( nVal ) );
955cdf0e10cSrcweir
956cdf0e10cSrcweir // #116827#
957cdf0e10cSrcweir aCtlPreview.SetLineAttributes(aXLineAttr.GetItemSet());
958cdf0e10cSrcweir
959cdf0e10cSrcweir return( sal_True );
960cdf0e10cSrcweir }
961cdf0e10cSrcweir
962cdf0e10cSrcweir // -----------------------------------------------------------------------
963cdf0e10cSrcweir
Reset(const SfxItemSet & rAttrs)964cdf0e10cSrcweir void SvxLineTabPage::Reset( const SfxItemSet& rAttrs )
965cdf0e10cSrcweir {
966cdf0e10cSrcweir String aString;
967cdf0e10cSrcweir XLineStyle eXLS; // XLINE_NONE, XLINE_SOLID, XLINE_DASH
968cdf0e10cSrcweir
969cdf0e10cSrcweir // Linienstil
970cdf0e10cSrcweir /*
971cdf0e10cSrcweir if( bObjSelected &&
972cdf0e10cSrcweir rAttrs.GetItemState( GetWhich( XATTR_LINESTYLE ) ) == SFX_ITEM_DEFAULT )
973cdf0e10cSrcweir {
974cdf0e10cSrcweir aLbLineStyle.Disable();
975cdf0e10cSrcweir }
976cdf0e10cSrcweir */
977cdf0e10cSrcweir const SfxPoolItem *pPoolItem;
978cdf0e10cSrcweir long nSymType=SVX_SYMBOLTYPE_UNKNOWN;
979cdf0e10cSrcweir sal_Bool bPrevSym=sal_False;
980cdf0e10cSrcweir sal_Bool bEnable=sal_True;
981cdf0e10cSrcweir sal_Bool bIgnoreGraphic=sal_False;
982cdf0e10cSrcweir sal_Bool bIgnoreSize=sal_False;
983cdf0e10cSrcweir if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLTYPE),sal_True,&pPoolItem) == SFX_ITEM_SET)
984cdf0e10cSrcweir {
985cdf0e10cSrcweir nSymType=((const SfxInt32Item *)pPoolItem)->GetValue();
986cdf0e10cSrcweir }
987cdf0e10cSrcweir
988cdf0e10cSrcweir if(nSymType == SVX_SYMBOLTYPE_AUTO)
989cdf0e10cSrcweir {
990cdf0e10cSrcweir aSymbolGraphic=aAutoSymbolGraphic;
991cdf0e10cSrcweir aSymbolSize=aSymbolLastSize=aAutoSymbolGraphic.GetPrefSize();
992cdf0e10cSrcweir bPrevSym=sal_True;
993cdf0e10cSrcweir }
994cdf0e10cSrcweir else if(nSymType == SVX_SYMBOLTYPE_NONE)
995cdf0e10cSrcweir {
996cdf0e10cSrcweir bEnable=sal_False;
997cdf0e10cSrcweir bIgnoreGraphic=sal_True;
998cdf0e10cSrcweir bIgnoreSize=sal_True;
999cdf0e10cSrcweir }
1000cdf0e10cSrcweir else if(nSymType >= 0)
1001cdf0e10cSrcweir {
1002cdf0e10cSrcweir VirtualDevice aVDev;
1003cdf0e10cSrcweir aVDev.SetMapMode(MapMode(MAP_100TH_MM));
1004cdf0e10cSrcweir
1005cdf0e10cSrcweir SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS);
1006cdf0e10cSrcweir pModel->GetItemPool().FreezeIdRanges();
1007cdf0e10cSrcweir SdrPage* pPage = new SdrPage( *pModel, sal_False );
1008cdf0e10cSrcweir pPage->SetSize(Size(1000,1000));
1009cdf0e10cSrcweir pModel->InsertPage( pPage, 0 );
1010cdf0e10cSrcweir SdrView* pView = new SdrView( pModel, &aVDev );
1011cdf0e10cSrcweir pView->hideMarkHandles();
10123c42630dSArmin Le Grand /*SdrPageView* pPageView = */pView->ShowSdrPage(pPage);
1013cdf0e10cSrcweir SdrObject *pObj=NULL;
1014cdf0e10cSrcweir long nSymTmp=nSymType;
1015cdf0e10cSrcweir if(pSymbolList)
1016cdf0e10cSrcweir {
1017cdf0e10cSrcweir if(pSymbolList->GetObjCount())
1018cdf0e10cSrcweir {
1019cdf0e10cSrcweir nSymTmp=nSymTmp%pSymbolList->GetObjCount(); //Liste wird als cyclisch betrachtet!!!
1020cdf0e10cSrcweir pObj=pSymbolList->GetObj(nSymTmp);
1021cdf0e10cSrcweir if(pObj)
1022cdf0e10cSrcweir {
1023cdf0e10cSrcweir pObj=pObj->Clone();
1024cdf0e10cSrcweir if(pSymbolAttr)
1025cdf0e10cSrcweir {
1026cdf0e10cSrcweir pObj->SetMergedItemSet(*pSymbolAttr);
1027cdf0e10cSrcweir }
1028cdf0e10cSrcweir else
1029cdf0e10cSrcweir {
1030cdf0e10cSrcweir pObj->SetMergedItemSet(rOutAttrs);
1031cdf0e10cSrcweir }
10323a5971bbSRegina Henschel
10333a5971bbSRegina Henschel pPage->NbcInsertObject(pObj);
10343a5971bbSRegina Henschel
10353a5971bbSRegina Henschel // Generate invisible square to give all symbol types a
10363a5971bbSRegina Henschel // bitmap size, which is indepedent from specific glyph
10373a5971bbSRegina Henschel SdrObject *pInvisibleSquare=pSymbolList->GetObj(0);
10383a5971bbSRegina Henschel pInvisibleSquare=pInvisibleSquare->Clone();
10393a5971bbSRegina Henschel pPage->NbcInsertObject(pInvisibleSquare);
10403a5971bbSRegina Henschel pInvisibleSquare->SetMergedItem(XFillTransparenceItem(100));
10413a5971bbSRegina Henschel pInvisibleSquare->SetMergedItem(XLineTransparenceItem(100));
10423a5971bbSRegina Henschel
10433a5971bbSRegina Henschel pView->MarkAll();
1044bb18ee55SArmin Le Grand GDIMetaFile aMeta(pView->GetMarkedObjMetaFile());
1045cdf0e10cSrcweir
1046cdf0e10cSrcweir aSymbolGraphic=Graphic(aMeta);
1047cdf0e10cSrcweir aSymbolSize=pObj->GetSnapRect().GetSize();
10483a5971bbSRegina Henschel aSymbolGraphic.SetPrefSize(pInvisibleSquare->GetSnapRect().GetSize());
1049cdf0e10cSrcweir aSymbolGraphic.SetPrefMapMode(MAP_100TH_MM);
1050cdf0e10cSrcweir bPrevSym=sal_True;
1051cdf0e10cSrcweir bEnable=sal_True;
1052cdf0e10cSrcweir bIgnoreGraphic=sal_True;
1053cdf0e10cSrcweir
1054cdf0e10cSrcweir pView->UnmarkAll();
10553a5971bbSRegina Henschel pInvisibleSquare=pPage->RemoveObject(1);
10563a5971bbSRegina Henschel SdrObject::Free( pInvisibleSquare);
1057cdf0e10cSrcweir pObj=pPage->RemoveObject(0);
1058cdf0e10cSrcweir SdrObject::Free( pObj );
1059cdf0e10cSrcweir }
1060cdf0e10cSrcweir }
1061cdf0e10cSrcweir }
1062cdf0e10cSrcweir delete pView;
1063cdf0e10cSrcweir delete pModel;
1064cdf0e10cSrcweir }
1065cdf0e10cSrcweir if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_BRUSH),sal_True,&pPoolItem) == SFX_ITEM_SET)
1066cdf0e10cSrcweir {
1067cdf0e10cSrcweir const Graphic* pGraphic = ((const SvxBrushItem *)pPoolItem)->GetGraphic();
1068cdf0e10cSrcweir if( pGraphic )
1069cdf0e10cSrcweir {
1070cdf0e10cSrcweir if(!bIgnoreGraphic)
1071cdf0e10cSrcweir {
1072cdf0e10cSrcweir aSymbolGraphic=*pGraphic;
1073cdf0e10cSrcweir }
1074cdf0e10cSrcweir if(!bIgnoreSize)
1075cdf0e10cSrcweir {
1076cdf0e10cSrcweir aSymbolSize=OutputDevice::LogicToLogic( pGraphic->GetPrefSize(),
1077cdf0e10cSrcweir pGraphic->GetPrefMapMode(),
1078cdf0e10cSrcweir MAP_100TH_MM );
1079cdf0e10cSrcweir }
1080cdf0e10cSrcweir bPrevSym=sal_True;
1081cdf0e10cSrcweir }
1082cdf0e10cSrcweir }
10833a5971bbSRegina Henschel
1084cdf0e10cSrcweir if(rAttrs.GetItemState(rAttrs.GetPool()->GetWhich(SID_ATTR_SYMBOLSIZE),sal_True,&pPoolItem) == SFX_ITEM_SET)
1085cdf0e10cSrcweir {
1086cdf0e10cSrcweir aSymbolSize = ((const SvxSizeItem *)pPoolItem)->GetSize();
1087cdf0e10cSrcweir }
1088cdf0e10cSrcweir
1089cdf0e10cSrcweir aSymbolRatioCB.Enable(bEnable);
1090cdf0e10cSrcweir aSymbolHeightFT.Enable(bEnable);
1091cdf0e10cSrcweir aSymbolWidthFT.Enable(bEnable);
1092cdf0e10cSrcweir aSymbolWidthMF.Enable(bEnable);
1093cdf0e10cSrcweir aSymbolHeightMF.Enable(bEnable);
1094cdf0e10cSrcweir if(bPrevSym)
1095cdf0e10cSrcweir {
1096cdf0e10cSrcweir SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit);
1097cdf0e10cSrcweir SetMetricValue(aSymbolHeightMF, aSymbolSize.Height(),ePoolUnit);
1098cdf0e10cSrcweir aCtlPreview.SetSymbol(&aSymbolGraphic,aSymbolSize);
1099cdf0e10cSrcweir aSymbolLastSize=aSymbolSize;
1100cdf0e10cSrcweir }
1101cdf0e10cSrcweir
1102cdf0e10cSrcweir if( rAttrs.GetItemState( XATTR_LINESTYLE ) != SFX_ITEM_DONTCARE )
1103cdf0e10cSrcweir {
1104cdf0e10cSrcweir eXLS = (XLineStyle) ( ( const XLineStyleItem& ) rAttrs.Get( XATTR_LINESTYLE ) ).GetValue();
1105cdf0e10cSrcweir
1106cdf0e10cSrcweir switch( eXLS )
1107cdf0e10cSrcweir {
1108cdf0e10cSrcweir case XLINE_NONE:
1109cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( 0 );
1110cdf0e10cSrcweir break;
1111cdf0e10cSrcweir case XLINE_SOLID:
1112cdf0e10cSrcweir aLbLineStyle.SelectEntryPos( 1 );
1113cdf0e10cSrcweir break;
1114cdf0e10cSrcweir
1115cdf0e10cSrcweir case XLINE_DASH:
1116cdf0e10cSrcweir aLbLineStyle.SetNoSelection();
1117cdf0e10cSrcweir aLbLineStyle.SelectEntry( ( ( const XLineDashItem& ) rAttrs.
1118cdf0e10cSrcweir Get( XATTR_LINEDASH ) ).GetName() );
1119cdf0e10cSrcweir break;
1120cdf0e10cSrcweir
1121cdf0e10cSrcweir default:
1122cdf0e10cSrcweir break;
1123cdf0e10cSrcweir }
1124cdf0e10cSrcweir }
1125cdf0e10cSrcweir else
1126cdf0e10cSrcweir {
1127cdf0e10cSrcweir aLbLineStyle.SetNoSelection();
1128cdf0e10cSrcweir }
1129cdf0e10cSrcweir
1130cdf0e10cSrcweir // Linienstaerke
1131cdf0e10cSrcweir /*
1132cdf0e10cSrcweir if( bObjSelected &&
1133cdf0e10cSrcweir rAttrs.GetItemState( GetWhich( XATTR_LINEWIDTH ) ) == SFX_ITEM_DEFAULT )
1134cdf0e10cSrcweir {
1135cdf0e10cSrcweir aMtrLineWidth.Disable();
1136cdf0e10cSrcweir }
1137cdf0e10cSrcweir */
1138cdf0e10cSrcweir if( rAttrs.GetItemState( XATTR_LINEWIDTH ) != SFX_ITEM_DONTCARE )
1139cdf0e10cSrcweir {
1140cdf0e10cSrcweir SetMetricValue( aMtrLineWidth, ( ( const XLineWidthItem& ) rAttrs.
1141cdf0e10cSrcweir Get( XATTR_LINEWIDTH ) ).GetValue(), ePoolUnit );
1142cdf0e10cSrcweir }
1143cdf0e10cSrcweir else
1144cdf0e10cSrcweir aMtrLineWidth.SetText( String() );
1145cdf0e10cSrcweir
1146cdf0e10cSrcweir // Linienfarbe
1147cdf0e10cSrcweir /*
1148cdf0e10cSrcweir if( bObjSelected &&
1149cdf0e10cSrcweir rAttrs.GetItemState( GetWhich( XATTR_LINECOLOR ) ) == SFX_ITEM_DEFAULT )
1150cdf0e10cSrcweir {
1151cdf0e10cSrcweir aLbColor.Disable();
1152cdf0e10cSrcweir }
1153cdf0e10cSrcweir */
1154cdf0e10cSrcweir aLbColor.SetNoSelection();
1155cdf0e10cSrcweir
1156cdf0e10cSrcweir if ( rAttrs.GetItemState( XATTR_LINECOLOR ) != SFX_ITEM_DONTCARE )
1157cdf0e10cSrcweir {
1158cdf0e10cSrcweir Color aCol = ( ( const XLineColorItem& ) rAttrs.Get( XATTR_LINECOLOR ) ).GetColorValue();
1159cdf0e10cSrcweir aLbColor.SelectEntry( aCol );
1160cdf0e10cSrcweir if( aLbColor.GetSelectEntryCount() == 0 )
1161cdf0e10cSrcweir {
1162cdf0e10cSrcweir aLbColor.InsertEntry( aCol, String() );
1163cdf0e10cSrcweir aLbColor.SelectEntry( aCol );
1164cdf0e10cSrcweir }
1165cdf0e10cSrcweir }
1166cdf0e10cSrcweir
1167cdf0e10cSrcweir // LinienAnfang
1168cdf0e10cSrcweir if( bObjSelected &&
1169cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINESTART ) == SFX_ITEM_DEFAULT )
1170cdf0e10cSrcweir {
1171cdf0e10cSrcweir aLbStartStyle.Disable();
1172cdf0e10cSrcweir }
1173cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINESTART ) != SFX_ITEM_DONTCARE )
1174cdf0e10cSrcweir {
1175cdf0e10cSrcweir // #86265# select entry using list and polygon, not string
1176cdf0e10cSrcweir sal_Bool bSelected(sal_False);
1177cdf0e10cSrcweir const basegfx::B2DPolyPolygon& rItemPolygon = ((const XLineStartItem&)rAttrs.Get(XATTR_LINESTART)).GetLineStartValue();
1178cdf0e10cSrcweir
1179c7be74b1SArmin Le Grand for(sal_Int32 a(0);!bSelected && a < maLineEndList->Count(); a++)
1180cdf0e10cSrcweir {
1181c7be74b1SArmin Le Grand XLineEndEntry* pEntry = maLineEndList->GetLineEnd(a);
1182cdf0e10cSrcweir const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd();
1183cdf0e10cSrcweir
1184cdf0e10cSrcweir if(rItemPolygon == rEntryPolygon)
1185cdf0e10cSrcweir {
1186cdf0e10cSrcweir // select this entry
1187cdf0e10cSrcweir aLbStartStyle.SelectEntryPos((sal_uInt16)a + 1);
1188cdf0e10cSrcweir bSelected = sal_True;
1189cdf0e10cSrcweir }
1190cdf0e10cSrcweir }
1191cdf0e10cSrcweir
1192cdf0e10cSrcweir if(!bSelected)
1193cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( 0 );
1194cdf0e10cSrcweir }
1195cdf0e10cSrcweir else
1196cdf0e10cSrcweir {
1197cdf0e10cSrcweir aLbStartStyle.SetNoSelection();
1198cdf0e10cSrcweir }
1199cdf0e10cSrcweir
1200cdf0e10cSrcweir // LinienEnde
1201cdf0e10cSrcweir if( bObjSelected &&
1202cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINEEND ) == SFX_ITEM_DEFAULT )
1203cdf0e10cSrcweir {
1204cdf0e10cSrcweir aLbEndStyle.Disable();
1205cdf0e10cSrcweir }
1206cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINEEND ) != SFX_ITEM_DONTCARE )
1207cdf0e10cSrcweir {
1208cdf0e10cSrcweir // #86265# select entry using list and polygon, not string
1209cdf0e10cSrcweir sal_Bool bSelected(sal_False);
1210cdf0e10cSrcweir const basegfx::B2DPolyPolygon& rItemPolygon = ((const XLineEndItem&)rAttrs.Get(XATTR_LINEEND)).GetLineEndValue();
1211cdf0e10cSrcweir
1212c7be74b1SArmin Le Grand for(sal_Int32 a(0);!bSelected && a < maLineEndList->Count(); a++)
1213cdf0e10cSrcweir {
1214c7be74b1SArmin Le Grand XLineEndEntry* pEntry = maLineEndList->GetLineEnd(a);
1215cdf0e10cSrcweir const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd();
1216cdf0e10cSrcweir
1217cdf0e10cSrcweir if(rItemPolygon == rEntryPolygon)
1218cdf0e10cSrcweir {
1219cdf0e10cSrcweir // select this entry
1220cdf0e10cSrcweir aLbEndStyle.SelectEntryPos((sal_uInt16)a + 1);
1221cdf0e10cSrcweir bSelected = sal_True;
1222cdf0e10cSrcweir }
1223cdf0e10cSrcweir }
1224cdf0e10cSrcweir
1225cdf0e10cSrcweir if(!bSelected)
1226cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( 0 );
1227cdf0e10cSrcweir }
1228cdf0e10cSrcweir else
1229cdf0e10cSrcweir {
1230cdf0e10cSrcweir aLbEndStyle.SetNoSelection();
1231cdf0e10cSrcweir }
1232cdf0e10cSrcweir
1233cdf0e10cSrcweir // LinienAnfang St"arke
1234cdf0e10cSrcweir if( bObjSelected &&
1235cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINESTARTWIDTH ) == SFX_ITEM_DEFAULT )
1236cdf0e10cSrcweir {
1237cdf0e10cSrcweir aMtrStartWidth.Disable();
1238cdf0e10cSrcweir }
1239cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINESTARTWIDTH ) != SFX_ITEM_DONTCARE )
1240cdf0e10cSrcweir {
1241cdf0e10cSrcweir SetMetricValue( aMtrStartWidth, ( ( const XLineStartWidthItem& ) rAttrs.
1242cdf0e10cSrcweir Get( XATTR_LINESTARTWIDTH ) ).GetValue(), ePoolUnit );
1243cdf0e10cSrcweir }
1244cdf0e10cSrcweir else
1245cdf0e10cSrcweir aMtrStartWidth.SetText( String() );
1246cdf0e10cSrcweir
1247cdf0e10cSrcweir // LinienEnde St"arke
1248cdf0e10cSrcweir if( bObjSelected &&
1249cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINEENDWIDTH ) == SFX_ITEM_DEFAULT )
1250cdf0e10cSrcweir {
1251cdf0e10cSrcweir aMtrEndWidth.Disable();
1252cdf0e10cSrcweir }
1253cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINEENDWIDTH ) != SFX_ITEM_DONTCARE )
1254cdf0e10cSrcweir {
1255cdf0e10cSrcweir SetMetricValue( aMtrEndWidth, ( ( const XLineEndWidthItem& ) rAttrs.
1256cdf0e10cSrcweir Get( XATTR_LINEENDWIDTH ) ).GetValue(), ePoolUnit );
1257cdf0e10cSrcweir }
1258cdf0e10cSrcweir else
1259cdf0e10cSrcweir aMtrEndWidth.SetText( String() );
1260cdf0e10cSrcweir
1261cdf0e10cSrcweir // Linienenden zentriert (Start)
1262cdf0e10cSrcweir if( bObjSelected &&
1263cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINESTARTCENTER ) == SFX_ITEM_DEFAULT )
1264cdf0e10cSrcweir {
1265cdf0e10cSrcweir aTsbCenterStart.Disable();
1266cdf0e10cSrcweir }
1267cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINESTARTCENTER ) != SFX_ITEM_DONTCARE )
1268cdf0e10cSrcweir {
1269cdf0e10cSrcweir aTsbCenterStart.EnableTriState( sal_False );
1270cdf0e10cSrcweir
1271cdf0e10cSrcweir if( ( ( const XLineStartCenterItem& ) rAttrs.Get( XATTR_LINESTARTCENTER ) ).GetValue() )
1272cdf0e10cSrcweir aTsbCenterStart.SetState( STATE_CHECK );
1273cdf0e10cSrcweir else
1274cdf0e10cSrcweir aTsbCenterStart.SetState( STATE_NOCHECK );
1275cdf0e10cSrcweir }
1276cdf0e10cSrcweir else
1277cdf0e10cSrcweir {
1278cdf0e10cSrcweir aTsbCenterStart.SetState( STATE_DONTKNOW );
1279cdf0e10cSrcweir }
1280cdf0e10cSrcweir
1281cdf0e10cSrcweir // Linienenden zentriert (Ende)
1282cdf0e10cSrcweir if( bObjSelected &&
1283cdf0e10cSrcweir rAttrs.GetItemState( XATTR_LINEENDCENTER ) == SFX_ITEM_DEFAULT )
1284cdf0e10cSrcweir {
1285cdf0e10cSrcweir aTsbCenterEnd.Disable();
1286cdf0e10cSrcweir }
1287cdf0e10cSrcweir else if( rAttrs.GetItemState( XATTR_LINEENDCENTER ) != SFX_ITEM_DONTCARE )
1288cdf0e10cSrcweir {
1289cdf0e10cSrcweir aTsbCenterEnd.EnableTriState( sal_False );
1290cdf0e10cSrcweir
1291cdf0e10cSrcweir if( ( ( const XLineEndCenterItem& ) rAttrs.Get( XATTR_LINEENDCENTER ) ).GetValue() )
1292cdf0e10cSrcweir aTsbCenterEnd.SetState( STATE_CHECK );
1293cdf0e10cSrcweir else
1294cdf0e10cSrcweir aTsbCenterEnd.SetState( STATE_NOCHECK );
1295cdf0e10cSrcweir }
1296cdf0e10cSrcweir else
1297cdf0e10cSrcweir {
1298cdf0e10cSrcweir aTsbCenterEnd.SetState( STATE_DONTKNOW );
1299cdf0e10cSrcweir }
1300cdf0e10cSrcweir
1301cdf0e10cSrcweir // Transparenz
1302cdf0e10cSrcweir if( rAttrs.GetItemState( XATTR_LINETRANSPARENCE ) != SFX_ITEM_DONTCARE )
1303cdf0e10cSrcweir {
1304cdf0e10cSrcweir sal_uInt16 nTransp = ( ( const XLineTransparenceItem& ) rAttrs.
1305cdf0e10cSrcweir Get( XATTR_LINETRANSPARENCE ) ).GetValue();
1306cdf0e10cSrcweir aMtrTransparent.SetValue( nTransp );
1307cdf0e10cSrcweir ChangeTransparentHdl_Impl( NULL );
1308cdf0e10cSrcweir }
1309cdf0e10cSrcweir else
1310cdf0e10cSrcweir aMtrTransparent.SetText( String() );
1311cdf0e10cSrcweir
1312cdf0e10cSrcweir if( !aLbStartStyle.IsEnabled() &&
1313cdf0e10cSrcweir !aLbEndStyle.IsEnabled() &&
1314cdf0e10cSrcweir !aMtrStartWidth.IsEnabled() &&
1315cdf0e10cSrcweir !aMtrEndWidth.IsEnabled() &&
1316cdf0e10cSrcweir !aTsbCenterStart.IsEnabled()&&
1317cdf0e10cSrcweir !aTsbCenterEnd.IsEnabled() )
1318cdf0e10cSrcweir {
1319cdf0e10cSrcweir aCbxSynchronize.Disable();
1320cdf0e10cSrcweir aFtLineEndsStyle.Disable();
1321cdf0e10cSrcweir aFtLineEndsWidth.Disable();
1322cdf0e10cSrcweir aFlLineEnds.Disable();
1323cdf0e10cSrcweir }
1324cdf0e10cSrcweir
1325cdf0e10cSrcweir // Synchronisieren
1326cdf0e10cSrcweir // Jetzt wird der Wert aus der INI-Datei geholt (#42258#)
1327cdf0e10cSrcweir String aStr = GetUserData();
1328cdf0e10cSrcweir aCbxSynchronize.Check( (sal_Bool)aStr.ToInt32() );
1329cdf0e10cSrcweir
1330cdf0e10cSrcweir // #116827#
1331cdf0e10cSrcweir if(bObjSelected && SFX_ITEM_DEFAULT == rAttrs.GetItemState(XATTR_LINEJOINT))
1332cdf0e10cSrcweir {
1333cdf0e10cSrcweir maFTEdgeStyle.Disable();
1334cdf0e10cSrcweir maLBEdgeStyle.Disable();
1335cdf0e10cSrcweir }
1336cdf0e10cSrcweir else if(SFX_ITEM_DONTCARE != rAttrs.GetItemState(XATTR_LINEJOINT))
1337cdf0e10cSrcweir {
1338d5370dc8SArmin Le Grand const com::sun::star::drawing::LineJoint eLineJoint = ((const XLineJointItem&)(rAttrs.Get(XATTR_LINEJOINT))).GetValue();
1339cdf0e10cSrcweir
1340cdf0e10cSrcweir switch(eLineJoint)
1341cdf0e10cSrcweir {
1342d5370dc8SArmin Le Grand case com::sun::star::drawing::LineJoint_MIDDLE : // fallback to round, unused value
1343d5370dc8SArmin Le Grand case com::sun::star::drawing::LineJoint_ROUND : maLBEdgeStyle.SelectEntryPos(0); break;
1344d5370dc8SArmin Le Grand case com::sun::star::drawing::LineJoint_NONE : maLBEdgeStyle.SelectEntryPos(1); break;
1345d5370dc8SArmin Le Grand case com::sun::star::drawing::LineJoint_MITER : maLBEdgeStyle.SelectEntryPos(2); break;
1346d5370dc8SArmin Le Grand case com::sun::star::drawing::LineJoint_BEVEL : maLBEdgeStyle.SelectEntryPos(3); break;
1347*50edefd7SPavel Janík default: break;
1348cdf0e10cSrcweir }
1349cdf0e10cSrcweir }
1350cdf0e10cSrcweir else
1351cdf0e10cSrcweir {
1352cdf0e10cSrcweir maLBEdgeStyle.SetNoSelection();
1353cdf0e10cSrcweir }
1354cdf0e10cSrcweir
1355cdf0e10cSrcweir /*
1356cdf0e10cSrcweir if( aLbStartStyle.GetSelectEntryPos() == aLbEndStyle.GetSelectEntryPos() &&
1357cdf0e10cSrcweir aMtrStartWidth.GetValue() == aMtrEndWidth.GetValue() &&
1358cdf0e10cSrcweir aTsbCenterStart.GetState() == aTsbCenterEnd.GetState() )
1359cdf0e10cSrcweir {
1360cdf0e10cSrcweir aCbxSynchronize.Check();
1361cdf0e10cSrcweir }
1362cdf0e10cSrcweir */
1363cdf0e10cSrcweir
13645aaf853bSArmin Le Grand // fdo#43209
13655aaf853bSArmin Le Grand if(bObjSelected && SFX_ITEM_DEFAULT == rAttrs.GetItemState(XATTR_LINECAP))
13665aaf853bSArmin Le Grand {
13675aaf853bSArmin Le Grand maFTCapStyle.Disable();
13685aaf853bSArmin Le Grand maLBCapStyle.Disable();
13695aaf853bSArmin Le Grand }
13705aaf853bSArmin Le Grand else if(SFX_ITEM_DONTCARE != rAttrs.GetItemState(XATTR_LINECAP))
13715aaf853bSArmin Le Grand {
13725aaf853bSArmin Le Grand const com::sun::star::drawing::LineCap eLineCap(((const XLineCapItem&)(rAttrs.Get(XATTR_LINECAP))).GetValue());
13735aaf853bSArmin Le Grand
13745aaf853bSArmin Le Grand switch(eLineCap)
13755aaf853bSArmin Le Grand {
13765aaf853bSArmin Le Grand case com::sun::star::drawing::LineCap_ROUND: maLBCapStyle.SelectEntryPos(1); break;
13775aaf853bSArmin Le Grand case com::sun::star::drawing::LineCap_SQUARE : maLBCapStyle.SelectEntryPos(2); break;
13785aaf853bSArmin Le Grand default /*com::sun::star::drawing::LineCap_BUTT*/: maLBCapStyle.SelectEntryPos(0); break;
13795aaf853bSArmin Le Grand }
13805aaf853bSArmin Le Grand }
13815aaf853bSArmin Le Grand else
13825aaf853bSArmin Le Grand {
13835aaf853bSArmin Le Grand maLBCapStyle.SetNoSelection();
13845aaf853bSArmin Le Grand }
13855aaf853bSArmin Le Grand
1386cdf0e10cSrcweir // Werte sichern
1387cdf0e10cSrcweir aLbLineStyle.SaveValue();
1388cdf0e10cSrcweir aMtrLineWidth.SaveValue();
1389cdf0e10cSrcweir aLbColor.SaveValue();
1390cdf0e10cSrcweir aLbStartStyle.SaveValue();
1391cdf0e10cSrcweir aLbEndStyle.SaveValue();
1392cdf0e10cSrcweir aMtrStartWidth.SaveValue();
1393cdf0e10cSrcweir aMtrEndWidth.SaveValue();
1394cdf0e10cSrcweir aTsbCenterStart.SaveValue();
1395cdf0e10cSrcweir aTsbCenterEnd.SaveValue();
1396cdf0e10cSrcweir aMtrTransparent.SaveValue();
1397cdf0e10cSrcweir
1398cdf0e10cSrcweir // #116827#
1399cdf0e10cSrcweir maLBEdgeStyle.SaveValue();
1400cdf0e10cSrcweir
14015aaf853bSArmin Le Grand // LineCaps
14025aaf853bSArmin Le Grand maLBCapStyle.SaveValue();
14035aaf853bSArmin Le Grand
1404cdf0e10cSrcweir ClickInvisibleHdl_Impl( this );
1405cdf0e10cSrcweir //ClickMeasuringHdl_Impl( this );
1406cdf0e10cSrcweir //aCtlPosition.Reset();
1407cdf0e10cSrcweir
1408cdf0e10cSrcweir ChangePreviewHdl_Impl( NULL );
1409cdf0e10cSrcweir }
1410cdf0e10cSrcweir
1411cdf0e10cSrcweir // -----------------------------------------------------------------------
1412cdf0e10cSrcweir
Create(Window * pWindow,const SfxItemSet & rAttrs)1413cdf0e10cSrcweir SfxTabPage* SvxLineTabPage::Create( Window* pWindow,
1414cdf0e10cSrcweir const SfxItemSet& rAttrs )
1415cdf0e10cSrcweir {
1416cdf0e10cSrcweir return( new SvxLineTabPage( pWindow, rAttrs ) );
1417cdf0e10cSrcweir }
1418cdf0e10cSrcweir
1419cdf0e10cSrcweir //------------------------------------------------------------------------
1420cdf0e10cSrcweir
GetRanges()1421cdf0e10cSrcweir sal_uInt16* SvxLineTabPage::GetRanges()
1422cdf0e10cSrcweir {
1423cdf0e10cSrcweir return( pLineRanges );
1424cdf0e10cSrcweir }
1425cdf0e10cSrcweir
1426cdf0e10cSrcweir //------------------------------------------------------------------------
1427cdf0e10cSrcweir
IMPL_LINK(SvxLineTabPage,ChangePreviewHdl_Impl,void *,pCntrl)1428cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ChangePreviewHdl_Impl, void *, pCntrl )
1429cdf0e10cSrcweir {
1430cdf0e10cSrcweir if(pCntrl == &aMtrLineWidth)
1431cdf0e10cSrcweir {
1432cdf0e10cSrcweir // Linienbreite und Start/EndBreite
1433cdf0e10cSrcweir sal_Int32 nNewLineWidth = GetCoreValue( aMtrLineWidth, ePoolUnit );
1434cdf0e10cSrcweir if(nActLineWidth == -1)
1435cdf0e10cSrcweir {
1436cdf0e10cSrcweir // Noch nicht initialisiert, hole den Startwert
1437cdf0e10cSrcweir const SfxPoolItem* pOld = GetOldItem( rXLSet, XATTR_LINEWIDTH );
1438cdf0e10cSrcweir sal_Int32 nStartLineWidth = 0;
1439cdf0e10cSrcweir if(pOld)
1440cdf0e10cSrcweir nStartLineWidth = (( const XLineWidthItem *)pOld)->GetValue();
1441cdf0e10cSrcweir nActLineWidth = nStartLineWidth;
1442cdf0e10cSrcweir }
1443cdf0e10cSrcweir
1444cdf0e10cSrcweir if(nActLineWidth != nNewLineWidth)
1445cdf0e10cSrcweir {
1446cdf0e10cSrcweir // Anpassungen Start/EndWidth #63083#
1447cdf0e10cSrcweir sal_Int32 nValAct = GetCoreValue( aMtrStartWidth, ePoolUnit );
1448cdf0e10cSrcweir sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
1449cdf0e10cSrcweir if(nValNew < 0)
1450cdf0e10cSrcweir nValNew = 0;
1451cdf0e10cSrcweir SetMetricValue( aMtrStartWidth, nValNew, ePoolUnit );
1452cdf0e10cSrcweir
1453cdf0e10cSrcweir nValAct = GetCoreValue( aMtrEndWidth, ePoolUnit );
1454cdf0e10cSrcweir nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
1455cdf0e10cSrcweir if(nValNew < 0)
1456cdf0e10cSrcweir nValNew = 0;
1457cdf0e10cSrcweir SetMetricValue( aMtrEndWidth, nValNew, ePoolUnit );
1458cdf0e10cSrcweir }
1459cdf0e10cSrcweir
1460cdf0e10cSrcweir // Aktuellen Wert merken
1461cdf0e10cSrcweir nActLineWidth = nNewLineWidth;
1462cdf0e10cSrcweir }
1463cdf0e10cSrcweir
1464cdf0e10cSrcweir FillXLSet_Impl();
1465cdf0e10cSrcweir aCtlPreview.Invalidate();
1466cdf0e10cSrcweir
1467cdf0e10cSrcweir // Transparenz entspr. zugaenglich machen
1468cdf0e10cSrcweir if( aLbLineStyle.GetSelectEntryPos() == 0 ) // unsichtbar
1469cdf0e10cSrcweir {
1470cdf0e10cSrcweir aFtTransparent.Disable();
1471cdf0e10cSrcweir aMtrTransparent.Disable();
1472cdf0e10cSrcweir }
1473cdf0e10cSrcweir else
1474cdf0e10cSrcweir {
1475cdf0e10cSrcweir aFtTransparent.Enable();
1476cdf0e10cSrcweir aMtrTransparent.Enable();
1477cdf0e10cSrcweir }
1478cdf0e10cSrcweir
1479cdf0e10cSrcweir const bool bHasLineStart = aLbStartStyle.GetSelectEntryPos() != 0;
1480cdf0e10cSrcweir const bool bHasLineEnd = aLbEndStyle.GetSelectEntryPos() != 0;
1481cdf0e10cSrcweir
1482cdf0e10cSrcweir aFtLineEndsWidth.Enable( bHasLineStart || bHasLineEnd );
1483cdf0e10cSrcweir aMtrStartWidth.Enable( bHasLineStart );
1484cdf0e10cSrcweir aTsbCenterStart.Enable( bHasLineStart );
1485cdf0e10cSrcweir aMtrEndWidth.Enable( bHasLineEnd );
1486cdf0e10cSrcweir aTsbCenterEnd.Enable( bHasLineEnd );
1487cdf0e10cSrcweir
1488cdf0e10cSrcweir return( 0L );
1489cdf0e10cSrcweir }
1490cdf0e10cSrcweir
1491cdf0e10cSrcweir //------------------------------------------------------------------------
1492cdf0e10cSrcweir
IMPL_LINK(SvxLineTabPage,ChangeStartHdl_Impl,void *,p)1493cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ChangeStartHdl_Impl, void *, p )
1494cdf0e10cSrcweir {
1495cdf0e10cSrcweir if( aCbxSynchronize.IsChecked() )
1496cdf0e10cSrcweir {
1497cdf0e10cSrcweir if( p == &aMtrStartWidth )
1498cdf0e10cSrcweir aMtrEndWidth.SetValue( aMtrStartWidth.GetValue() );
1499cdf0e10cSrcweir if( p == &aLbStartStyle )
1500cdf0e10cSrcweir aLbEndStyle.SelectEntryPos( aLbStartStyle.GetSelectEntryPos() );
1501cdf0e10cSrcweir if( p == &aTsbCenterStart )
1502cdf0e10cSrcweir aTsbCenterEnd.SetState( aTsbCenterStart.GetState() );
1503cdf0e10cSrcweir }
1504cdf0e10cSrcweir
1505cdf0e10cSrcweir ChangePreviewHdl_Impl( this );
1506cdf0e10cSrcweir
1507cdf0e10cSrcweir return( 0L );
1508cdf0e10cSrcweir }
1509cdf0e10cSrcweir
1510cdf0e10cSrcweir //------------------------------------------------------------------------
1511cdf0e10cSrcweir // #116827#
1512cdf0e10cSrcweir
IMPL_LINK(SvxLineTabPage,ChangeEdgeStyleHdl_Impl,void *,EMPTYARG)1513cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ChangeEdgeStyleHdl_Impl, void *, EMPTYARG )
1514cdf0e10cSrcweir {
1515cdf0e10cSrcweir ChangePreviewHdl_Impl( this );
1516cdf0e10cSrcweir
1517cdf0e10cSrcweir return( 0L );
1518cdf0e10cSrcweir }
1519cdf0e10cSrcweir
15205aaf853bSArmin Le Grand //------------------------------------------------------------------------
15215aaf853bSArmin Le Grand // fdo#43209
15225aaf853bSArmin Le Grand
IMPL_LINK(SvxLineTabPage,ChangeCapStyleHdl_Impl,void *,EMPTYARG)15235aaf853bSArmin Le Grand IMPL_LINK( SvxLineTabPage, ChangeCapStyleHdl_Impl, void *, EMPTYARG )
15245aaf853bSArmin Le Grand {
15255aaf853bSArmin Le Grand ChangePreviewHdl_Impl( this );
15265aaf853bSArmin Le Grand
15275aaf853bSArmin Le Grand return( 0L );
15285aaf853bSArmin Le Grand }
1529cdf0e10cSrcweir //------------------------------------------------------------------------
1530cdf0e10cSrcweir
IMPL_LINK(SvxLineTabPage,ClickInvisibleHdl_Impl,void *,EMPTYARG)1531cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ClickInvisibleHdl_Impl, void *, EMPTYARG )
1532cdf0e10cSrcweir {
1533cdf0e10cSrcweir if( aLbLineStyle.GetSelectEntryPos() == 0 ) // unsichtbar
1534cdf0e10cSrcweir {
1535cdf0e10cSrcweir aFtColor.Disable();
1536cdf0e10cSrcweir if(!bSymbols)
1537cdf0e10cSrcweir aLbColor.Disable();
1538cdf0e10cSrcweir aFtLineWidth.Disable();
1539cdf0e10cSrcweir aMtrLineWidth.Disable();
1540cdf0e10cSrcweir
1541cdf0e10cSrcweir if( aFlLineEnds.IsEnabled() )
1542cdf0e10cSrcweir {
1543cdf0e10cSrcweir aFtLineEndsStyle.Disable();
1544cdf0e10cSrcweir aFtLineEndsWidth.Disable();
1545cdf0e10cSrcweir aLbStartStyle.Disable();
1546cdf0e10cSrcweir aMtrStartWidth.Disable();
1547cdf0e10cSrcweir aTsbCenterStart.Disable();
1548cdf0e10cSrcweir aLbEndStyle.Disable();
1549cdf0e10cSrcweir aMtrEndWidth.Disable();
1550cdf0e10cSrcweir aTsbCenterEnd.Disable();
1551cdf0e10cSrcweir aCbxSynchronize.Disable();
1552cdf0e10cSrcweir
1553cdf0e10cSrcweir // #116827#
1554cdf0e10cSrcweir maFTEdgeStyle.Disable();
1555cdf0e10cSrcweir maLBEdgeStyle.Disable();
15565aaf853bSArmin Le Grand
15575aaf853bSArmin Le Grand // LineCaps
15585aaf853bSArmin Le Grand maFTCapStyle.Disable();
15595aaf853bSArmin Le Grand maLBCapStyle.Disable();
1560cdf0e10cSrcweir }
1561cdf0e10cSrcweir }
1562cdf0e10cSrcweir else
1563cdf0e10cSrcweir {
1564cdf0e10cSrcweir aFtColor.Enable();
1565cdf0e10cSrcweir aLbColor.Enable();
1566cdf0e10cSrcweir aFtLineWidth.Enable();
1567cdf0e10cSrcweir aMtrLineWidth.Enable();
1568cdf0e10cSrcweir
1569cdf0e10cSrcweir if( aFlLineEnds.IsEnabled() )
1570cdf0e10cSrcweir {
1571cdf0e10cSrcweir aFtLineEndsStyle.Enable();
1572cdf0e10cSrcweir aFtLineEndsWidth.Enable();
1573cdf0e10cSrcweir aLbStartStyle.Enable();
1574cdf0e10cSrcweir aMtrStartWidth.Enable();
1575cdf0e10cSrcweir aTsbCenterStart.Enable();
1576cdf0e10cSrcweir aLbEndStyle.Enable();
1577cdf0e10cSrcweir aMtrEndWidth.Enable();
1578cdf0e10cSrcweir aTsbCenterEnd.Enable();
1579cdf0e10cSrcweir aCbxSynchronize.Enable();
1580cdf0e10cSrcweir
1581cdf0e10cSrcweir // #116827#
1582cdf0e10cSrcweir maFTEdgeStyle.Enable();
1583cdf0e10cSrcweir maLBEdgeStyle.Enable();
15845aaf853bSArmin Le Grand
15855aaf853bSArmin Le Grand // LineCaps
15865aaf853bSArmin Le Grand maFTCapStyle.Enable();
15875aaf853bSArmin Le Grand maLBCapStyle.Enable();
1588cdf0e10cSrcweir }
1589cdf0e10cSrcweir }
1590cdf0e10cSrcweir ChangePreviewHdl_Impl( NULL );
1591cdf0e10cSrcweir
1592cdf0e10cSrcweir return( 0L );
1593cdf0e10cSrcweir }
1594cdf0e10cSrcweir
1595cdf0e10cSrcweir //------------------------------------------------------------------------
1596cdf0e10cSrcweir
IMPL_LINK(SvxLineTabPage,ChangeEndHdl_Impl,void *,p)1597cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ChangeEndHdl_Impl, void *, p )
1598cdf0e10cSrcweir {
1599cdf0e10cSrcweir if( aCbxSynchronize.IsChecked() )
1600cdf0e10cSrcweir {
1601cdf0e10cSrcweir if( p == &aMtrEndWidth )
1602cdf0e10cSrcweir aMtrStartWidth.SetValue( aMtrEndWidth.GetValue() );
1603cdf0e10cSrcweir if( p == &aLbEndStyle )
1604cdf0e10cSrcweir aLbStartStyle.SelectEntryPos( aLbEndStyle.GetSelectEntryPos() );
1605cdf0e10cSrcweir if( p == &aTsbCenterEnd )
1606cdf0e10cSrcweir aTsbCenterStart.SetState( aTsbCenterEnd.GetState() );
1607cdf0e10cSrcweir }
1608cdf0e10cSrcweir
1609cdf0e10cSrcweir ChangePreviewHdl_Impl( this );
1610cdf0e10cSrcweir
1611cdf0e10cSrcweir return( 0L );
1612cdf0e10cSrcweir }
1613cdf0e10cSrcweir
1614cdf0e10cSrcweir //------------------------------------------------------------------------
1615cdf0e10cSrcweir /*
1616cdf0e10cSrcweir
1617cdf0e10cSrcweir long SvxLineTabPage::ClickMeasuringHdl_Impl( void* )
1618cdf0e10cSrcweir {
1619cdf0e10cSrcweir if( aTsbShowMeasuring.GetState() == STATE_NOCHECK )
1620cdf0e10cSrcweir {
1621cdf0e10cSrcweir aFtPosition.Disable();
1622cdf0e10cSrcweir aCtlPosition.Disable();
1623cdf0e10cSrcweir }
1624cdf0e10cSrcweir else
1625cdf0e10cSrcweir {
1626cdf0e10cSrcweir aFtPosition.Enable();
1627cdf0e10cSrcweir aCtlPosition.Enable();
1628cdf0e10cSrcweir }
1629cdf0e10cSrcweir aCtlPosition.Invalidate();
1630cdf0e10cSrcweir
1631cdf0e10cSrcweir return( 0L );
1632cdf0e10cSrcweir }
1633cdf0e10cSrcweir */
1634cdf0e10cSrcweir //------------------------------------------------------------------------
1635cdf0e10cSrcweir
IMPL_LINK(SvxLineTabPage,ChangeTransparentHdl_Impl,void *,EMPTYARG)1636cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, ChangeTransparentHdl_Impl, void *, EMPTYARG )
1637cdf0e10cSrcweir {
1638cdf0e10cSrcweir sal_uInt16 nVal = (sal_uInt16)aMtrTransparent.GetValue();
1639cdf0e10cSrcweir XLineTransparenceItem aItem( nVal );
1640cdf0e10cSrcweir
1641cdf0e10cSrcweir rXLSet.Put( XLineTransparenceItem( aItem ) );
1642cdf0e10cSrcweir
1643cdf0e10cSrcweir // #116827#
1644cdf0e10cSrcweir FillXLSet_Impl();
1645cdf0e10cSrcweir
1646cdf0e10cSrcweir aCtlPreview.Invalidate();
1647cdf0e10cSrcweir
1648cdf0e10cSrcweir return( 0L );
1649cdf0e10cSrcweir }
1650cdf0e10cSrcweir
1651cdf0e10cSrcweir //------------------------------------------------------------------------
1652cdf0e10cSrcweir
PointChanged(Window *,RECT_POINT eRcPt)1653cdf0e10cSrcweir void SvxLineTabPage::PointChanged( Window*, RECT_POINT eRcPt )
1654cdf0e10cSrcweir {
1655cdf0e10cSrcweir eRP = eRcPt;
1656cdf0e10cSrcweir }
1657cdf0e10cSrcweir
1658cdf0e10cSrcweir //------------------------------------------------------------------------
1659cdf0e10cSrcweir
FillUserData()1660cdf0e10cSrcweir void SvxLineTabPage::FillUserData()
1661cdf0e10cSrcweir {
1662cdf0e10cSrcweir // Abgleich wird in der Ini-Datei festgehalten
1663cdf0e10cSrcweir UniString aStrUserData = UniString::CreateFromInt32( (sal_Int32) aCbxSynchronize.IsChecked() );
1664cdf0e10cSrcweir SetUserData( aStrUserData );
1665cdf0e10cSrcweir }
1666cdf0e10cSrcweir
1667cdf0e10cSrcweir
1668cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart)
1669cdf0e10cSrcweir //Handler f�r Popup-Menue der Symbolauswahl (NumMenueButton)
1670cdf0e10cSrcweir //der folgende Link stammt urspruenglich aus SvxNumOptionsTabPage
IMPL_LINK(SvxLineTabPage,MenuCreateHdl_Impl,MenuButton *,pButton)1671cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
1672cdf0e10cSrcweir {
1673cdf0e10cSrcweir //Popup initialisieren
1674cdf0e10cSrcweir if(!pButton->GetPopupMenu()->GetPopupMenu( MN_GALLERY ))
1675cdf0e10cSrcweir {
1676cdf0e10cSrcweir // Gallery-Eintraege besorgen
1677cdf0e10cSrcweir GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames);
1678cdf0e10cSrcweir
1679cdf0e10cSrcweir PopupMenu* pPopup = new PopupMenu;
1680cdf0e10cSrcweir String aEmptyStr;
1681cdf0e10cSrcweir
1682cdf0e10cSrcweir nNumMenuGalleryItems=aGrfNames.Count();
1683cdf0e10cSrcweir for(long i = 0; i < nNumMenuGalleryItems; i++)
1684cdf0e10cSrcweir {
1685cdf0e10cSrcweir const String* pGrfName = (const String*)aGrfNames.GetObject(i);
1686cdf0e10cSrcweir const String* pUIName = pGrfName;
1687cdf0e10cSrcweir
1688cdf0e10cSrcweir // convert URL encodings to UI characters (eg %20 for spaces)
1689cdf0e10cSrcweir String aPhysicalName;
1690cdf0e10cSrcweir if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( *pGrfName, aPhysicalName ))
1691cdf0e10cSrcweir pUIName = &aPhysicalName;
1692cdf0e10cSrcweir
1693cdf0e10cSrcweir SvxBrushItem* pBrushItem = new SvxBrushItem(*pGrfName, aEmptyStr, GPOS_AREA, SID_ATTR_BRUSH);
1694cdf0e10cSrcweir pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl));
1695cdf0e10cSrcweir
1696cdf0e10cSrcweir SvxBmpItemInfo* pInfo = new SvxBmpItemInfo();
1697cdf0e10cSrcweir pInfo->pBrushItem = pBrushItem;
1698cdf0e10cSrcweir pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i);
1699cdf0e10cSrcweir aGrfBrushItems.Insert(pInfo, i);
1700cdf0e10cSrcweir const Graphic* pGraphic = pBrushItem->GetGraphic();
1701cdf0e10cSrcweir
1702cdf0e10cSrcweir if(pGraphic)
1703cdf0e10cSrcweir {
1704cdf0e10cSrcweir Bitmap aBitmap(pGraphic->GetBitmap());
1705cdf0e10cSrcweir Size aSize(aBitmap.GetSizePixel());
1706cdf0e10cSrcweir if(aSize.Width() > MAX_BMP_WIDTH ||
1707cdf0e10cSrcweir aSize.Height() > MAX_BMP_HEIGHT)
1708cdf0e10cSrcweir {
1709cdf0e10cSrcweir sal_Bool bWidth = aSize.Width() > aSize.Height();
1710cdf0e10cSrcweir double nScale = bWidth ?
1711cdf0e10cSrcweir (double)MAX_BMP_WIDTH / (double)aSize.Width():
1712cdf0e10cSrcweir (double)MAX_BMP_HEIGHT / (double)aSize.Height();
1713cdf0e10cSrcweir aBitmap.Scale(nScale, nScale);
1714cdf0e10cSrcweir
1715cdf0e10cSrcweir }
1716cdf0e10cSrcweir Image aImage(aBitmap);
1717cdf0e10cSrcweir pPopup->InsertItem(pInfo->nItemId, *pUIName, aImage );
1718cdf0e10cSrcweir }
1719cdf0e10cSrcweir else
1720cdf0e10cSrcweir {
1721cdf0e10cSrcweir Image aImage;
1722cdf0e10cSrcweir pPopup->InsertItem(pInfo->nItemId, *pUIName, aImage );
1723cdf0e10cSrcweir }
1724cdf0e10cSrcweir }
1725cdf0e10cSrcweir aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup );
1726cdf0e10cSrcweir if(!aGrfNames.Count())
1727cdf0e10cSrcweir aSymbolMB.GetPopupMenu()->EnableItem(MN_GALLERY, sal_False);
1728cdf0e10cSrcweir }
1729cdf0e10cSrcweir
1730cdf0e10cSrcweir if(!pButton->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ) && pSymbolList)
1731cdf0e10cSrcweir {
1732cdf0e10cSrcweir VirtualDevice aVDev;
1733cdf0e10cSrcweir aVDev.SetMapMode(MapMode(MAP_100TH_MM));
1734cdf0e10cSrcweir SdrModel* pModel = new SdrModel(NULL, NULL, LOADREFCOUNTS);
1735cdf0e10cSrcweir pModel->GetItemPool().FreezeIdRanges();
1736cdf0e10cSrcweir // Page
1737cdf0e10cSrcweir SdrPage* pPage = new SdrPage( *pModel, sal_False );
1738cdf0e10cSrcweir pPage->SetSize(Size(1000,1000));
1739cdf0e10cSrcweir pModel->InsertPage( pPage, 0 );
1740cdf0e10cSrcweir // 3D View
1741cdf0e10cSrcweir SdrView* pView = new SdrView( pModel, &aVDev );
1742cdf0e10cSrcweir pView->hideMarkHandles();
17433c42630dSArmin Le Grand /*SdrPageView* pPageView = */pView->ShowSdrPage(pPage);
1744cdf0e10cSrcweir
1745cdf0e10cSrcweir PopupMenu* pPopup = new PopupMenu;
1746cdf0e10cSrcweir String aEmptyStr;
17473a5971bbSRegina Henschel
17483a5971bbSRegina Henschel // Generate invisible square to give all symbols a
17493a5971bbSRegina Henschel // bitmap size, which is indepedent from specific glyph
17503a5971bbSRegina Henschel SdrObject *pInvisibleSquare=pSymbolList->GetObj(0);
17513a5971bbSRegina Henschel pInvisibleSquare=pInvisibleSquare->Clone();
17523a5971bbSRegina Henschel pPage->NbcInsertObject(pInvisibleSquare);
17533a5971bbSRegina Henschel pInvisibleSquare->SetMergedItem(XFillTransparenceItem(100));
17543a5971bbSRegina Henschel pInvisibleSquare->SetMergedItem(XLineTransparenceItem(100));
17553a5971bbSRegina Henschel
1756cdf0e10cSrcweir for(long i=0;; ++i)
1757cdf0e10cSrcweir {
1758cdf0e10cSrcweir SdrObject *pObj=pSymbolList->GetObj(i);
1759cdf0e10cSrcweir if(pObj==NULL)
1760cdf0e10cSrcweir break;
1761cdf0e10cSrcweir pObj=pObj->Clone();
1762cdf0e10cSrcweir //const String* pGrfName = (const String*)aGrfNames.GetObject(i);
1763cdf0e10cSrcweir String *pStr=new String();//String(i));
1764cdf0e10cSrcweir aGrfNames.Insert(pStr,LIST_APPEND);
1765cdf0e10cSrcweir //Rectangle aRect(pObj->GetLogicRect());
1766cdf0e10cSrcweir pPage->NbcInsertObject(pObj);
1767cdf0e10cSrcweir if(pSymbolAttr)
1768cdf0e10cSrcweir {
1769cdf0e10cSrcweir pObj->SetMergedItemSet(*pSymbolAttr);
1770cdf0e10cSrcweir }
1771cdf0e10cSrcweir else
1772cdf0e10cSrcweir {
1773cdf0e10cSrcweir pObj->SetMergedItemSet(rOutAttrs);
1774cdf0e10cSrcweir }
17753a5971bbSRegina Henschel pView->MarkAll();
1776bb18ee55SArmin Le Grand BitmapEx aBitmapEx(pView->GetMarkedObjBitmapEx());
1777bb18ee55SArmin Le Grand GDIMetaFile aMeta(pView->GetMarkedObjMetaFile());
1778cdf0e10cSrcweir pView->UnmarkAll();
17793a5971bbSRegina Henschel pObj=pPage->RemoveObject(1);
1780cdf0e10cSrcweir SdrObject::Free(pObj);
1781cdf0e10cSrcweir
1782cdf0e10cSrcweir SvxBrushItem* pBrushItem = new SvxBrushItem(Graphic(aMeta), GPOS_AREA, SID_ATTR_BRUSH);
1783cdf0e10cSrcweir pBrushItem->SetDoneLink(STATIC_LINK(this, SvxLineTabPage, GraphicArrivedHdl_Impl));
1784cdf0e10cSrcweir
1785cdf0e10cSrcweir SvxBmpItemInfo* pInfo = new SvxBmpItemInfo();
1786cdf0e10cSrcweir pInfo->pBrushItem = pBrushItem;
1787cdf0e10cSrcweir pInfo->nItemId = (sal_uInt16)(MN_GALLERY_ENTRY + i + nNumMenuGalleryItems);
1788cdf0e10cSrcweir aGrfBrushItems.Insert(pInfo, nNumMenuGalleryItems + i);
1789cdf0e10cSrcweir
1790bb18ee55SArmin Le Grand Size aSize(aBitmapEx.GetSizePixel());
1791cdf0e10cSrcweir if(aSize.Width() > MAX_BMP_WIDTH || aSize.Height() > MAX_BMP_HEIGHT)
1792cdf0e10cSrcweir {
1793cdf0e10cSrcweir sal_Bool bWidth = aSize.Width() > aSize.Height();
1794cdf0e10cSrcweir double nScale = bWidth ?
1795cdf0e10cSrcweir (double)MAX_BMP_WIDTH / (double)aSize.Width():
1796cdf0e10cSrcweir (double)MAX_BMP_HEIGHT / (double)aSize.Height();
1797bb18ee55SArmin Le Grand aBitmapEx.Scale(nScale, nScale);
1798cdf0e10cSrcweir }
1799bb18ee55SArmin Le Grand Image aImage(aBitmapEx);
1800cdf0e10cSrcweir pPopup->InsertItem(pInfo->nItemId,*pStr,aImage);
1801cdf0e10cSrcweir }
18023a5971bbSRegina Henschel pInvisibleSquare=pPage->RemoveObject(0);
18033a5971bbSRegina Henschel SdrObject::Free(pInvisibleSquare);
18043a5971bbSRegina Henschel
1805cdf0e10cSrcweir aSymbolMB.GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup );
1806cdf0e10cSrcweir if(!aGrfNames.Count())
1807cdf0e10cSrcweir aSymbolMB.GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False);
1808cdf0e10cSrcweir
1809cdf0e10cSrcweir delete pView;
1810cdf0e10cSrcweir delete pModel;
1811cdf0e10cSrcweir }
1812cdf0e10cSrcweir return 0;
1813cdf0e10cSrcweir }
1814cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart)
1815cdf0e10cSrcweir //Handler f�r Popup-Menue der Symbolauswahl (NumMenueButton)
1816cdf0e10cSrcweir //der folgende Link stammt urspruenglich aus SvxNumOptionsTabPage:
IMPL_STATIC_LINK(SvxLineTabPage,GraphicArrivedHdl_Impl,SvxBrushItem *,pItem)1817cdf0e10cSrcweir IMPL_STATIC_LINK(SvxLineTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem)
1818cdf0e10cSrcweir {
1819cdf0e10cSrcweir PopupMenu* pPopup = pThis->aSymbolMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
1820cdf0e10cSrcweir
1821cdf0e10cSrcweir SvxBmpItemInfo* pBmpInfo = 0;
1822cdf0e10cSrcweir for ( sal_uInt16 i = 0; i < pThis->aGrfBrushItems.Count(); i++ )
1823cdf0e10cSrcweir {
1824cdf0e10cSrcweir SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)pThis->aGrfBrushItems.GetObject(i);
1825cdf0e10cSrcweir if( pInfo->pBrushItem == pItem )
1826cdf0e10cSrcweir {
1827cdf0e10cSrcweir pBmpInfo = pInfo; break;
1828cdf0e10cSrcweir }
1829cdf0e10cSrcweir }
1830cdf0e10cSrcweir if( pBmpInfo )
1831cdf0e10cSrcweir {
1832cdf0e10cSrcweir if( pItem->GetGraphic() )
1833cdf0e10cSrcweir {
1834cdf0e10cSrcweir Bitmap aBitmap(pItem->GetGraphic()->GetBitmap());
1835cdf0e10cSrcweir Size aSize(aBitmap.GetSizePixel());
1836cdf0e10cSrcweir if(aSize.Width() > MAX_BMP_WIDTH ||
1837cdf0e10cSrcweir aSize.Height() > MAX_BMP_HEIGHT)
1838cdf0e10cSrcweir {
1839cdf0e10cSrcweir sal_Bool bWidth = aSize.Width() > aSize.Height();
1840cdf0e10cSrcweir double nScale = bWidth ?
1841cdf0e10cSrcweir (double)MAX_BMP_WIDTH / (double)aSize.Width():
1842cdf0e10cSrcweir (double)MAX_BMP_HEIGHT / (double)aSize.Height();
1843cdf0e10cSrcweir aBitmap.Scale(nScale, nScale);
1844cdf0e10cSrcweir }
1845cdf0e10cSrcweir Image aImage(aBitmap);
1846cdf0e10cSrcweir pPopup->SetItemImage( pBmpInfo->nItemId, aImage );
1847cdf0e10cSrcweir }
1848cdf0e10cSrcweir }
1849cdf0e10cSrcweir
1850cdf0e10cSrcweir return 0;
1851cdf0e10cSrcweir }
1852cdf0e10cSrcweir
1853cdf0e10cSrcweir //#58425# Symbole auf einer Linie (z.B. StarChart)
1854cdf0e10cSrcweir //Handler f�r Menuebutton
IMPL_LINK(SvxLineTabPage,GraphicHdl_Impl,MenuButton *,pButton)1855cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, GraphicHdl_Impl, MenuButton *, pButton )
1856cdf0e10cSrcweir {
1857cdf0e10cSrcweir sal_uInt16 nItemId = pButton->GetCurItemId();
1858cdf0e10cSrcweir const Graphic* pGraphic = 0;
1859cdf0e10cSrcweir Graphic aGraphic;
1860cdf0e10cSrcweir String aGrfName;
1861cdf0e10cSrcweir sal_Bool bResetSize = sal_False;
1862cdf0e10cSrcweir sal_Bool bEnable=sal_True;
1863cdf0e10cSrcweir long nPreviousSymbolType = nSymbolType;
1864cdf0e10cSrcweir
1865cdf0e10cSrcweir if(nItemId >= MN_GALLERY_ENTRY)
1866cdf0e10cSrcweir {
1867cdf0e10cSrcweir if( (nItemId-MN_GALLERY_ENTRY) >= nNumMenuGalleryItems)
1868cdf0e10cSrcweir {
1869cdf0e10cSrcweir nSymbolType=nItemId-MN_GALLERY_ENTRY-nNumMenuGalleryItems; //Index der Liste
1870cdf0e10cSrcweir }
1871cdf0e10cSrcweir else
1872cdf0e10cSrcweir {
1873cdf0e10cSrcweir nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM;
1874cdf0e10cSrcweir bResetSize = sal_True;
1875cdf0e10cSrcweir }
1876cdf0e10cSrcweir SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.GetObject(nItemId - MN_GALLERY_ENTRY);
1877cdf0e10cSrcweir pGraphic = pInfo->pBrushItem->GetGraphic();
1878cdf0e10cSrcweir }
1879cdf0e10cSrcweir else switch(nItemId)
1880cdf0e10cSrcweir {
1881cdf0e10cSrcweir case MN_SYMBOLS_AUTO:
1882cdf0e10cSrcweir {
1883cdf0e10cSrcweir pGraphic=&aAutoSymbolGraphic;
1884cdf0e10cSrcweir aAutoSymbolGraphic.SetPrefSize( Size(253,253) );
1885cdf0e10cSrcweir nSymbolType=SVX_SYMBOLTYPE_AUTO;
1886cdf0e10cSrcweir }
1887cdf0e10cSrcweir break;
1888cdf0e10cSrcweir
1889cdf0e10cSrcweir case MN_SYMBOLS_NONE:
1890cdf0e10cSrcweir {
1891cdf0e10cSrcweir nSymbolType=SVX_SYMBOLTYPE_NONE;
1892cdf0e10cSrcweir pGraphic=NULL;
1893cdf0e10cSrcweir bEnable=sal_False;
1894cdf0e10cSrcweir }
1895cdf0e10cSrcweir break;
1896cdf0e10cSrcweir default:
1897cdf0e10cSrcweir {
1898cdf0e10cSrcweir SvxOpenGraphicDialog aGrfDlg(CUI_RES(RID_STR_EDIT_GRAPHIC));
1899cdf0e10cSrcweir aGrfDlg.EnableLink(sal_False);
1900cdf0e10cSrcweir aGrfDlg.AsLink(sal_False);
1901cdf0e10cSrcweir if( !aGrfDlg.Execute() )
1902cdf0e10cSrcweir {
1903cdf0e10cSrcweir // ausgewaehlten Filter merken
1904cdf0e10cSrcweir aGrfName = aGrfDlg.GetPath();
1905cdf0e10cSrcweir if( !aGrfDlg.GetGraphic(aGraphic) )
1906cdf0e10cSrcweir {
1907cdf0e10cSrcweir nSymbolType=SVX_SYMBOLTYPE_BRUSHITEM;
1908cdf0e10cSrcweir pGraphic = &aGraphic;
1909cdf0e10cSrcweir bResetSize = sal_True;
1910cdf0e10cSrcweir }
1911cdf0e10cSrcweir }
1912cdf0e10cSrcweir if( !pGraphic )
1913cdf0e10cSrcweir return 0;
1914cdf0e10cSrcweir }
1915cdf0e10cSrcweir break;
1916cdf0e10cSrcweir }
1917cdf0e10cSrcweir
1918cdf0e10cSrcweir if(pGraphic)
1919cdf0e10cSrcweir {
1920cdf0e10cSrcweir Size aSize = SvxNumberFormat::GetGraphicSizeMM100(pGraphic);
1921cdf0e10cSrcweir aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)ePoolUnit);
1922cdf0e10cSrcweir aSymbolGraphic=*pGraphic;
1923cdf0e10cSrcweir if( bResetSize )
1924cdf0e10cSrcweir {
1925cdf0e10cSrcweir aSymbolSize=aSize;
1926cdf0e10cSrcweir }
1927cdf0e10cSrcweir else if( nPreviousSymbolType == SVX_SYMBOLTYPE_BRUSHITEM )
1928cdf0e10cSrcweir { //#i31097# Data Point Symbol size changes when a different symbol is choosen(maoyg)
1929cdf0e10cSrcweir if( aSymbolSize.Width() != aSymbolSize.Height() )
1930cdf0e10cSrcweir {
1931cdf0e10cSrcweir aSize.setWidth( (long)( aSymbolSize.Width() + aSymbolSize.Height() )/2 );
1932cdf0e10cSrcweir aSize.setHeight( (long)( aSymbolSize.Width() + aSymbolSize.Height() )/2 );
1933cdf0e10cSrcweir aSymbolSize = aSize;
1934cdf0e10cSrcweir }
1935cdf0e10cSrcweir }
1936cdf0e10cSrcweir aCtlPreview.SetSymbol(&aSymbolGraphic,aSymbolSize);
1937cdf0e10cSrcweir }
1938cdf0e10cSrcweir else
1939cdf0e10cSrcweir {
1940cdf0e10cSrcweir aSymbolGraphic=Graphic();
1941cdf0e10cSrcweir aCtlPreview.SetSymbol(NULL,aSymbolSize);
1942cdf0e10cSrcweir bEnable=sal_False;
1943cdf0e10cSrcweir }
1944cdf0e10cSrcweir aSymbolLastSize=aSymbolSize;
1945cdf0e10cSrcweir SetMetricValue(aSymbolWidthMF, aSymbolSize.Width(), ePoolUnit);
1946cdf0e10cSrcweir SetMetricValue(aSymbolHeightMF, aSymbolSize.Height(), ePoolUnit);
1947cdf0e10cSrcweir aSymbolRatioCB.Enable(bEnable);
1948cdf0e10cSrcweir aSymbolHeightFT.Enable(bEnable);
1949cdf0e10cSrcweir aSymbolWidthFT.Enable(bEnable);
1950cdf0e10cSrcweir aSymbolWidthMF.Enable(bEnable);
1951cdf0e10cSrcweir aSymbolHeightMF.Enable(bEnable);
1952cdf0e10cSrcweir aCtlPreview.Invalidate();
1953cdf0e10cSrcweir
1954cdf0e10cSrcweir return 0;
1955cdf0e10cSrcweir }
IMPL_LINK(SvxLineTabPage,SizeHdl_Impl,MetricField *,pField)1956cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, MetricField *, pField)
1957cdf0e10cSrcweir {
1958cdf0e10cSrcweir bNewSize=true;
1959cdf0e10cSrcweir sal_Bool bWidth = (sal_Bool)(pField == &aSymbolWidthMF);
1960cdf0e10cSrcweir bLastWidthModified = bWidth;
1961cdf0e10cSrcweir sal_Bool bRatio = aSymbolRatioCB.IsChecked();
1962cdf0e10cSrcweir long nWidthVal = static_cast<long>(aSymbolWidthMF.Denormalize(aSymbolWidthMF.GetValue(FUNIT_100TH_MM)));
1963cdf0e10cSrcweir long nHeightVal= static_cast<long>(aSymbolHeightMF.Denormalize(aSymbolHeightMF.GetValue(FUNIT_100TH_MM)));
1964cdf0e10cSrcweir nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MAP_100TH_MM,(MapUnit)ePoolUnit );
1965cdf0e10cSrcweir nHeightVal = OutputDevice::LogicToLogic(nHeightVal,MAP_100TH_MM,(MapUnit)ePoolUnit);
1966cdf0e10cSrcweir aSymbolSize=Size(nWidthVal,nHeightVal);
1967cdf0e10cSrcweir double fSizeRatio = (double)1;
1968cdf0e10cSrcweir
1969cdf0e10cSrcweir if(bRatio)
1970cdf0e10cSrcweir {
1971cdf0e10cSrcweir if (aSymbolLastSize.Height() && aSymbolLastSize.Width())
1972cdf0e10cSrcweir fSizeRatio = (double)aSymbolLastSize.Width() / aSymbolLastSize.Height();
1973cdf0e10cSrcweir }
1974cdf0e10cSrcweir
1975cdf0e10cSrcweir //Size aSymbolSize(aSymbolLastSize);
1976cdf0e10cSrcweir
1977cdf0e10cSrcweir if(bWidth)
1978cdf0e10cSrcweir {
1979cdf0e10cSrcweir long nDelta = nWidthVal - aSymbolLastSize.Width();
1980cdf0e10cSrcweir aSymbolSize.Width() = nWidthVal;
1981cdf0e10cSrcweir if (bRatio)
1982cdf0e10cSrcweir {
1983cdf0e10cSrcweir aSymbolSize.Height() = aSymbolLastSize.Height() + (long)((double)nDelta / fSizeRatio);
1984cdf0e10cSrcweir aSymbolSize.Height() = OutputDevice::LogicToLogic( aSymbolSize.Height(),(MapUnit)ePoolUnit, MAP_100TH_MM );
1985cdf0e10cSrcweir aSymbolHeightMF.SetUserValue(aSymbolHeightMF.Normalize(aSymbolSize.Height()), FUNIT_100TH_MM);
1986cdf0e10cSrcweir }
1987cdf0e10cSrcweir }
1988cdf0e10cSrcweir else
1989cdf0e10cSrcweir {
1990cdf0e10cSrcweir long nDelta = nHeightVal - aSymbolLastSize.Height();
1991cdf0e10cSrcweir aSymbolSize.Height() = nHeightVal;
1992cdf0e10cSrcweir if (bRatio)
1993cdf0e10cSrcweir {
1994cdf0e10cSrcweir aSymbolSize.Width() = aSymbolLastSize.Width() + (long)((double)nDelta * fSizeRatio);
1995cdf0e10cSrcweir aSymbolSize.Width() = OutputDevice::LogicToLogic( aSymbolSize.Width(),
1996cdf0e10cSrcweir (MapUnit)ePoolUnit, MAP_100TH_MM );
1997cdf0e10cSrcweir aSymbolWidthMF.SetUserValue(aSymbolWidthMF.Normalize(aSymbolSize.Width()), FUNIT_100TH_MM);
1998cdf0e10cSrcweir }
1999cdf0e10cSrcweir }
2000cdf0e10cSrcweir aCtlPreview.ResizeSymbol(aSymbolSize);
2001cdf0e10cSrcweir aSymbolLastSize=aSymbolSize;
2002cdf0e10cSrcweir return 0;
2003cdf0e10cSrcweir }
IMPL_LINK(SvxLineTabPage,RatioHdl_Impl,CheckBox *,pBox)2004cdf0e10cSrcweir IMPL_LINK( SvxLineTabPage, RatioHdl_Impl, CheckBox *, pBox )
2005cdf0e10cSrcweir {
2006cdf0e10cSrcweir if (pBox->IsChecked())
2007cdf0e10cSrcweir {
2008cdf0e10cSrcweir if (bLastWidthModified)
2009cdf0e10cSrcweir SizeHdl_Impl(&aSymbolWidthMF);
2010cdf0e10cSrcweir else
2011cdf0e10cSrcweir SizeHdl_Impl(&aSymbolHeightMF);
2012cdf0e10cSrcweir }
2013cdf0e10cSrcweir return 0;
2014cdf0e10cSrcweir }
2015cdf0e10cSrcweir
2016cdf0e10cSrcweir
DataChanged(const DataChangedEvent & rDCEvt)2017cdf0e10cSrcweir void SvxLineTabPage::DataChanged( const DataChangedEvent& rDCEvt )
2018cdf0e10cSrcweir {
2019cdf0e10cSrcweir SvxTabPage::DataChanged( rDCEvt );
2020cdf0e10cSrcweir
2021cdf0e10cSrcweir if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
2022cdf0e10cSrcweir {
2023cdf0e10cSrcweir FillListboxes();
2024cdf0e10cSrcweir }
2025cdf0e10cSrcweir }
2026cdf0e10cSrcweir
PageCreated(SfxAllItemSet aSet)2027cdf0e10cSrcweir void SvxLineTabPage::PageCreated (SfxAllItemSet aSet) //add CHINA001
2028cdf0e10cSrcweir {
2029cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pColorTabItem,SvxColorTableItem,SID_COLOR_TABLE,sal_False);
2030cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pDashListItem,SvxDashListItem,SID_DASH_LIST,sal_False);
2031cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pLineEndListItem,SvxLineEndListItem,SID_LINEEND_LIST,sal_False);
2032cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pPageTypeItem,SfxUInt16Item,SID_PAGE_TYPE,sal_False);
2033cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pDlgTypeItem,SfxUInt16Item,SID_DLG_TYPE,sal_False);
2034cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pSdrObjListItem,OfaPtrItem,SID_OBJECT_LIST,sal_False);
2035cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pSymbolAttrItem,SfxTabDialogItem,SID_ATTR_SET,sal_False);
2036cdf0e10cSrcweir SFX_ITEMSET_ARG (&aSet,pGraphicItem,SvxGraphicItem,SID_GRAPHIC,sal_False);
2037cdf0e10cSrcweir
2038cdf0e10cSrcweir if (pColorTabItem)
2039cdf0e10cSrcweir SetColorTable(pColorTabItem->GetColorTable());
2040cdf0e10cSrcweir if (pDashListItem)
2041cdf0e10cSrcweir SetDashList(pDashListItem->GetDashList());
2042cdf0e10cSrcweir if (pLineEndListItem)
2043cdf0e10cSrcweir SetLineEndList(pLineEndListItem->GetLineEndList());
2044cdf0e10cSrcweir if (pPageTypeItem)
2045cdf0e10cSrcweir SetPageType(pPageTypeItem->GetValue());
2046cdf0e10cSrcweir if (pDlgTypeItem)
2047cdf0e10cSrcweir SetDlgType(pDlgTypeItem->GetValue());
2048cdf0e10cSrcweir Construct();
2049cdf0e10cSrcweir
2050cdf0e10cSrcweir if(pSdrObjListItem) //symbols
2051cdf0e10cSrcweir {
2052cdf0e10cSrcweir ShowSymbolControls(sal_True);
2053cdf0e10cSrcweir pSymbolList = static_cast<SdrObjList*>(pSdrObjListItem->GetValue());
2054cdf0e10cSrcweir if (pSymbolAttrItem)
2055cdf0e10cSrcweir pSymbolAttr = new SfxItemSet(pSymbolAttrItem->GetItemSet());
2056cdf0e10cSrcweir if(pGraphicItem)
2057cdf0e10cSrcweir aAutoSymbolGraphic = pGraphicItem->GetGraphic();
2058cdf0e10cSrcweir }
2059cdf0e10cSrcweir }
2060