frmsh.cxx (f120fe41) frmsh.cxx (721f296a)
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

--- 369 unchanged lines hidden (view full) ---

378 if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem))
379 {
380 aMgr.SetAttrSet( *pArgs );
381 if(SID_ATTR_ULSPACE == nSlot && SID_ATTR_ULSPACE == nSlot)
382 bCopyToFmt = sal_True;
383 }
384 }
385 break;
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

--- 369 unchanged lines hidden (view full) ---

378 if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem))
379 {
380 aMgr.SetAttrSet( *pArgs );
381 if(SID_ATTR_ULSPACE == nSlot && SID_ATTR_ULSPACE == nSlot)
382 bCopyToFmt = sal_True;
383 }
384 }
385 break;
386 case FN_FORMAT_FRAME_DLG:
386 case FN_FORMAT_FRAME_DLG:
387 case FN_PROPERTY_WRAP_DLG:
387 {
388 const int nSel = rSh.GetSelectionType();
389 if (nSel & nsSelectionType::SEL_GRF)
390 {
391 rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG);
392 bUpdateMgr = sal_False;
393 }
394 else
395 {
388 {
389 const int nSel = rSh.GetSelectionType();
390 if (nSel & nsSelectionType::SEL_GRF)
391 {
392 rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG);
393 bUpdateMgr = sal_False;
394 }
395 else
396 {
396 SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1,
397 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
398 FN_GET_PRINT_AREA, FN_GET_PRINT_AREA,
399 SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
400 SID_ATTR_BRUSH, SID_ATTR_BRUSH,
401 SID_ATTR_LRSPACE, SID_ATTR_ULSPACE,
402 FN_SURROUND, FN_HORI_ORIENT,
403 FN_SET_FRM_NAME, FN_SET_FRM_NAME,
404 FN_KEEP_ASPECT_RATIO, FN_KEEP_ASPECT_RATIO,
405 SID_DOCFRAME, SID_DOCFRAME,
406 SID_HTML_MODE, SID_HTML_MODE,
407 FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
397 SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1,
398 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
399 FN_GET_PRINT_AREA, FN_GET_PRINT_AREA,
400 SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
401 SID_ATTR_BRUSH, SID_ATTR_BRUSH,
402 SID_ATTR_LRSPACE, SID_ATTR_ULSPACE,
403 FN_SURROUND, FN_HORI_ORIENT,
404 FN_SET_FRM_NAME, FN_SET_FRM_NAME,
405 FN_KEEP_ASPECT_RATIO, FN_KEEP_ASPECT_RATIO,
406 SID_DOCFRAME, SID_DOCFRAME,
407 SID_HTML_MODE, SID_HTML_MODE,
408 FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
408 FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT,
409 FN_OLE_IS_MATH, FN_OLE_IS_MATH,
410 FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT,
411 0);
412
409 FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT,
410 FN_OLE_IS_MATH, FN_OLE_IS_MATH,
411 FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT,
412 0);
413
413 const SwViewOption* pVOpt = rSh.GetViewOptions();
414 if(nSel & nsSelectionType::SEL_OLE)
414 const SwViewOption* pVOpt = rSh.GetViewOptions();
415 if(nSel & nsSelectionType::SEL_OLE)
415 aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) );
416 aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) );
416 aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
417 aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
417 aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
418 aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
418 if( nSel & nsSelectionType::SEL_OLE )
419 {
419 if( nSel & nsSelectionType::SEL_OLE )
420 {
420 // --> OD 2009-07-13 #i73249#
421// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText()));
422 aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
421 aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
423 // <--
424 }
425
426 const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE);
427 SwFmtFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height());
428 aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE));
429 aSet.Put(aFrmSize);
430
431 const SwRect &rPr = rSh.GetAnyCurRect(RECT_PAGE_PRT);

--- 32 unchanged lines hidden (view full) ---

464 aSet, sal_False,
465 nSel & nsSelectionType::SEL_GRF ? DLG_FRM_GRF :
466 nSel & nsSelectionType::SEL_OLE ? DLG_FRM_OLE :
467 DLG_FRM_STD,
468 sal_False,
469 nDefPage);
470 DBG_ASSERT(pDlg, "Dialogdiet fail!");
471
422 }
423
424 const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE);
425 SwFmtFrmSize aFrmSize(ATT_VAR_SIZE, rPg.Width(), rPg.Height());
426 aFrmSize.SetWhich(GetPool().GetWhich(SID_ATTR_PAGE_SIZE));
427 aSet.Put(aFrmSize);
428
429 const SwRect &rPr = rSh.GetAnyCurRect(RECT_PAGE_PRT);

--- 32 unchanged lines hidden (view full) ---

462 aSet, sal_False,
463 nSel & nsSelectionType::SEL_GRF ? DLG_FRM_GRF :
464 nSel & nsSelectionType::SEL_OLE ? DLG_FRM_OLE :
465 DLG_FRM_STD,
466 sal_False,
467 nDefPage);
468 DBG_ASSERT(pDlg, "Dialogdiet fail!");
469
470 if ( nSlot == FN_PROPERTY_WRAP_DLG )
471 {
472 pDlg->SetCurPageId(TP_FRM_WRAP);
473 }
474
472 if ( pDlg->Execute() )
473 {
474 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
475 if(pOutSet)
476 {
477 rReq.Done(*pOutSet);
478 if(nSel & nsSelectionType::SEL_OLE &&
479 SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, sal_True, &pItem))

--- 674 unchanged lines hidden ---
475 if ( pDlg->Execute() )
476 {
477 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
478 if(pOutSet)
479 {
480 rReq.Done(*pOutSet);
481 if(nSel & nsSelectionType::SEL_OLE &&
482 SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, sal_True, &pItem))

--- 674 unchanged lines hidden ---