fontworkbar.cxx (26734c99) | fontworkbar.cxx (5ffb42a1) |
---|---|
1/************************************************************** | 1/************************************************************** |
2 * | 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 9 * with the License. You may obtain a copy of the License at | 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 9 * with the License. You may obtain a copy of the License at |
10 * | 10 * |
11 * http://www.apache.org/licenses/LICENSE-2.0 | 11 * http://www.apache.org/licenses/LICENSE-2.0 |
12 * | 12 * |
13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. | 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. |
19 * | 19 * |
20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_svx.hxx" 26#include <svx/svdundo.hxx> 27#include <sfx2/app.hxx> --- 143 unchanged lines hidden (view full) --- 171 } 172 } 173 } 174 } 175 rSet.Put( SfxStringItem( SID_FONTWORK_SHAPE_TYPE, aFontWorkShapeType ) ); 176} 177 178/************************************************************************* | 20 *************************************************************/ 21 22 23 24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_svx.hxx" 26#include <svx/svdundo.hxx> 27#include <sfx2/app.hxx> --- 143 unchanged lines hidden (view full) --- 171 } 172 } 173 } 174 } 175 rSet.Put( SfxStringItem( SID_FONTWORK_SHAPE_TYPE, aFontWorkShapeType ) ); 176} 177 178/************************************************************************* |
179|* | |
180|* Standardinterface deklarieren (Die Slotmap darf nicht leer sein, also 181|* tragen wir etwas ein, was hier (hoffentlich) nie vorkommt). | 179|* Standardinterface deklarieren (Die Slotmap darf nicht leer sein, also 180|* tragen wir etwas ein, was hier (hoffentlich) nie vorkommt). |
182|* | |
183\************************************************************************/ 184 185#define ShellClass FontworkBar 186 187SFX_SLOTMAP(FontworkBar) 188{ 189 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 190}; 191 192SFX_IMPL_INTERFACE(FontworkBar, SfxShell, SVX_RES(RID_SVX_FONTWORK_BAR)) 193{ 194 SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT, SVX_RES(RID_SVX_FONTWORK_BAR) ); 195} 196 197TYPEINIT1( FontworkBar, SfxShell ); 198 199 200/************************************************************************* | 181\************************************************************************/ 182 183#define ShellClass FontworkBar 184 185SFX_SLOTMAP(FontworkBar) 186{ 187 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } 188}; 189 190SFX_IMPL_INTERFACE(FontworkBar, SfxShell, SVX_RES(RID_SVX_FONTWORK_BAR)) 191{ 192 SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_OBJECT, SVX_RES(RID_SVX_FONTWORK_BAR) ); 193} 194 195TYPEINIT1( FontworkBar, SfxShell ); 196 197 198/************************************************************************* |
201|* | |
202|* Standard-Konstruktor | 199|* Standard-Konstruktor |
203|* | |
204\************************************************************************/ 205 206FontworkBar::FontworkBar(SfxViewShell* pViewShell ) 207: SfxShell(pViewShell) 208{ 209 DBG_ASSERT( pViewShell, "svx::FontworkBar::FontworkBar(), I need a viewshell!" ); 210 if( pViewShell ) 211 SetPool(&pViewShell->GetPool()); 212 213 SetHelpId( SVX_INTERFACE_FONTWORK_BAR ); 214 SetName( String( SVX_RES( RID_SVX_FONTWORK_BAR) )); 215} 216 217 218/************************************************************************* | 200\************************************************************************/ 201 202FontworkBar::FontworkBar(SfxViewShell* pViewShell ) 203: SfxShell(pViewShell) 204{ 205 DBG_ASSERT( pViewShell, "svx::FontworkBar::FontworkBar(), I need a viewshell!" ); 206 if( pViewShell ) 207 SetPool(&pViewShell->GetPool()); 208 209 SetHelpId( SVX_INTERFACE_FONTWORK_BAR ); 210 SetName( String( SVX_RES( RID_SVX_FONTWORK_BAR) )); 211} 212 213 214/************************************************************************* |
219|* | |
220|* Destruktor | 215|* Destruktor |
221|* | |
222\************************************************************************/ 223 224FontworkBar::~FontworkBar() 225{ 226 SetRepeatTarget(NULL); 227} 228 229static Window* ImpGetViewWin(SdrView* pView) 230{ 231 if( pView ) 232 { 233 const sal_uInt32 nAnz(pView->PaintWindowCount()); | 216\************************************************************************/ 217 218FontworkBar::~FontworkBar() 219{ 220 SetRepeatTarget(NULL); 221} 222 223static Window* ImpGetViewWin(SdrView* pView) 224{ 225 if( pView ) 226 { 227 const sal_uInt32 nAnz(pView->PaintWindowCount()); |
234 for(sal_uInt32 nNum(0L); nNum < nAnz; nNum++) | 228 for(sal_uInt32 nNum(0L); nNum < nAnz; nNum++) |
235 { 236 OutputDevice* pOut = &(pView->GetPaintWindow(nNum)->GetOutputDevice()); 237 | 229 { 230 OutputDevice* pOut = &(pView->GetPaintWindow(nNum)->GetOutputDevice()); 231 |
238 if(OUTDEV_WINDOW == pOut->GetOutDevType()) | 232 if(OUTDEV_WINDOW == pOut->GetOutDevType()) |
239 { 240 return (Window*)pOut; 241 } 242 } 243 } 244 245 return 0L; 246} --- 121 unchanged lines hidden (view full) --- 368 rGeometryItem.ClearPropertyValue( sAdjustmentValues ); 369 rGeometryItem.ClearPropertyValue( sCoordinateOrigin ); 370 rGeometryItem.ClearPropertyValue( sCoordinateSize ); 371 rGeometryItem.ClearPropertyValue( sEquations ); 372 rGeometryItem.ClearPropertyValue( sHandles ); 373 rGeometryItem.ClearPropertyValue( sPath ); 374 375 /* SJ: CustomShapes that are available in the gallery are having the highest | 233 { 234 return (Window*)pOut; 235 } 236 } 237 } 238 239 return 0L; 240} --- 121 unchanged lines hidden (view full) --- 362 rGeometryItem.ClearPropertyValue( sAdjustmentValues ); 363 rGeometryItem.ClearPropertyValue( sCoordinateOrigin ); 364 rGeometryItem.ClearPropertyValue( sCoordinateSize ); 365 rGeometryItem.ClearPropertyValue( sEquations ); 366 rGeometryItem.ClearPropertyValue( sHandles ); 367 rGeometryItem.ClearPropertyValue( sPath ); 368 369 /* SJ: CustomShapes that are available in the gallery are having the highest |
376 priority, so we will take a look there before taking the internal default */ | 370 priority, so we will take a look there before taking the internal default */ |
377 378 if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) ) 379 { 380 std::vector< rtl::OUString > aObjList; 381 if ( GalleryExplorer::FillObjListTitle( GALLERY_THEME_POWERPOINT, aObjList ) ) 382 { 383 sal_uInt16 i; 384 for ( i = 0; i < aObjList.size(); i++ ) --- 118 unchanged lines hidden (view full) --- 503 Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( aXShape, UNO_QUERY ); 504 if( xDefaulter.is() ) 505 xDefaulter->createCustomShapeDefaults( aCustomShape ); 506 } 507 508 pObj->BroadcastObjectChange(); 509 if( bUndo ) 510 pSdrView->EndUndo(); | 371 372 if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) ) 373 { 374 std::vector< rtl::OUString > aObjList; 375 if ( GalleryExplorer::FillObjListTitle( GALLERY_THEME_POWERPOINT, aObjList ) ) 376 { 377 sal_uInt16 i; 378 for ( i = 0; i < aObjList.size(); i++ ) --- 118 unchanged lines hidden (view full) --- 497 Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( aXShape, UNO_QUERY ); 498 if( xDefaulter.is() ) 499 xDefaulter->createCustomShapeDefaults( aCustomShape ); 500 } 501 502 pObj->BroadcastObjectChange(); 503 if( bUndo ) 504 pSdrView->EndUndo(); |
511 pSdrView->AdjustMarkHdl(); //HMH sal_True ); | 505 pSdrView->AdjustMarkHdl(); // HMH sal_True ); |
512 rBindings.Invalidate( SID_FONTWORK_SHAPE_TYPE ); 513 } 514 } 515 } 516 } 517 break; 518 519 case SID_FONTWORK_CHARACTER_SPACING_DIALOG : --- 104 unchanged lines hidden (view full) --- 624 } 625 if ( rSet.GetItemState( SID_FONTWORK_SAME_LETTER_HEIGHTS ) != SFX_ITEM_UNKNOWN ) 626 { 627 if ( !checkForSelectedFontWork( pSdrView, nCheckStatus ) ) 628 rSet.DisableItem( SID_FONTWORK_SAME_LETTER_HEIGHTS ); 629 } 630 if ( rSet.GetItemState( SID_FONTWORK_SHAPE_TYPE ) != SFX_ITEM_UNKNOWN ) 631 { | 506 rBindings.Invalidate( SID_FONTWORK_SHAPE_TYPE ); 507 } 508 } 509 } 510 } 511 break; 512 513 case SID_FONTWORK_CHARACTER_SPACING_DIALOG : --- 104 unchanged lines hidden (view full) --- 618 } 619 if ( rSet.GetItemState( SID_FONTWORK_SAME_LETTER_HEIGHTS ) != SFX_ITEM_UNKNOWN ) 620 { 621 if ( !checkForSelectedFontWork( pSdrView, nCheckStatus ) ) 622 rSet.DisableItem( SID_FONTWORK_SAME_LETTER_HEIGHTS ); 623 } 624 if ( rSet.GetItemState( SID_FONTWORK_SHAPE_TYPE ) != SFX_ITEM_UNKNOWN ) 625 { |
632 if ( !checkForSelectedFontWork( pSdrView, nCheckStatus ) ) | 626 if ( !checkForSelectedFontWork( pSdrView, nCheckStatus ) ) |
633 rSet.DisableItem( SID_FONTWORK_SHAPE_TYPE ); 634 else 635 SetFontWorkShapeTypeState( pSdrView, rSet ); 636 } 637} | 627 rSet.DisableItem( SID_FONTWORK_SHAPE_TYPE ); 628 else 629 SetFontWorkShapeTypeState( pSdrView, rSet ); 630 } 631} |