tabline.cxx (2ee96f1c) | tabline.cxx (c7be74b1) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 56 unchanged lines hidden (view full) --- 65 const SdrObject* pSdrObj, 66 sal_Bool bHasObj 67) : 68 69 SfxTabDialog ( pParent, CUI_RES( RID_SVXDLG_LINE ), pAttr ), 70 pDrawModel ( pModel ), 71 pObj ( pSdrObj ), 72 rOutAttrs ( *pAttr ), | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 56 unchanged lines hidden (view full) --- 65 const SdrObject* pSdrObj, 66 sal_Bool bHasObj 67) : 68 69 SfxTabDialog ( pParent, CUI_RES( RID_SVXDLG_LINE ), pAttr ), 70 pDrawModel ( pModel ), 71 pObj ( pSdrObj ), 72 rOutAttrs ( *pAttr ), |
73 pColorTab ( pModel->GetColorTable() ), 74 mpNewColorTab ( pModel->GetColorTable() ), 75 pDashList ( pModel->GetDashList() ), 76 pNewDashList ( pModel->GetDashList() ), 77 pLineEndList ( pModel->GetLineEndList() ), 78 pNewLineEndList ( pModel->GetLineEndList() ), | 73 maColorTab ( pModel->GetColorTableFromSdrModel() ), 74 maNewColorTab ( pModel->GetColorTableFromSdrModel() ), 75 maDashList ( pModel->GetDashListFromSdrModel() ), 76 maNewDashList ( pModel->GetDashListFromSdrModel() ), 77 maLineEndList ( pModel->GetLineEndListFromSdrModel() ), 78 maNewLineEndList( pModel->GetLineEndListFromSdrModel() ), |
79 bObjSelected ( bHasObj ), 80 nLineEndListState( CT_NONE ), 81 nDashListState( CT_NONE ), 82 mnColorTableState( CT_NONE ), 83 nPageType( 0 ), // wird hier in erster Linie benutzt, um mit FillItemSet 84 // die richtigen Attribute zu erhalten ( noch Fragen? ) 85 nDlgType( 0 ), 86 nPosDashLb( 0 ), 87 nPosLineEndLb( 0 ), 88 mnPos( 0 ), | 79 bObjSelected ( bHasObj ), 80 nLineEndListState( CT_NONE ), 81 nDashListState( CT_NONE ), 82 mnColorTableState( CT_NONE ), 83 nPageType( 0 ), // wird hier in erster Linie benutzt, um mit FillItemSet 84 // die richtigen Attribute zu erhalten ( noch Fragen? ) 85 nDlgType( 0 ), 86 nPosDashLb( 0 ), 87 nPosLineEndLb( 0 ), 88 mnPos( 0 ), |
89 mbAreaTP( sal_False ), 90 mbDeleteColorTable( sal_True ) | 89 mbAreaTP( sal_False ) |
91{ 92 FreeResource(); 93 94 bool bLineOnly = false; 95 if( pObj && pObj->GetObjInventor() == SdrInventor ) 96 { 97 switch( pObj->GetObjIdentifier() ) 98 { --- 34 unchanged lines hidden (view full) --- 133{ 134} 135 136// ----------------------------------------------------------------------- 137 138void SvxLineTabDialog::SavePalettes() 139{ 140 SfxObjectShell* pShell = SfxObjectShell::Current(); | 90{ 91 FreeResource(); 92 93 bool bLineOnly = false; 94 if( pObj && pObj->GetObjInventor() == SdrInventor ) 95 { 96 switch( pObj->GetObjIdentifier() ) 97 { --- 34 unchanged lines hidden (view full) --- 132{ 133} 134 135// ----------------------------------------------------------------------- 136 137void SvxLineTabDialog::SavePalettes() 138{ 139 SfxObjectShell* pShell = SfxObjectShell::Current(); |
141 if( mpNewColorTab != pDrawModel->GetColorTable() ) | 140 if( maNewColorTab != pDrawModel->GetColorTableFromSdrModel() ) |
142 { | 141 { |
143 if(mbDeleteColorTable) 144 delete pDrawModel->GetColorTable(); 145 pDrawModel->SetColorTable( mpNewColorTab ); | 142 pDrawModel->SetColorTableAtSdrModel( maNewColorTab ); |
146 if ( pShell ) | 143 if ( pShell ) |
147 pShell->PutItem( SvxColorTableItem( mpNewColorTab, SID_COLOR_TABLE ) ); 148 pColorTab = pDrawModel->GetColorTable(); | 144 pShell->PutItem( SvxColorTableItem( maNewColorTab, SID_COLOR_TABLE ) ); 145 maColorTab = pDrawModel->GetColorTableFromSdrModel(); |
149 } | 146 } |
150 if( pNewDashList != pDrawModel->GetDashList() ) | 147 if( maNewDashList != pDrawModel->GetDashListFromSdrModel() ) |
151 { | 148 { |
152 delete pDrawModel->GetDashList(); 153 pDrawModel->SetDashList( pNewDashList ); | 149 pDrawModel->SetDashListAtSdrModel( maNewDashList ); |
154 if ( pShell ) | 150 if ( pShell ) |
155 pShell->PutItem( SvxDashListItem( pNewDashList, SID_DASH_LIST ) ); 156 pDashList = pDrawModel->GetDashList(); | 151 pShell->PutItem( SvxDashListItem( maNewDashList, SID_DASH_LIST ) ); 152 maDashList = pDrawModel->GetDashListFromSdrModel(); |
157 } | 153 } |
158 if( pNewLineEndList != pDrawModel->GetLineEndList() ) | 154 if( maNewLineEndList != pDrawModel->GetLineEndListFromSdrModel() ) |
159 { | 155 { |
160 delete pDrawModel->GetLineEndList(); 161 pDrawModel->SetLineEndList( pNewLineEndList ); | 156 pDrawModel->SetLineEndListAtSdrModel( maNewLineEndList ); |
162 if ( pShell ) | 157 if ( pShell ) |
163 pShell->PutItem( SvxLineEndListItem( pNewLineEndList, SID_LINEEND_LIST ) ); 164 pLineEndList = pDrawModel->GetLineEndList(); | 158 pShell->PutItem( SvxLineEndListItem( maNewLineEndList, SID_LINEEND_LIST ) ); 159 maLineEndList = pDrawModel->GetLineEndListFromSdrModel(); |
165 } 166 167 // Speichern der Tabellen, wenn sie geaendert wurden. 168 169 const String aPath( SvtPathOptions().GetPalettePath() ); 170 171 if( nDashListState & CT_MODIFIED ) 172 { | 160 } 161 162 // Speichern der Tabellen, wenn sie geaendert wurden. 163 164 const String aPath( SvtPathOptions().GetPalettePath() ); 165 166 if( nDashListState & CT_MODIFIED ) 167 { |
173 pDashList->SetPath( aPath ); 174 pDashList->Save(); | 168 maDashList->SetPath( aPath ); 169 maDashList->Save(); |
175 176 // ToolBoxControls werden benachrichtigt: 177 if ( pShell ) | 170 171 // ToolBoxControls werden benachrichtigt: 172 if ( pShell ) |
178 pShell->PutItem( SvxDashListItem( pDashList, SID_DASH_LIST ) ); | 173 pShell->PutItem( SvxDashListItem( maDashList, SID_DASH_LIST ) ); |
179 } 180 181 if( nLineEndListState & CT_MODIFIED ) 182 { | 174 } 175 176 if( nLineEndListState & CT_MODIFIED ) 177 { |
183 pLineEndList->SetPath( aPath ); 184 pLineEndList->Save(); | 178 maLineEndList->SetPath( aPath ); 179 maLineEndList->Save(); |
185 186 // ToolBoxControls werden benachrichtigt: 187 if ( pShell ) | 180 181 // ToolBoxControls werden benachrichtigt: 182 if ( pShell ) |
188 pShell->PutItem( SvxLineEndListItem( pLineEndList, SID_LINEEND_LIST ) ); | 183 pShell->PutItem( SvxLineEndListItem( maLineEndList, SID_LINEEND_LIST ) ); |
189 } 190 191 if( mnColorTableState & CT_MODIFIED ) 192 { | 184 } 185 186 if( mnColorTableState & CT_MODIFIED ) 187 { |
193 pColorTab->SetPath( aPath ); 194 pColorTab->Save(); | 188 maColorTab->SetPath( aPath ); 189 maColorTab->Save(); |
195 196 // ToolBoxControls werden benachrichtigt: 197 if ( pShell ) | 190 191 // ToolBoxControls werden benachrichtigt: 192 if ( pShell ) |
198 pShell->PutItem( SvxColorTableItem( pColorTab, SID_COLOR_TABLE ) ); | 193 pShell->PutItem( SvxColorTableItem( maColorTab, SID_COLOR_TABLE ) ); |
199 } 200} 201 202// ----------------------------------------------------------------------- 203 204short SvxLineTabDialog::Ok() 205{ 206 SavePalettes(); --- 17 unchanged lines hidden (view full) --- 224 225// ----------------------------------------------------------------------- 226 227void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) 228{ 229 switch( nId ) 230 { 231 case RID_SVXPAGE_LINE: | 194 } 195} 196 197// ----------------------------------------------------------------------- 198 199short SvxLineTabDialog::Ok() 200{ 201 SavePalettes(); --- 17 unchanged lines hidden (view full) --- 219 220// ----------------------------------------------------------------------- 221 222void SvxLineTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) 223{ 224 switch( nId ) 225 { 226 case RID_SVXPAGE_LINE: |
232 ( (SvxLineTabPage&) rPage ).SetColorTable( pColorTab ); 233 ( (SvxLineTabPage&) rPage ).SetDashList( pDashList ); 234 ( (SvxLineTabPage&) rPage ).SetLineEndList( pLineEndList ); | 227 ( (SvxLineTabPage&) rPage ).SetColorTable( maColorTab ); 228 ( (SvxLineTabPage&) rPage ).SetDashList( maDashList ); 229 ( (SvxLineTabPage&) rPage ).SetLineEndList( maLineEndList ); |
235 ( (SvxLineTabPage&) rPage ).SetDlgType( nDlgType );//CHINA001 ( (SvxLineTabPage&) rPage ).SetDlgType( &nDlgType ); 236 ( (SvxLineTabPage&) rPage ).SetPageType( nPageType );//CHINA001 ( (SvxLineTabPage&) rPage ).SetPageType( &nPageType ); 237 ( (SvxLineTabPage&) rPage ).SetPosDashLb( &nPosDashLb ); 238 ( (SvxLineTabPage&) rPage ).SetPosLineEndLb( &nPosLineEndLb ); 239 ( (SvxLineTabPage&) rPage ).SetDashChgd( &nDashListState ); 240 ( (SvxLineTabPage&) rPage ).SetLineEndChgd( &nLineEndListState ); 241 ( (SvxLineTabPage&) rPage ).SetObjSelected( bObjSelected ); 242 ( (SvxLineTabPage&) rPage ).Construct(); 243 ( (SvxLineTabPage&) rPage ).SetColorChgd( &mnColorTableState ); 244 // ActivatePage() wird das erste mal nicht gerufen 245 ( (SvxLineTabPage&) rPage ).ActivatePage( rOutAttrs ); 246 break; 247 248 case RID_SVXPAGE_LINE_DEF: | 230 ( (SvxLineTabPage&) rPage ).SetDlgType( nDlgType );//CHINA001 ( (SvxLineTabPage&) rPage ).SetDlgType( &nDlgType ); 231 ( (SvxLineTabPage&) rPage ).SetPageType( nPageType );//CHINA001 ( (SvxLineTabPage&) rPage ).SetPageType( &nPageType ); 232 ( (SvxLineTabPage&) rPage ).SetPosDashLb( &nPosDashLb ); 233 ( (SvxLineTabPage&) rPage ).SetPosLineEndLb( &nPosLineEndLb ); 234 ( (SvxLineTabPage&) rPage ).SetDashChgd( &nDashListState ); 235 ( (SvxLineTabPage&) rPage ).SetLineEndChgd( &nLineEndListState ); 236 ( (SvxLineTabPage&) rPage ).SetObjSelected( bObjSelected ); 237 ( (SvxLineTabPage&) rPage ).Construct(); 238 ( (SvxLineTabPage&) rPage ).SetColorChgd( &mnColorTableState ); 239 // ActivatePage() wird das erste mal nicht gerufen 240 ( (SvxLineTabPage&) rPage ).ActivatePage( rOutAttrs ); 241 break; 242 243 case RID_SVXPAGE_LINE_DEF: |
249 ( (SvxLineDefTabPage&) rPage ).SetDashList( pDashList ); | 244 ( (SvxLineDefTabPage&) rPage ).SetDashList( maDashList ); |
250 ( (SvxLineDefTabPage&) rPage ).SetDlgType( &nDlgType ); 251 ( (SvxLineDefTabPage&) rPage ).SetPageType( &nPageType ); 252 ( (SvxLineDefTabPage&) rPage ).SetPosDashLb( &nPosDashLb ); 253 ( (SvxLineDefTabPage&) rPage ).SetDashChgd( &nDashListState ); 254 ( (SvxLineDefTabPage&) rPage ).SetObjSelected( bObjSelected ); 255 ( (SvxLineDefTabPage&) rPage ).Construct(); 256 break; 257 258 case RID_SVXPAGE_LINEEND_DEF: | 245 ( (SvxLineDefTabPage&) rPage ).SetDlgType( &nDlgType ); 246 ( (SvxLineDefTabPage&) rPage ).SetPageType( &nPageType ); 247 ( (SvxLineDefTabPage&) rPage ).SetPosDashLb( &nPosDashLb ); 248 ( (SvxLineDefTabPage&) rPage ).SetDashChgd( &nDashListState ); 249 ( (SvxLineDefTabPage&) rPage ).SetObjSelected( bObjSelected ); 250 ( (SvxLineDefTabPage&) rPage ).Construct(); 251 break; 252 253 case RID_SVXPAGE_LINEEND_DEF: |
259 ( (SvxLineEndDefTabPage&) rPage ).SetLineEndList( pLineEndList ); | 254 ( (SvxLineEndDefTabPage&) rPage ).SetLineEndList( maLineEndList ); |
260 ( (SvxLineEndDefTabPage&) rPage ).SetPolyObj( pObj ); 261 ( (SvxLineEndDefTabPage&) rPage ).SetDlgType( &nDlgType ); 262 ( (SvxLineEndDefTabPage&) rPage ).SetPageType( &nPageType ); 263 ( (SvxLineEndDefTabPage&) rPage ).SetPosLineEndLb( &nPosLineEndLb ); 264 ( (SvxLineEndDefTabPage&) rPage ).SetLineEndChgd( &nLineEndListState ); 265 ( (SvxLineEndDefTabPage&) rPage ).SetObjSelected( bObjSelected ); 266 ( (SvxLineEndDefTabPage&) rPage ).Construct(); 267 break; 268 269 case RID_SVXPAGE_SHADOW: 270 { | 255 ( (SvxLineEndDefTabPage&) rPage ).SetPolyObj( pObj ); 256 ( (SvxLineEndDefTabPage&) rPage ).SetDlgType( &nDlgType ); 257 ( (SvxLineEndDefTabPage&) rPage ).SetPageType( &nPageType ); 258 ( (SvxLineEndDefTabPage&) rPage ).SetPosLineEndLb( &nPosLineEndLb ); 259 ( (SvxLineEndDefTabPage&) rPage ).SetLineEndChgd( &nLineEndListState ); 260 ( (SvxLineEndDefTabPage&) rPage ).SetObjSelected( bObjSelected ); 261 ( (SvxLineEndDefTabPage&) rPage ).Construct(); 262 break; 263 264 case RID_SVXPAGE_SHADOW: 265 { |
271 ( (SvxShadowTabPage&) rPage ).SetColorTable( pColorTab ); | 266 ( (SvxShadowTabPage&) rPage ).SetColorTable( maColorTab ); |
272 ( (SvxShadowTabPage&) rPage ).SetPageType( nPageType ); 273 ( (SvxShadowTabPage&) rPage ).SetDlgType( nDlgType ); 274 ( (SvxShadowTabPage&) rPage ).SetAreaTP( &mbAreaTP ); 275 ( (SvxShadowTabPage&) rPage ).SetColorChgd( &mnColorTableState ); 276 ( (SvxShadowTabPage&) rPage ).Construct(); 277 } 278 break; 279/* 280 case RID_SVXPAGE_COLOR: | 267 ( (SvxShadowTabPage&) rPage ).SetPageType( nPageType ); 268 ( (SvxShadowTabPage&) rPage ).SetDlgType( nDlgType ); 269 ( (SvxShadowTabPage&) rPage ).SetAreaTP( &mbAreaTP ); 270 ( (SvxShadowTabPage&) rPage ).SetColorChgd( &mnColorTableState ); 271 ( (SvxShadowTabPage&) rPage ).Construct(); 272 } 273 break; 274/* 275 case RID_SVXPAGE_COLOR: |
281 ( (SvxColorTabPage&) rPage ).SetColorTable( pColorTab ); | 276 ( (SvxColorTabPage&) rPage ).SetColorTable( maColorTab ); |
282 ( (SvxColorTabPage&) rPage ).SetPageType( &nPageType ); 283 ( (SvxColorTabPage&) rPage ).SetDlgType( &nDlgType ); 284 ( (SvxColorTabPage&) rPage ).SetPos( &mnPos ); 285 ( (SvxColorTabPage&) rPage ).SetAreaTP( &mbAreaTP ); 286 ( (SvxColorTabPage&) rPage ).SetColorChgd( &mnColorTableState ); | 277 ( (SvxColorTabPage&) rPage ).SetPageType( &nPageType ); 278 ( (SvxColorTabPage&) rPage ).SetDlgType( &nDlgType ); 279 ( (SvxColorTabPage&) rPage ).SetPos( &mnPos ); 280 ( (SvxColorTabPage&) rPage ).SetAreaTP( &mbAreaTP ); 281 ( (SvxColorTabPage&) rPage ).SetColorChgd( &mnColorTableState ); |
287 ( (SvxColorTabPage&) rPage ).SetDeleteColorTable( mbDeleteColorTable ); | |
288 ( (SvxColorTabPage&) rPage ).Construct(); 289 break; 290*/ 291 } 292} 293 294 | 282 ( (SvxColorTabPage&) rPage ).Construct(); 283 break; 284*/ 285 } 286} 287 288 |