grfsh.cxx (f120fe41) grfsh.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

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

109 String sGrfNm, sFilterNm;
110 rSh.GetGrfNms( &sGrfNm, &sFilterNm );
111 ExportGraphic( *pGraphic, sGrfNm );
112 }
113 }
114 break;
115 case SID_INSERT_GRAPHIC:
116 case FN_FORMAT_GRAFIC_DLG:
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

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

109 String sGrfNm, sFilterNm;
110 rSh.GetGrfNms( &sGrfNm, &sFilterNm );
111 ExportGraphic( *pGraphic, sGrfNm );
112 }
113 }
114 break;
115 case SID_INSERT_GRAPHIC:
116 case FN_FORMAT_GRAFIC_DLG:
117 case FN_PROPERTY_SIDEBAR_GRAFIC_DLG:
117 case FN_PROPERTY_WRAP_DLG:
118 {
119 SwFlyFrmAttrMgr aMgr( sal_False, &rSh, rSh.IsFrmSelected() ?
120 FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF);
121 const SwViewOption* pVOpt = rSh.GetViewOptions();
122 SwViewOption aUsrPref( *pVOpt );
123
124 SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1,
125 RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF,

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

146 const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE);
147 SwFmtFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height());
148 aFrmSize.SetWhich( GetPool().GetWhich( SID_ATTR_PAGE_SIZE ) );
149 aSet.Put( aFrmSize );
150
151 aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
152 if ( nSlot == FN_FORMAT_GRAFIC_DLG )
153 {
118 {
119 SwFlyFrmAttrMgr aMgr( sal_False, &rSh, rSh.IsFrmSelected() ?
120 FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF);
121 const SwViewOption* pVOpt = rSh.GetViewOptions();
122 SwViewOption aUsrPref( *pVOpt );
123
124 SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1,
125 RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF,

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

146 const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE);
147 SwFmtFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height());
148 aFrmSize.SetWhich( GetPool().GetWhich( SID_ATTR_PAGE_SIZE ) );
149 aSet.Put( aFrmSize );
150
151 aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
152 if ( nSlot == FN_FORMAT_GRAFIC_DLG )
153 {
154 // --> OD 2009-07-13 #i73249#
155// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText()));
156 aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
154 aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
157 // <--
158 }
159
160 pRect = &rSh.GetAnyCurRect(RECT_PAGE_PRT);
161 aFrmSize.SetWidth( pRect->Width() );
162 aFrmSize.SetHeight( pRect->Height() );
163 aFrmSize.SetWhich( GetPool().GetWhich(FN_GET_PRINT_AREA) );
164 aSet.Put( aFrmSize );
165

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

228 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
229 DBG_ASSERT(pFact, "Dialogdiet fail!");
230 SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_GRF,
231 GetView().GetViewFrame(),
232 GetView().GetWindow(),
233 aSet, sal_False, DLG_FRM_GRF);
234 DBG_ASSERT(pDlg, "Dialogdiet fail!");
235
155 }
156
157 pRect = &rSh.GetAnyCurRect(RECT_PAGE_PRT);
158 aFrmSize.SetWidth( pRect->Width() );
159 aFrmSize.SetHeight( pRect->Height() );
160 aFrmSize.SetWhich( GetPool().GetWhich(FN_GET_PRINT_AREA) );
161 aSet.Put( aFrmSize );
162

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

225 SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
226 DBG_ASSERT(pFact, "Dialogdiet fail!");
227 SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_GRF,
228 GetView().GetViewFrame(),
229 GetView().GetWindow(),
230 aSet, sal_False, DLG_FRM_GRF);
231 DBG_ASSERT(pDlg, "Dialogdiet fail!");
232
236 if (nSlot == FN_PROPERTY_SIDEBAR_GRAFIC_DLG)
233 if (nSlot == FN_PROPERTY_WRAP_DLG)
237 pDlg->SetCurPageId(TP_FRM_WRAP);
238
239 if( pDlg->Execute() )
240 {
241 rSh.StartAllAction();
242 rSh.StartUndo(UNDO_START);
243 const SfxPoolItem* pItem;
244 SfxItemSet* pSet = (SfxItemSet*)pDlg->GetOutputItemSet();

--- 460 unchanged lines hidden ---
234 pDlg->SetCurPageId(TP_FRM_WRAP);
235
236 if( pDlg->Execute() )
237 {
238 rSh.StartAllAction();
239 rSh.StartUndo(UNDO_START);
240 const SfxPoolItem* pItem;
241 SfxItemSet* pSet = (SfxItemSet*)pDlg->GetOutputItemSet();

--- 460 unchanged lines hidden ---