basesh.cxx (64b14621) | basesh.cxx (8ef2f12b) |
---|---|
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 --- 633 unchanged lines hidden (view full) --- 642 SwTableFUNC( &rSh, sal_False).UpdateChart(); 643 rSh.ClearTblBoxCntnt(); 644 rSh.SaveTblBoxCntnt(); 645 } 646 } 647 break; 648 case FN_UPDATE_CHARTS: 649 { | 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 --- 633 unchanged lines hidden (view full) --- 642 SwTableFUNC( &rSh, sal_False).UpdateChart(); 643 rSh.ClearTblBoxCntnt(); 644 rSh.SaveTblBoxCntnt(); 645 } 646 } 647 break; 648 case FN_UPDATE_CHARTS: 649 { |
650 SwWait aWait( *rView.GetDocShell(), sal_True ); | 650 SwWait aWait( *rView.GetDocShell(), true ); |
651 rSh.UpdateAllCharts(); 652 } 653 break; 654 655 case FN_UPDATE_ALL: 656 { 657 SwView& rTempView = GetView(); 658 rSh.EnterStdMode(); --- 88 unchanged lines hidden (view full) --- 747 break; 748 749 const int nSelType = rSh.GetSelectionType(); 750 sal_Int8 nGalleryItemType( pGalleryItem->GetType() ); 751 752 if ( (!rSh.IsSelFrmMode() || nSelType & nsSelectionType::SEL_GRF) && 753 nGalleryItemType == com::sun::star::gallery::GalleryItemType::GRAPHIC ) 754 { | 651 rSh.UpdateAllCharts(); 652 } 653 break; 654 655 case FN_UPDATE_ALL: 656 { 657 SwView& rTempView = GetView(); 658 rSh.EnterStdMode(); --- 88 unchanged lines hidden (view full) --- 747 break; 748 749 const int nSelType = rSh.GetSelectionType(); 750 sal_Int8 nGalleryItemType( pGalleryItem->GetType() ); 751 752 if ( (!rSh.IsSelFrmMode() || nSelType & nsSelectionType::SEL_GRF) && 753 nGalleryItemType == com::sun::star::gallery::GalleryItemType::GRAPHIC ) 754 { |
755 SwWait aWait( *rView.GetDocShell(), sal_True ); | 755 SwWait aWait( *rView.GetDocShell(), true ); |
756 757 String aGrfName, aFltName; 758 const Graphic aGrf( pGalleryItem->GetGraphic() ); 759 760 if( pGalleryItem->IsLink() ) 761 { 762 // Verknuepft 763 aGrfName = pGalleryItem->GetURL(); --- 1505 unchanged lines hidden (view full) --- 2269 rSet.DisableItem( SID_BACKGROUND_COLOR ); 2270 return; 2271 } 2272 } 2273 2274 SvxBrushItem aBrushItem( RES_BACKGROUND ); 2275 2276 if( nsSelectionType::SEL_TBL_CELLS & nSelType ) | 756 757 String aGrfName, aFltName; 758 const Graphic aGrf( pGalleryItem->GetGraphic() ); 759 760 if( pGalleryItem->IsLink() ) 761 { 762 // Verknuepft 763 aGrfName = pGalleryItem->GetURL(); --- 1505 unchanged lines hidden (view full) --- 2269 rSet.DisableItem( SID_BACKGROUND_COLOR ); 2270 return; 2271 } 2272 } 2273 2274 SvxBrushItem aBrushItem( RES_BACKGROUND ); 2275 2276 if( nsSelectionType::SEL_TBL_CELLS & nSelType ) |
2277 { | |
2278 rSh.GetBoxBackground( aBrushItem ); | 2277 rSh.GetBoxBackground( aBrushItem ); |
2279 } 2280 else 2281 { 2282 //UUUU 2283 if(nSelType & nsSelectionType::SEL_GRF) 2284 { 2285 SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); 2286 2287 rSh.GetFlyFrmAttr( aCoreSet ); 2288 aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND); 2289 } 2290 else if(nsSelectionType::SEL_FRM & nSelType) 2291 { 2292 SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); 2293 const XFillStyleItem& rXFillStyleItem(static_cast< const XFillStyleItem& >(aCoreSet.Get(XATTR_FILLSTYLE))); 2294 2295 if(XFILL_SOLID == rXFillStyleItem.GetValue()) 2296 { 2297 const Color aFillColor(static_cast< const XFillColorItem& >(aCoreSet.Get(XATTR_FILLCOLOR)).GetColorValue()); 2298 2299 aBrushItem.SetColor(aFillColor); 2300 } 2301 else 2302 { 2303 // keep default in SvxBrushItem which equals no fill 2304 } 2305 } 2306 else 2307 { 2308 SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); 2309 | 2278 else 2279 { 2280 SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); 2281 if( nSelType & nsSelectionType::SEL_GRF || nsSelectionType::SEL_FRM & nSelType ) 2282 rSh.GetFlyFrmAttr( aCoreSet ); 2283 else |
2310 rSh.GetCurAttr( aCoreSet ); | 2284 rSh.GetCurAttr( aCoreSet ); |
2311 aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND); 2312 } 2313 } | 2285 aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND); 2286 } |
2314 2315 while ( nWhich ) 2316 { 2317 switch(nWhich) 2318 { 2319 case SID_BACKGROUND_COLOR : 2320 { 2321 SvxColorItem aColorItem(aBrushItem.GetColor(), SID_BACKGROUND_COLOR); --- 25 unchanged lines hidden (view full) --- 2347 const SfxItemSet* pArgs = rReq.GetArgs(); 2348 sal_uInt16 nSlot = rReq.GetSlot(); 2349 if( !pArgs && nSlot != SID_BACKGROUND_COLOR) 2350 return ; 2351 2352 SvxBrushItem aBrushItem( RES_BACKGROUND ); 2353 2354 if( nsSelectionType::SEL_TBL_CELLS & nSelType ) | 2287 2288 while ( nWhich ) 2289 { 2290 switch(nWhich) 2291 { 2292 case SID_BACKGROUND_COLOR : 2293 { 2294 SvxColorItem aColorItem(aBrushItem.GetColor(), SID_BACKGROUND_COLOR); --- 25 unchanged lines hidden (view full) --- 2320 const SfxItemSet* pArgs = rReq.GetArgs(); 2321 sal_uInt16 nSlot = rReq.GetSlot(); 2322 if( !pArgs && nSlot != SID_BACKGROUND_COLOR) 2323 return ; 2324 2325 SvxBrushItem aBrushItem( RES_BACKGROUND ); 2326 2327 if( nsSelectionType::SEL_TBL_CELLS & nSelType ) |
2355 { 2356 rSh.GetBoxBackground( aBrushItem ); 2357 } 2358 else 2359 { 2360 //UUUU 2361 if(nSelType & nsSelectionType::SEL_GRF) 2362 { 2363 SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); 2364 2365 rSh.GetFlyFrmAttr( aCoreSet ); 2366 aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND); 2367 } 2368 else if(nsSelectionType::SEL_FRM & nSelType) 2369 { 2370 SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); 2371 const XFillStyleItem& rXFillStyleItem(static_cast< const XFillStyleItem& >(aCoreSet.Get(XATTR_FILLSTYLE))); 2372 2373 if(XFILL_SOLID == rXFillStyleItem.GetValue()) 2374 { 2375 const Color aFillColor(static_cast< const XFillColorItem& >(aCoreSet.Get(XATTR_FILLCOLOR)).GetColorValue()); 2376 2377 aBrushItem.SetColor(aFillColor); 2378 } 2379 else 2380 { 2381 // keep default in SvxBrushItem which equals no fill 2382 } 2383 } 2384 else 2385 { 2386 SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); 2387 | 2328 { 2329 rSh.GetBoxBackground( aBrushItem ); 2330 } 2331 else 2332 { 2333 SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); 2334 if( (nsSelectionType::SEL_FRM & nSelType) || (nsSelectionType::SEL_GRF & nSelType) ) 2335 rSh.GetFlyFrmAttr( aCoreSet ); 2336 else |
2388 rSh.GetCurAttr( aCoreSet ); | 2337 rSh.GetCurAttr( aCoreSet ); |
2389 aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND); 2390 } 2391 } | 2338 aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND); 2339 } |
2392 2393// sal_Bool bMsgOk = sal_False; 2394 2395 switch (nSlot) 2396 { 2397 // RES_BACKGROUND (=SID_ATTR_BRUSH) muss ueber zwei IDs 2398 // gesetzt werden: 2399 case SID_BACKGROUND_COLOR: --- 28 unchanged lines hidden (view full) --- 2428 default: 2429// bMsgOk = sal_False; 2430 rReq.Ignore(); 2431 DBG_ERROR( "Unbekannte Message bei ExecuteAttr!" ); 2432 return; 2433 } 2434 2435 if( nsSelectionType::SEL_TBL_CELLS & nSelType ) | 2340 2341// sal_Bool bMsgOk = sal_False; 2342 2343 switch (nSlot) 2344 { 2345 // RES_BACKGROUND (=SID_ATTR_BRUSH) muss ueber zwei IDs 2346 // gesetzt werden: 2347 case SID_BACKGROUND_COLOR: --- 28 unchanged lines hidden (view full) --- 2376 default: 2377// bMsgOk = sal_False; 2378 rReq.Ignore(); 2379 DBG_ERROR( "Unbekannte Message bei ExecuteAttr!" ); 2380 return; 2381 } 2382 2383 if( nsSelectionType::SEL_TBL_CELLS & nSelType ) |
2436 { 2437 rSh.SetBoxBackground( aBrushItem ); 2438 } 2439 //UUUU 2440 else if(nsSelectionType::SEL_GRF & nSelType) 2441 { 2442 SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); 2443 aCoreSet.Put( aBrushItem ); 2444 // Vorlagen-AutoUpdate 2445 SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); 2446 if(pFmt && pFmt->IsAutoUpdateFmt()) 2447 rSh.AutoUpdateFrame( pFmt, aCoreSet); 2448 else 2449 rSh.SetFlyFrmAttr( aCoreSet ); 2450 } 2451 else if(nsSelectionType::SEL_FRM & nSelType) 2452 { 2453 SfxItemSet aCoreSet(GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST); 2454 const XubString aNullStr; | 2384 { 2385 rSh.SetBoxBackground( aBrushItem ); 2386 } 2387 else if( (nsSelectionType::SEL_FRM & nSelType) || 2388 (nsSelectionType::SEL_GRF & nSelType) ) 2389 { 2390 SfxItemSet aCoreSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND); 2391 aCoreSet.Put( aBrushItem ); 2392 // Vorlagen-AutoUpdate 2393 SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); 2394 if(pFmt && pFmt->IsAutoUpdateFmt()) 2395 rSh.AutoUpdateFrame( pFmt, aCoreSet); 2396 else 2397 rSh.SetFlyFrmAttr( aCoreSet ); 2398 } 2399 else 2400 { 2401 SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); 2402 if( pColl && pColl->IsAutoUpdateFmt()) 2403 { 2404 SfxItemSet aSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND ); 2405 aSet.Put(aBrushItem); 2406 rSh.AutoUpdatePara( pColl, aSet); 2407 } 2408 else 2409 rSh.SetAttrItem( aBrushItem ); 2410 } |
2455 | 2411 |
2456 // set FillStyle and color when applying 2457 aCoreSet.Put(XFillStyleItem(XFILL_SOLID)); 2458 aCoreSet.Put(XFillColorItem(aNullStr, aBrushItem.GetColor())); 2459 2460 // Vorlagen-AutoUpdate 2461 SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); 2462 2463 if(pFmt && pFmt->IsAutoUpdateFmt()) 2464 { 2465 rSh.AutoUpdateFrame( pFmt, aCoreSet); 2466 } 2467 else 2468 { 2469 rSh.SetFlyFrmAttr( aCoreSet ); 2470 } 2471 } 2472 else 2473 { 2474 SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl(); 2475 if( pColl && pColl->IsAutoUpdateFmt()) 2476 { 2477 SfxItemSet aSet(GetPool(), RES_BACKGROUND, RES_BACKGROUND ); 2478 aSet.Put(aBrushItem); 2479 rSh.AutoUpdatePara( pColl, aSet); 2480 } 2481 else 2482 rSh.SetAttrItem( aBrushItem ); 2483 } 2484 | |
2485 rReq.Done(); 2486} 2487 2488/*-------------------------------------------------------------------- 2489 Beschreibung: 2490 --------------------------------------------------------------------*/ 2491 2492 --- 539 unchanged lines hidden --- | 2412 rReq.Done(); 2413} 2414 2415/*-------------------------------------------------------------------- 2416 Beschreibung: 2417 --------------------------------------------------------------------*/ 2418 2419 --- 539 unchanged lines hidden --- |