diff options
Diffstat (limited to 'svx/source')
626 files changed, 7415 insertions, 8848 deletions
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 2265033742..4e5cd203d9 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -379,10 +380,10 @@ void SAL_CALL AccessibleControlShape::grabFocus(void) throw (RuntimeException) if ( !sDesc.getLength() ) { // no -> use the default aDG.Initialize (STR_ObjNameSingulUno); - aDG.AddProperty (::rtl::OUString::createFromAscii ("ControlBackground"), + aDG.AddProperty (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlBackground")), DescriptionGenerator::COLOR, ::rtl::OUString()); - aDG.AddProperty (::rtl::OUString::createFromAscii ("ControlBorder"), + aDG.AddProperty (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlBorder")), DescriptionGenerator::INTEGER, ::rtl::OUString()); } @@ -392,8 +393,8 @@ void SAL_CALL AccessibleControlShape::grabFocus(void) throw (RuntimeException) break; default: - aDG.Initialize (::rtl::OUString::createFromAscii ( - "Unknown accessible control shape")); + aDG.Initialize (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "Unknown accessible control shape")) ); Reference< XShapeDescriptor > xDescriptor (mxShape, UNO_QUERY); if (xDescriptor.is()) { @@ -918,3 +919,5 @@ void SAL_CALL AccessibleControlShape::elementReplaced( const ::com::sun::star::c { // not interested in } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx index 42c1b5a114..cb1e23c6a5 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -354,3 +355,5 @@ namespace accessibility } // end of namespace accessibility //------------------------------------------------------------------------ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.hxx b/svx/source/accessibility/AccessibleEmptyEditSource.hxx index f4492f313b..b2d6765847 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.hxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,4 @@ namespace accessibility #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx index e43ff30d03..dfb7e819c7 100644 --- a/svx/source/accessibility/AccessibleFrameSelector.cxx +++ b/svx/source/accessibility/AccessibleFrameSelector.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,31 +32,21 @@ #include <com/sun/star/awt/KeyEvent.hpp> #include <com/sun/star/awt/KeyModifier.hpp> #include <com/sun/star/awt/Key.hpp> -#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HDL_ #include <com/sun/star/accessibility/AccessibleStateType.hpp> -#endif -#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HDL_ #include <com/sun/star/accessibility/AccessibleRelationType.hpp> -#endif -#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEROLE_HDL_ #include <com/sun/star/accessibility/AccessibleRole.hpp> -#endif #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/awt/FocusChangeReason.hpp> #include <unotools/accessiblestatesethelper.hxx> #include <unotools/accessiblerelationsethelper.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <svx/frmsel.hxx> #include <svx/dialmgr.hxx> #include "editeng/unolingu.hxx" -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> -#endif -#ifndef SVX_FRMSEL_HRC #include "frmsel.hrc" -#endif #ifndef MNEMONIC_CHAR #define MNEMONIC_CHAR ((sal_Unicode)'~') @@ -130,7 +121,7 @@ Reference< XAccessibleContext > AccFrameSelector::getAccessibleContext( ) sal_Int32 AccFrameSelector::getAccessibleChildCount( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return (meBorder == FRAMEBORDER_NONE) ? mpFrameSel->GetEnabledBorderCount() : 0; } @@ -140,7 +131,7 @@ sal_Int32 AccFrameSelector::getAccessibleChildCount( ) throw (RuntimeException) Reference< XAccessible > AccFrameSelector::getAccessibleChild( sal_Int32 i ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Reference< XAccessible > xRet; if( meBorder == FRAMEBORDER_NONE ) @@ -155,7 +146,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleChild( sal_Int32 i ) Reference< XAccessible > AccFrameSelector::getAccessibleParent( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Reference< XAccessible > xRet; if(meBorder == FRAMEBORDER_NONE) @@ -170,7 +161,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleParent( ) sal_Int32 AccFrameSelector::getAccessibleIndexInParent( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); sal_Int32 nIdx = 0; @@ -202,7 +193,7 @@ sal_Int16 AccFrameSelector::getAccessibleRole( ) throw (RuntimeException) OUString AccFrameSelector::getAccessibleDescription( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return maDescriptions.GetString(meBorder); } @@ -212,7 +203,7 @@ OUString AccFrameSelector::getAccessibleDescription( ) OUString AccFrameSelector::getAccessibleName( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return maNames.GetString(meBorder); } @@ -222,7 +213,7 @@ OUString AccFrameSelector::getAccessibleName( ) Reference< XAccessibleRelationSet > AccFrameSelector::getAccessibleRelationSet( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); utl::AccessibleRelationSetHelper* pHelper; Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper; @@ -247,7 +238,7 @@ Reference< XAccessibleRelationSet > AccFrameSelector::getAccessibleRelationSet( Reference< XAccessibleStateSet > AccFrameSelector::getAccessibleStateSet( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper; Reference< XAccessibleStateSet > xRet = pStateSetHelper; @@ -320,7 +311,7 @@ void AccFrameSelector::removePropertyChangeListener( const Reference< XPropertyC sal_Bool AccFrameSelector::containsPoint( const AwtPoint& aPt ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); //aPt is relative to the frame selector return mpFrameSel->ContainsClickPoint( Point( aPt.X, aPt.Y ) ); @@ -332,7 +323,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleAtPoint( const AwtPoint& aPt ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); //aPt is relative to the frame selector return mpFrameSel->GetChildAccessible( Point( aPt.X, aPt.Y ) ); @@ -340,7 +331,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleAtPoint( AwtRectangle AccFrameSelector::getBounds( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Size aSz; Point aPos; @@ -367,7 +358,7 @@ AwtRectangle AccFrameSelector::getBounds( ) throw (RuntimeException) AwtPoint AccFrameSelector::getLocation( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Point aPos; switch(meBorder) @@ -387,7 +378,7 @@ AwtPoint AccFrameSelector::getLocation( ) throw (RuntimeException) AwtPoint AccFrameSelector::getLocationOnScreen( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Point aPos; switch(meBorder) @@ -408,7 +399,7 @@ AwtPoint AccFrameSelector::getLocationOnScreen( ) throw (RuntimeException) AwtSize AccFrameSelector::getSize( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); Size aSz; switch(meBorder) @@ -428,7 +419,7 @@ AwtSize AccFrameSelector::getSize( ) throw (RuntimeException) sal_Bool AccFrameSelector::isShowing( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return sal_True; } @@ -437,7 +428,7 @@ sal_Bool AccFrameSelector::isShowing( ) throw (RuntimeException) sal_Bool AccFrameSelector::isVisible( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return sal_True; } @@ -446,7 +437,7 @@ sal_Bool AccFrameSelector::isVisible( ) throw (RuntimeException) sal_Bool AccFrameSelector::isFocusTraversable( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return sal_True; } @@ -469,7 +460,7 @@ void AccFrameSelector::removeFocusListener( const Reference< XFocusListener >& x void AccFrameSelector::grabFocus( ) throw (RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); mpFrameSel->GrabFocus(); } @@ -479,7 +470,7 @@ void AccFrameSelector::grabFocus( ) throw (RuntimeException) Any AccFrameSelector::getAccessibleKeyBinding( ) throw (RuntimeException) { Any aRet; - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); utl::AccessibleRelationSetHelper* pHelper; Reference< XAccessibleRelationSet > xRet = pHelper = new utl::AccessibleRelationSetHelper; @@ -517,7 +508,7 @@ sal_Int32 AccFrameSelector::getForeground( ) throw (RuntimeException) { Any aRet; - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return mpFrameSel->GetControlForeground().GetColor(); } @@ -528,7 +519,7 @@ sal_Int32 AccFrameSelector::getBackground( ) throw (RuntimeException) { Any aRet; - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; IsValid(); return mpFrameSel->GetControlBackground().GetColor(); } @@ -537,7 +528,7 @@ sal_Int32 AccFrameSelector::getBackground( ) void AccFrameSelector::addEventListener( const Reference< XAccessibleEventListener >& xListener ) throw (RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( xListener.is() ) { @@ -553,7 +544,7 @@ void AccFrameSelector::addEventListener( const Reference< XAccessibleEventListen void AccFrameSelector::removeEventListener( const Reference< XAccessibleEventListener >& xListener ) throw (RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( xListener.is() && mnClientId != 0 && ::comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener ) == 0 ) @@ -572,7 +563,7 @@ void AccFrameSelector::removeEventListener( const Reference< XAccessibleEventLis OUString AccFrameSelector::getImplementationName( ) throw (RuntimeException) { - return OUString::createFromAscii("AccFrameSelector"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("AccFrameSelector")); } // ---------------------------------------------------------------------------- @@ -614,7 +605,7 @@ void AccFrameSelector::IsValid() throw (RuntimeException) void AccFrameSelector::NotifyFocusListeners(sal_Bool bGetFocus) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; AwtFocusEvent aEvent; aEvent.FocusFlags = 0; if(bGetFocus) @@ -738,3 +729,4 @@ void AccFrameSelector::Invalidate() } // namespace a11y } // namespace svx +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleGraphicShape.cxx b/svx/source/accessibility/AccessibleGraphicShape.cxx index c99c398e8e..a3cfcbf1d9 100644 --- a/svx/source/accessibility/AccessibleGraphicShape.cxx +++ b/svx/source/accessibility/AccessibleGraphicShape.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -210,3 +211,5 @@ uno::Sequence<uno::Type> SAL_CALL { return CreateAccessibleName (); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleOLEShape.cxx b/svx/source/accessibility/AccessibleOLEShape.cxx index 26445c420f..764d4d8bfa 100644 --- a/svx/source/accessibility/AccessibleOLEShape.cxx +++ b/svx/source/accessibility/AccessibleOLEShape.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -230,3 +231,4 @@ uno::Sequence<uno::Type> SAL_CALL return CreateAccessibleName (); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 22d7f99563..50b6a32c1a 100755..100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,12 +33,8 @@ #include <svx/AccessibleShapeInfo.hxx> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <rtl/uuid.h> -#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLE_ROLE_HPP_ #include <com/sun/star/accessibility/AccessibleRole.hpp> -#endif -#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLE_STATE_TYPE_HPP_ #include <com/sun/star/accessibility/AccessibleStateType.hpp> -#endif #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/drawing/XShapes.hpp> @@ -56,7 +53,6 @@ #include <svx/ShapeTypeHandler.hxx> #include <svx/SvxShapeTypes.hxx> -#ifndef _SVX_ACCESSIBILITY_HRC #include "accessibility.hrc" #endif #include "svx/svdstr.hrc" @@ -383,7 +379,7 @@ uno::Reference<XAccessible> SAL_CALL } else throw lang::IndexOutOfBoundsException ( - ::rtl::OUString::createFromAscii ("shape has no child with index ") + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("shape has no child with index ")) + rtl::OUString::valueOf(nIndex), static_cast<uno::XWeak*>(this)); @@ -486,7 +482,7 @@ uno::Reference<XAccessible > SAL_CALL awt::Rectangle SAL_CALL AccessibleShape::getBounds (void) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); ThrowIfDisposed (); @@ -518,7 +514,7 @@ awt::Rectangle SAL_CALL AccessibleShape::getBounds (void) aValue >>= aBoundingBox; bFoundBoundRect = true; } - catch (beans::UnknownPropertyException e) + catch (beans::UnknownPropertyException const&) { // Handled below (bFoundBoundRect stays false). } @@ -681,7 +677,7 @@ sal_Int32 SAL_CALL AccessibleShape::getForeground (void) if (aSet.is()) { uno::Any aColor; - aColor = aSet->getPropertyValue (OUString::createFromAscii ("LineColor")); + aColor = aSet->getPropertyValue (OUString(RTL_CONSTASCII_USTRINGPARAM("LineColor")) ); aColor >>= nColor; } } @@ -707,7 +703,7 @@ sal_Int32 SAL_CALL AccessibleShape::getBackground (void) if (aSet.is()) { uno::Any aColor; - aColor = aSet->getPropertyValue (OUString::createFromAscii ("FillColor")); + aColor = aSet->getPropertyValue (OUString(RTL_CONSTASCII_USTRINGPARAM("FillColor")) ); aColor >>= nColor; } } @@ -883,7 +879,7 @@ void SAL_CALL AccessibleShape::disposing (const lang::EventObject& aEvent) throw (uno::RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); try @@ -896,7 +892,7 @@ void SAL_CALL } } - catch (uno::RuntimeException e) + catch (uno::RuntimeException const&) { OSL_TRACE ("caught exception while disposing"); } @@ -1039,7 +1035,7 @@ void AccessibleShape::ViewForwarderChanged (ChangeType aChangeType, uno::Reference<beans::XPropertySet> xSet (mxShape, uno::UNO_QUERY); if (xSet.is()) { - uno::Any aZOrder (xSet->getPropertyValue (::rtl::OUString::createFromAscii ("ZOrder"))); + uno::Any aZOrder (xSet->getPropertyValue (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZOrder")) )); aZOrder >>= nIndex; // Add one to be not zero based. @@ -1109,10 +1105,10 @@ void AccessibleShape::ViewForwarderChanged (ChangeType aChangeType, break; case DRAWING_CONTROL: - aDG.AddProperty (OUString::createFromAscii ("ControlBackground"), + aDG.AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("ControlBackground")), DescriptionGenerator::COLOR, OUString()); - aDG.AddProperty (OUString::createFromAscii ("ControlBorder"), + aDG.AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("ControlBorder")), DescriptionGenerator::INTEGER, OUString()); break; @@ -1148,7 +1144,7 @@ uno::Reference< drawing::XShape > AccessibleShape::GetXShape() // protected void AccessibleShape::disposing (void) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); // Make sure to send an event that this object looses the focus in the @@ -1242,3 +1238,5 @@ void AccessibleShape::UpdateNameAndDescription (void) } // end of namespace accessibility + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleShapeInfo.cxx b/svx/source/accessibility/AccessibleShapeInfo.cxx index dee1822f0d..756a02f145 100644 --- a/svx/source/accessibility/AccessibleShapeInfo.cxx +++ b/svx/source/accessibility/AccessibleShapeInfo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,5 @@ AccessibleShapeInfo::~AccessibleShapeInfo (void) } } // end of namespace accessibility. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx index e2b8bf82fa..879f7ed637 100644 --- a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx +++ b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -221,3 +222,5 @@ const IAccessibleViewForwarder* AccessibleShapeTreeInfo::GetViewForwarder (void) } // end of namespace accessibility + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleTextEventQueue.cxx b/svx/source/accessibility/AccessibleTextEventQueue.cxx index 128bf304ed..894c8d004a 100644 --- a/svx/source/accessibility/AccessibleTextEventQueue.cxx +++ b/svx/source/accessibility/AccessibleTextEventQueue.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -109,3 +110,5 @@ namespace accessibility } // end of namespace accessibility //------------------------------------------------------------------------ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleTextEventQueue.hxx b/svx/source/accessibility/AccessibleTextEventQueue.hxx index daa3bbb564..3fab23b063 100644 --- a/svx/source/accessibility/AccessibleTextEventQueue.hxx +++ b/svx/source/accessibility/AccessibleTextEventQueue.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -101,3 +102,5 @@ namespace accessibility } // end of namespace accessibility #endif /* _SVX_TEXT_CHANGED_QUEUE_HXX */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index b9d82c6eac..1f50794fff 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,7 +39,7 @@ #include <memory> #include <algorithm> #include <deque> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Reference.hxx> #include <cppuhelper/weakref.hxx> @@ -177,7 +178,7 @@ namespace accessibility // checks all children for visibility, throws away invisible ones void UpdateVisibleChildren( bool bBroadcastEvents=true ); - // check all children for changes in positíon and size + // check all children for changes in position and size void UpdateBoundRect(); // calls SetSelection on the forwarder and updates maLastSelection @@ -293,7 +294,7 @@ namespace accessibility { DBG_DTOR( AccessibleTextHelper_Impl, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; try { @@ -640,18 +641,15 @@ namespace accessibility makeSortedPair(::std::min( maLastSelection.nStartPara, nMaxValidParaIndex ), ::std::min( maLastSelection.nEndPara, nMaxValidParaIndex ) ) ); - // --> OD 2005-12-15 #i27299# - // event TEXT_SELECTION_CHANGED has to be submitted. + // event TEXT_SELECTION_CHANGED has to be submitted. (#i27299#) const sal_Int16 nTextSelChgEventId = AccessibleEventId::TEXT_SELECTION_CHANGED; - // <-- // #107037# notify selection change if( maLastSelection.nStartPara == EE_PARA_NOT_FOUND ) { // last selection is undefined - // --> OD 2005-12-15 #i27299# - use method <ESelection::HasRange()> + // use method <ESelection::HasRange()> (#i27299#) if ( aSelection.HasRange() ) - // <-- { // selection was undefined, now is on maParaManager.FireEvent( sortedSelection.first, @@ -662,36 +660,31 @@ namespace accessibility else { // last selection is valid - // --> OD 2005-12-15 #i27299# - use method <ESelection::HasRange()> + // use method <ESelection::HasRange()> (#i27299#) if ( maLastSelection.HasRange() && !aSelection.HasRange() ) - // <-- { // selection was on, now is empty maParaManager.FireEvent( sortedLastSelection.first, sortedLastSelection.second+1, nTextSelChgEventId ); } - // --> OD 2005-12-15 #i27299# - use method <ESelection::HasRange()> + // use method <ESelection::HasRange()> (#i27299#) else if( !maLastSelection.HasRange() && aSelection.HasRange() ) - // <-- { // selection was empty, now is on maParaManager.FireEvent( sortedSelection.first, sortedSelection.second+1, nTextSelChgEventId ); } - // --> OD 2005-12-15 #i27299# - // - no event TEXT_SELECTION_CHANGED event, if new and - // last selection are empty. + // no event TEXT_SELECTION_CHANGED event, if new and + // last selection are empty. (#i27299#) else if ( maLastSelection.HasRange() && aSelection.HasRange() ) - // <-- { - // --> OD 2005-12-16 #i27299# - // - send event TEXT_SELECTION_CHANGED for difference - // between last and new selection. + // send event TEXT_SELECTION_CHANGED for difference + // between last and new selection. (#i27299#) // // selection was on, now is different: take union of ranges // maParaManager.FireEvent( ::std::min(sortedSelection.first, // sortedLastSelection.second), @@ -1461,10 +1454,9 @@ namespace accessibility if( pEditSourceHint ) { maEventQueue.Append( *pEditSourceHint ); - // --> OD 2005-12-19 #i27299# + // EditEngine should emit TEXT_SELECTION_CHANGED events (#i27299#) if( maEventOpenFrames == 0 ) ProcessQueue(); - // <-- } else if( pTextHint ) { @@ -1501,17 +1493,14 @@ namespace accessibility case TEXT_HINT_BLOCKNOTIFICATION_START: case TEXT_HINT_INPUT_START: ++maEventOpenFrames; - // --> OD 2005-12-19 #i27299# - no FALLTROUGH - // reason: event will not be processes, thus appending - // the event isn't necessary. + // no FALLTHROUGH reason: event will not be processed, + // thus appending the event isn't necessary. (#i27299#) break; - // <-- default: maEventQueue.Append( *pTextHint ); - // --> OD 2005-12-19 #i27299# + // EditEngine should emit TEXT_SELECTION_CHANGED events (#i27299#) if( maEventOpenFrames == 0 ) ProcessQueue(); - // <-- break; } } @@ -1742,7 +1731,7 @@ namespace accessibility AccessibleTextHelper::AccessibleTextHelper( ::std::auto_ptr< SvxEditSource > pEditSource ) : mpImpl( new AccessibleTextHelper_Impl() ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SetEditSource( pEditSource ); } @@ -1963,7 +1952,7 @@ namespace accessibility // As Dispose calls ShutdownEditSource, which in turn // deregisters as listener on the edit source, have to lock // here - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #ifdef DBG_UTIL mpImpl->CheckInvariants(); @@ -1978,7 +1967,7 @@ namespace accessibility sal_Bool AccessibleTextHelper::IsSelected() const { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #ifdef DBG_UTIL mpImpl->CheckInvariants(); @@ -1996,7 +1985,7 @@ namespace accessibility // XAccessibleContext sal_Int32 AccessibleTextHelper::GetChildCount() SAL_THROW((uno::RuntimeException)) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #ifdef DBG_UTIL mpImpl->CheckInvariants(); @@ -2013,7 +2002,7 @@ namespace accessibility uno::Reference< XAccessible > AccessibleTextHelper::GetChild( sal_Int32 i ) SAL_THROW((lang::IndexOutOfBoundsException, uno::RuntimeException)) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #ifdef DBG_UTIL mpImpl->CheckInvariants(); @@ -2057,7 +2046,7 @@ namespace accessibility // XAccessibleComponent uno::Reference< XAccessible > AccessibleTextHelper::GetAt( const awt::Point& aPoint ) SAL_THROW((uno::RuntimeException)) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; #ifdef DBG_UTIL mpImpl->CheckInvariants(); @@ -2075,3 +2064,5 @@ namespace accessibility } // end of namespace accessibility //------------------------------------------------------------------------ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/ChildrenManager.cxx b/svx/source/accessibility/ChildrenManager.cxx index d7ce3b2a1e..20328e658e 100644 --- a/svx/source/accessibility/ChildrenManager.cxx +++ b/svx/source/accessibility/ChildrenManager.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include <svx/ChildrenManager.hxx> -#ifndef _SVX_ACCESSIBILITY_CHILDREN_MANAGER_IMPL_HXX #include "ChildrenManagerImpl.hxx" -#endif #include <svx/AccessibleShape.hxx> using namespace ::com::sun::star; @@ -54,8 +53,8 @@ ChildrenManager::ChildrenManager ( mpImpl->Init (); else throw uno::RuntimeException( - ::rtl::OUString::createFromAscii( - "ChildrenManager::ChildrenManager can't create implementation object"), NULL); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "ChildrenManager::ChildrenManager can't create implementation object")), NULL); } @@ -178,3 +177,4 @@ void ChildrenManager::ViewForwarderChanged (ChangeType aChangeType, } // end of namespace accessibility +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index 6ab4ac7ed7..a6f86b0f45 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include "ChildrenManagerImpl.hxx" #include <svx/ShapeTypeHandler.hxx> #include <svx/AccessibleShapeInfo.hxx> -#ifndef _COM_SUN_STAR_ACCESSIBLE_ACCESSIBLESTATETYPE_HPP_ #include <com/sun/star/accessibility/AccessibleStateType.hpp> -#endif #include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/container/XChild.hpp> #include <comphelper/uno3.hxx> @@ -134,8 +133,8 @@ uno::Reference<XAccessible> // Check wether the given index is valid. if (nIndex < 0 || (unsigned long)nIndex >= maVisibleChildren.size()) throw lang::IndexOutOfBoundsException ( - ::rtl::OUString::createFromAscii( - "no accessible child with index ") + nIndex, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "no accessible child with index ")) + nIndex, mxParent); return GetChild (maVisibleChildren[nIndex],nIndex); @@ -1096,3 +1095,4 @@ void ChildDescriptor::disposeAccessibleObject (AccessibleContextBase& rParent) } // end of namespace accessibility +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/ChildrenManagerImpl.hxx b/svx/source/accessibility/ChildrenManagerImpl.hxx index 06c49670a6..c863721f21 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.hxx +++ b/svx/source/accessibility/ChildrenManagerImpl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,7 @@ #include <svx/AccessibleShapeTreeInfo.hxx> #include <editeng/AccessibleContextBase.hxx> #include <cppuhelper/compbase2.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vector> #include <memory> #include <com/sun/star/drawing/XShape.hpp> @@ -575,3 +576,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/DGColorNameLookUp.cxx b/svx/source/accessibility/DGColorNameLookUp.cxx index 1715188534..7dc583f834 100644 --- a/svx/source/accessibility/DGColorNameLookUp.cxx +++ b/svx/source/accessibility/DGColorNameLookUp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <comphelper/processfactory.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> @@ -51,7 +52,7 @@ DGColorNameLookUp& DGColorNameLookUp::Instance (void) // the shape type handler is instantiated. if (mpInstance == NULL) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; if (mpInstance == NULL) { // Create the single instance of the color name look up. @@ -98,7 +99,7 @@ DGColorNameLookUp::DGColorNameLookUp (void) // Create color table in which to look up the given color. uno::Reference<container::XNameContainer> xColorTable ( ::comphelper::getProcessServiceFactory()->createInstance( - OUString::createFromAscii("com.sun.star.drawing.ColorTable")), + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ColorTable")) ), uno::UNO_QUERY); // Get list of color names in order to iterate over the color table. @@ -107,13 +108,13 @@ DGColorNameLookUp::DGColorNameLookUp (void) { // Look the solar mutex here as workarround for missing lock in // called function. - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; aNames = xNA->getElementNames(); } } - catch (uno::RuntimeException e) + catch (uno::RuntimeException const&) { - // When an excpetion occured then whe have an empty name sequence + // When an exception occurred then whe have an empty name sequence // and the loop below is not entered. } @@ -129,9 +130,9 @@ DGColorNameLookUp::DGColorNameLookUp (void) aColor >>= nColor; maColorValueToNameMap[nColor] = aNames[i]; } - catch (uno::RuntimeException e) + catch (uno::RuntimeException const&) { - // Ignore the exception: the color who lead to the excpetion + // Ignore the exception: the color who lead to the exception // is not included into the map. } } @@ -146,3 +147,5 @@ DGColorNameLookUp::~DGColorNameLookUp (void) } } // end of namespace accessibility + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/DescriptionGenerator.cxx b/svx/source/accessibility/DescriptionGenerator.cxx index e72d8a830c..f93fd53cba 100644 --- a/svx/source/accessibility/DescriptionGenerator.cxx +++ b/svx/source/accessibility/DescriptionGenerator.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,13 +44,12 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/style/XStyle.hpp> #include <comphelper/processfactory.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <com/sun/star/uno/Exception.hpp> // Includes for string resources. -#ifndef _SVX_ACCESSIBILITY_HRC #include "accessibility.hrc" #endif #include "svx/svdstr.hrc" @@ -93,7 +93,7 @@ void DescriptionGenerator::Initialize (sal_Int32 nResourceId) // Get the string from the resource for the specified id. OUString sPrefix; { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; sPrefix = OUString (SVX_RESSTR (nResourceId)); } @@ -110,7 +110,7 @@ void DescriptionGenerator::Initialize (::rtl::OUString sPrefix) if (mxSet.is()) { { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; msDescription.append (sal_Unicode (' ')); msDescription.append (OUString (SVX_RESSTR(RID_SVXSTR_A11Y_WITH))); @@ -124,19 +124,19 @@ void DescriptionGenerator::Initialize (::rtl::OUString sPrefix) { if (mxSet.is()) { - uno::Any aValue = mxSet->getPropertyValue (OUString::createFromAscii ("Style")); + uno::Any aValue = mxSet->getPropertyValue (OUString(RTL_CONSTASCII_USTRINGPARAM("Style")) ); uno::Reference<container::XNamed> xStyle (aValue, uno::UNO_QUERY); if (xStyle.is()) msDescription.append (xStyle->getName()); } else msDescription.append ( - OUString::createFromAscii("<no style>")); + OUString(RTL_CONSTASCII_USTRINGPARAM("<no style>")) ); } catch (::com::sun::star::beans::UnknownPropertyException) { msDescription.append ( - OUString::createFromAscii("<unknown>")); + OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) ); } } } @@ -161,7 +161,7 @@ void DescriptionGenerator::AddProperty ( { OUString sLocalizedName; { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; sLocalizedName = SVX_RESSTR (nLocalizedNameId); } AddProperty (sPropertyName, aType, sLocalizedName, nWhichId); @@ -183,7 +183,7 @@ void DescriptionGenerator::AddProperty (const OUString& sPropertyName, msDescription.append (sal_Unicode (',')); else { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; msDescription.append (sal_Unicode (' ')); msDescription.append (OUString (SVX_RESSTR(RID_SVXSTR_A11Y_AND))); @@ -223,14 +223,14 @@ void DescriptionGenerator::AppendString (const ::rtl::OUString& sString) void DescriptionGenerator::AddLineProperties (void) { - AddProperty (OUString::createFromAscii ("LineColor"), + AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("LineColor")), DescriptionGenerator::COLOR, SIP_XA_LINECOLOR); - AddProperty (OUString::createFromAscii ("LineDashName"), + AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("LineDashName")), DescriptionGenerator::STRING, SIP_XA_LINEDASH, XATTR_LINEDASH); - AddProperty (OUString::createFromAscii ("LineWidth"), + AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("LineWidth")), DescriptionGenerator::INTEGER, SIP_XA_LINEWIDTH); } @@ -243,7 +243,7 @@ void DescriptionGenerator::AddLineProperties (void) */ void DescriptionGenerator::AddFillProperties (void) { - AddProperty (OUString::createFromAscii ("FillStyle"), + AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("FillStyle")), DescriptionGenerator::FILL_STYLE, SIP_XA_FILLSTYLE); } @@ -253,7 +253,7 @@ void DescriptionGenerator::AddFillProperties (void) void DescriptionGenerator::Add3DProperties (void) { - AddProperty (OUString::createFromAscii ("D3DMaterialColor"), + AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("D3DMaterialColor")), DescriptionGenerator::COLOR, RID_SVXSTR_A11Y_3D_MATERIAL_COLOR); AddLineProperties (); @@ -265,7 +265,7 @@ void DescriptionGenerator::Add3DProperties (void) void DescriptionGenerator::AddTextProperties (void) { - AddProperty (OUString::createFromAscii ("CharColor"), + AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("CharColor")), DescriptionGenerator::COLOR); AddFillProperties (); } @@ -297,7 +297,7 @@ void DescriptionGenerator::AddColor (const OUString& sPropertyName, catch (::com::sun::star::beans::UnknownPropertyException) { msDescription.append ( - OUString::createFromAscii("<unknown>")); + OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) ); } } @@ -333,7 +333,7 @@ void DescriptionGenerator::AddInteger (const OUString& sPropertyName, catch (::com::sun::star::beans::UnknownPropertyException) { msDescription.append ( - OUString::createFromAscii("<unknown>")); + OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) ); } } @@ -356,7 +356,7 @@ void DescriptionGenerator::AddString (const OUString& sPropertyName, if (nWhichId >= 0) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; String sLocalizedValue; SvxUnogetInternalNameForItem (sal::static_int_cast<sal_Int16>(nWhichId), sValue, sLocalizedValue); @@ -369,7 +369,7 @@ void DescriptionGenerator::AddString (const OUString& sPropertyName, catch (::com::sun::star::beans::UnknownPropertyException) { msDescription.append ( - OUString::createFromAscii("<unknown>")); + OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) ); } } @@ -393,7 +393,7 @@ void DescriptionGenerator::AddFillStyle (const OUString& sPropertyName, // Get the fill style name from the resource. OUString sFillStyleName; { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; switch (aFillStyle) { case drawing::FillStyle_NONE: @@ -423,27 +423,27 @@ void DescriptionGenerator::AddFillStyle (const OUString& sPropertyName, case drawing::FillStyle_NONE: break; case drawing::FillStyle_SOLID: - AddProperty (OUString::createFromAscii ("FillColor"), + AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("FillColor")), COLOR, SIP_XA_FILLCOLOR); break; case drawing::FillStyle_GRADIENT: - AddProperty (OUString::createFromAscii ("FillGradientName"), + AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("FillGradientName")), STRING, SIP_XA_FILLGRADIENT, XATTR_FILLGRADIENT); break; case drawing::FillStyle_HATCH: - AddProperty (OUString::createFromAscii ("FillColor"), + AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("FillColor")), COLOR, SIP_XA_FILLCOLOR); - AddProperty (OUString::createFromAscii ("FillHatchName"), + AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("FillHatchName")), STRING, SIP_XA_FILLHATCH, XATTR_FILLHATCH); break; case drawing::FillStyle_BITMAP: - AddProperty (OUString::createFromAscii ("FillBitmapName"), + AddProperty (OUString(RTL_CONSTASCII_USTRINGPARAM("FillBitmapName")), STRING, SIP_XA_FILLBITMAP, XATTR_FILLBITMAP); @@ -456,7 +456,7 @@ void DescriptionGenerator::AddFillStyle (const OUString& sPropertyName, catch (::com::sun::star::beans::UnknownPropertyException) { msDescription.append ( - OUString::createFromAscii("<unknown>")); + OUString(RTL_CONSTASCII_USTRINGPARAM("<unknown>")) ); } } @@ -482,3 +482,5 @@ void DescriptionGenerator::AddPropertyNames (void) } // end of namespace accessibility + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index b9ae169293..21542a05eb 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,12 +53,8 @@ #include <svx/AccessibleShapeInfo.hxx> #include "GraphCtlAccessibleContext.hxx" #include <svx/graphctl.hxx> -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> -#endif -#ifndef _SVX_ACCESSIBILITY_HRC #include "accessibility.hrc" -#endif #include <svx/svdpage.hxx> #include <svx/unomod.hxx> #include <svx/dialmgr.hxx> @@ -66,7 +63,6 @@ //===== namespaces =========================================================== -using namespace ::vos; using namespace ::cppu; using namespace ::osl; using ::rtl::OUString; @@ -77,6 +73,8 @@ using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::accessibility; +using rtl::OUString; + //===== internal ============================================================ /** initialize this component and set default values */ @@ -119,7 +117,7 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext( } else { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; msName = SVX_RESSTR( RID_SVXSTR_GRAPHCTRL_ACC_NAME ); } @@ -129,7 +127,7 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext( } else { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; msDescription = SVX_RESSTR( RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION ); } @@ -289,7 +287,7 @@ awt::Size SAL_CALL SvxGraphCtrlAccessibleContext::getSize() throw( RuntimeExcept sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleChildCount( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( NULL == mpPage ) throw DisposedException(); @@ -303,7 +301,7 @@ sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleChildCount( void SdrObject* SvxGraphCtrlAccessibleContext::getSdrObject( sal_Int32 nIndex ) throw( RuntimeException, lang::IndexOutOfBoundsException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( NULL == mpPage ) throw DisposedException(); @@ -343,7 +341,7 @@ void SvxGraphCtrlAccessibleContext::FireEvent (const AccessibleEventObject& aEve Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleChild( sal_Int32 nIndex ) throw( RuntimeException, lang::IndexOutOfBoundsException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; return getAccessible( getSdrObject( nIndex ) ); } @@ -359,7 +357,7 @@ Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessiblePa sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleIndexInParent( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; // Use a simple but slow solution for now. Optimize later. // Iterate over all the parent's children and search for this object. @@ -398,7 +396,7 @@ sal_Int16 SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleRole( void ) thro OUString SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleDescription( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; return msDescription; } @@ -406,7 +404,7 @@ OUString SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleDescription( void OUString SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleName( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; return msName; } @@ -424,7 +422,7 @@ Reference< XAccessibleRelationSet > SAL_CALL SvxGraphCtrlAccessibleContext::getA Reference< XAccessibleStateSet > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleStateSet( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; utl::AccessibleStateSetHelper* pStateSetHelper = new utl::AccessibleStateSetHelper; @@ -451,7 +449,7 @@ Reference< XAccessibleStateSet > SAL_CALL SvxGraphCtrlAccessibleContext::getAcce lang::Locale SAL_CALL SvxGraphCtrlAccessibleContext::getLocale( void ) throw( IllegalAccessibleComponentStateException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mxParent.is() ) { @@ -471,7 +469,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::addEventListener( const Reference< { if (xListener.is()) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if (!mnClientId) mnClientId = comphelper::AccessibleEventNotifier::registerClient( ); comphelper::AccessibleEventNotifier::addEventListener( mnClientId, xListener ); @@ -485,7 +483,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::removeEventListener( const Referenc { if (xListener.is()) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener ); if ( !nListenerCount ) @@ -505,7 +503,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::removeEventListener( const Referenc void SAL_CALL SvxGraphCtrlAccessibleContext::addFocusListener( const Reference< awt::XFocusListener >& xListener ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( xListener.is() ) { @@ -520,7 +518,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::addFocusListener( const Reference< void SAL_CALL SvxGraphCtrlAccessibleContext::removeFocusListener( const Reference< awt::XFocusListener >& xListener ) throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( xListener.is() ) { @@ -534,7 +532,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::removeFocusListener( const Referenc void SAL_CALL SvxGraphCtrlAccessibleContext::grabFocus() throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( NULL == mpControl ) throw DisposedException(); @@ -584,7 +582,7 @@ OUString SAL_CALL SvxGraphCtrlAccessibleContext::getImplementationName( void ) t sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::supportsService( const OUString& sServiceName ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; // Iterate over all supported service names and return true if on of them // matches the given name. Sequence< OUString > aSupportedServices( getSupportedServiceNames() ); @@ -616,7 +614,7 @@ Sequence< OUString > SAL_CALL SvxGraphCtrlAccessibleContext::getSupportedService Sequence<sal_Int8> SAL_CALL SvxGraphCtrlAccessibleContext::getImplementationId( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; return getUniqueId(); } @@ -631,7 +629,7 @@ OUString SvxGraphCtrlAccessibleContext::getServiceName( void ) throw( RuntimeExc void SAL_CALL SvxGraphCtrlAccessibleContext::selectAccessibleChild( sal_Int32 nIndex ) throw( lang::IndexOutOfBoundsException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( NULL == mpView ) throw DisposedException(); @@ -646,7 +644,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::selectAccessibleChild( sal_Int32 nI sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::isAccessibleChildSelected( sal_Int32 nIndex ) throw( lang::IndexOutOfBoundsException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( NULL == mpView ) throw DisposedException(); @@ -658,7 +656,7 @@ sal_Bool SAL_CALL SvxGraphCtrlAccessibleContext::isAccessibleChildSelected( sal_ void SAL_CALL SvxGraphCtrlAccessibleContext::clearAccessibleSelection() throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( NULL == mpView ) throw DisposedException(); @@ -670,7 +668,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::clearAccessibleSelection() throw( R void SAL_CALL SvxGraphCtrlAccessibleContext::selectAllAccessibleChildren() throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( NULL == mpView ) throw DisposedException(); @@ -682,7 +680,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::selectAllAccessibleChildren() throw sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getSelectedAccessibleChildCount() throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( NULL == mpView ) throw DisposedException(); @@ -696,7 +694,7 @@ sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getSelectedAccessibleChildCoun Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getSelectedAccessibleChild( sal_Int32 nIndex ) throw( lang::IndexOutOfBoundsException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; checkChildIndexOnSelection( nIndex ); @@ -714,7 +712,7 @@ Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getSelectedAcce void SAL_CALL SvxGraphCtrlAccessibleContext::deselectAccessibleChild( sal_Int32 nIndex ) throw( lang::IndexOutOfBoundsException, RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; checkChildIndexOnSelection( nIndex ); @@ -761,7 +759,7 @@ void SvxGraphCtrlAccessibleContext::checkChildIndexOnSelection( long nIndex ) th void SvxGraphCtrlAccessibleContext::setName( const OUString& rName ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; msName = rName; } @@ -770,7 +768,7 @@ void SvxGraphCtrlAccessibleContext::setName( const OUString& rName ) void SvxGraphCtrlAccessibleContext::setDescription( const OUString& rDescr ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; msDescription = rDescr; } @@ -785,7 +783,7 @@ void SvxGraphCtrlAccessibleContext::setModelAndView ( SdrModel* pModel, SdrView* pView) { - OGuard aGuard (Application::GetSolarMutex()); + ::SolarMutexGuard aGuard; mpModel = pModel; if (mpModel != NULL) @@ -812,7 +810,7 @@ void SvxGraphCtrlAccessibleContext::setModelAndView ( void SAL_CALL SvxGraphCtrlAccessibleContext::disposing() { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mbDisposed ) return; @@ -826,7 +824,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::disposing() { ShapesMapType::iterator I; - for (I=mxShapes.begin(); I!=mxShapes.end(); I++) + for (I=mxShapes.begin(); I!=mxShapes.end(); ++I) { XAccessible* pAcc = (*I).second; Reference< XComponent > xComp( pAcc, UNO_QUERY ); @@ -851,7 +849,7 @@ void SAL_CALL SvxGraphCtrlAccessibleContext::disposing() Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBoxOnScreen( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( NULL == mpControl ) throw DisposedException(); @@ -870,7 +868,7 @@ Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBoxOnScreen( void ) throw( R */ Rectangle SvxGraphCtrlAccessibleContext::GetBoundingBox( void ) throw( RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; Rectangle aBounds ( 0, 0, 0, 0 ); @@ -899,7 +897,7 @@ Sequence< sal_Int8 > SvxGraphCtrlAccessibleContext::getUniqueId( void ) static OImplementationId* pId = 0; if( !pId ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( !pId) { static OImplementationId aId; @@ -1025,3 +1023,5 @@ Size SvxGraphCtrlAccessibleContext::PixelToLogic (const Size& rSize) const else return rSize; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx index c2403c3499..7d67430102 100755..100644 --- a/svx/source/accessibility/ShapeTypeHandler.cxx +++ b/svx/source/accessibility/ShapeTypeHandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,7 @@ #include <svx/SvxShapeTypes.hxx> #include <svx/AccessibleShapeInfo.hxx> #include <com/sun/star/drawing/XShapeDescriptor.hpp> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <svx/dialmgr.hxx> #include "svx/svdstr.hrc" @@ -67,7 +68,7 @@ ShapeTypeHandler& ShapeTypeHandler::Instance (void) // the shape type handler is instantiated. if (instance == NULL) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; if (instance == NULL) { // Create the single instance of the shape type handler. @@ -156,7 +157,7 @@ ShapeTypeHandler::ShapeTypeHandler (void) // Resize the list, if necessary, so that the new type can be inserted. maShapeTypeDescriptorList[0].mnShapeTypeId = UNKNOWN_SHAPE_TYPE; maShapeTypeDescriptorList[0].msServiceName = - OUString::createFromAscii ("UNKNOWN_SHAPE_TYPE"); + OUString(RTL_CONSTASCII_USTRINGPARAM("UNKNOWN_SHAPE_TYPE")); maShapeTypeDescriptorList[0].maCreateFunction = CreateEmptyShapeReference; maServiceNameToSlotId[maShapeTypeDescriptorList[0].msServiceName] = 0; } @@ -180,7 +181,7 @@ ShapeTypeHandler::~ShapeTypeHandler (void) bool ShapeTypeHandler::AddShapeTypeList (int nDescriptorCount, ShapeTypeDescriptor aDescriptorList[]) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; // Determine first id of new type descriptor(s). int nFirstId = maShapeTypeDescriptorList.size(); @@ -328,7 +329,7 @@ long ShapeTypeHandler::GetSlotId (const uno::Reference<drawing::XShape>& rxShape if (nResourceId != -1) { - ::vos::OGuard aGuard (::Application::GetSolarMutex()); + SolarMutexGuard aGuard; sName = OUString (SVX_RESSTR((unsigned short)nResourceId)); } @@ -336,3 +337,5 @@ long ShapeTypeHandler::GetSlotId (const uno::Reference<drawing::XShape>& rxShape } } // end of namespace accessibility + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/SvxShapeTypes.cxx b/svx/source/accessibility/SvxShapeTypes.cxx index 18e080c242..cacfde900b 100644 --- a/svx/source/accessibility/SvxShapeTypes.cxx +++ b/svx/source/accessibility/SvxShapeTypes.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,14 +67,12 @@ AccessibleShape* CreateSvxAccessibleShape ( case DRAWING_POLY_LINE_PATH: case DRAWING_RECTANGLE: case DRAWING_TEXT: - // --> OD 2004-11-29 #i37790# - default accessiblility shape for - // com::sun::star::drawing::CustomShape + // Default accessiblility shape for + // com::sun::star::drawing::CustomShape (#i37790#) case DRAWING_CUSTOM: - // <-- - // --> OD 2008-05-19 #i85429# - default accessiblility shape for - // com::sun::star::drawing::MediaShape + // Default accessiblility shape for + // com::sun::star::drawing::MediaShape (#i85429#) case DRAWING_MEDIA: - // <-- return new AccessibleShape (rShapeInfo, rShapeTreeInfo); case DRAWING_CONTROL: @@ -100,91 +99,91 @@ AccessibleShape* CreateSvxAccessibleShape ( ShapeTypeDescriptor aSvxShapeTypeList[] = { ShapeTypeDescriptor (DRAWING_TEXT, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.TextShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TextShape")), CreateSvxAccessibleShape), ShapeTypeDescriptor (DRAWING_RECTANGLE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.RectangleShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.RectangleShape")), CreateSvxAccessibleShape), ShapeTypeDescriptor ( DRAWING_ELLIPSE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.EllipseShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.EllipseShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_CONTROL, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.ControlShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_CONNECTOR, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.ConnectorShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ConnectorShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_MEASURE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.MeasureShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.MeasureShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_LINE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.LineShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.LineShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_POLY_POLYGON, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PolyPolygonShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PolyPolygonShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_POLY_LINE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PolyLineShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PolyLineShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_OPEN_BEZIER, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.OpenBezierShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OpenBezierShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_CLOSED_BEZIER, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.ClosedBezierShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ClosedBezierShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_OPEN_FREEHAND, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.OpenFreeHandShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OpenFreeHandShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_CLOSED_FREEHAND, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.ClosedFreeHandShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ClosedFreeHandShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_POLY_POLYGON_PATH, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PolyPolygonPathShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PolyPolygonPathShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_POLY_LINE_PATH, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PolyLinePathShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PolyLinePathShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_GRAPHIC_OBJECT, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.GraphicObjectShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicObjectShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_GROUP, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.GroupShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GroupShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_OLE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.OLE2Shape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_PAGE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PageShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PageShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_CAPTION, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.CaptionShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_FRAME, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.FrameShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.FrameShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_PLUGIN, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.PluginShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.PluginShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_APPLET, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.AppletShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.AppletShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_3D_SCENE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.Shape3DSceneObject"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Shape3DSceneObject")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_3D_CUBE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.Shape3DCubeObject"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Shape3DCubeObject")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_3D_SPHERE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.Shape3DSphereObject"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Shape3DSphereObject")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_3D_LATHE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.Shape3DLatheObject"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Shape3DLatheObject")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_3D_EXTRUDE, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.Shape3DExtrudeObject"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_CUSTOM, - ::rtl::OUString::createFromAscii ("com.sun.star.drawing.CustomShape"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape")), CreateSvxAccessibleShape ), ShapeTypeDescriptor ( DRAWING_TABLE, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.TableShape" ) ), @@ -198,10 +197,11 @@ ShapeTypeDescriptor aSvxShapeTypeList[] = { void RegisterDrawShapeTypes (void) { - // --> OD 2004-11-26 #i37790# + // Crash while inserting callout with activated accesibility (#i37790#) ShapeTypeHandler::Instance().AddShapeTypeList ( DRAWING_END, aSvxShapeTypeList); - // <-- } } // end of namespace accessibility + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index 1a4d71c75c..f758115158 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -889,3 +890,4 @@ sal_Int32 SAL_CALL SvxShowCharSetAcc::getBackground( ) throw (RuntimeException) // ----------------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx index f900fd2d36..2b02a99cf4 100644 --- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx +++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -166,7 +167,7 @@ SvxRectCtlAccessibleContext::SvxRectCtlAccessibleContext( msName = *pName; else { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; msName = SVX_RESSTR( mbAngleMode? RID_SVXSTR_RECTCTL_ACC_ANGL_NAME : RID_SVXSTR_RECTCTL_ACC_CORN_NAME ); } @@ -174,7 +175,7 @@ SvxRectCtlAccessibleContext::SvxRectCtlAccessibleContext( msDescription = *pDesc; else { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; msDescription = SVX_RESSTR( mbAngleMode? RID_SVXSTR_RECTCTL_ACC_ANGL_DESCR : RID_SVXSTR_RECTCTL_ACC_CORN_DESCR ); } @@ -291,7 +292,7 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleChil Reference< XAccessible > xChild = mpChilds[ nIndex ]; if( !xChild.is() ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); @@ -485,7 +486,7 @@ void SAL_CALL SvxRectCtlAccessibleContext::removeFocusListener( const Reference< void SAL_CALL SvxRectCtlAccessibleContext::grabFocus() throw( RuntimeException ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); @@ -502,7 +503,7 @@ Any SAL_CALL SvxRectCtlAccessibleContext::getAccessibleKeyBinding() throw( Runti sal_Int32 SvxRectCtlAccessibleContext::getForeground( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); @@ -511,7 +512,7 @@ sal_Int32 SvxRectCtlAccessibleContext::getForeground( ) sal_Int32 SvxRectCtlAccessibleContext::getBackground( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); @@ -560,7 +561,7 @@ Sequence< sal_Int8 > SAL_CALL SvxRectCtlAccessibleContext::getImplementationId( void SAL_CALL SvxRectCtlAccessibleContext::selectAccessibleChild( sal_Int32 nIndex ) throw( lang::IndexOutOfBoundsException, RuntimeException ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); @@ -755,7 +756,7 @@ void SAL_CALL SvxRectCtlAccessibleContext::disposing() Rectangle SvxRectCtlAccessibleContext::GetBoundingBoxOnScreen( void ) throw( RuntimeException ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); @@ -765,7 +766,7 @@ Rectangle SvxRectCtlAccessibleContext::GetBoundingBoxOnScreen( void ) throw( Run Rectangle SvxRectCtlAccessibleContext::GetBoundingBox( void ) throw( RuntimeException ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ThrowExceptionIfNotAlive(); @@ -921,7 +922,7 @@ Any SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleKeyBinding() throw( sal_Int32 SvxRectCtlChildAccessibleContext::getForeground( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( maMutex ); ThrowExceptionIfNotAlive(); return mrParentWindow.GetControlForeground().GetColor(); @@ -929,7 +930,7 @@ sal_Int32 SvxRectCtlChildAccessibleContext::getForeground( ) sal_Int32 SvxRectCtlChildAccessibleContext::getBackground( ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( maMutex ); ThrowExceptionIfNotAlive(); @@ -1204,3 +1205,4 @@ void SvxRectCtlChildAccessibleContext::setStateChecked( sal_Bool bChecked ) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/core/makefile.mk b/svx/source/core/makefile.mk index bae1ec70b8..83a899bb2b 100644 --- a/svx/source/core/makefile.mk +++ b/svx/source/core/makefile.mk @@ -39,9 +39,12 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- SLOFILES = \ - $(SLO)$/coreservices.obj + $(SLO)$/coreservices.obj # --- Targets ------------------------------------------------------- .INCLUDE : target.mk +$(MISC)$/THIRDPARTYLICENSEREADME.html: THIRDPARTYLICENSEREADME.html + $(COPY) THIRDPARTYLICENSEREADME.html $@ + diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 53daf3628e..dc279fce17 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,9 +36,7 @@ #include <svx/svdocirc.hxx> #include <svx/svdogrp.hxx> #include <svx/svdopath.hxx> -#ifndef _SVDOCAPT_HXX #include <svx/svdocapt.hxx> -#endif #include <svx/svdpage.hxx> #include <svx/xflclit.hxx> #include <svx/sdasaitm.hxx> @@ -59,12 +58,8 @@ #include <svx/xhatch.hxx> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp> -#ifndef __COM_SUN_STAR_DRAWING_ENHANCEDCUSTOMSHAPESEGMENTCOMMAND_HPP__ #include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp> -#endif -#ifndef BOOST_SHARED_PTR_HPP_INCLUDED #include <boost/shared_ptr.hpp> -#endif #include <basegfx/numeric/ftools.hxx> #include <basegfx/color/bcolortools.hxx> #include <basegfx/polygon/b2dpolygon.hxx> @@ -1004,7 +999,7 @@ sal_Bool EnhancedCustomShape2d::GetParameter( double& rRetValue, const EnhancedC { if ( rParameter.Value.getValueTypeClass() == TypeClass_DOUBLE ) { - double fValue; + double fValue(0.0); if ( rParameter.Value >>= fValue ) { rRetValue = fValue; @@ -2173,3 +2168,4 @@ SdrObject* EnhancedCustomShape2d::CreateLineGeometry() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 0ad13cb317..0addf30c97 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -750,3 +751,5 @@ Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomS return aTransformed.GetBoundRect(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/EnhancedCustomShape3d.hxx b/svx/source/customshapes/EnhancedCustomShape3d.hxx index 5c242855c9..8007d9829b 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.hxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,3 +77,4 @@ class EnhancedCustomShape3d #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 59873c7927..ac3b316f43 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,7 +35,6 @@ #include "EnhancedCustomShapeHandle.hxx" #include "svx/EnhancedCustomShapeGeometry.hxx" #include <svx/unoshape.hxx> -#ifndef _SVX_UNOPAGE_HXX #include "svx/unopage.hxx" #endif #include "svx/unoapi.hxx" @@ -115,9 +115,9 @@ void SAL_CALL EnhancedCustomShapeEngine::initialize( const SEQ( NMSP_UNO::Any )& for ( i = 0; i < aParameter.getLength(); i++ ) { const NMSP_BEANS::PropertyValue& rProp = aParameter[ i ]; - if ( rProp.Name.equalsAscii( "CustomShape" ) ) + if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CustomShape" ) ) ) rProp.Value >>= mxShape; - else if ( rProp.Name.equalsAscii( "ForceGroupWithText" ) ) + else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ForceGroupWithText" ) ) ) rProp.Value >>= mbForceGroupWithText; } } @@ -469,3 +469,5 @@ SEQ( REF( com::sun::star::drawing::XCustomShapeHandle ) ) SAL_CALL EnhancedCusto aSeq[ i ] = new EnhancedCustomShapeHandle( mxShape, i ); return aSeq; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.hxx b/svx/source/customshapes/EnhancedCustomShapeEngine.hxx index 684d902d9b..919f1a11f6 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.hxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -122,3 +123,5 @@ SEQ( rtl::OUString ) SAL_CALL EnhancedCustomShapeEngine_getSupportedServiceNames throw( NMSP_UNO::RuntimeException ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 15cceee496..5846946452 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,14 +59,10 @@ #include <numeric> #include <algorithm> #include <comphelper/processfactory.hxx> -#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include <com/sun/star/i18n/ScriptType.hdl> -#endif #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#ifndef _COM_SUN_STAR_I18N_CHARACTERITERATORMODE_HDL_ #include <com/sun/star/i18n/CharacterIteratorMode.hdl> -#endif #include <basegfx/polygon/b2dpolygontools.hxx> using namespace com::sun::star; @@ -127,7 +124,7 @@ sal_Bool InitializeFontWorkData( const SdrObject* pCustomShape, const sal_uInt16 { FWTextArea aTextArea; sal_Int32 i, nParagraphs = ( ( nParagraphsLeft - 1 ) / nTextAreaCount ) + 1; - for ( i = 0; i < nParagraphs; i++, j++ ) + for ( i = 0; i < nParagraphs; ++i, ++j ) { FWParagraphData aParagraphData; aParagraphData.aString = rTextObj.GetText( j ); @@ -218,9 +215,9 @@ void CalculateHorizontalScalingFactor( const SdrObject* pCustomShape, fScalingFactor = fScale; } } - aParagraphIter++; + ++aParagraphIter; } - aTextAreaIter++; + ++aTextAreaIter; } rFWData.fHorizontalTextScaling = fScalingFactor; } @@ -244,9 +241,9 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F if ( xBI.is() ) { nScriptType = xBI->getScriptType( rText, 0 ); - sal_uInt16 nChg = 0; if( i18n::ScriptType::WEAK == nScriptType ) { + sal_uInt16 nChg = 0; nChg = (xub_StrLen)xBI->endOfScript( rText, nChg, nScriptType ); if( nChg < rText.getLength() ) nScriptType = xBI->getScriptType( rText, nChg ); @@ -316,7 +313,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F // rotating aOutlineIter->Rotate( Point( nTextWidth / 2, rFWData.nSingleLineHeight / 2 ), 900 ); aCharacterData.aBoundRect.Union( aOutlineIter->GetBoundRect() ); - aOutlineIter++; + ++aOutlineIter; } aOutlineIter = aCharacterData.vOutlines.begin(); aOutlineIEnd = aCharacterData.vOutlines.end(); @@ -325,7 +322,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F sal_Int32 nM = - aCharacterData.aBoundRect.Left() + nHeight; aOutlineIter->Move( nM, 0 ); aCharacterData.aBoundRect.Move( nM, 0 ); - aOutlineIter++; + ++aOutlineIter; } nHeight += aCharacterData.aBoundRect.GetWidth() + ( rFWData.nSingleLineHeight / 5 ); aSingleCharacterUnion.Union( aCharacterData.aBoundRect ); @@ -342,9 +339,9 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F while ( aOutlineIter != aOutlineIEnd ) { aOutlineIter->Move( ( aSingleCharacterUnion.GetWidth() - aCharacterIter->aBoundRect.GetWidth() ) / 2, 0 ); - aOutlineIter++; + ++aOutlineIter; } - aCharacterIter++; + ++aCharacterIter; } } else @@ -362,25 +359,6 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F { aParagraphIter->vCharacters.push_back( aCharacterData ); } - -/* trying to retrieve each single character _> is not working well - sal_Int32 i; - for ( i = 0; i < rText.getLength(); i++ ) - { - FWCharacterData aCharacterData; - if ( aVirDev.GetTextOutlines( aCharacterData.vOutlines, rText, 0, i, 1, TRUE, nWidth, pDXArry ) ) - { - std::vector< PolyPolygon >::iterator aOutlineIter = aCharacterData.vOutlines.begin(); - std::vector< PolyPolygon >::iterator aOutlineIEnd = aCharacterData.vOutlines.end(); - while ( aOutlineIter != aOutlineIEnd ) - { - aCharacterData.aBoundRect.Union( aOutlineIter->GetBoundRect() ); - aOutlineIter++; - } - } - aParagraphIter->vCharacters.push_back( aCharacterData ); - } -*/ } delete[] pDXArry; @@ -403,7 +381,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); aParagraphIter->aBoundRect.Union( aBoundRect ); } - aCharacterIter++; + ++aCharacterIter; } } // updating the boundrect for the text area by merging the current paragraph boundrect @@ -436,9 +414,9 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F sal_Int32 nMove = aPolyPolyBoundRect.Top() - rParagraphBoundRect.Top(); if ( nMove ) aOutlineIter->Move( 0, -nMove ); - aOutlineIter++; + ++aOutlineIter; } - aCharacterIter++; + ++aCharacterIter; } } } @@ -446,7 +424,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F nVerticalOffset -= rFWData.nSingleLineHeight; else nVerticalOffset += rFWData.nSingleLineHeight; - aParagraphIter++; + ++aParagraphIter; } } @@ -492,12 +470,12 @@ void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape ) while( aOutlineIter != aOutlineIEnd ) { aOutlineIter->Scale( fScale, 1.0 ); - aOutlineIter++; + ++aOutlineIter; } - aCharacterIter++; + ++aCharacterIter; } } - aParagraphIter++; + ++aParagraphIter; } } else @@ -527,12 +505,12 @@ void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape ) while( aOutlineIter != aOutlineIEnd ) { aOutlineIter->Move( nHorzDiff, 0 ); - aOutlineIter++; + ++aOutlineIter; } - aCharacterIter++; + ++aCharacterIter; } } - aParagraphIter++; + ++aParagraphIter; } } break; @@ -541,7 +519,7 @@ void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape ) case SDRTEXTHORZADJUST_LEFT : break; // already left aligned -> nothing to do } } - aTextAreaIter++; + ++aTextAreaIter; } } @@ -636,7 +614,7 @@ void InsertMissingOutlinePoints( const Polygon& /*rOutlinePoly*/, const std::vec void GetPoint( const Polygon& rPoly, const std::vector< double >& rDistances, const double& fX, double& fx1, double& fy1 ) { fy1 = fx1 = 0.0; - if ( rPoly.GetSize() ) + if ( rPoly.GetSize() > 1 ) { std::vector< double >::const_iterator aIter = std::lower_bound( rDistances.begin(), rDistances.end(), fX ); sal_uInt16 nIdx = sal::static_int_cast<sal_uInt16>( std::distance( rDistances.begin(), aIter ) ); @@ -725,11 +703,11 @@ void FitTextOutlinesToShapeOutlines( const PolyPolygon& aOutlines2d, FWData& rFW rPolyPoly.Rotate( Point( aBoundRect.Center().X(), aParagraphIter->aBoundRect.Center().Y() ), sin( fAngle ), cos( fAngle ) ); rPolyPoly.Move( (sal_Int32)( ( fx1 + fvx )- aBoundRect.Center().X() ), (sal_Int32)( ( fy1 + fvy ) - aParagraphIter->aBoundRect.Center().Y() ) ); - aOutlineIter++; + ++aOutlineIter; } - aCharacterIter++; + ++aCharacterIter; } - aParagraphIter++; + ++aParagraphIter; } } } @@ -801,15 +779,15 @@ void FitTextOutlinesToShapeOutlines( const PolyPolygon& aOutlines2d, FWData& rFW // write back polygon rPolyPoly[ i ] = aLocalPoly; } - aOutlineIter++; + ++aOutlineIter; } - aCharacterIter++; + ++aCharacterIter; } - aParagraphIter++; + ++aParagraphIter; } } } - aTextAreaIter++; + ++aTextAreaIter; } } @@ -841,13 +819,13 @@ SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const Sd // SJ: not setting model, so we save a lot of broadcasting and the model is not modified any longer // pPathObj->SetModel( pCustomShape->GetModel() ); ((SdrObjGroup*)pRet)->GetSubList()->NbcInsertObject( pPathObj ); - aOutlineIter++; + ++aOutlineIter; } - aCharacterIter++; + ++aCharacterIter; } - aParagraphIter++; + ++aParagraphIter; } - aTextAreaIter++; + ++aTextAreaIter; } Point aP( pCustomShape->GetSnapRect().Center() ); @@ -871,7 +849,7 @@ Reference < i18n::XBreakIterator > EnhancedCustomShapeFontWork::GetBreakIterator if ( !mxBreakIterator.is() ) { Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - Reference < XInterface > xI = xMSF->createInstance( rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ); + Reference < XInterface > xI = xMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")) ); if ( xI.is() ) { Any x = xI->queryInterface( ::getCppuType((const Reference< i18n::XBreakIterator >*)0) ); @@ -908,3 +886,5 @@ SdrObject* EnhancedCustomShapeFontWork::CreateFontWork( const SdrObject* pShape2 } return pRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx index 672637d7d2..4b3a90e0dc 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,3 +44,4 @@ class EnhancedCustomShapeFontWork #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx index 4d57a45ca3..1277fd6f5d 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60,7 +61,7 @@ void EnhancedCustomShape::FillEquationParameter( const EnhancedCustomShapeParame sal_Int32 nValue = 0; if ( rSource.Value.getValueTypeClass() == uno::TypeClass_DOUBLE ) { - double fValue; + double fValue(0.0); if ( rSource.Value >>= fValue ) nValue = (sal_Int32)fValue; } diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx index 12a27b086f..0714bf2a56 100644 --- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -8271,3 +8272,5 @@ const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType ) } return pCustomShape; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/EnhancedCustomShapeHandle.cxx b/svx/source/customshapes/EnhancedCustomShapeHandle.cxx index 1fd49aa7fd..db094d5862 100644 --- a/svx/source/customshapes/EnhancedCustomShapeHandle.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeHandle.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -91,3 +92,5 @@ void SAL_CALL EnhancedCustomShapeHandle::initialize( const com::sun::star::uno:: throw ( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException ) { } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/EnhancedCustomShapeHandle.hxx b/svx/source/customshapes/EnhancedCustomShapeHandle.hxx index c1fbb291cd..68ac2bc784 100644 --- a/svx/source/customshapes/EnhancedCustomShapeHandle.hxx +++ b/svx/source/customshapes/EnhancedCustomShapeHandle.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,3 +68,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx index 7cd3169704..8c4bea73e4 100644 --- a/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -319,3 +320,5 @@ rtl::OUString EnhancedCustomShapeTypeNames::Get( const MSO_SPT eShapeType ) ? rtl::OUString::createFromAscii( pNameTypeTableArray[ eShapeType ].pS ) : rtl::OUString(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/customshapes/tbxcustomshapes.cxx b/svx/source/customshapes/tbxcustomshapes.cxx index a791f8b75e..9ec85a608c 100644 --- a/svx/source/customshapes/tbxcustomshapes.cxx +++ b/svx/source/customshapes/tbxcustomshapes.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,16 +31,14 @@ #include <string> // HACK: prevent conflict between STLPORT and Workshop headers -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include <tools/shl.hxx> #include <svl/eitem.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/viewfrm.hxx> #include <vcl/toolbox.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <sfx2/imagemgr.hxx> #include <vcl/svapp.hxx> @@ -175,13 +174,13 @@ void SAL_CALL SvxTbxCtlCustomShapes::functionSelected( const ::rtl::OUString& rC m_aCommand = rCommand; // Our sub-toolbar wants to execute a function. // We have to change the image of our toolbar button to reflect the new function. - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !m_bDisposed ) { if ( m_aCommand.getLength() > 0 ) { ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( getFrameInterface()); - Image aImage = GetImage( xFrame, m_aCommand, hasBigImages(), isHighContrast() ); + Image aImage = GetImage( xFrame, m_aCommand, hasBigImages() ); if ( !!aImage ) GetToolBox().SetItemImage( GetId(), aImage ); } @@ -192,13 +191,14 @@ void SAL_CALL SvxTbxCtlCustomShapes::updateImage( ) throw (::com::sun::star::un { // We should update the button image of our parent (toolbar). // Use the stored command to set the correct current image. - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( m_aCommand.getLength() > 0 ) { ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( getFrameInterface()); - Image aImage = GetImage( xFrame, m_aCommand, hasBigImages(), isHighContrast() ); + Image aImage = GetImage( xFrame, m_aCommand, hasBigImages() ); if ( !!aImage ) GetToolBox().SetItemImage( GetId(), aImage ); } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/SpellDialogChildWindow.cxx b/svx/source/dialog/SpellDialogChildWindow.cxx index f1e0da5d29..1ce369af35 100644 --- a/svx/source/dialog/SpellDialogChildWindow.cxx +++ b/svx/source/dialog/SpellDialogChildWindow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -94,26 +95,22 @@ void SpellDialogChildWindow::AddAutoCorrection( { DBG_ERROR("AutoCorrection should have been overloaded - if available"); } -/*-- 16.06.2008 10:11:57--------------------------------------------------- - -----------------------------------------------------------------------*/ bool SpellDialogChildWindow::HasGrammarChecking() { return false; } -/*-- 18.06.2008 12:26:35--------------------------------------------------- - -----------------------------------------------------------------------*/ bool SpellDialogChildWindow::IsGrammarChecking() { DBG_ERROR("Grammar checking should have been overloaded - if available"); return false; } -/*-- 18.06.2008 12:26:35--------------------------------------------------- - -----------------------------------------------------------------------*/ void SpellDialogChildWindow::SetGrammarChecking(bool ) { DBG_ERROR("Grammar checking should have been overloaded - if available"); } } // end of namespace ::svx + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 022478a824..d125982f48 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -446,8 +447,7 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx, pColTab ( NULL ), aPipetteColor ( COL_WHITE ), aSelItem ( SID_BMPMASK_EXEC, *this, *pBindinx ), - maImgPipette ( BMP_RESID ( IMG_PIPETTE ) ), - maImgPipetteH ( BMP_RESID ( IMG_PIPETTE_H ) ) + maImgPipette ( BMP_RESID ( IMG_PIPETTE ) ) { FreeResource(); @@ -1209,9 +1209,7 @@ void SvxBmpMask::DataChanged( const DataChangedEvent& rDCEvt ) void SvxBmpMask::ApplyStyle() { - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - - aTbxPipette.SetItemImage( TBI_PIPETTE, bHighContrast ? maImgPipetteH : maImgPipette ); + aTbxPipette.SetItemImage( TBI_PIPETTE, maImgPipette ); } @@ -1239,3 +1237,5 @@ void SvxBmpMask::SetAccessibleNames (void) sSourceColorN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 4")); aCbx4.SetAccessibleName (sSourceColorN); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index d73b0faafa..4829d0929b 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,9 +38,7 @@ #include <sfx2/viewfrm.hxx> #include <svtools/miscopt.hxx> #include <unotools/localedatawrapper.hxx> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #define _SDR_NOITEMS #define _SDR_NOTOUCH @@ -287,8 +286,6 @@ void SvxContourDlg::ScaleContour( PolyPolygon& rContour, const Graphic& rGraphic const MapMode aDispMap( eUnit ); const MapMode aGrfMap( rGraphic.GetPrefMapMode() ); const Size aGrfSize( rGraphic.GetPrefSize() ); - double fScaleX; - double fScaleY; Size aOrgSize; Point aNewPoint; BOOL bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL; @@ -300,8 +297,8 @@ void SvxContourDlg::ScaleContour( PolyPolygon& rContour, const Graphic& rGraphic if ( aOrgSize.Width() && aOrgSize.Height() ) { - fScaleX = (double) rDisplaySize.Width() / aOrgSize.Width(); - fScaleY = (double) rDisplaySize.Height() / aOrgSize.Height(); + double fScaleX = (double) rDisplaySize.Width() / aOrgSize.Width(); + double fScaleY = (double) rDisplaySize.Height() / aOrgSize.Height(); for ( USHORT j = 0, nPolyCount = rContour.Count(); j < nPolyCount; j++ ) { @@ -398,8 +395,7 @@ SvxSuperContourDlg::SvxSuperContourDlg( SfxBindings *_pBindings, SfxChildWindow nGrfChanged ( 0UL ), bExecState ( FALSE ), bGraphicLinked ( FALSE ), - maImageList ( SVX_RES( CD_IMAPDLG ) ), - maImageListH ( SVX_RES( CDH_IMAPDLG ) ) + maImageList ( SVX_RES( CD_IMAPDLG ) ) { ApplyImageList(); @@ -811,7 +807,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) case( TBI_UNDO ): { - nGrfChanged = nGrfChanged ? nGrfChanged-- : 0UL; + nGrfChanged = nGrfChanged ? nGrfChanged - 1 : 0UL; aRedoGraphic = aGraphic; aGraphic = aUndoGraphic; aUndoGraphic = Graphic(); @@ -1130,9 +1126,7 @@ IMPL_LINK( SvxSuperContourDlg, WorkplaceClickHdl, ContourWindow*, pWnd ) void SvxSuperContourDlg::ApplyImageList() { - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - - ImageList& rImgLst = bHighContrast ? maImageListH : maImageList; + ImageList& rImgLst = maImageList; aTbx1.SetImageList( rImgLst ); } @@ -1153,9 +1147,10 @@ void SvxSuperContourDlg::DataChanged( const DataChangedEvent& rDCEvt ) IMPL_LINK( SvxSuperContourDlg, MiscHdl, void*, EMPTYARG ) { - SvtMiscOptions aMiscOptions; + SvtMiscOptions aMiscOptions; aTbx1.SetOutStyle( aMiscOptions.GetToolboxStyle() ); return 0L; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/bmpmask.hrc b/svx/source/dialog/bmpmask.hrc index 79c9b60d3a..be2a2a9772 100644 --- a/svx/source/dialog/bmpmask.hrc +++ b/svx/source/dialog/bmpmask.hrc @@ -57,6 +57,3 @@ #define FT_2 2 #define FT_3 3 #define IMG_PIPETTE 11 -#define IMG_PIPETTE_H 12 - - diff --git a/svx/source/dialog/bmpmask.src b/svx/source/dialog/bmpmask.src index 2c81fa7104..6332a80e07 100644 --- a/svx/source/dialog/bmpmask.src +++ b/svx/source/dialog/bmpmask.src @@ -104,7 +104,7 @@ DockingWindow RID_SVXDLG_BMPMASK Last = 99 ; SpinSize = 1 ; Unit = FUNIT_CUSTOM ; - CustomUnitText = " %" ; + CustomUnitText = "%" ; }; ListBox LB_1 { @@ -147,7 +147,7 @@ DockingWindow RID_SVXDLG_BMPMASK Last = 99 ; SpinSize = 1 ; Unit = FUNIT_CUSTOM ; - CustomUnitText = " %" ; + CustomUnitText = "%" ; }; ListBox LB_2 { @@ -190,7 +190,7 @@ DockingWindow RID_SVXDLG_BMPMASK Last = 99 ; SpinSize = 1 ; Unit = FUNIT_CUSTOM ; - CustomUnitText = " %" ; + CustomUnitText = "%" ; }; ListBox LB_3 { @@ -233,7 +233,7 @@ DockingWindow RID_SVXDLG_BMPMASK Last = 99 ; SpinSize = 1 ; Unit = FUNIT_CUSTOM ; - CustomUnitText = " %" ; + CustomUnitText = "%" ; }; ListBox LB_4 { @@ -308,11 +308,6 @@ DockingWindow RID_SVXDLG_BMPMASK MASKCOLOR }; - Image IMG_PIPETTE_H - { - ImageBitmap = Bitmap { File = "sc10350_h.bmp" ; }; - MASKCOLOR - }; }; String RID_SVXDLG_BMPMASK_STR_TRANSP diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 1dce3620a5..69370001a0 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -891,3 +892,5 @@ void SubsetMap::ApplyCharMap( const FontCharMap* pFontCharMap ) maSubsets.erase( it ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx index 2e070cacdd..7d7f97518c 100644 --- a/svx/source/dialog/checklbx.cxx +++ b/svx/source/dialog/checklbx.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,10 +62,8 @@ SvxCheckListBox::SvxCheckListBox( Window* pParent, const ResId& rResId ) : // ----------------------------------------------------------------------- SvxCheckListBox::SvxCheckListBox( Window* pParent, const ResId& rResId, - const Image& rNormalStaticImage, - const Image& /*TODO#i72485# rHighContrastStaticImage*/ ) : - - SvTreeListBox( pParent, rResId ) + const Image& rNormalStaticImage ) + : SvTreeListBox( pParent, rResId ) { Init_Impl(); @@ -275,3 +274,4 @@ SvLBoxEntry* SvxCheckListBox::InsertEntry( const XubString& rText, SvLBoxEntry* return SvTreeListBox::InsertEntry( rText, pParent, bChildsOnDemand, nPos, pUserData, eButtonKind ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index be1a2d4528..3532ca6526 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -385,3 +386,4 @@ void SvxXConnectionPreview::DataChanged( const DataChangedEvent& rDCEvt ) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/contdlg.hrc b/svx/source/dialog/contdlg.hrc index bf3bc84267..a58995d4a6 100644 --- a/svx/source/dialog/contdlg.hrc +++ b/svx/source/dialog/contdlg.hrc @@ -65,7 +65,6 @@ #define STB_STATUS 1 #define CD_IMAPDLG 1300 -#define CDH_IMAPDLG 1301 /******************************************************************************/ diff --git a/svx/source/dialog/contdlg.src b/svx/source/dialog/contdlg.src index 16040d380a..6a81f513de 100644 --- a/svx/source/dialog/contdlg.src +++ b/svx/source/dialog/contdlg.src @@ -225,30 +225,29 @@ FloatingWindow RID_SVXDLG_CONTOUR MASKCOLOR CONTOURDLG_IDLIST }; - ImageList CDH_IMAPDLG - { - Prefix = "cdh"; - MASKCOLOR - CONTOURDLG_IDLIST - }; }; + /******************************************************************************/ String STR_CONTOURDLG_MODIFY { Text [ en-US ] = "The contour has been modified.\nDo you want to save the changes?" ; }; + String STR_CONTOURDLG_NEWPIPETTE { Text [ en-US ] = "Do you want to create a new contour?" ; }; + String STR_CONTOURDLG_WORKPLACE { Text [ en-US ] = "Setting a new workspace will\ncause the contour to be deleted.\nAre you sure you want to continue?" ; }; + String STR_CONTOURDLG_LINKED { Text [ en-US ] = "This graphic object is linked to the document. Do you want to unlink the graphics in order to edit it?" ; }; + /******************************************************************************/ diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx index 3689d19935..d6636c36e7 100644 --- a/svx/source/dialog/contimp.hxx +++ b/svx/source/dialog/contimp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,9 +28,7 @@ #ifndef _CONTIMP_HXX_ #define _CONTIMP_HXX_ -#ifndef _CONTDLG_HXX #include <svx/contdlg.hxx> -#endif #include "contwnd.hxx" #include <vcl/toolbox.hxx> #include <vcl/status.hxx> @@ -68,7 +67,6 @@ class SvxSuperContourDlg : public SvxContourDlg BOOL bUpdateGraphicLinked; BOOL bGraphicLinked; ImageList maImageList; - ImageList maImageListH; virtual void Resize(); virtual BOOL Close(); @@ -125,3 +123,4 @@ public: #endif // _CONTIMP_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index 43784ebbf7..b518d24431 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -356,3 +357,5 @@ void ContourWindow::Paint( const Rectangle& rRect ) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/contwnd.hxx b/svx/source/dialog/contwnd.hxx index 43babce95e..51dbd51e98 100644 --- a/svx/source/dialog/contwnd.hxx +++ b/svx/source/dialog/contwnd.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,3 +89,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index b5e28ab6cf..c53a6344ef 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -826,12 +827,8 @@ SvxTPFilter::SvxTPFilter( Window * pParent) aStrMyName ( SVX_RES( STR_FILTER) ), bModified (FALSE) { - Image aImgTimeHC( SVX_RES( IMG_TIME_H ) ); FreeResource(); - aIbClock.SetModeImage( aImgTimeHC, BMP_COLOR_HIGHCONTRAST ); - aIbClock2.SetModeImage( aImgTimeHC, BMP_COLOR_HIGHCONTRAST ); - aDfDate.SetShowDateCentury( TRUE ); aDfDate2.SetShowDateCentury( TRUE ); @@ -1529,3 +1526,4 @@ SvxRedlinTable* SvxAcceptChgCtr::GetViewTable() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/ctredlin.hrc b/svx/source/dialog/ctredlin.hrc index cba699d839..bb4c6cbaf9 100644 --- a/svx/source/dialog/ctredlin.hrc +++ b/svx/source/dialog/ctredlin.hrc @@ -50,7 +50,6 @@ #define LB_ACTION 18 #define CB_COMMENT 19 #define ED_COMMENT 20 -#define IMG_TIME_H 30 #define HG_VIEW 1 #define DG_VIEW 2 @@ -67,4 +66,3 @@ #define STR_TITLE4 4 #define STR_TITLE5 5 // - diff --git a/svx/source/dialog/ctredlin.src b/svx/source/dialog/ctredlin.src index 3ca9f10480..c4ec0abab4 100644 --- a/svx/source/dialog/ctredlin.src +++ b/svx/source/dialog/ctredlin.src @@ -249,11 +249,6 @@ TabPage SID_REDLIN_FILTER_PAGE Size = MAP_APPFONT ( 178 , 12 ) ; TabStop = TRUE ; }; - Image IMG_TIME_H - { - ImageBitmap = Bitmap { File = "time_h.bmp" ; }; - MASKCOLOR - }; }; TabPage SID_REDLIN_VIEW_PAGE { diff --git a/svx/source/dialog/databaseregistrationui.cxx b/svx/source/dialog/databaseregistrationui.cxx index 2d807f7b39..9afc8a4598 100644 --- a/svx/source/dialog/databaseregistrationui.cxx +++ b/svx/source/dialog/databaseregistrationui.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,22 +32,15 @@ // === includes (declaration) ============================================ #include "svx/databaseregistrationui.hxx" -// === includes (UNO) ==================================================== -// === /includes (UNO) =================================================== - // === includes (project) ================================================ #include <svx/svxdlg.hxx> -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> -#endif -//#include "connpooloptions.hxx" -// === /includes (project) =============================================== // === includes (global) ================================================= #include <sfx2/app.hxx> #include <svl/itemset.hxx> #include <vcl/msgbox.hxx> -// === /includes (global) ================================================ + namespace svx { @@ -67,3 +61,5 @@ namespace svx } } // namespace svx + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index bd202fead1..f7dba318e5 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,6 +77,8 @@ private: DialControlBmp::DialControlBmp( Window& rParent ) : VirtualDevice( rParent, 0, 0 ), mrParent( rParent ), + mnCenterX(0), + mnCenterY(0), mbEnabled( true ) { EnableRTL( FALSE ); @@ -265,6 +268,8 @@ DialControl_Impl::DialControl_Impl( Window& rParent ) : maBmpBuffered( rParent ), mpLinkField( 0 ), mnAngle( 0 ), + mnCenterX( 0 ), + mnCenterY( 0 ), mbNoRot( false ) { } @@ -570,3 +575,4 @@ void DialControlWrapper::SetControlValue( sal_Int32 nValue ) } // namespace svx +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/dialmgr.cxx b/svx/source/dialog/dialmgr.cxx index d95dffb514..b2d0ba368a 100644 --- a/svx/source/dialog/dialmgr.cxx +++ b/svx/source/dialog/dialmgr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,3 +53,5 @@ ResMgr* DialogsResMgr::GetResMgr() return pResMgr; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 9d6644f5fb..a23c311fc2 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1321,3 +1322,5 @@ IMPL_LINK( SvxLightCtl3D, InternalSelectionChange, void*, EMPTYARG) ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index d19e04dd93..6efc91d3c6 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ // include --------------------------------------------------------------- #include <tools/shl.hxx> -#ifndef _APP_HXX //autogen #include <vcl/svapp.hxx> -#endif #include <svx/xtable.hxx> #include <svx/xpool.hxx> @@ -2285,3 +2284,5 @@ void SvxXShadowPreview::Paint( const Rectangle& ) // ----------------------------------------------------------------------- // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/dlgutil.cxx b/svx/source/dialog/dlgutil.cxx index cdafb622e7..10456fe702 100644 --- a/svx/source/dialog/dlgutil.cxx +++ b/svx/source/dialog/dlgutil.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,7 +41,7 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet& rSet ) { - FieldUnit eUnit = FUNIT_INCH; + BOOL bUseCharUnit = FALSE; const SfxPoolItem* pItem = NULL; if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC, FALSE, &pItem ) ) eUnit = (FieldUnit)( (const SfxUInt16Item*)pItem )->GetValue(); @@ -53,3 +54,4 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet& rSet ) return eUnit; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 3aa4ec8daa..a940f22da3 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,8 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#include <svx/dialmgr.hxx> +#include <sal/macros.h> + +#include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> #include "docrecovery.hxx" #include "docrecovery.hrc" @@ -44,14 +47,10 @@ #include <rtl/ustrbuf.hxx> #include <vcl/scrbar.hxx> -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif -//#include "com/sun/star/lang/XMultiServiceFactory.hpp" #include <com/sun/star/task/XStatusIndicatorFactory.hpp> #include <com/sun/star/lang/XInitialization.hpp> -//#include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/util/URL.hpp> #include <com/sun/star/util/XURLTransformer.hpp> @@ -100,7 +99,7 @@ void TabDialog4Recovery::addTabPage(IExtendedTabPage* pPage) //=============================================== short TabDialog4Recovery::Execute() { - ::vos::OGuard aLock(Application::GetSolarMutex()); + ::SolarMutexGuard aLock; Show(); m_pActualPage = m_lTabPages.begin(); @@ -549,8 +548,7 @@ void SAL_CALL RecoveryCore::statusChanged(const css::frame::FeatureStateEvent& a if (!sURL.Len()) sURL = aNew.TemplateURL; INetURLObject aURL(sURL); - aNew.StandardImage = SvFileInformationManager::GetFileImage(aURL, false, false); - aNew.HCImage = SvFileInformationManager::GetFileImage(aURL, false, true ); + aNew.StandardImage = SvFileInformationManager::GetFileImage(aURL, false); /* set the right UI state for this item to NOT_RECOVERED_YET ... because nDocState shows the state of the last emergency save operation before and is interessting for the used recovery core service only ... @@ -559,7 +557,7 @@ void SAL_CALL RecoveryCore::statusChanged(const css::frame::FeatureStateEvent& a aNew.RecoveryState = E_NOT_RECOVERED_YET; // patch DisplayName! Because the document title contain more then the file name ... - sal_Int32 i = aNew.DisplayName.indexOf(::rtl::OUString::createFromAscii(" - ")); + sal_Int32 i = aNew.DisplayName.indexOf(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - "))); if (i > 0) aNew.DisplayName = aNew.DisplayName.copy(0, i); @@ -775,7 +773,6 @@ SaveDialog::SaveDialog(Window* pParent, m_aTitleFT.SetFont(aFont); m_aOkBtn.SetClickHdl( LINK( this, SaveDialog, OKButtonHdl ) ); -// m_aFileListLB.EnableInput( sal_False ); m_aFileListLB.SetControlBackground( rStyleSettings.GetDialogColor() ); // fill listbox with current open documents @@ -808,7 +805,7 @@ IMPL_LINK( SaveDialog, OKButtonHdl, void*, EMPTYARG ) //=============================================== short SaveDialog::execute() { - ::vos::OGuard aLock(Application::GetSolarMutex()); + ::SolarMutexGuard aLock; // wait for user input "OK" m_nResult = DLG_RET_UNKNOWN; @@ -848,7 +845,6 @@ SaveProgressDialog::SaveProgressDialog(Window* pParent, FreeResource(); PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, pCore->getSMGR() ); m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW); -// m_aProgrBaseTxt = m_aProgrFT.GetText(); } //=============================================== @@ -859,7 +855,7 @@ SaveProgressDialog::~SaveProgressDialog() //=============================================== short SaveProgressDialog::Execute() { - ::vos::OGuard aLock(Application::GetSolarMutex()); + ::SolarMutexGuard aLock; m_pCore->setProgressHandler(m_xProgress); m_pCore->setUpdateListener(this); @@ -914,16 +910,12 @@ void RecovDocListEntry::Paint(const Point& aPos , const String* pTxt = 0; RecovDocList* pList = static_cast< RecovDocList* >(&aDevice); - BOOL bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode(); - TURLInfo* pInfo = (TURLInfo*)pEntry->GetUserData(); switch(pInfo->RecoveryState) { case E_SUCCESSFULLY_RECOVERED : { pImg = &pList->m_aGreenCheckImg; - if (bHC) - pImg = &pList->m_aGreenCheckImgHC; pTxt = &pList->m_aSuccessRecovStr; } break; @@ -931,8 +923,6 @@ void RecovDocListEntry::Paint(const Point& aPos , case E_ORIGINAL_DOCUMENT_RECOVERED : // TODO must be renamed into ORIGINAL DOCUMENT recovered! Because its marked as yellow { pImg = &pList->m_aYellowCheckImg; - if (bHC) - pImg = &pList->m_aYellowCheckImgHC; pTxt = &pList->m_aOrigDocRecovStr; } break; @@ -940,8 +930,6 @@ void RecovDocListEntry::Paint(const Point& aPos , case E_RECOVERY_FAILED : { pImg = &pList->m_aRedCrossImg; - if (bHC) - pImg = &pList->m_aRedCrossImgHC; pTxt = &pList->m_aRecovFailedStr; } break; @@ -981,9 +969,6 @@ RecovDocList::RecovDocList( Window* pParent, , m_aGreenCheckImg ( ResId(IMG_GREENCHECK,*rResId.GetResMgr() ) ) , m_aYellowCheckImg ( ResId(IMG_YELLOWCHECK,*rResId.GetResMgr() ) ) , m_aRedCrossImg ( ResId(IMG_REDCROSS,*rResId.GetResMgr() ) ) - , m_aGreenCheckImgHC ( ResId(IMG_GREENCHECK_HC,*rResId.GetResMgr() ) ) - , m_aYellowCheckImgHC ( ResId(IMG_YELLOWCHECK_HC,*rResId.GetResMgr() ) ) - , m_aRedCrossImgHC ( ResId(IMG_REDCROSS_HC,*rResId.GetResMgr() ) ) , m_aSuccessRecovStr ( ResId(STR_SUCCESSRECOV,*rResId.GetResMgr() ) ) , m_aOrigDocRecovStr ( ResId(STR_ORIGDOCRECOV,*rResId.GetResMgr() ) ) , m_aRecovFailedStr ( ResId(STR_RECOVFAILED,*rResId.GetResMgr() ) ) @@ -1104,8 +1089,6 @@ RecoveryDialog::RecoveryDialog(Window* pParent, sName += impl_getStatusString( rInfo ); SvLBoxEntry* pEntry = m_aFileListLB.InsertEntry(sName, rInfo.StandardImage, rInfo.StandardImage); pEntry->SetUserData((void*)&rInfo); - m_aFileListLB.SetExpandedEntryBmp (pEntry, rInfo.HCImage, BMP_COLOR_HIGHCONTRAST); - m_aFileListLB.SetCollapsedEntryBmp(pEntry, rInfo.HCImage, BMP_COLOR_HIGHCONTRAST); } // mark first item @@ -1122,7 +1105,7 @@ RecoveryDialog::~RecoveryDialog() //=============================================== short RecoveryDialog::execute() { - ::vos::OGuard aSolarLock(Application::GetSolarMutex()); + ::SolarMutexGuard aSolarLock; switch(m_eRecoveryState) { @@ -1658,7 +1641,7 @@ void BrokenRecoveryDialog::impl_askForSavePath() short ErrorRepWelcomeDialog::execute() { - ::vos::OGuard aLock(Application::GetSolarMutex()); + ::SolarMutexGuard aLock; Show(); m_nResult = DLG_RET_UNKNOWN; while(m_nResult == DLG_RET_UNKNOWN) @@ -1768,7 +1751,7 @@ void BrokenRecoveryDialog::impl_askForSavePath() short ErrorRepSendDialog::execute() { - ::vos::OGuard aLock(Application::GetSolarMutex()); + ::SolarMutexGuard aLock; Show(); m_nResult = DLG_RET_UNKNOWN; while(m_nResult == DLG_RET_UNKNOWN) @@ -1865,7 +1848,7 @@ void BrokenRecoveryDialog::impl_askForSavePath() } // loop through all the other windows and adjust their size - for ( ; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent ) + for ( ; i < SAL_N_ELEMENTS( pWins ); ++i, ++pCurrent ) { Size aSize = (*pCurrent)->GetSizePixel(); aSize.Width() -= nDelta; @@ -1936,7 +1919,7 @@ void BrokenRecoveryDialog::impl_askForSavePath() &maProxyServerEd, &maProxyPortFT, &maProxyPortEd, &maDescriptionFT }; Window** pCurrent = pWins; - for ( sal_uInt32 i = 0; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent ) + for ( sal_uInt32 i = 0; i < SAL_N_ELEMENTS( pWins ); ++i, ++pCurrent ) { Point aPos = (*pCurrent)->GetPosPixel(); aPos.Y() -= nDelta; @@ -2036,16 +2019,16 @@ void BrokenRecoveryDialog::impl_askForSavePath() { #if defined(WNT) || defined(OS2) - OUString ustrValue = OUString::createFromAscii("${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}"); + OUString ustrValue = OUString(RTL_CONSTASCII_USTRINGPARAM("${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}")); #elif defined( MACOSX ) - OUString ustrValue = OUString::createFromAscii("~"); + OUString ustrValue = OUString(RTL_CONSTASCII_USTRINGPARAM("~")); #else - OUString ustrValue = OUString::createFromAscii("$SYSUSERCONFIG"); + OUString ustrValue = OUString(RTL_CONSTASCII_USTRINGPARAM("$SYSUSERCONFIG")); #endif Bootstrap::expandMacros( ustrValue ); #if defined(WNT) || defined(OS2) - ustrValue += OUString::createFromAscii("/user/crashdata"); + ustrValue += OUString(RTL_CONSTASCII_USTRINGPARAM("/user/crashdata")); #endif return ustrValue; } @@ -2096,7 +2079,7 @@ void BrokenRecoveryDialog::impl_askForSavePath() ::osl::File aFile( rURL ); printf( "Loading %s:", OString( rURL.getStr(), rURL.getLength(), osl_getThreadTextEncoding() ).getStr() ); - if ( ::osl::FileBase::E_None == aFile.open( OpenFlag_Read ) ) + if ( ::osl::FileBase::E_None == aFile.open( osl_File_OpenFlag_Read ) ) { ::rtl::OString aContent; ::osl::FileBase::RC result; @@ -2179,3 +2162,4 @@ void BrokenRecoveryDialog::impl_askForSavePath() } // namespace DocRecovery } // namespace svx +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/docrecovery.hrc b/svx/source/dialog/docrecovery.hrc index ae6ddc84bc..4a5e22afce 100644 --- a/svx/source/dialog/docrecovery.hrc +++ b/svx/source/dialog/docrecovery.hrc @@ -105,9 +105,6 @@ #define IMG_GREENCHECK 14 #define IMG_YELLOWCHECK 15 #define IMG_REDCROSS 16 -#define IMG_GREENCHECK_HC 17 -#define IMG_YELLOWCHECK_HC 18 -#define IMG_REDCROSS_HC 19 #define STR_SUCCESSRECOV 20 #define STR_ORIGDOCRECOV 21 #define STR_RECOVFAILED 22 diff --git a/svx/source/dialog/docrecovery.src b/svx/source/dialog/docrecovery.src index e73f4a919e..e8421ad2b4 100644 --- a/svx/source/dialog/docrecovery.src +++ b/svx/source/dialog/docrecovery.src @@ -213,26 +213,14 @@ TabPage RID_SVXPAGE_DOCRECOVERY_RECOVER { ImageBitmap = Bitmap { File = "nu01.png"; }; }; - Image IMG_GREENCHECK_HC - { - ImageBitmap = Bitmap { File = "nuh01.png"; }; - }; Image IMG_YELLOWCHECK { ImageBitmap = Bitmap { File = "nu04.png"; }; }; - Image IMG_YELLOWCHECK_HC - { - ImageBitmap = Bitmap { File = "nuh04.png"; }; - }; Image IMG_REDCROSS { ImageBitmap = Bitmap { File = "nu02.png"; }; }; - Image IMG_REDCROSS_HC - { - ImageBitmap = Bitmap { File = "nuh02.png"; }; - }; String STR_SUCCESSRECOV { Text[ en-US ] = "Successfully recovered"; diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index db4459c95f..683fa038a8 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,9 +40,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <comphelper/processfactory.hxx> -#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_ #include <com/sun/star/i18n/ScriptType.hdl> -#endif #ifndef _SVSTDARR_HXX #define _SVSTDARR_USHORTS @@ -148,7 +147,7 @@ class FontPrevWin_Impl public: inline FontPrevWin_Impl() : pPrinter( NULL ), bDelPrinter( FALSE ), - pColor( NULL ), pBackColor( 0 ), + pColor( NULL ), pBackColor( 0 ), nAscent( 0 ), cStartBracket( 0 ), cEndBracket( 0 ), nFontWidthScale( 100 ), bSelection( FALSE ), bGetSelection( FALSE ), bUseResText( FALSE ), bTwoLines( FALSE ), @@ -224,7 +223,7 @@ void FontPrevWin_Impl::_CheckScript() { Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); xBreak = Reference< XBreakIterator >(xMSF->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.i18n.BreakIterator" ) ),UNO_QUERY); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")) ),UNO_QUERY); } if( xBreak.is() ) { @@ -803,23 +802,17 @@ void SvxFontPrevWindow::Paint( const Rectangle& ) pImpl->DrawPrev( this, pPrinter, aTmpPoint, rFont ); } } -/* -----------------------------04.12.00 16:26-------------------------------- - ---------------------------------------------------------------------------*/ BOOL SvxFontPrevWindow::IsTwoLines() const { return pImpl->bTwoLines; } -/* -----------------------------04.12.00 16:26-------------------------------- - ---------------------------------------------------------------------------*/ void SvxFontPrevWindow::SetTwoLines(BOOL bSet) { pImpl->bTwoLines = bSet;} -/* -----------------------------04.12.00 16:26-------------------------------- - ---------------------------------------------------------------------------*/ void SvxFontPrevWindow::SetBrackets(sal_Unicode cStart, sal_Unicode cEnd) { pImpl->cStartBracket = cStart; @@ -849,3 +842,5 @@ void SvxFontPrevWindow::AutoCorrectFontColor( void ) if( COL_AUTO == pImpl->aCTLFont.GetColor().GetColor() ) pImpl->aCTLFont.SetColor( aFontColor ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx index a7f37eef6b..f8e3192572 100644 --- a/svx/source/dialog/fontlb.cxx +++ b/svx/source/dialog/fontlb.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -187,3 +188,4 @@ IMPL_GET_WINDOW (SvxFontListBox);*/ // ============================================================================ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index b0419dbd04..e4b4b65b15 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -248,7 +249,6 @@ SvxFontWorkDialog::SvxFontWorkDialog( SfxBindings *pBindinx, nSaveShadowSize (100), maImageList (ResId(IL_FONTWORK,*rResId.GetResMgr())), - maImageListH (ResId(ILH_FONTWORK,*rResId.GetResMgr())), pColorTable (NULL) { @@ -710,7 +710,7 @@ void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem) { // #i19251# // INT32 nValue = pItem->GetValue(); - + // #i19251# // The two involved fields/items are used double and contain/give different // values regarding to the access method. Thus, here we need to separate the access @@ -1007,7 +1007,7 @@ void SvxFontWorkDialog::CreateStdFormObj(SdrView& rView, SdrPageView& rPV, //-/ rOldObj.TakeAttributes(aAttr, TRUE, FALSE); aAttr.Put(rOldObj.GetMergedItemSet()); - + const XFormTextStdFormItem& rOldForm = (const XFormTextStdFormItem&) aAttr.Get(XATTR_FORMTXTSTDFORM); @@ -1220,30 +1220,16 @@ void SvxFontWorkDialog::DataChanged( const DataChangedEvent& rDCEvt ) SfxDockingWindow::DataChanged( rDCEvt ); } -/* -----------------------------08.05.2002 14:28------------------------------ - ---------------------------------------------------------------------------*/ void SvxFontWorkDialog::ApplyImageList() { - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - ResMgr* _pMgr = &DIALOG_MGR(); - USHORT nBitmapResId = bHighContrast ? RID_SVXBMP_FONTWORK_FORM1_H : RID_SVXBMP_FONTWORK_FORM1; + USHORT nBitmapResId = RID_SVXBMP_FONTWORK_FORM1; USHORT nTextResId = RID_SVXSTR_FONTWORK_FORM1; bool bInit = aFormSet.GetItemCount() == 0; - if( bInit ) - { -/* - Size aSize( aTbxStyle.CalcWindowSizePixel() ); - Bitmap aBmp(ResId(RID_SVXBMP_FONTWORK_FORM1,_pMgr)); - aSize.Height() = aFormSet.CalcWindowSizePixel(aBmp.GetSizePixel()).Height() + 2; - aFormSet.SetSizePixel(aSize); -*/ - } - USHORT i; for( i = 1; i < 13; i++, nTextResId++, nBitmapResId++ ) { @@ -1258,7 +1244,7 @@ void SvxFontWorkDialog::ApplyImageList() } } - ImageList& rImgLst = bHighContrast ? maImageListH : maImageList; + ImageList& rImgLst = maImageList; aTbxStyle.SetImageList( rImgLst ); aTbxAdjust.SetImageList( rImgLst ); @@ -1281,3 +1267,5 @@ void SvxFontWorkDialog::ApplyImageList() aFbTextStart.SetImage( rImgLst.GetImage( TBI_TEXTSTART ) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/fontwork.hrc b/svx/source/dialog/fontwork.hrc index a664dd3ce6..bce6cfa209 100644 --- a/svx/source/dialog/fontwork.hrc +++ b/svx/source/dialog/fontwork.hrc @@ -40,7 +40,6 @@ #define CLB_SHADOW_COLOR 1 #define IL_FONTWORK 1200 -#define ILH_FONTWORK 1201 // the following ids are also used to identify the // bitmaps for the image list diff --git a/svx/source/dialog/fontwork.src b/svx/source/dialog/fontwork.src index 01cf483a67..06f2a2b519 100644 --- a/svx/source/dialog/fontwork.src +++ b/svx/source/dialog/fontwork.src @@ -350,12 +350,6 @@ DockingWindow RID_SVXDLG_FONTWORK MaskColor = IMAGE_STDBTN_COLOR ; FONTWORK_IDLIST }; - ImageList ILH_FONTWORK - { - Prefix = "fwh"; - MaskColor = IMAGE_STDBTN_COLOR ; - FONTWORK_IDLIST - }; }; // Bitmaps --------------------------------------------------------------- Bitmap RID_SVXBMP_FONTWORK_FORM1 @@ -407,55 +401,6 @@ Bitmap RID_SVXBMP_FONTWORK_FORM12 File = "fwbuttn4.bmp" ; }; -Bitmap RID_SVXBMP_FONTWORK_FORM1_H -{ - File = "fwthcirc_h.bmp" ; -}; -Bitmap RID_SVXBMP_FONTWORK_FORM2_H -{ - File = "fwbhcirc_h.bmp" ; -}; -Bitmap RID_SVXBMP_FONTWORK_FORM3_H -{ - File = "fwlhcirc_h.bmp" ; -}; -Bitmap RID_SVXBMP_FONTWORK_FORM4_H -{ - File = "fwrhcirc_h.bmp" ; -}; -Bitmap RID_SVXBMP_FONTWORK_FORM5_H -{ - File = "fwtoparc_h.bmp" ; -}; -Bitmap RID_SVXBMP_FONTWORK_FORM6_H -{ - File = "fwbotarc_h.bmp" ; -}; -Bitmap RID_SVXBMP_FONTWORK_FORM7_H -{ - File = "fwlftarc_h.bmp" ; -}; -Bitmap RID_SVXBMP_FONTWORK_FORM8_H -{ - File = "fwrgtarc_h.bmp" ; -}; -Bitmap RID_SVXBMP_FONTWORK_FORM9_H -{ - File = "fwbuttn1_h.bmp" ; -}; -Bitmap RID_SVXBMP_FONTWORK_FORM10_H -{ - File = "fwbuttn2_h.bmp" ; -}; -Bitmap RID_SVXBMP_FONTWORK_FORM11_H -{ - File = "fwbuttn3_h.bmp" ; -}; -Bitmap RID_SVXBMP_FONTWORK_FORM12_H -{ - File = "fwbuttn4_h.bmp" ; -}; - // Strings --------------------------------------------------------------- String RID_SVXSTR_FONTWORK_FORM1 { diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx index 06fc47828b..94c2d021b1 100644 --- a/svx/source/dialog/framelink.cxx +++ b/svx/source/dialog/framelink.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -48,6 +49,9 @@ #if SVX_FRAME_USE_LINEINFO #include <vcl/lineinfo.hxx> +#else +#include <basegfx/polygon/b2dpolygon.hxx> +#include <basegfx/polygon/b2dpolygontools.hxx> #endif namespace svx { @@ -389,7 +393,7 @@ void lclLinkLeftEnd_Single( // don't overdraw vertical borders with equal width lclGetBehindEnd( rLFromT ) : // take leftmost start of both secondary lines (#46488#) - rResult.mnOffs1 = std::min( lclGetSecnBeg( rLFromT ), lclGetSecnBeg( rLFromB ) ); + std::min( lclGetSecnBeg( rLFromT ), lclGetSecnBeg( rLFromB ) ); // single border with equal width coming from left else if( !rLFromL.Secn() && (rLFromL.Prim() == rBorder.Prim()) ) @@ -608,44 +612,6 @@ void lclLinkVerFrameBorder( // ============================================================================ -#if 0 -// Not used anymore, but not deleted for possible future usage. - -/** Returns the relative Y offset of the intercept point of 2 diagonal borders. - - @param nTLBROffs - Width offset (sub units) across the top-left to bottom-right frame border. - @param fTLBRAngle - Inner angle between horizontal and top-left to bottom-right frame border. - @param nBLTROffs - Width offset (sub units) across the bottom-left to top-right frame border. - @param fBLTRAngle - Inner angle between horizontal and bottom-left to top-right frame border. - @return - Offset (sub units) relative to the Y position of the centered intercept - point of both diagonal frame borders. - */ -long lclGetDiagDiagOffset( long nTLBROffs, double fTLBRAngle, long nBLTROffs, double fBLTRAngle ) -{ - double fASin = sin( fTLBRAngle ); - double fACos = cos( fTLBRAngle ); - double fAX = -nTLBROffs * fASin; - double fAY = nTLBROffs * fACos; - double fRAX = fACos; - double fRAY = fASin; - - double fBSin = sin( fBLTRAngle ); - double fBCos = cos( fBLTRAngle ); - double fBX = nBLTROffs * fBSin; - double fBY = nBLTROffs * fBCos; - double fRBX = fBCos; - double fRBY = -fBSin; - - double fKA = (fRBX * (fBY - fAY) - fRBY * (fBX - fAX)) / (fRBX * fRAY - fRAX * fRBY); - return lclD2L( fAY + fKA * fRAY ); -} -#endif - // ---------------------------------------------------------------------------- // Linking of diagonal frame borders. @@ -755,7 +721,7 @@ inline Polygon lclCreatePolygon( const PointVec& rPoints ) Polygon lclCreatePolygon( const Point& rP1, const Point& rP2, const Point& rP3, const Point& rP4 ) { PointVec aPoints; - aPoints.reserve( 4 ); + aPoints.reserve( 2 ); aPoints.push_back( rP1 ); aPoints.push_back( rP2 ); aPoints.push_back( rP3 ); @@ -776,12 +742,6 @@ Polygon lclCreatePolygon( const Point& rP1, const Point& rP2, const Point& rP3, return lclCreatePolygon( aPoints ); } -/** Returns a polygon constructed from the two passed line positions. */ -inline Polygon lclCreatePolygon( const LinePoints& rPoints1, const LinePoints& rPoints2 ) -{ - return lclCreatePolygon( rPoints1.maBeg, rPoints1.maEnd, rPoints2.maEnd, rPoints2.maBeg ); -} - /** Sets the color of the passed frame style to the output device. Sets the line color and fill color in the output device. @@ -803,73 +763,6 @@ void lclSetColorToOutDev( OutputDevice& rDev, const Style& rStyle, const Color* } // ---------------------------------------------------------------------------- -// Generic drawing functions. - -/** Draws a thin (1 pixel wide) line, optionally dotted, into the passed output device. */ -void lclDrawThinLine( OutputDevice& rDev, const Point& rBeg, const Point& rEnd, bool bDotted ) -{ -#if SVX_FRAME_USE_LINEINFO - if( bDotted && (rBeg != rEnd) ) - { -// using LineInfo for dotted lines looks ugly and does not work well for diagonal lines - LineInfo aLineInfo( LINE_DASH, 1 ); - aLineInfo.SetDotCount( 1 ); - aLineInfo.SetDotLen( 1 ); - aLineInfo.SetDistance( 3 ); - rDev.DrawLine( rBeg, rEnd, aLineInfo ); - } -#else - Point aBeg( rDev.LogicToPixel( rBeg ) ); - Point aEnd( rDev.LogicToPixel( rEnd ) ); - if( bDotted && (aBeg != aEnd) ) - { - bool bHor = Abs( aEnd.X() - aBeg.X() ) > Abs( aEnd.Y() - aBeg.Y() ); - const Point& rBegPos( bHor ? ((aBeg.X() < aEnd.X()) ? aBeg : aEnd) : ((aBeg.Y() < aEnd.Y()) ? aBeg : aEnd ) ); - const Point& rEndPos( (rBegPos == aBeg) ? aEnd : aBeg ); - - long nAlongBeg = bHor ? rBegPos.X() : rBegPos.Y(); - long nAcrssBeg = bHor ? rBegPos.Y() : rBegPos.X(); - long nAlongSize = (bHor ? rEndPos.X() : rEndPos.Y()) - nAlongBeg; - long nAcrssSize = (bHor ? rEndPos.Y() : rEndPos.X()) - nAcrssBeg; - double fGradient = static_cast< double >( nAcrssSize ) / nAlongSize; - - PointVec aPoints; - aPoints.reserve( (nAlongSize + 1) / 2 ); - for( long nAlongIdx = 0; nAlongIdx <= nAlongSize; nAlongIdx += 2 ) - { - long nAl = nAlongBeg + nAlongIdx; - long nAc = nAcrssBeg + lclD2L( fGradient * nAlongIdx ); - aPoints.push_back( Point( bHor ? nAl : nAc, bHor ? nAc : nAl ) ); - } - - rDev.Push( PUSH_MAPMODE ); - rDev.SetMapMode( MAP_PIXEL ); - rDev.DrawPixel( lclCreatePolygon( aPoints ) ); - rDev.Pop(); // map mode - } -#endif - else - rDev.DrawLine( rBeg, rEnd ); -} - -/** Draws a thin (1 pixel wide) line, optionally dotted, into the passed output device. */ -inline void lclDrawThinLine( OutputDevice& rDev, const LinePoints& rPoints, bool bDotted ) -{ - lclDrawThinLine( rDev, rPoints.maBeg, rPoints.maEnd, bDotted ); -} - -/** Draws a polygon with four points into the passed output device. */ -inline void lclDrawPolygon( OutputDevice& rDev, const Point& rP1, const Point& rP2, const Point& rP3, const Point& rP4 ) -{ - rDev.DrawPolygon( lclCreatePolygon( rP1, rP2, rP3, rP4 ) ); -} - -/** Draws a polygon specified by two borders into the passed output device. */ -inline void lclDrawPolygon( OutputDevice& rDev, const LinePoints& rPoints1, const LinePoints& rPoints2 ) -{ - rDev.DrawPolygon( lclCreatePolygon( rPoints1, rPoints2 ) ); -} - // ============================================================================ // Drawing of horizontal frame borders. @@ -882,16 +775,18 @@ void lclDrawHorLine( OutputDevice& rDev, const Point& rLPos, const LineEndResult& rLRes, const Point& rRPos, const LineEndResult& rRRes, - long nTOffs, long nBOffs, bool bDotted ) + long nTOffs, long nBOffs, SvxBorderStyle nDashing ) { LinePoints aTPoints( rLPos + lclToMapUnit( rLRes.mnOffs1, nTOffs ), rRPos + lclToMapUnit( rRRes.mnOffs1, nTOffs ) ); - if( nTOffs == nBOffs ) - lclDrawThinLine( rDev, aTPoints, bDotted ); - else - { - LinePoints aBPoints( rLPos + lclToMapUnit( rLRes.mnOffs2, nBOffs ), rRPos + lclToMapUnit( rRRes.mnOffs2, nBOffs ) ); - lclDrawPolygon( rDev, aTPoints, aBPoints ); - } + LinePoints aBPoints( rLPos + lclToMapUnit( rLRes.mnOffs2, nBOffs ), rRPos + lclToMapUnit( rRRes.mnOffs2, nBOffs ) ); + + sal_uInt32 nWidth = lclToMapUnit( abs( nTOffs ) ) + lclToMapUnit( abs( nBOffs ) ); + if ( ( nTOffs >= 0 && nBOffs >= 0 ) || ( nTOffs <= 0 && nBOffs <= 0 ) ) + nWidth = abs( lclToMapUnit( nTOffs ) - lclToMapUnit( nBOffs ) ) + 1; + Point rLMid = ( aTPoints.maBeg + aBPoints.maBeg ) / 2; + Point rRMid = ( aTPoints.maEnd + aBPoints.maEnd ) / 2; + + ::svtools::DrawLine( rDev, rLMid, rRMid, nWidth, nDashing ); } /** Draws a horizontal frame border into the passed output device. @@ -917,10 +812,10 @@ void lclDrawHorFrameBorder( { lclSetColorToOutDev( rDev, rBorder, pForceColor ); lclDrawHorLine( rDev, rLPos, rResult.maBeg.maPrim, rRPos, rResult.maEnd.maPrim, - lclGetBeg( rBorder ), lclGetPrimEnd( rBorder ), rBorder.Dotted() ); + lclGetBeg( rBorder ), lclGetPrimEnd( rBorder ), rBorder.Dashing() ); if( rBorder.Secn() ) lclDrawHorLine( rDev, rLPos, rResult.maBeg.maSecn, rRPos, rResult.maEnd.maSecn, - lclGetSecnBeg( rBorder ), lclGetEnd( rBorder ), rBorder.Dotted() ); + lclGetSecnBeg( rBorder ), lclGetEnd( rBorder ), rBorder.Dashing() ); rDev.Pop(); // colors } } @@ -937,16 +832,18 @@ void lclDrawVerLine( OutputDevice& rDev, const Point& rTPos, const LineEndResult& rTRes, const Point& rBPos, const LineEndResult& rBRes, - long nLOffs, long nROffs, bool bDotted ) + long nLOffs, long nROffs, SvxBorderStyle nDashing ) { LinePoints aLPoints( rTPos + lclToMapUnit( nLOffs, rTRes.mnOffs1 ), rBPos + lclToMapUnit( nLOffs, rBRes.mnOffs1 ) ); - if( nLOffs == nROffs ) - lclDrawThinLine( rDev, aLPoints, bDotted ); - else - { - LinePoints aRPoints( rTPos + lclToMapUnit( nROffs, rTRes.mnOffs2 ), rBPos + lclToMapUnit( nROffs, rBRes.mnOffs2 ) ); - lclDrawPolygon( rDev, aLPoints, aRPoints ); - } + LinePoints aRPoints( rTPos + lclToMapUnit( nROffs, rTRes.mnOffs2 ), rBPos + lclToMapUnit( nROffs, rBRes.mnOffs2 ) ); + + sal_uInt32 nWidth = lclToMapUnit( abs( nLOffs ) ) + lclToMapUnit( abs( nROffs ) ); + if ( ( nLOffs >= 0 && nROffs >= 0 ) || ( nLOffs <= 0 && nROffs <= 0 ) ) + nWidth = abs( lclToMapUnit( nLOffs ) - lclToMapUnit( nROffs ) ) + 1; + Point rTMid = ( aLPoints.maBeg + aRPoints.maBeg ) / 2; + Point rBMid = ( aLPoints.maEnd + aRPoints.maEnd ) / 2; + + ::svtools::DrawLine( rDev, rTMid, rBMid, nWidth, nDashing ); } /** Draws a vertical frame border into the passed output device. @@ -972,10 +869,10 @@ void lclDrawVerFrameBorder( { lclSetColorToOutDev( rDev, rBorder, pForceColor ); lclDrawVerLine( rDev, rTPos, rResult.maBeg.maPrim, rBPos, rResult.maEnd.maPrim, - lclGetBeg( rBorder ), lclGetPrimEnd( rBorder ), rBorder.Dotted() ); + lclGetBeg( rBorder ), lclGetPrimEnd( rBorder ), rBorder.Dashing() ); if( rBorder.Secn() ) lclDrawVerLine( rDev, rTPos, rResult.maBeg.maSecn, rBPos, rResult.maEnd.maSecn, - lclGetSecnBeg( rBorder ), lclGetEnd( rBorder ), rBorder.Dotted() ); + lclGetSecnBeg( rBorder ), lclGetEnd( rBorder ), rBorder.Dashing() ); rDev.Pop(); // colors } } @@ -1108,14 +1005,19 @@ void lclPushCrossingClipRegion( OutputDevice& rDev, const Rectangle& rRect, bool */ void lclDrawDiagLine( OutputDevice& rDev, const Rectangle& rRect, bool bTLBR, - const DiagLineResult& rResult, long nDiagOffs1, long nDiagOffs2, bool bDotted ) + const DiagLineResult& rResult, long nDiagOffs1, long nDiagOffs2, SvxBorderStyle nDashing ) { lclPushDiagClipRect( rDev, rRect, rResult ); LinePoints aLPoints( lclGetDiagLineEnds( rRect, bTLBR, nDiagOffs1 ) ); - if( nDiagOffs1 == nDiagOffs2 ) - lclDrawThinLine( rDev, aLPoints, bDotted ); - else - lclDrawPolygon( rDev, aLPoints, lclGetDiagLineEnds( rRect, bTLBR, nDiagOffs2 ) ); + LinePoints aL2Points( lclGetDiagLineEnds( rRect, bTLBR, nDiagOffs2 ) ); + Point aSMid( ( aLPoints.maBeg + aL2Points.maBeg ) / 2 ); + Point aEMid( ( aLPoints.maEnd + aL2Points.maEnd ) / 2 ); + + sal_uInt32 nWidth = lclToMapUnit( abs( nDiagOffs1 ) ) + lclToMapUnit( abs( nDiagOffs2 ) ); + if ( ( nDiagOffs1 <= 0 && nDiagOffs2 <= 0 ) || ( nDiagOffs1 >=0 && nDiagOffs2 >=0 ) ) + nWidth = lclToMapUnit( abs( nDiagOffs1 - nDiagOffs2 ) ); + + svtools::DrawLine( rDev, aSMid, aEMid, nWidth, nDashing ); rDev.Pop(); // clipping region } @@ -1147,9 +1049,9 @@ void lclDrawDiagFrameBorder( lclPushCrossingClipRegion( rDev, rRect, bTLBR, rCrossStyle ); lclSetColorToOutDev( rDev, rBorder, pForceColor ); - lclDrawDiagLine( rDev, rRect, bTLBR, rResult.maPrim, lclGetBeg( rBorder ), lclGetPrimEnd( rBorder ), rBorder.Dotted() ); + lclDrawDiagLine( rDev, rRect, bTLBR, rResult.maPrim, lclGetBeg( rBorder ), lclGetPrimEnd( rBorder ), rBorder.Dashing() ); if( rBorder.Secn() ) - lclDrawDiagLine( rDev, rRect, bTLBR, rResult.maSecn, lclGetSecnBeg( rBorder ), lclGetEnd( rBorder ), rBorder.Dotted() ); + lclDrawDiagLine( rDev, rRect, bTLBR, rResult.maSecn, lclGetSecnBeg( rBorder ), lclGetEnd( rBorder ), rBorder.Dashing() ); rDev.Pop(); // colors if( bClip ) @@ -1226,7 +1128,7 @@ void Style::Set( const Color& rColor, sal_uInt16 nP, sal_uInt16 nD, sal_uInt16 n Set( nP, nD, nS ); } -void Style::Set( const SvxBorderLine& rBorder, double fScale, sal_uInt16 nMaxWidth, bool bUseDots ) +void Style::Set( const SvxBorderLine& rBorder, double fScale, sal_uInt16 nMaxWidth ) { maColor = rBorder.GetColor(); @@ -1237,12 +1139,12 @@ void Style::Set( const SvxBorderLine& rBorder, double fScale, sal_uInt16 nMaxWid if( !nSecn ) // no or single frame border { Set( SCALEVALUE( nPrim ), 0, 0 ); - mbDotted = bUseDots && (0 < nPrim) && (nPrim < 10); + mnDashing = rBorder.GetStyle(); } else { Set( SCALEVALUE( nPrim ), SCALEVALUE( nDist ), SCALEVALUE( nSecn ) ); - mbDotted = false; + mnDashing = SOLID; // Enlarge the style if distance is too small due to rounding losses. sal_uInt16 nPixWidth = SCALEVALUE( nPrim + nDist + nSecn ); if( nPixWidth > GetWidth() ) @@ -1275,14 +1177,14 @@ void Style::Set( const SvxBorderLine& rBorder, double fScale, sal_uInt16 nMaxWid } } -void Style::Set( const SvxBorderLine* pBorder, double fScale, sal_uInt16 nMaxWidth, bool bUseDots ) +void Style::Set( const SvxBorderLine* pBorder, double fScale, sal_uInt16 nMaxWidth ) { if( pBorder ) - Set( *pBorder, fScale, nMaxWidth, bUseDots ); + Set( *pBorder, fScale, nMaxWidth ); else { Clear(); - mbDotted = false; + mnDashing = SOLID; } } @@ -1314,7 +1216,8 @@ Style Style::Mirror() const bool operator==( const Style& rL, const Style& rR ) { return (rL.Prim() == rR.Prim()) && (rL.Dist() == rR.Dist()) && (rL.Secn() == rR.Secn()) && - (rL.GetColor() == rR.GetColor()) && (rL.GetRefMode() == rR.GetRefMode()) && (rL.Dotted() == rR.Dotted()); + (rL.GetColor() == rR.GetColor()) && (rL.GetRefMode() == rR.GetRefMode()) && + (rL.Dashing() == rR.Dashing()); } bool operator<( const Style& rL, const Style& rR ) @@ -1331,7 +1234,7 @@ bool operator<( const Style& rL, const Style& rR ) if( (rL.Secn() && rR.Secn()) && (rL.Dist() != rR.Dist()) ) return rL.Dist() > rR.Dist(); // both lines single and 1 unit thick, only one is dotted -> rL<rR, if rL is dotted - if( (nLW == 1) && (rL.Dotted() != rR.Dotted()) ) return rL.Dotted(); + if( (nLW == 1) && (rL.Dashing() != rR.Dashing()) ) return rL.Dashing(); // seem to be equal return false; @@ -1498,10 +1401,10 @@ void DrawVerFrameBorderSlanted( OutputDevice& rDev, lclSetColorToOutDev( rDev, aScaled, pForceColor ); lclDrawVerLine( rDev, rTPos, aRes, rBPos, aRes, - lclGetBeg( aScaled ), lclGetPrimEnd( aScaled ), aScaled.Dotted() ); + lclGetBeg( aScaled ), lclGetPrimEnd( aScaled ), aScaled.Dashing() ); if( aScaled.Secn() ) lclDrawVerLine( rDev, rTPos, aRes, rBPos, aRes, - lclGetSecnBeg( aScaled ), lclGetEnd( aScaled ), aScaled.Dotted() ); + lclGetSecnBeg( aScaled ), lclGetEnd( aScaled ), aScaled.Dashing() ); rDev.Pop(); // colors } } @@ -1529,3 +1432,4 @@ void DrawDiagFrameBorders( } // namespace frame } // namespace svx +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx index 273f2e8ce8..e778abca89 100644 --- a/svx/source/dialog/framelinkarray.cxx +++ b/svx/source/dialog/framelinkarray.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1245,3 +1246,4 @@ void Array::DrawArray( OutputDevice& rDev, const Color* pForceColor ) const } // namespace frame } // namespace svx +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/frmdirlbox.cxx b/svx/source/dialog/frmdirlbox.cxx index 89b8f73480..03b1eec8a2 100644 --- a/svx/source/dialog/frmdirlbox.cxx +++ b/svx/source/dialog/frmdirlbox.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -125,3 +126,4 @@ void FrameDirListBoxWrapper::SetControlValue( SvxFrameDirection eValue ) } // namespace svx +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index b562e123b4..867ef9a593 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,12 +36,8 @@ #include "AccessibleFrameSelector.hxx" #include <svx/dialmgr.hxx> -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> -#endif -#ifndef SVX_FRMSEL_HRC #include "frmsel.hrc" -#endif #include <tools/rcid.h> @@ -157,7 +154,7 @@ void FrameBorder::SetCoreStyle( const SvxBorderLine* pStyle ) maCoreStyle = SvxBorderLine(); // from twips to points - maUIStyle.Set( maCoreStyle, 0.05, FRAMESEL_GEOM_WIDTH, true ); + maUIStyle.Set( maCoreStyle, 0.05, FRAMESEL_GEOM_WIDTH ); meState = maUIStyle.Prim() ? FRAMESTATE_SHOW : FRAMESTATE_HIDE; } @@ -637,11 +634,31 @@ void FrameSelectorImpl::DrawAllFrameBorders() // Copy all frame border styles to the helper array maArray.SetColumnStyleLeft( 0, maLeft.GetUIStyle() ); if( mbVer ) maArray.SetColumnStyleLeft( 1, maVer.GetUIStyle() ); - maArray.SetColumnStyleRight( mbVer ? 1 : 0, maRight.GetUIStyle() ); + + // Invert the style for the right line + const frame::Style rRightStyle = maRight.GetUIStyle( ); + frame::Style rInvertedRight( rRightStyle.GetColor(), + rRightStyle.Secn(), rRightStyle.Dist(), rRightStyle.Prim( ), + rRightStyle.Dashing( ) ); + maArray.SetColumnStyleRight( mbVer ? 1 : 0, rInvertedRight ); maArray.SetRowStyleTop( 0, maTop.GetUIStyle() ); - if( mbHor ) maArray.SetRowStyleTop( 1, maHor.GetUIStyle() ); - maArray.SetRowStyleBottom( mbHor ? 1 : 0, maBottom.GetUIStyle() ); + if( mbHor ) + { + // Invert the style for the hor line to match the real borders + const frame::Style rHorStyle = maHor.GetUIStyle(); + frame::Style rInvertedHor( rHorStyle.GetColor(), + rHorStyle.Secn(), rHorStyle.Dist(), rHorStyle.Prim( ), + rHorStyle.Dashing() ); + maArray.SetRowStyleTop( 1, rInvertedHor ); + } + + // Invert the style for the bottom line + const frame::Style rBottomStyle = maBottom.GetUIStyle( ); + frame::Style rInvertedBottom( rBottomStyle.GetColor(), + rBottomStyle.Secn(), rBottomStyle.Dist(), rBottomStyle.Prim( ), + rBottomStyle.Dashing() ); + maArray.SetRowStyleBottom( mbHor ? 1 : 0, rInvertedBottom ); for( size_t nCol = 0; nCol < maArray.GetColCount(); ++nCol ) for( size_t nRow = 0; nRow < maArray.GetRowCount(); ++nRow ) @@ -862,7 +879,8 @@ void FrameSelector::HideAllBorders() mxImpl->SetBorderState( **aIt, FRAMESTATE_HIDE ); } -bool FrameSelector::GetVisibleWidth( USHORT& rnPrim, USHORT& rnDist, USHORT& rnSecn ) const +bool FrameSelector::GetVisibleWidth( USHORT& rnPrim, USHORT& rnDist, USHORT& rnSecn, + SvxBorderStyle& rnStyle ) const { VisFrameBorderCIter aIt( mxImpl->maEnabBorders ); if( !aIt.Is() ) @@ -874,13 +892,15 @@ bool FrameSelector::GetVisibleWidth( USHORT& rnPrim, USHORT& rnDist, USHORT& rnS bFound = (rStyle.GetOutWidth() == (*aIt)->GetCoreStyle().GetOutWidth()) && (rStyle.GetDistance() == (*aIt)->GetCoreStyle().GetDistance()) && - (rStyle.GetInWidth() == (*aIt)->GetCoreStyle().GetInWidth()); + (rStyle.GetInWidth() == (*aIt)->GetCoreStyle().GetInWidth()) && + (rStyle.GetStyle() == (*aIt)->GetCoreStyle().GetStyle()); if( bFound ) { rnPrim = rStyle.GetOutWidth(); rnDist = rStyle.GetDistance(); rnSecn = rStyle.GetInWidth(); + rnStyle = rStyle.GetStyle(); } return bFound; } @@ -941,11 +961,13 @@ void FrameSelector::SelectAllVisibleBorders( bool bSelect ) mxImpl->SelectBorder( **aIt, bSelect ); } -void FrameSelector::SetStyleToSelection( USHORT nPrim, USHORT nDist, USHORT nSecn ) +void FrameSelector::SetStyleToSelection( USHORT nPrim, USHORT nDist, USHORT nSecn, + SvxBorderStyle nStyle ) { mxImpl->maCurrStyle.SetOutWidth( nPrim ); mxImpl->maCurrStyle.SetDistance( nDist ); mxImpl->maCurrStyle.SetInWidth( nSecn ); + mxImpl->maCurrStyle.SetStyle( nStyle ); for( SelFrameBorderIter aIt( mxImpl->maEnabBorders ); aIt.Is(); ++aIt ) mxImpl->SetBorderState( **aIt, FRAMESTATE_SHOW ); } @@ -1203,3 +1225,4 @@ FrameBorderIterBase< Cont, Iter, Pred >& FrameBorderIterBase< Cont, Iter, Pred > } // namespace svx +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index 75496b2492..e8d3fd5acf 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ #include <unotools/syslocale.hxx> #include <rtl/math.hxx> #include <unotools/localedatawrapper.hxx> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #include <vcl/svapp.hxx> #include <osl/mutex.hxx> @@ -182,7 +181,7 @@ void GraphCtrl::SetWinStyle( WinBits nWinBits ) void GraphCtrl::InitSdrModel() { - ::vos::OGuard aGuard (Application::GetSolarMutex()); + SolarMutexGuard aGuard; SdrPage* pPage; @@ -616,7 +615,7 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt ) if(pView->IsDragObj()) { - FASTBOOL bWasNoSnap = rDragStat.IsNoSnap(); + bool bWasNoSnap = rDragStat.IsNoSnap(); BOOL bWasSnapEnabled = pView->IsSnapEnabled(); // switch snapping off @@ -958,3 +957,5 @@ IMPL_LINK( GraphCtrl, UpdateHdl, Timer*, pTimer ) return mpAccContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx index bf8bd104a2..d69290ad1d 100644 --- a/svx/source/dialog/grfflt.cxx +++ b/svx/source/dialog/grfflt.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,16 +32,13 @@ #include <vcl/msgbox.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> -#ifndef _SFXOBJSH_HXX #include <sfx2/objsh.hxx> -#endif #include <sfx2/request.hxx> #include <svx/dialmgr.hxx> #include <svx/grfflt.hxx> -//#include "grfflt.hrc" #include <svx/dialogs.hrc> -#include <svx/svxdlg.hxx> //CHINA001 +#include <svx/svxdlg.hxx> // -------------------- // - SvxGraphicFilter - @@ -187,7 +185,6 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r case( SID_GRFFILTER_MOSAIC ): { - //CHINA001 GraphicFilterMosaic aDlg( pWindow, rGraphic, 4, 4, FALSE ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { @@ -202,30 +199,28 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r case( SID_GRFFILTER_EMBOSS ): { - //CHINA001 GraphicFilterEmboss aDlg( pWindow, rGraphic, RP_MM ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterEmboss( pWindow, rGraphic, RP_MM, RID_SVX_GRFFILTER_DLG_EMBOSS ); - DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 - if( aDlg->Execute() == RET_OK ) //CHINA001 if( aDlg.Execute() == RET_OK ) - aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); //CHINA001 aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); - delete aDlg; //add by CHINA001 + DBG_ASSERT(aDlg, "Dialogdiet fail!"); + if( aDlg->Execute() == RET_OK ) + aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); + delete aDlg; } } break; case( SID_GRFFILTER_POSTER ): { - //CHINA001 GraphicFilterPoster aDlg( pWindow, rGraphic, 16 ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterPosterSepia( pWindow, rGraphic, 16, RID_SVX_GRFFILTER_DLG_POSTER ); - DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 - if( aDlg->Execute() == RET_OK ) //CHINA001 if( aDlg.Execute() == RET_OK ) - aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); //CHINA001 aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); - delete aDlg; //add by CHINA001 + DBG_ASSERT(aDlg, "Dialogdiet fail!"); + if( aDlg->Execute() == RET_OK ) + aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); + delete aDlg; } } break; @@ -257,30 +252,28 @@ ULONG SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObject& r case( SID_GRFFILTER_SEPIA ): { - //CHINA001 GraphicFilterSepia aDlg( pWindow, rGraphic, 10 ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterPosterSepia( pWindow, rGraphic, 10, RID_SVX_GRFFILTER_DLG_SEPIA ); - DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 - if( aDlg->Execute() == RET_OK ) //CHINA001 if( aDlg.Execute() == RET_OK ) - aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); //CHINA001 aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); - delete aDlg; //add by CHINA001 + DBG_ASSERT(aDlg, "Dialogdiet fail!"); + if( aDlg->Execute() == RET_OK ) + aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); + delete aDlg; } } break; case( SID_GRFFILTER_SOLARIZE ): { - //CHINA001 GraphicFilterSolarize aDlg( pWindow, rGraphic, 128, FALSE ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterSolarize( pWindow, rGraphic, 128, FALSE, RID_SVX_GRFFILTER_DLG_SOLARIZE ); - DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 - if( aDlg->Execute() == RET_OK ) //CHINA001 if( aDlg.Execute() == RET_OK ) - aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); //CHINA001 aGraphic = aDlg.GetFilteredGraphic( rGraphic, 1.0, 1.0 ); - delete aDlg; //add by CHINA001 + DBG_ASSERT(aDlg, "Dialogdiet fail!"); + if( aDlg->Execute() == RET_OK ) + aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 ); + delete aDlg; } } break; @@ -350,444 +343,5 @@ void SvxGraphicFilter::DisableGraphicFilterSlots( SfxItemSet& rSet ) if( SFX_ITEM_AVAILABLE <= rSet.GetItemState( SID_GRFFILTER_SOLARIZE ) ) rSet.DisableItem( SID_GRFFILTER_SOLARIZE ); }; -/* CHINA001 move to cuigrfflt.cxx -// -------------------------------------- -// - GraphicFilterDialog::PreviewWindow - -// -------------------------------------- - -GraphicFilterDialog::PreviewWindow::PreviewWindow( Window* pParent, const ResId& rResId ) : - Control( pParent, rResId ) -{ -} - -// ----------------------------------------------------------------------------- - -GraphicFilterDialog::PreviewWindow::~PreviewWindow() -{ -} - -// ----------------------------------------------------------------------------- - -void GraphicFilterDialog::PreviewWindow::Paint( const Rectangle& rRect ) -{ - Control::Paint( rRect ); - - const Size aGrfSize( LogicToPixel( maGraphic.GetPrefSize(), maGraphic.GetPrefMapMode() ) ); - const Size aOutSize( GetOutputSizePixel() ); - const Point aGrfPos( ( aOutSize.Width() - aGrfSize.Width() ) >> 1, - ( aOutSize.Height() - aGrfSize.Height() ) >> 1 ); - - if( maGraphic.IsAnimated() ) - maGraphic.StartAnimation( this , aGrfPos, aGrfSize ); - else - maGraphic.Draw( this, aGrfPos, aGrfSize ); -} - -// ----------------------------------------------------------------------------- - -void GraphicFilterDialog::PreviewWindow::SetGraphic( const Graphic& rGraphic ) -{ - maGraphic = rGraphic; - - if( maGraphic.IsAnimated() || maGraphic.IsTransparent() ) - Invalidate(); - else - Paint( Rectangle( Point(), GetOutputSizePixel() ) ); -} - -// ----------------------- -// - GraphicFilterDialog - -// ----------------------- - -GraphicFilterDialog::GraphicFilterDialog( Window* pParent, const ResId& rResId, const Graphic& rGraphic ) : - ModalDialog ( pParent, rResId ), - mfScaleX ( 0.0 ), - mfScaleY ( 0.0 ), - maSizePixel ( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ), - maModifyHdl ( LINK( this, GraphicFilterDialog, ImplModifyHdl ) ), - maPreview ( this, SVX_RES( CTL_PREVIEW ) ), - maFlParameter ( this, SVX_RES( FL_PARAMETER ) ), - maBtnOK ( this, SVX_RES( BTN_OK ) ), - maBtnCancel ( this, SVX_RES( BTN_CANCEL ) ), - maBtnHelp ( this, SVX_RES( BTN_HELP ) ) -{ - const Size aPreviewSize( maPreview.GetOutputSizePixel() ); - Size aGrfSize( maSizePixel ); - - if( rGraphic.GetType() == GRAPHIC_BITMAP && - aPreviewSize.Width() && aPreviewSize.Height() && - aGrfSize.Width() && aGrfSize.Height() ) - { - const double fGrfWH = (double) aGrfSize.Width() / aGrfSize.Height(); - const double fPreWH = (double) aPreviewSize.Width() / aPreviewSize.Height(); - - if( fGrfWH < fPreWH ) - { - aGrfSize.Width() = (long) ( aPreviewSize.Height() * fGrfWH ); - aGrfSize.Height()= aPreviewSize.Height(); - } - else - { - aGrfSize.Width() = aPreviewSize.Width(); - aGrfSize.Height()= (long) ( aPreviewSize.Width() / fGrfWH); - } - - mfScaleX = (double) aGrfSize.Width() / maSizePixel.Width(); - mfScaleY = (double) aGrfSize.Height() / maSizePixel.Height(); - - if( !rGraphic.IsAnimated() ) - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.Scale( aGrfSize, BMP_SCALE_INTERPOLATE ) ) - maGraphic = aBmpEx; - } - } - - maTimer.SetTimeoutHdl( LINK( this, GraphicFilterDialog, ImplPreviewTimeoutHdl ) ); - maTimer.SetTimeout( 100 ); - ImplModifyHdl( NULL ); -} - -// ----------------------------------------------------------------------------- - -GraphicFilterDialog::~GraphicFilterDialog() -{ -} - -// ----------------------------------------------------------------------------- - -IMPL_LINK( GraphicFilterDialog, ImplPreviewTimeoutHdl, Timer*, pTimer ) -{ - maTimer.Stop(); - maPreview.SetGraphic( GetFilteredGraphic( maGraphic, mfScaleX, mfScaleY ) ); - - return 0; -} - -// ----------------------------------------------------------------------------- - -IMPL_LINK( GraphicFilterDialog, ImplModifyHdl, void*, p ) -{ - if( maGraphic.GetType() == GRAPHIC_BITMAP ) - { - maTimer.Stop(); - maTimer.Start(); - } - - return 0; -} - -// ---------------- -// - FilterMosaic - -// ---------------- - -GraphicFilterMosaic::GraphicFilterMosaic( Window* pParent, const Graphic& rGraphic, - USHORT nTileWidth, USHORT nTileHeight, BOOL bEnhanceEdges ) : - GraphicFilterDialog( pParent, SVX_RES( RID_SVX_GRFFILTER_DLG_MOSAIC ), rGraphic ), - maFtWidth ( this, SVX_RES( DLG_FILTERMOSAIC_FT_WIDTH ) ), - maMtrWidth ( this, SVX_RES( DLG_FILTERMOSAIC_MTR_WIDTH ) ), - maFtHeight ( this, SVX_RES( DLG_FILTERMOSAIC_FT_HEIGHT ) ), - maMtrHeight ( this, SVX_RES( DLG_FILTERMOSAIC_MTR_HEIGHT ) ), - maCbxEdges ( this, SVX_RES( DLG_FILTERMOSAIC_CBX_EDGES ) ) -{ - FreeResource(); - - maMtrWidth.SetValue( nTileWidth ); - maMtrWidth.SetLast( GetGraphicSizePixel().Width() ); - maMtrWidth.SetModifyHdl( GetModifyHdl() ); - - maMtrHeight.SetValue( nTileHeight ); - maMtrHeight.SetLast( GetGraphicSizePixel().Height() ); - maMtrHeight.SetModifyHdl( GetModifyHdl() ); - - maCbxEdges.Check( bEnhanceEdges ); - maCbxEdges.SetToggleHdl( GetModifyHdl() ); - - maMtrWidth.GrabFocus(); -} - -// ----------------------------------------------------------------------------- - -GraphicFilterMosaic::~GraphicFilterMosaic() -{ -} - -// ----------------------------------------------------------------------------- - -Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic, - double fScaleX, double fScaleY ) -{ - Graphic aRet; - const Size aSize( Max( FRound( GetTileWidth() * fScaleX ), 1L ), - Max( FRound( GetTileHeight() * fScaleY ), 1L ) ); - BmpFilterParam aParam( aSize ); - - if( rGraphic.IsAnimated() ) - { - Animation aAnim( rGraphic.GetAnimation() ); - - if( aAnim.Filter( BMP_FILTER_MOSAIC, &aParam ) ) - { - if( IsEnhanceEdges() ) - aAnim.Filter( BMP_FILTER_SHARPEN ); - - aRet = aAnim; - } - } - else - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.Filter( BMP_FILTER_MOSAIC, &aParam ) ) - { - if( IsEnhanceEdges() ) - aBmpEx.Filter( BMP_FILTER_SHARPEN ); - - aRet = aBmpEx; - } - } - - return aRet; -} - -// ------------------ -// - GraphicFilterSolarize - -// ------------------ - -GraphicFilterSolarize::GraphicFilterSolarize( Window* pParent, const Graphic& rGraphic, - BYTE cGreyThreshold, BOOL bInvert ) : - GraphicFilterDialog ( pParent, SVX_RES( RID_SVX_GRFFILTER_DLG_SOLARIZE ), rGraphic ), - maFtThreshold ( this, SVX_RES( DLG_FILTERSOLARIZE_FT_THRESHOLD ) ), - maMtrThreshold ( this, SVX_RES( DLG_FILTERSOLARIZE_MTR_THRESHOLD ) ), - maCbxInvert ( this, SVX_RES( DLG_FILTERSOLARIZE_CBX_INVERT ) ) -{ - FreeResource(); - - maMtrThreshold.SetValue( FRound( cGreyThreshold / 2.55 ) ); - maMtrThreshold.SetModifyHdl( GetModifyHdl() ); - maCbxInvert.Check( bInvert ); - maCbxInvert.SetToggleHdl( GetModifyHdl() ); - - maMtrThreshold.GrabFocus(); -} - -// ----------------------------------------------------------------------------- - -GraphicFilterSolarize::~GraphicFilterSolarize() -{ -} - -// ----------------------------------------------------------------------------- - -Graphic GraphicFilterSolarize::GetFilteredGraphic( const Graphic& rGraphic, - double fScaleX, double fScaleY ) -{ - Graphic aRet; - BmpFilterParam aParam( GetGreyThreshold() ); - - if( rGraphic.IsAnimated() ) - { - Animation aAnim( rGraphic.GetAnimation() ); - - if( aAnim.Filter( BMP_FILTER_SOLARIZE, &aParam ) ) - { - if( IsInvert() ) - aAnim.Invert(); - - aRet = aAnim; - } - } - else - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.Filter( BMP_FILTER_SOLARIZE, &aParam ) ) - { - if( IsInvert() ) - aBmpEx.Invert(); - - aRet = aBmpEx; - } - } - - return aRet; -} - -// ---------------------- -// - GraphicFilterSepia - -// ---------------------- - -GraphicFilterSepia::GraphicFilterSepia( Window* pParent, const Graphic& rGraphic, - USHORT nSepiaPercent ) : - GraphicFilterDialog ( pParent, SVX_RES( RID_SVX_GRFFILTER_DLG_SEPIA ), rGraphic ), - maFtSepia ( this, SVX_RES( DLG_FILTERSEPIA_FT_SEPIA ) ), - maMtrSepia ( this, SVX_RES( DLG_FILTERSEPIA_MTR_SEPIA ) ) -{ - FreeResource(); - - maMtrSepia.SetValue( nSepiaPercent ); - maMtrSepia.SetModifyHdl( GetModifyHdl() ); - - maMtrSepia.GrabFocus(); -} - -// ----------------------------------------------------------------------------- - -GraphicFilterSepia::~GraphicFilterSepia() -{ -} - -// ----------------------------------------------------------------------------- - -Graphic GraphicFilterSepia::GetFilteredGraphic( const Graphic& rGraphic, - double fScaleX, double fScaleY ) -{ - Graphic aRet; - BmpFilterParam aParam( GetSepiaPercent() ); - - if( rGraphic.IsAnimated() ) - { - Animation aAnim( rGraphic.GetAnimation() ); - - if( aAnim.Filter( BMP_FILTER_SEPIA, &aParam ) ) - aRet = aAnim; - } - else - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.Filter( BMP_FILTER_SEPIA, &aParam ) ) - aRet = aBmpEx; - } - - return aRet; -} - -// ----------------------- -// - GraphicFilterPoster - -// ----------------------- - -GraphicFilterPoster::GraphicFilterPoster( Window* pParent, const Graphic& rGraphic, - USHORT nPosterCount ) : - GraphicFilterDialog ( pParent, SVX_RES( RID_SVX_GRFFILTER_DLG_POSTER ), rGraphic ), - maFtPoster ( this, SVX_RES( DLG_FILTERPOSTER_FT_POSTER ) ), - maNumPoster ( this, SVX_RES( DLG_FILTERPOSTER_NUM_POSTER ) ) -{ - FreeResource(); - - maNumPoster.SetFirst( 2 ); - maNumPoster.SetLast( rGraphic.GetBitmapEx().GetBitCount() ); - maNumPoster.SetValue( nPosterCount ); - maNumPoster.SetModifyHdl( GetModifyHdl() ); - maNumPoster.GrabFocus(); -} - -// ----------------------------------------------------------------------------- - -GraphicFilterPoster::~GraphicFilterPoster() -{ -} - -// ----------------------------------------------------------------------------- - -Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic, - double fScaleX, double fScaleY ) -{ - Graphic aRet; - const USHORT nPosterCount = GetPosterColorCount(); - - if( rGraphic.IsAnimated() ) - { - Animation aAnim( rGraphic.GetAnimation() ); - - if( aAnim.ReduceColors( nPosterCount, BMP_REDUCE_POPULAR ) ) - aRet = aAnim; - } - else - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.ReduceColors( nPosterCount, BMP_REDUCE_POPULAR ) ) - aRet = aBmpEx; - } - - return aRet; -} - -// ----------------------- -// - GraphicFilterEmboss - -// ----------------------- - -void GraphicFilterEmboss::EmbossControl::MouseButtonDown( const MouseEvent& rEvt ) -{ - const RECT_POINT eOldRP = GetActualRP(); - - SvxRectCtl::MouseButtonDown( rEvt ); - - if( GetActualRP() != eOldRP ) - maModifyHdl.Call( this ); -} - -// ----------------------------------------------------------------------------- - -GraphicFilterEmboss::GraphicFilterEmboss( Window* pParent, const Graphic& rGraphic, - RECT_POINT eLightSource ) : - GraphicFilterDialog ( pParent, SVX_RES( RID_SVX_GRFFILTER_DLG_EMBOSS ), rGraphic ), - maFtLight ( this, SVX_RES( DLG_FILTEREMBOSS_FT_LIGHT ) ), - maCtlLight ( this, SVX_RES( DLG_FILTEREMBOSS_CTL_LIGHT ), eLightSource ) -{ - FreeResource(); - - maCtlLight.SetModifyHdl( GetModifyHdl() ); - maCtlLight.GrabFocus(); -} - -// ----------------------------------------------------------------------------- - -GraphicFilterEmboss::~GraphicFilterEmboss() -{ -} - -// ----------------------------------------------------------------------------- - -Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic, - double fScaleX, double fScaleY ) -{ - Graphic aRet; - USHORT nAzim, nElev; - - switch( maCtlLight.GetActualRP() ) - { - case( RP_LT ): nAzim = 4500, nElev = 4500; break; - case( RP_MT ): nAzim = 9000, nElev = 4500; break; - case( RP_RT ): nAzim = 13500, nElev = 4500; break; - case( RP_LM ): nAzim = 0, nElev = 4500; break; - case( RP_MM ): nAzim = 0, nElev = 9000; break; - case( RP_RM ): nAzim = 18000, nElev = 4500; break; - case( RP_LB ): nAzim = 31500, nElev = 4500; break; - case( RP_MB ): nAzim = 27000, nElev = 4500; break; - case( RP_RB ): nAzim = 22500, nElev = 4500; break; - } - - BmpFilterParam aParam( nAzim, nElev ); - - if( rGraphic.IsAnimated() ) - { - Animation aAnim( rGraphic.GetAnimation() ); - - if( aAnim.Filter( BMP_FILTER_EMBOSS_GREY, &aParam ) ) - aRet = aAnim; - } - else - { - BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); - - if( aBmpEx.Filter( BMP_FILTER_EMBOSS_GREY, &aParam ) ) - aRet = aBmpEx; - } - - return aRet; -} -*/ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index aa64c47efa..d782152429 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,11 +60,11 @@ #include <editeng/sizeitem.hxx> #include <editeng/boxitem.hxx> -#include <svx/svxdlg.hxx> //CHINA001 -#include <svx/dialogs.hrc> //CHINA001 +#include <svx/svxdlg.hxx> +#include <svx/dialogs.hrc> // static ---------------------------------------------------------------- -// --> OD 2004-06-18 #i19922# +// Word 97 incompatibility (#i19922#) //static const long MINBODY = 284; // 0,5cm in twips aufgerundet static const long MINBODY = 56; // 1mm in twips rounded @@ -89,10 +90,6 @@ static USHORT pRanges[] = 0 }; -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - // gibt den Bereich der Which-Werte zurueck @@ -388,13 +385,13 @@ void SvxHFPage::Reset( const SfxItemSet& rSet ) aCntSharedBox.SaveValue(); RangeHdl( 0 ); - USHORT nHtmlMode = 0; const SfxPoolItem* pItem = 0; SfxObjectShell* pShell; if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { + USHORT nHtmlMode = 0; nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue(); if(nHtmlMode && HTMLMODE_ON) { @@ -544,8 +541,6 @@ IMPL_LINK( SvxHFPage, BackgroundHdl, Button *, EMPTYARG ) pBBSet->Put( *pItem ); } - //CHINA001 SvxBorderBackgroundDlg* pDlg = -//CHINA001 new SvxBorderBackgroundDlg( this, *pBBSet, bEnableBackgroundSelector ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { @@ -712,10 +707,6 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet ) } } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - void SvxHFPage::ActivatePage( const SfxItemSet& rSet ) { const SfxPoolItem* pItem = GetItem( rSet, SID_ATTR_LRSPACE ); @@ -867,10 +858,6 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet ) RangeHdl( 0 ); } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - int SvxHFPage::DeactivatePage( SfxItemSet* _pSet ) { if ( _pSet ) @@ -954,9 +941,7 @@ IMPL_LINK( SvxHFPage, RangeHdl, Edit *, EMPTYARG ) aRMEdit.SetMax( aLMEdit.Normalize( nMax ), FUNIT_TWIP ); return 0; } -/* -----------------------------26.08.2002 12:49------------------------------ - ---------------------------------------------------------------------------*/ void lcl_Move(Window& rWin, sal_Int32 nDiff) { Point aPos(rWin.GetPosPixel()); @@ -981,3 +966,4 @@ void SvxHFPage::EnableDynamicSpacing() lcl_Move(*aMoveWindows[nIdx++], nOffset); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx index fed065cba4..a755c3f224 100644 --- a/svx/source/dialog/hyperdlg.cxx +++ b/svx/source/dialog/hyperdlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,11 +66,10 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( Window* _pParent, USHORT nId, mpDlg( NULL ) { - //CHINA001 pWindow = new SvxHpLinkDlg( _pParent, pBindings ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 + DBG_ASSERT(pFact, "Dialogdiet fail!"); mpDlg = pFact->CreateSvxHpLinkDlg( _pParent, pBindings, SID_HYPERLINK_DIALOG ); - DBG_ASSERT(mpDlg, "Dialogdiet fail!");//CHINA001 + DBG_ASSERT(mpDlg, "Dialogdiet fail!"); pWindow = mpDlg->GetWindow(); ((MyStruct*)pImp)->bVisible = FALSE; @@ -105,3 +105,4 @@ sal_Bool SvxHlinkDlgWrapper::QueryClose() return mpDlg ? mpDlg->QueryClose() : sal_True; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/hyprdlg.hxx b/svx/source/dialog/hyprdlg.hxx index 465e18337d..d0db4fcd87 100644 --- a/svx/source/dialog/hyprdlg.hxx +++ b/svx/source/dialog/hyprdlg.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,10 +39,6 @@ class SvxHyperlinkDlg; class SfxViewFrame; -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - class HyperCombo : public ComboBox { SvxHyperlinkDlg *pDlg; @@ -141,3 +138,4 @@ public: #endif // _SVX_DLG_HYPERDLG_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx index e69800cfa1..22f6717739 100644 --- a/svx/source/dialog/hyprlink.cxx +++ b/svx/source/dialog/hyprlink.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,20 +68,15 @@ public: virtual void Commit(); }; -/*-- 11.11.2003 14:20:59--------------------------------------------------- - - -----------------------------------------------------------------------*/ SearchDefaultConfigItem_Impl::SearchDefaultConfigItem_Impl() : ConfigItem(OUString::createFromAscii("Inet/DefaultSearchEngine")) { uno::Sequence<OUString> aNames(1); - aNames.getArray()[0] = OUString::createFromAscii("Name"); + aNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Name")); uno::Sequence< uno::Any > aValues = GetProperties(aNames); aValues.getConstArray()[0] >>= sDefaultEngine; } -/*-- 11.11.2003 14:21:00--------------------------------------------------- - -----------------------------------------------------------------------*/ SearchDefaultConfigItem_Impl::~SearchDefaultConfigItem_Impl() { } @@ -202,10 +198,6 @@ SvxHyperlinkDlg::SvxHyperlinkDlg( SfxBindings *_pBindings, Window* pParent) : HideItem( BTN_INET_SEARCH ); } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - SvxHyperlinkDlg::~SvxHyperlinkDlg() { SfxImageManager::GetImageManager( 0 )->ReleaseToolBox(this); @@ -246,10 +238,6 @@ void SvxHyperlinkDlg::Resize() } } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - void SvxHyperlinkDlg::Resizing(Size& rSize) { if (rSize.Height() > nMaxHeight) @@ -338,10 +326,6 @@ void SvxHyperlinkDlg::StateChanged( USHORT nSID, SfxItemState eState, } } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - IMPL_LINK( SvxHyperlinkDlg, TBClickHdl, ToolBox *, pBox ) { switch (pBox->GetCurItemId()) @@ -363,10 +347,6 @@ IMPL_LINK( SvxHyperlinkDlg, TBClickHdl, ToolBox *, pBox ) return TRUE; } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - IMPL_LINK( SvxHyperlinkDlg, TBSelectHdl, ToolBox *, pBox ) { switch (pBox->GetCurItemId()) @@ -459,10 +439,6 @@ IMPL_LINK( SvxHyperlinkDlg, DropdownClick, ToolBox *, pBox ) return TRUE; } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - void SvxHyperlinkDlg::TargetMenu(const String& rSelEntry, BOOL bExecute) { if (pTargetMenu && !bExecute) @@ -484,9 +460,9 @@ void SvxHyperlinkDlg::TargetMenu(const String& rSelEntry, BOOL bExecute) TargetList aList; pVwFrm->GetTopFrame().GetTargetList(aList); - USHORT nCount = (USHORT)aList.Count(); - if( nCount ) + if ( !aList.empty() ) { + size_t nCount = aList.size(); BOOL bChecked = FALSE; if (pTargetMenu != NULL) @@ -495,10 +471,10 @@ void SvxHyperlinkDlg::TargetMenu(const String& rSelEntry, BOOL bExecute) pTargetMenu = new PopupMenu; pTargetMenu->SetMenuFlags( pTargetMenu->GetMenuFlags() | MENU_FLAG_NOAUTOMNEMONICS ); - USHORT i; - for ( i = 0; i < nCount; i++ ) + + for ( size_t i = 0; i < nCount; i++ ) { - String sEntry(*aList.GetObject(i)); + String sEntry( *aList[ i ] ); pTargetMenu->InsertItem(i + 1, sEntry, MIB_RADIOCHECK|MIB_AUTOCHECK); if (sEntry == rSelEntry) @@ -507,8 +483,8 @@ void SvxHyperlinkDlg::TargetMenu(const String& rSelEntry, BOOL bExecute) bChecked = TRUE; } } - for ( i = nCount; i; i-- ) - delete aList.GetObject( i - 1 ); + for ( size_t i = nCount; i; ) + delete aList[ --i ]; if (!bChecked) pTargetMenu->CheckItem(1); @@ -524,10 +500,6 @@ void SvxHyperlinkDlg::TargetMenu(const String& rSelEntry, BOOL bExecute) } } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - IMPL_LINK( SvxHyperlinkDlg, LinkPopupSelectHdl, Menu *, pMenu ) { switch (pMenu->GetCurItemId()) @@ -543,10 +515,6 @@ IMPL_LINK( SvxHyperlinkDlg, LinkPopupSelectHdl, Menu *, pMenu ) return TRUE; } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - IMPL_LINK( SvxHyperlinkDlg, SearchPopupSelectHdl, Menu *, pMenu ) { const SvxSearchEngineData& rData = aSearchConfig.GetData(pMenu->GetCurItemId() - 1); @@ -623,10 +591,6 @@ IMPL_LINK( SvxHyperlinkDlg, SearchPopupSelectHdl, Menu *, pMenu ) return TRUE; } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - IMPL_LINK( SvxHyperlinkDlg, BookmarkFoundHdl, String *, pUrl ) { if (pUrl && pUrl->Len()) @@ -791,10 +755,6 @@ IMPL_LINK( SvxHyperlinkDlg, ComboSelectHdl, ComboBox *, pCombo ) return TRUE; } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - IMPL_LINK( SvxHyperlinkDlg, ComboModifyHdl, ComboBox *, pCombo ) { BOOL bEnable = TRUE; @@ -851,6 +811,7 @@ void SvxHyperlinkDlg::SetImages() HyperCombo::HyperCombo( SvxHyperlinkDlg* pDialog, const ResId& rResId ) : ComboBox( (Window *)pDialog, rResId ) { + nRatio = 0; pDlg = pDialog; nMaxWidth = GetSizePixel().Width(); @@ -909,10 +870,6 @@ long HyperCombo::PreNotify( NotifyEvent& rNEvt ) return nHandled; } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - long HyperCombo::CalcResizeWidth( long nW ) { long nNewWidth = Max(nMaxWidth - nW * GetRatio() / 100L, nMinWidth); @@ -926,10 +883,6 @@ long HyperCombo::CalcResizeWidth( long nW ) return 0; // Kein Resize notwendig } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - void HyperCombo::DoResize( long nNewWidth ) { SetSizePixel(Size(nNewWidth, GetSizePixel().Height())); @@ -987,13 +940,10 @@ SvxHyperlinkDlgWrapper::SvxHyperlinkDlgWrapper( Window* _pParent, USHORT nId, eChildAlignment = SFX_ALIGN_TOP; } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - SfxChildWinInfo SvxHyperlinkDlgWrapper::GetInfo() const { SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); return aInfo; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index ae4c7f4da1..ec2e302973 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,13 +40,9 @@ #include <stdlib.h> #include <tools/shl.hxx> -#ifndef _EINF_HXX #include <tools/errinf.hxx> -#endif #include <tools/urlobj.hxx> -#ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX #include <unotools/ucbstreamhelper.hxx> -#endif #include <vcl/msgbox.hxx> #include <vcl/group.hxx> #include <vcl/lstbox.hxx> @@ -63,9 +60,7 @@ #include <sfx2/objsh.hxx> #include <sfx2/docfile.hxx> #include <unotools/localedatawrapper.hxx> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #define _IMAPDLG_PRIVATE #include "svx/imapdlg.hxx" @@ -203,7 +198,6 @@ SvxIMapDlg::SvxIMapDlg( SfxBindings *_pBindings, SfxChildWindow *pCW, maCbbTarget ( this, SVX_RES( RID_SVXCTL_CBB_TARGET ) ), aStbStatus ( this, WB_BORDER | WB_3DLOOK | WB_LEFT ), maImageList ( SVX_RES( IL_IMAPDLG ) ), - maImageListH ( SVX_RES( ILH_IMAPDLG ) ), pCheckObj ( NULL ), aIMapItem ( SID_IMAP_EXEC, *this, *_pBindings ) { @@ -409,8 +403,8 @@ void SvxIMapDlg::SetTargetList( const TargetList& rTargetList ) maCbbTarget.Clear(); - for( String* pStr = aNewList.First(); pStr; pStr = aNewList.Next() ) - maCbbTarget.InsertEntry( *pStr ); + for ( size_t i = 0, n = aNewList.size(); i < n; ++i ) + maCbbTarget.InsertEntry( *aNewList[ i ] ); } @@ -447,9 +441,9 @@ void SvxIMapDlg::Update( const Graphic& rGraphic, const ImageMap* pImageMap, // UpdateTargetList loeschen, da diese Methode // vor dem Zuschlagen des Update-Timers noch // mehrmals gerufen werden kann( #46540 ) - for( String* pStr = pOwnData->aUpdateTargetList.First(); pStr; pStr = pOwnData->aUpdateTargetList.Next() ) - delete pStr; - pOwnData->aUpdateTargetList.Clear(); + for ( size_t i = 0, n = pOwnData->aUpdateTargetList.size(); i < n; ++i ) + delete pOwnData->aUpdateTargetList[ i ]; + pOwnData->aUpdateTargetList.clear(); // TargetListe muss kopiert werden, da sie im // Besitz des Aufrufers ist und von ihm nach diesem @@ -459,8 +453,8 @@ void SvxIMapDlg::Update( const Graphic& rGraphic, const ImageMap* pImageMap, { TargetList aTargetList( *pTargetList ); - for( String* pStr = aTargetList.First(); pStr; pStr = aTargetList.Next() ) - pOwnData->aUpdateTargetList.Insert( new String( *pStr ) ); + for ( size_t i = 0, n = aTargetList.size(); i < n; ++i ) + pOwnData->aUpdateTargetList.push_back( new String( *aTargetList[ i ] ) ); } pOwnData->aTimer.Start(); @@ -954,10 +948,9 @@ IMPL_LINK( SvxIMapDlg, UpdateHdl, Timer*, EMPTYARG ) } // die in der Update-Methode kopierte Liste wieder loeschen - for( String* pStr = pOwnData->aUpdateTargetList.First(); pStr; pStr = pOwnData->aUpdateTargetList.Next() ) - delete pStr; - - pOwnData->aUpdateTargetList.Clear(); + for ( size_t i = 0, n = pOwnData->aUpdateTargetList.size(); i < n; ++i ) + delete pOwnData->aUpdateTargetList[ i ]; + pOwnData->aUpdateTargetList.clear(); GetBindings().Invalidate( SID_IMAP_EXEC ); @@ -1039,9 +1032,7 @@ IMPL_LINK( SvxIMapDlg, MiscHdl, void*, EMPTYARG ) void SvxIMapDlg::ApplyImageList() { - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - - ImageList& rImgLst = bHighContrast ? maImageListH : maImageList; + ImageList& rImgLst = maImageList; aTbxIMapDlg1.SetImageList( rImgLst ); } @@ -1053,3 +1044,5 @@ void SvxIMapDlg::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) ApplyImageList(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/imapdlg.hrc b/svx/source/dialog/imapdlg.hrc index 5247836d25..850c960ebb 100644 --- a/svx/source/dialog/imapdlg.hrc +++ b/svx/source/dialog/imapdlg.hrc @@ -71,7 +71,6 @@ #define STB_STATUS 1 #define IL_IMAPDLG 1024 -#define ILH_IMAPDLG 1025 /******************************************************************************/ diff --git a/svx/source/dialog/imapdlg.src b/svx/source/dialog/imapdlg.src index 202dc6d984..f6d990f930 100644 --- a/svx/source/dialog/imapdlg.src +++ b/svx/source/dialog/imapdlg.src @@ -269,13 +269,8 @@ ModelessDialog RID_SVXDLG_IMAP MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; } ; IMAPDLG_IDLIST }; - ImageList ILH_IMAPDLG - { - Prefix = "idh"; - MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; } ; - IMAPDLG_IDLIST - }; }; + Control RID_SVXCTL_IMAP { Border = TRUE ; diff --git a/svx/source/dialog/imapimp.hxx b/svx/source/dialog/imapimp.hxx index 0296bc426a..51ebf403f9 100644 --- a/svx/source/dialog/imapimp.hxx +++ b/svx/source/dialog/imapimp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,8 +50,10 @@ public: void* pUpdateEditingObject; BOOL bExecState; - IMapOwnData( SvxIMapDlg* pIMapDlg ) : pIMap ( pIMapDlg ) {} + IMapOwnData( SvxIMapDlg* pIMapDlg ) : pIMap ( pIMapDlg ), pUpdateEditingObject( NULL ) {} }; #endif // _IMAPIMP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 31b1757350..25cc6d5650 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,8 +96,8 @@ IMapWindow::IMapWindow( Window* pParent, const ResId& rResId, const Reference< X IMapWindow::~IMapWindow() { // Liste loeschen - for( String* pStr = aTargetList.First(); pStr; pStr = aTargetList.Next() ) - delete pStr; + for ( size_t i = 0, n = aTargetList.size(); i < n; ++i ) + delete aTargetList[ i ]; SfxItemPool::Free(pIMapPool); delete[] pItemInfo; @@ -218,17 +219,14 @@ const ImageMap& IMapWindow::GetImageMap() void IMapWindow::SetTargetList( TargetList& rTargetList ) { - String* pStr; - // alte Liste loeschen - for( pStr = aTargetList.First(); pStr; pStr = aTargetList.Next() ) - delete pStr; - - aTargetList.Clear(); + for( size_t i = 0, n = aTargetList.size(); i < n; ++i ) + delete aTargetList[ i ]; + aTargetList.clear(); // mit uebergebener Liste fuellen - for( pStr = rTargetList.First(); pStr; pStr = rTargetList.Next() ) - aTargetList.Insert( new String( *pStr ) ); + for( size_t i = 0, n = rTargetList.size(); i < n; ++i ) + aTargetList.push_back( new String( *rTargetList[ i ] ) ); pModel->SetChanged( sal_False ); } @@ -822,7 +820,7 @@ void IMapWindow::DoMacroAssign() aNamesItem.AddEvent( String::CreateFromAscii( "MouseOver" ), String(), SFX_EVENT_MOUSEOVER_OBJECT ); aNamesItem.AddEvent( String::CreateFromAscii( "MouseOut" ), String(), SFX_EVENT_MOUSEOUT_OBJECT ); aSet.Put( aNamesItem ); - + SvxMacroItem aMacroItem(SID_ATTR_MACROITEM); IMapObject* pIMapObj = GetIMapObj( pSdrObj ); aMacroItem.SetMacroTable( pIMapObj->GetMacroTable() ); @@ -882,7 +880,7 @@ void IMapWindow::DoPropertyDialog() pModel->SetChanged( sal_True ); UpdateInfo( TRUE ); } - delete aDlg; //add by CHINA001 + delete aDlg; } } } @@ -1004,40 +1002,6 @@ void IMapWindow::CreateDefaultObject() void IMapWindow::KeyInput( const KeyEvent& rKEvt ) { - KeyCode aCode = rKEvt.GetKeyCode(); - -/* - switch(aCode.GetCode()) - { - case KEY_ESCAPE: - { - if ( pView->IsAction() ) - { - pView->BrkAction(); - return; - } - else if ( pView->AreObjectsMarked() ) - { - const SdrHdlList& rHdlList = pView->GetHdlList(); - SdrHdl* pHdl = rHdlList.GetFocusHdl(); - - if(pHdl) - { - ((SdrHdlList&)rHdlList).ResetFocusHdl(); - } - else - { - pView->UnmarkAllObj(); - ((Dialog*)GetParent())->GrabFocusToFirstControl(); - } - - return; - } - } - break; - - } -*/ GraphCtrl::KeyInput( rKEvt ); } @@ -1067,3 +1031,5 @@ void IMapWindow::StartPolyEdit() ((SdrHdlList&)rHdlList).TravelFocusHdl(true); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx index 0ab118b3c7..971e93af72 100644 --- a/svx/source/dialog/imapwnd.hxx +++ b/svx/source/dialog/imapwnd.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -224,3 +225,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index 0ff0f72451..c4cb6fd617 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -155,7 +156,6 @@ void SvxLanguageBox::Init() m_pLangTable = new SvtLanguageTable; m_aNotCheckedImage = Image( SVX_RES( RID_SVXIMG_NOTCHECKED ) ); m_aCheckedImage = Image( SVX_RES( RID_SVXIMG_CHECKED ) ); - m_aCheckedImageHC = Image( SVX_RES( RID_SVXIMG_CHECKED_H ) ); m_aAllString = String( SVX_RESSTR( RID_SVXSTR_LANGUAGE_ALL ) ); m_nLangList = LANG_LIST_EMPTY; m_bHasLangNone = FALSE; @@ -201,8 +201,6 @@ USHORT SvxLanguageBox::ImplInsertImgEntry( const String& rEntry, USHORT nPos, bo USHORT nRet = 0; if( !bChecked ) nRet = InsertEntry( rEntry, m_aNotCheckedImage, nPos ); - else if( GetSettings().GetStyleSettings().GetHighContrastMode() ) - nRet = InsertEntry( rEntry, m_aCheckedImageHC, nPos ); else nRet = InsertEntry( rEntry, m_aCheckedImage, nPos ); return nRet; @@ -298,7 +296,7 @@ void SvxLanguageBox::SetLanguageList( INT16 nLangList, nLangType != LANGUAGE_SYSTEM && nLangType != LANGUAGE_NONE && (nLangType < LANGUAGE_USER1 || nLangType > LANGUAGE_USER9) && - (MsLangId::getSubLanguage( nLangType) != 0 || + (MsLangId::getSubLanguage( nLangType) != 0 || (nLangList & LANG_LIST_ALSO_PRIMARY_ONLY)) && ((nLangList & LANG_LIST_ALL) != 0 || ((nLangList & LANG_LIST_WESTERN) != 0 && @@ -344,8 +342,8 @@ USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, USHORT nPos USHORT SvxLanguageBox::ImplInsertLanguage( const LanguageType nLangType, USHORT nPos, sal_Int16 nType ) { LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( nLangType); - // For obsolete and to be replaced languages check whether an entry of the - // replacement already exists and if so don't add an entry with identical + // For obsolete and to be replaced languages check whether an entry of the + // replacement already exists and if so don't add an entry with identical // string as would be returned by SvtLanguageTable::GetString(). if (nLang != nLangType) { @@ -404,8 +402,8 @@ USHORT SvxLanguageBox::InsertLanguage( const LanguageType nLangType, BOOL bCheckEntry, USHORT nPos ) { LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( nLangType); - // For obsolete and to be replaced languages check whether an entry of the - // replacement already exists and if so don't add an entry with identical + // For obsolete and to be replaced languages check whether an entry of the + // replacement already exists and if so don't add an entry with identical // string as would be returned by SvtLanguageTable::GetString(). if (nLang != nLangType) { @@ -450,7 +448,7 @@ LanguageType SvxLanguageBox::GetSelectLanguage() const void SvxLanguageBox::SelectLanguage( const LanguageType eLangType, BOOL bSelect ) { - // If the core uses a LangID of an imported MS document and wants to select + // If the core uses a LangID of an imported MS document and wants to select // a language that is replaced, we need to select the replacement instead. LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( eLangType); @@ -524,3 +522,4 @@ IMPL_GET_WINDOW (SvxLanguageBox);*/ #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/langbox.src b/svx/source/dialog/langbox.src index 8bd1987d2d..70eb0347e7 100644 --- a/svx/source/dialog/langbox.src +++ b/svx/source/dialog/langbox.src @@ -34,16 +34,12 @@ Image RID_SVXIMG_NOTCHECKED ImageBitmap = Bitmap { File = "notcheck.bmp" ; } ; MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; }; + Image RID_SVXIMG_CHECKED { ImageBitmap = Bitmap { File = "lngcheck.bmp" ; } ; MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; }; -Image RID_SVXIMG_CHECKED_H -{ - ImageBitmap = Bitmap { File = "lngcheck_h.bmp" ; } ; - MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; -}; // ********************************************************************** EOF diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx new file mode 100644 index 0000000000..d69ddda72b --- /dev/null +++ b/svx/source/dialog/linkwarn.cxx @@ -0,0 +1,150 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Novell, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svx.hxx" + +#include "linkwarn.hrc" +#include "svx/linkwarn.hxx" +#include "svx/dialogs.hrc" +#include "svx/dialmgr.hxx" +#include <vcl/msgbox.hxx> +#include <sfx2/basedlgs.hxx> +#include <svtools/miscopt.hxx> + +SvxLinkWarningDialog::SvxLinkWarningDialog( Window* pParent, const String& _rFileName ) : + SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_LINK_WARNING ) ), + m_aQueryImage ( this, SVX_RES( FI_QUERY ) ), + m_aInfoText ( this, SVX_RES( FT_INFOTEXT ) ), + m_aLinkGraphicBtn ( this, SVX_RES( PB_OK ) ), + m_aEmbedGraphicBtn ( this, SVX_RES( PB_NO ) ), + m_aOptionLine ( this, SVX_RES( FL_OPTION ) ), + m_aWarningOnBox ( this, SVX_RES( CB_WARNING_OFF ) ) +{ + FreeResource(); + + // set questionmark image + m_aQueryImage.SetImage( QueryBox::GetStandardImage() ); + + // replace filename + String sInfoText = m_aInfoText.GetText(); + sInfoText.SearchAndReplaceAll( + UniString::CreateFromAscii( + RTL_CONSTASCII_STRINGPARAM( "%FILENAME" ) ), _rFileName ); + m_aInfoText.SetText( sInfoText ); + + // load state of "warning on" checkbox from misc options + SvtMiscOptions aMiscOpt; + m_aWarningOnBox.Check( aMiscOpt.ShowLinkWarningDialog() == sal_True ); + if( aMiscOpt.IsShowLinkWarningDialogReadOnly() ) + m_aWarningOnBox.Disable(); + + // set focus to Cancel button + m_aEmbedGraphicBtn.GrabFocus(); + + // calculate and set the size of the dialog and its controls + InitSize(); +} + +// ----------------------------------------------------------------------- + +SvxLinkWarningDialog::~SvxLinkWarningDialog() +{ + // save value of "warning off" checkbox, if necessary + SvtMiscOptions aMiscOpt; + sal_Bool bChecked = m_aWarningOnBox.IsChecked(); + if ( aMiscOpt.ShowLinkWarningDialog() != bChecked ) + aMiscOpt.SetShowLinkWarningDialog( bChecked ); +} + +// ----------------------------------------------------------------------- + +void SvxLinkWarningDialog::InitSize() +{ + // text of checkbox to wide -> add new line + long nTxtW = m_aWarningOnBox.GetCtrlTextWidth( m_aWarningOnBox.GetText() ) + IMPL_EXTRA_BUTTON_WIDTH; + long nCtrlW = m_aWarningOnBox.GetSizePixel().Width(); + if ( nTxtW >= nCtrlW ) + { + long nTextHeight = m_aWarningOnBox.GetTextHeight(); + Size aNewSize = m_aWarningOnBox.GetSizePixel(); + aNewSize.Height() += nTextHeight; + m_aWarningOnBox.SetSizePixel( aNewSize ); + aNewSize = GetSizePixel(); + aNewSize.Height() += nTextHeight; + SetSizePixel( aNewSize ); + } + + // align the size of the information text control (FixedText) to its content + Size aMinSize = m_aInfoText.CalcMinimumSize( m_aInfoText.GetSizePixel().Width() ); + long nTxtH = aMinSize.Height(); + long nCtrlH = m_aInfoText.GetSizePixel().Height(); + long nDelta = ( nCtrlH - nTxtH ); + Size aNewSize = m_aInfoText.GetSizePixel(); + aNewSize.Height() -= nDelta; + m_aInfoText.SetSizePixel( aNewSize ); + + // new position for the succeeding windows + Window* pWins[] = + { + &m_aLinkGraphicBtn, &m_aEmbedGraphicBtn, &m_aOptionLine, &m_aWarningOnBox + }; + Window** pCurrent = pWins; + for ( sal_uInt32 i = 0; i < sizeof(pWins) / sizeof(*pWins); ++i, ++pCurrent ) + { + Point aNewPos = (*pCurrent)->GetPosPixel(); + aNewPos.Y() -= nDelta; + (*pCurrent)->SetPosPixel( aNewPos ); + } + + // new size of the dialog + aNewSize = GetSizePixel(); + aNewSize.Height() -= nDelta; + SetSizePixel( aNewSize ); + + // recalculate the size and position of the buttons + nTxtW = m_aLinkGraphicBtn.GetCtrlTextWidth( m_aLinkGraphicBtn.GetText() ); + long nTemp = m_aEmbedGraphicBtn.GetCtrlTextWidth( m_aEmbedGraphicBtn.GetText() ); + if ( nTemp > nTxtW ) + nTxtW = nTemp; + nTxtW += IMPL_EXTRA_BUTTON_WIDTH; + Size a3Size = LogicToPixel( Size( 3, 3 ), MAP_APPFONT ); + Point aPos = m_aLinkGraphicBtn.GetPosPixel(); + aPos.X() = ( aNewSize.Width() - (2*nTxtW) - a3Size.Width() ) / 2; + long nDefX = m_aWarningOnBox.GetPosPixel().X(); + if ( nDefX < aPos.X() ) + aPos.X() = nDefX; + aNewSize = m_aLinkGraphicBtn.GetSizePixel(); + aNewSize.Width() = nTxtW; + m_aLinkGraphicBtn.SetPosSizePixel( aPos, aNewSize ); + aPos.X() += nTxtW + a3Size.Width(); + m_aEmbedGraphicBtn.SetPosSizePixel( aPos, aNewSize ); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/linkwarn.hrc b/svx/source/dialog/linkwarn.hrc new file mode 100644 index 0000000000..d01dc88d8e --- /dev/null +++ b/svx/source/dialog/linkwarn.hrc @@ -0,0 +1,60 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Novell, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SVX_LINKWARN_HRC +#define _SVX_LINKWARN_HRC + +#include <svtools/controldims.hrc> + +// dialog ids +#define FI_QUERY 10 +#define FT_INFOTEXT 11 +#define PB_OK 12 +#define PB_NO 13 +#define FL_OPTION 15 +#define CB_WARNING_OFF 16 + +// --------- general metrics --------- + +#define SYMBOL_EDGE 20 +#define DIALOG_WIDTH 220 +#define INFO_TEXT_LINES 11 + +#define AW_COL_1 (RSC_SP_DLG_INNERBORDER_LEFT) +#define AW_COL_2 (AW_COL_1+SYMBOL_EDGE+RSC_SP_CTRL_DESC_X) +#define AW_COL_3 (AW_COL_2+RSC_CD_PUSHBUTTON_WIDTH+RSC_SP_CTRL_DESC_X) +#define AW_COL_4 (DIALOG_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT-RSC_CD_PUSHBUTTON_WIDTH) + +#define AW_ROW_1 (RSC_SP_DLG_INNERBORDER_TOP) +#define AW_ROW_2 (AW_ROW_1+INFO_TEXT_LINES*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_Y) +#define AW_ROW_3 (AW_ROW_2+RSC_CD_PUSHBUTTON_HEIGHT+RSC_SP_CTRL_DESC_Y) +#define AW_ROW_4 (AW_ROW_3+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_CTRL_DESC_Y) + +#define DIALOG_HEIGHT (AW_ROW_4+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_DLG_INNERBORDER_BOTTOM) + +#endif diff --git a/svx/source/dialog/linkwarn.src b/svx/source/dialog/linkwarn.src new file mode 100644 index 0000000000..100b53cb6e --- /dev/null +++ b/svx/source/dialog/linkwarn.src @@ -0,0 +1,85 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2010 Novell, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "linkwarn.hrc" +#include "svx/dialogs.hrc" +#include "helpid.hrc" + +ModalDialog RID_SVXDLG_LINK_WARNING +{ + Size = MAP_APPFONT( DIALOG_WIDTH, DIALOG_HEIGHT ); + OutputSize = TRUE; + Closeable = FALSE; + Moveable = TRUE; + SVLook = TRUE; + + Text = "%PRODUCTNAME %PRODUCTVERSION %PRODUCTEXTENSION"; + + FixedImage FI_QUERY + { + Pos = MAP_APPFONT( AW_COL_1, AW_ROW_1 ); + Size = MAP_APPFONT( SYMBOL_EDGE, SYMBOL_EDGE ); + }; + FixedText FT_INFOTEXT + { + Pos = MAP_APPFONT( AW_COL_2, AW_ROW_1 ); + Size = MAP_APPFONT( DIALOG_WIDTH-AW_COL_2-RSC_SP_DLG_INNERBORDER_RIGHT, INFO_TEXT_LINES*RSC_CD_FIXEDTEXT_HEIGHT ); + NoLabel = TRUE; + Wordbreak = TRUE; + Text [ en-US ] = "The file %FILENAME will not be stored along with your document, but only referenced as a link. This is dangerous if you move and/or rename the files. Do you want to embed the graphic instead?"; + Text [ de-DE ] = "Die Datei %FILENAME wird nicht zusammen mit dem Dokument gespeichert, sondern nur als Verweis referenziert. Dies kann zu Problemen führen, wenn die Dateien verschoben und/oder umbenannt werden. Möchten Sie stattdessen die Grafik als eingebettetes Objekt einfügen?"; + }; + OKButton PB_OK + { + Pos = MAP_APPFONT( AW_COL_2, AW_ROW_2 ); + Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); + DefButton = TRUE ; + Text [ en-US ] = "~Keep Link"; + Text [ de-DE ] = "~Als Verweis einfügen"; + }; + CancelButton PB_NO + { + Pos = MAP_APPFONT( AW_COL_3, AW_ROW_2 ); + Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); + Text [ en-US ] = "~Embed Graphic"; + Text [ de-DE ] = "~Eingebettet einfügen"; + }; + FixedLine FL_OPTION + { + Pos = MAP_APPFONT( 0, AW_ROW_3 ); + Size = MAP_APPFONT( DIALOG_WIDTH, RSC_CD_FIXEDLINE_HEIGHT ); + }; + CheckBox CB_WARNING_OFF + { + Pos = MAP_APPFONT( AW_COL_2, AW_ROW_4 ); + Size = MAP_APPFONT( DIALOG_WIDTH-AW_COL_2-RSC_SP_DLG_INNERBORDER_RIGHT, RSC_CD_CHECKBOX_HEIGHT ); + WordBreak = TRUE ; + Text [ en-US ] = "~Ask when linking a graphic"; + Text [ de-DE ] = "~Nachfragen falls Grafik als Verweis eingefügt wird"; + }; +}; diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk index 2c91e2acaf..a42bdee343 100644 --- a/svx/source/dialog/makefile.mk +++ b/svx/source/dialog/makefile.mk @@ -108,6 +108,7 @@ LIB2OBJFILES= \ $(SLO)$/hyprlink.obj \ $(SLO)$/imapdlg.obj \ $(SLO)$/imapwnd.obj \ + $(SLO)$/linkwarn.obj \ $(SLO)$/measctrl.obj \ $(SLO)$/orienthelper.obj \ $(SLO)$/pagectrl.obj \ diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index ba7c0deb74..6a706d9b98 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -197,3 +198,4 @@ void SvxXMeasurePreview::DataChanged( const DataChangedEvent& rDCEvt ) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index 0f35520db2..8fbfdc2576 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,9 +44,7 @@ #include "optgrid.hrc" #include "svx/dlgutil.hxx" -/* -----------------18.08.98 17:41------------------- - * local functions - * --------------------------------------------------*/ +// local functions void lcl_GetMinMax(MetricField& rField, long& nFirst, long& nLast, long& nMin, long& nMax) { nFirst = static_cast<long>(rField.Denormalize( rField.GetFirst( FUNIT_TWIP ) )); @@ -109,19 +108,11 @@ SvxGridItem::SvxGridItem( const SvxGridItem& rItem ) }; -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - SfxPoolItem* SvxGridItem::Clone( SfxItemPool* ) const { return new SvxGridItem( *this ); } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - int SvxGridItem::operator==( const SfxPoolItem& rAttr ) const { DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" ); @@ -140,10 +131,6 @@ int SvxGridItem::operator==( const SfxPoolItem& rAttr ) const nFldSnapY == rItem.nFldSnapY ); } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - SfxItemPresentation SvxGridItem::GetPresentation ( SfxItemPresentation ePres, @@ -166,11 +153,7 @@ SfxItemPresentation SvxGridItem::GetPresentation } } - -/*----------------- OS 23.02.95 ----------------------- - TabPage Rastereinstellungen --------------------------------------------------------*/ - +// TabPage Rastereinstellungen SvxGridTabPage::SvxGridTabPage( Window* pParent, const SfxItemSet& rCoreSet) : SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_GRID ), rCoreSet ), @@ -413,3 +396,4 @@ IMPL_LINK( SvxGridTabPage, ChangeGridsnapHdl_Impl, void *, EMPTYARG ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/orienthelper.cxx b/svx/source/dialog/orienthelper.cxx index 1d5b9d6ad6..9594139503 100644 --- a/svx/source/dialog/orienthelper.cxx +++ b/svx/source/dialog/orienthelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,6 @@ #include <vector> #include <utility> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> #endif #include "svx/dialcontrol.hxx" @@ -204,3 +204,4 @@ void OrientStackedWrapper::SetControlValue( bool bValue ) } // namespace svx +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index 94dcc23712..19a91a1199 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,7 +46,7 @@ struct PageWindow_Impl { SvxBoxItem* pBorder; Bitmap aBitmap; - FASTBOOL bBitmap; + bool bBitmap; sal_Bool bResetBackground; sal_Bool bFrameDirection; sal_Int32 nFrameDirection; @@ -122,7 +123,7 @@ SvxPageWindow::~SvxPageWindow() // ----------------------------------------------------------------------- -void __EXPORT SvxPageWindow::Paint( const Rectangle& ) +void SvxPageWindow::Paint( const Rectangle& ) { Fraction aXScale( aWinSize.Width(), std::max( (long) (aSize.Width() * 2 + aSize.Width() / 8), 1L ) ); Fraction aYScale( aWinSize.Height(), std::max( aSize.Height(), 1L ) ); @@ -400,16 +401,12 @@ void SvxPageWindow::SetFtBorder( const SvxBoxItem& rNew ) delete pFtBorder; pFtBorder = new SvxBoxItem( rNew ); } -/* -----------------------------13.06.2002 16:16------------------------------ - ---------------------------------------------------------------------------*/ void SvxPageWindow::EnableFrameDirection(sal_Bool bEnable) { pImpl->EnableFrameDirection(bEnable); } -/* -----------------------------13.06.2002 16:16------------------------------ - ---------------------------------------------------------------------------*/ void SvxPageWindow::SetFrameDirection(sal_Int32 nFrameDirection) { pImpl->SetFrameDirection(nFrameDirection); @@ -419,3 +416,5 @@ void SvxPageWindow::ResetBackground() { pImpl->bResetBackground = sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/paraprev.cxx b/svx/source/dialog/paraprev.cxx index 2b2baa07e3..9d24138834 100644 --- a/svx/source/dialog/paraprev.cxx +++ b/svx/source/dialog/paraprev.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -236,3 +237,4 @@ void SvxParaPrevWindow::OutputSizeChanged() Invalidate(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/passwd.cxx b/svx/source/dialog/passwd.cxx index 386681b6fe..b4d9f2dcef 100644 --- a/svx/source/dialog/passwd.cxx +++ b/svx/source/dialog/passwd.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ // include --------------------------------------------------------------- #include <tools/shl.hxx> -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #define _SVX_PASSWD_CXX @@ -134,3 +133,4 @@ SvxPasswordDialog::~SvxPasswordDialog() // ----------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/pfiledlg.cxx b/svx/source/dialog/pfiledlg.cxx index ae11f94ba5..ae860ac5c5 100644 --- a/svx/source/dialog/pfiledlg.cxx +++ b/svx/source/dialog/pfiledlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,8 +45,8 @@ using namespace ::rtl; using namespace ::com::sun::star; -sal_Char __READONLY_DATA sAudio[] = "audio"; -sal_Char __READONLY_DATA sVideo[] = "video"; +sal_Char const sAudio[] = "audio"; +sal_Char const sVideo[] = "video"; /************************************************************************* |* @@ -87,7 +88,7 @@ SvxPluginFileDlg::SvxPluginFileDlg (Window *, sal_uInt16 nKind ) : if( xMgr.is() ) { uno::Reference< plugin::XPluginManager > rPluginManager( xMgr->createInstance( - OUString::createFromAscii( "com.sun.star.plugin.PluginManager" ) ), uno::UNO_QUERY ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.plugin.PluginManager")) ), uno::UNO_QUERY ); if ( rPluginManager.is() ) { const uno::Sequence<plugin::PluginDescription > aSeq( rPluginManager->getPluginDescriptions() ); @@ -232,7 +233,7 @@ bool SvxPluginFileDlg::IsAvailable (sal_uInt16 nKind) if( xMgr.is() ) { - uno::Reference< plugin::XPluginManager > rPluginManager = uno::Reference< plugin::XPluginManager > ( xMgr->createInstance( OUString::createFromAscii( "com.sun.star.plugin.PluginManager" ) ), uno::UNO_QUERY ); + uno::Reference< plugin::XPluginManager > rPluginManager = uno::Reference< plugin::XPluginManager > ( xMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.plugin.PluginManager")) ), uno::UNO_QUERY ); if( rPluginManager.is() ) { const uno::Sequence<plugin::PluginDescription > aSeq( rPluginManager->getPluginDescriptions() ); @@ -278,3 +279,5 @@ void SvxPluginFileDlg::SetContext( sfx2::FileDialogHelper::Context _eNewContext { maFileDlg.SetContext( _eNewContext ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/prtqry.cxx b/svx/source/dialog/prtqry.cxx index ccf932be6a..5fdc3e8136 100644 --- a/svx/source/dialog/prtqry.cxx +++ b/svx/source/dialog/prtqry.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,16 +29,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> #endif #include <svx/prtqry.hxx> #include <svx/dialmgr.hxx> #include <tools/shl.hxx> -/* -----------------------------01.02.00 13:57-------------------------------- - - ---------------------------------------------------------------------------*/ SvxPrtQryBox::SvxPrtQryBox(Window* pParent) : MessBox(pParent, 0, String(SVX_RES(RID_SVXSTR_QRY_PRINT_TITLE)), @@ -52,11 +49,10 @@ SvxPrtQryBox::SvxPrtQryBox(Window* pParent) : AddButton(BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON); SetButtonHelpText( RET_OK, String() ); } -/* -----------------------------01.02.00 13:57-------------------------------- - ---------------------------------------------------------------------------*/ SvxPrtQryBox::~SvxPrtQryBox() { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/relfld.cxx b/svx/source/dialog/relfld.cxx index 7f627762fc..6a6e4259ff 100644 --- a/svx/source/dialog/relfld.cxx +++ b/svx/source/dialog/relfld.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -144,3 +145,4 @@ void SvxRelativeField::SetRelative( BOOL bNewRelative ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/rlrcitem.cxx b/svx/source/dialog/rlrcitem.cxx index ad37ef2704..37d7877b21 100644 --- a/svx/source/dialog/rlrcitem.cxx +++ b/svx/source/dialog/rlrcitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -164,3 +165,4 @@ void SvxRulerItem::StateChanged( USHORT nSID, SfxItemState eState, } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/rlrcitem.hxx b/svx/source/dialog/rlrcitem.hxx index 64eafd2af3..7c643c4f73 100644 --- a/svx/source/dialog/rlrcitem.hxx +++ b/svx/source/dialog/rlrcitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,3 +50,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index bad0e1c2d1..8e7c2fb9c1 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -47,9 +48,7 @@ #include <com/sun/star/text/RubyAdjust.hpp> #include <com/sun/star/view/XSelectionChangeListener.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> -#ifndef _CPPUHELPER_IMPLBASE3_HXX_ #include <cppuhelper/implbase1.hxx> -#endif #include <svtools/colorcfg.hxx> using namespace com::sun::star::uno; @@ -75,9 +74,7 @@ static const sal_Char cRubyIsAbove[] = "RubyIsAbove"; static const sal_Char cDisplayName[] = "DisplayName"; static const sal_Char cRubyCharStyleName[] = "RubyCharStyleName"; static const sal_Char cRubies[] = "Rubies"; -/* -----------------------------09.01.01 17:24-------------------------------- - ---------------------------------------------------------------------------*/ SvxRubyChildWindow::SvxRubyChildWindow( Window* _pParent, USHORT nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo) : SfxChildWindow(_pParent, nId) @@ -92,16 +89,12 @@ SvxRubyChildWindow::SvxRubyChildWindow( Window* _pParent, USHORT nId, pDlg->Initialize( pInfo ); } -/* -----------------------------10.01.01 13:53-------------------------------- - ---------------------------------------------------------------------------*/ SfxChildWinInfo SvxRubyChildWindow::GetInfo() const { return SfxChildWindow::GetInfo(); } -/* -----------------------------09.01.01 17:17-------------------------------- - ---------------------------------------------------------------------------*/ class SvxRubyData_Impl : public cppu::WeakImplHelper1 < ::com::sun::star::view::XSelectionChangeListener > { @@ -278,18 +271,14 @@ SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW, UpdateColors(); } -/* -----------------------------09.01.01 17:17-------------------------------- - ---------------------------------------------------------------------------*/ SvxRubyDialog::~SvxRubyDialog() { ClearCharStyleList(); EventObject aEvent; xImpl->disposing(aEvent); } -/* -----------------------------01.02.01 10:29-------------------------------- - ---------------------------------------------------------------------------*/ void SvxRubyDialog::ClearCharStyleList() { for(USHORT i = 0; i < aCharStyleLB.GetEntryCount(); i++) @@ -299,9 +288,7 @@ void SvxRubyDialog::ClearCharStyleList() } aCharStyleLB.Clear(); } -/* -----------------------------09.01.01 17:17-------------------------------- - ---------------------------------------------------------------------------*/ BOOL SvxRubyDialog::Close() { pBindings->GetDispatcher()->Execute( SID_RUBY_DIALOG, @@ -309,9 +296,7 @@ BOOL SvxRubyDialog::Close() SFX_CALLMODE_RECORD); return TRUE; } -/* -----------------------------29.01.01 15:26-------------------------------- - ---------------------------------------------------------------------------*/ void SvxRubyDialog::Activate() { SfxModelessDialog::Activate(); @@ -393,16 +378,12 @@ void SvxRubyDialog::Activate() aPreviewWin.Invalidate(); } } -/* -----------------------------29.01.01 15:26-------------------------------- - ---------------------------------------------------------------------------*/ void SvxRubyDialog::Deactivate() { SfxModelessDialog::Deactivate(); } -/* -----------------------------30.01.01 15:35-------------------------------- - ---------------------------------------------------------------------------*/ void SvxRubyDialog::SetText(sal_Int32 nPos, Edit& rLeft, Edit& rRight) { OUString sLeft, sRight; @@ -536,17 +517,13 @@ void SvxRubyDialog::Update() ScrollHdl_Impl(&aScrollSB); } -/* -----------------------------16.02.01 14:01-------------------------------- - ---------------------------------------------------------------------------*/ void SvxRubyDialog::GetCurrentText(String& rBase, String& rRuby) { rBase = aEditArr[nCurrentEdit * 2]->GetText(); rRuby = aEditArr[nCurrentEdit * 2 + 1]->GetText(); } -/* -----------------------------31.01.01 14:09-------------------------------- - ---------------------------------------------------------------------------*/ IMPL_LINK(SvxRubyDialog, ScrollHdl_Impl, ScrollBar*, pScroll) { long nPos = pScroll->GetThumbPos(); @@ -562,9 +539,7 @@ IMPL_LINK(SvxRubyDialog, ScrollHdl_Impl, ScrollBar*, pScroll) aPreviewWin.Invalidate(); return 0; } -/* -----------------------------30.01.01 14:48-------------------------------- - ---------------------------------------------------------------------------*/ IMPL_LINK(SvxRubyDialog, ApplyHdl_Impl, PushButton*, EMPTYARG) { const Sequence<PropertyValues>& aRubyValues = pImpl->GetRubyValues(); @@ -593,17 +568,13 @@ IMPL_LINK(SvxRubyDialog, ApplyHdl_Impl, PushButton*, EMPTYARG) } return 0; } -/* -----------------------------29.01.01 09:38-------------------------------- - ---------------------------------------------------------------------------*/ IMPL_LINK(SvxRubyDialog, CloseHdl_Impl, PushButton*, EMPTYARG) { Close(); return 0; } -/* -----------------------------29.01.01 15:10-------------------------------- - ---------------------------------------------------------------------------*/ IMPL_LINK(SvxRubyDialog, StylistHdl_Impl, PushButton*, EMPTYARG) { SfxPoolItem* pState = 0; @@ -616,18 +587,14 @@ IMPL_LINK(SvxRubyDialog, StylistHdl_Impl, PushButton*, EMPTYARG) } return 0; } -/* -----------------------------30.01.01 15:32-------------------------------- - ---------------------------------------------------------------------------*/ IMPL_LINK(SvxRubyDialog, AutomaticHdl_Impl, CheckBox*, pBox) { pImpl->UpdateRubyValues(pBox->IsChecked()); Update(); return 0; } -/* -----------------------------31.01.01 16:37-------------------------------- - ---------------------------------------------------------------------------*/ IMPL_LINK(SvxRubyDialog, AdjustHdl_Impl, ListBox*, pBox) { AssertOneEntry(); @@ -647,9 +614,7 @@ IMPL_LINK(SvxRubyDialog, AdjustHdl_Impl, ListBox*, pBox) aPreviewWin.Invalidate(); return 0; } -/* -----------------------------01.06.01 10:24-------------------------------- - ---------------------------------------------------------------------------*/ IMPL_LINK(SvxRubyDialog, PositionHdl_Impl, ListBox*, pBox) { AssertOneEntry(); @@ -670,9 +635,7 @@ IMPL_LINK(SvxRubyDialog, PositionHdl_Impl, ListBox*, pBox) aPreviewWin.Invalidate(); return 0; } -/* -----------------------------01.02.01 10:06-------------------------------- - ---------------------------------------------------------------------------*/ IMPL_LINK(SvxRubyDialog, CharStyleHdl_Impl, ListBox*, EMPTYARG ) { AssertOneEntry(); @@ -695,9 +658,7 @@ IMPL_LINK(SvxRubyDialog, CharStyleHdl_Impl, ListBox*, EMPTYARG ) } return 0; } -/* -----------------------------16.02.01 08:35-------------------------------- - ---------------------------------------------------------------------------*/ IMPL_LINK(SvxRubyDialog, EditModifyHdl_Impl, Edit*, pEdit) { for(USHORT i = 0; i < 8; i++) @@ -711,9 +672,7 @@ IMPL_LINK(SvxRubyDialog, EditModifyHdl_Impl, Edit*, pEdit) aPreviewWin.Invalidate(); return 0; } -/* -----------------------------17.07.01 09:11-------------------------------- - ---------------------------------------------------------------------------*/ IMPL_LINK(SvxRubyDialog, EditScrollHdl_Impl, sal_Int32*, pParam) { long nRet = 0; @@ -741,9 +700,7 @@ IMPL_LINK(SvxRubyDialog, EditScrollHdl_Impl, sal_Int32*, pParam) } return nRet; } -/* -----------------------------20.07.2001 15:18------------------------------ - ---------------------------------------------------------------------------*/ IMPL_LINK(SvxRubyDialog, EditJumpHdl_Impl, sal_Int32*, pParam) { USHORT nIndex = USHRT_MAX; @@ -771,9 +728,7 @@ IMPL_LINK(SvxRubyDialog, EditJumpHdl_Impl, sal_Int32*, pParam) } return 0; }; -/* -----------------------------19.06.01 11:33-------------------------------- - ---------------------------------------------------------------------------*/ void SvxRubyDialog::AssertOneEntry() { pImpl->AssertOneEntry(); @@ -811,9 +766,6 @@ void SvxRubyDialog::DataChanged( const DataChangedEvent& rDCEvt ) UpdateColors(); } -/* -----------------------------29.01.01 15:44-------------------------------- - - ---------------------------------------------------------------------------*/ void lcl_MoveBox(long nOffset, Edit& rLeft, Edit& rRight) { Size aLeftSz(rLeft.GetSizePixel()); @@ -826,9 +778,7 @@ void lcl_MoveBox(long nOffset, Edit& rLeft, Edit& rRight) rRight.SetPosSizePixel(aRightPos, aRightSz); } -/* -----------------------------16.02.01 08:09-------------------------------- - ---------------------------------------------------------------------------*/ RubyPreview::RubyPreview(SvxRubyDialog& rParent, const ResId& rResId) : Window(&rParent, rResId), rParentDlg(rParent) @@ -842,9 +792,7 @@ RubyPreview::RubyPreview(SvxRubyDialog& rParent, const ResId& rResId) : SetBorderStyle( WINDOW_BORDER_MONO ); } -/* -----------------------------29.01.01 14:05-------------------------------- - ---------------------------------------------------------------------------*/ void RubyPreview::Paint( const Rectangle& /* rRect */ ) { Font aRubyFont = GetFont(); @@ -951,17 +899,13 @@ void RubyPreview::Paint( const Rectangle& /* rRect */ ) } SetFont(aSaveFont); } -/* -----------------------------16.02.01 15:12-------------------------------- - ---------------------------------------------------------------------------*/ void RubyEdit::GetFocus() { GetModifyHdl().Call(this); Edit::GetFocus(); } -/* -----------------------------17.07.01 09:00-------------------------------- - ---------------------------------------------------------------------------*/ long RubyEdit::PreNotify( NotifyEvent& rNEvt ) { long nHandled = 0; @@ -988,3 +932,4 @@ long RubyEdit::PreNotify( NotifyEvent& rNEvt ) return nHandled; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/ruler.hrc b/svx/source/dialog/ruler.hrc index 8031270272..101130bbb7 100644 --- a/svx/source/dialog/ruler.hrc +++ b/svx/source/dialog/ruler.hrc @@ -34,4 +34,5 @@ #define ID_MILE 10 #define ID_POINT 6 #define ID_PICA 7 - +#define ID_CHAR 11 +#define ID_LINE 12 diff --git a/svx/source/dialog/ruler.src b/svx/source/dialog/ruler.src index 5937ab99fb..b30ca44b5e 100644 --- a/svx/source/dialog/ruler.src +++ b/svx/source/dialog/ruler.src @@ -87,6 +87,18 @@ Menu RID_SVXMN_RULER Checkable = TRUE ; Text [ en-US ] = "Pica" ; }; + MenuItem + { + Identifier = ID_CHAR ; + Checkable = TRUE ; + Text[ en-US ] = "Char" ; + }; + MenuItem + { + Identifier = ID_LINE ; + Checkable = TRUE ; + Text[ en-US ] = "Line" ; + }; }; }; String RID_SVXSTR_RULER_TAB_LEFT diff --git a/svx/source/dialog/rulritem.cxx b/svx/source/dialog/rulritem.cxx index 9c01948296..4bf1eca9ae 100644 --- a/svx/source/dialog/rulritem.cxx +++ b/svx/source/dialog/rulritem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,7 +64,7 @@ String SvxLongLRSpaceItem::GetValueText() const #define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L)) #define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L)) -sal_Bool SvxLongLRSpaceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool SvxLongLRSpaceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -82,18 +83,18 @@ sal_Bool SvxLongLRSpaceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE case MID_LEFT: nVal = lLeft; break; case MID_RIGHT: nVal = lRight; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: DBG_ERROR("Wrong MemberId!"); return false; } if ( bConvert ) nVal = TWIP_TO_MM100( nVal ); rVal <<= nVal; - return TRUE; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxLongLRSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool SvxLongLRSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -106,7 +107,7 @@ sal_Bool SvxLongLRSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, B { lLeft = bConvert ? MM100_TO_TWIP( aLeftRightMargin.Left ) : aLeftRightMargin.Left; lRight = bConvert ? MM100_TO_TWIP( aLeftRightMargin.Right ) : aLeftRightMargin.Right; - return sal_True; + return true; } } else if ( rVal >>= nVal ) @@ -118,13 +119,13 @@ sal_Bool SvxLongLRSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, B { case MID_LEFT: lLeft = nVal; break; case MID_RIGHT: lRight = nVal; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: DBG_ERROR("Wrong MemberId!"); return false; } - return sal_True; + return true; } - return sal_False; + return false; } //------------------------------------------------------------------------ @@ -189,7 +190,7 @@ String SvxLongULSpaceItem::GetValueText() const return String(); } -sal_Bool SvxLongULSpaceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool SvxLongULSpaceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -203,23 +204,23 @@ sal_Bool SvxLongULSpaceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE aUpperLowerMargin.Upper = bConvert ? TWIP_TO_MM100( lLeft ) : lLeft; aUpperLowerMargin.Lower = bConvert ? TWIP_TO_MM100( lRight ) : lRight; rVal <<= aUpperLowerMargin; - return TRUE; + return true; } case MID_UPPER: nVal = lLeft; break; case MID_LOWER: nVal = lRight; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: DBG_ERROR("Wrong MemberId!"); return false; } if ( bConvert ) nVal = TWIP_TO_MM100( nVal ); rVal <<= nVal; - return TRUE; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxLongULSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool SvxLongULSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -232,7 +233,7 @@ sal_Bool SvxLongULSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, B { lLeft = bConvert ? MM100_TO_TWIP( aUpperLowerMargin.Upper ) : aUpperLowerMargin.Upper; lRight = bConvert ? MM100_TO_TWIP( aUpperLowerMargin.Lower ) : aUpperLowerMargin.Lower; - return sal_True; + return true; } } else if ( rVal >>= nVal ) @@ -244,13 +245,13 @@ sal_Bool SvxLongULSpaceItem::PutValue( const ::com::sun::star::uno::Any& rVal, B { case MID_UPPER: lLeft = nVal; break; case MID_LOWER: lRight = nVal; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: DBG_ERROR("Wrong MemberId!"); return false; } - return sal_True; + return true; } - return sal_False; + return false; } //------------------------------------------------------------------------ @@ -307,7 +308,7 @@ int SvxPagePosSizeItem::operator==( const SfxPoolItem& rCmp) const lHeight == ((const SvxPagePosSizeItem &)rCmp).lHeight; } -sal_Bool SvxPagePosSizeItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool SvxPagePosSizeItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { nMemberId &= ~CONVERT_TWIPS; @@ -322,22 +323,22 @@ sal_Bool SvxPagePosSizeItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE aPagePosSize.Width = lWidth; aPagePosSize.Height = lHeight; rVal <<= aPagePosSize; - return TRUE; + return true; } - + case MID_X: nVal = aPos.X(); break; case MID_Y: nVal = aPos.Y(); break; case MID_WIDTH: nVal = lWidth; break; case MID_HEIGHT: nVal = lHeight; break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: DBG_ERROR("Wrong MemberId!"); return false; } rVal <<= nVal; - return TRUE; + return true; } -sal_Bool SvxPagePosSizeItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool SvxPagePosSizeItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) { nMemberId &= ~CONVERT_TWIPS; @@ -364,14 +365,14 @@ sal_Bool SvxPagePosSizeItem::PutValue( const ::com::sun::star::uno::Any& rVal, B case MID_Y: aPos.Y() = nVal; break; case MID_WIDTH: lWidth = nVal; break; case MID_HEIGHT: lHeight = nVal; break; - + default: DBG_ERROR("Wrong MemberId!"); return sal_False; } - return sal_True; + return true; } - return sal_False; + return false; } //------------------------------------------------------------------------ @@ -595,14 +596,14 @@ long SvxColumnItem::GetVisibleRight() const return (*this)[nIdx].nEnd; } -sal_Bool SvxColumnItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool SvxColumnItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { nMemberId &= ~CONVERT_TWIPS; switch ( nMemberId ) { case MID_COLUMNARRAY: { - return sal_False; + return false; } case MID_RIGHT: rVal <<= nRight; break; case MID_LEFT: rVal <<= nLeft; break; @@ -612,10 +613,10 @@ sal_Bool SvxColumnItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMember default: DBG_ERROR("Wrong MemberId!"); return sal_False; } - return sal_True; + return true; } -sal_Bool SvxColumnItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool SvxColumnItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { nMemberId &= ~CONVERT_TWIPS; sal_Int32 nVal = 0; @@ -623,7 +624,7 @@ sal_Bool SvxColumnItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMe { case MID_COLUMNARRAY: { - return sal_False; + return false; } case MID_RIGHT: rVal >>= nRight; break; case MID_LEFT: rVal >>= nLeft; break; @@ -633,7 +634,7 @@ sal_Bool SvxColumnItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMe default: DBG_ERROR("Wrong MemberId!"); return sal_False; } - return sal_True; + return true; } //------------------------------------------------------------------------ @@ -706,7 +707,7 @@ SvxObjectItem::SvxObjectItem( const SvxObjectItem& rCopy ) : { } -sal_Bool SvxObjectItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool SvxObjectItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { nMemberId &= ~CONVERT_TWIPS; switch ( nMemberId ) @@ -721,13 +722,13 @@ sal_Bool SvxObjectItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMember return sal_False; } - return TRUE; + return true; } -sal_Bool SvxObjectItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool SvxObjectItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { nMemberId &= ~CONVERT_TWIPS; - BOOL bRet=FALSE; + BOOL bRet = false; switch ( nMemberId ) { case MID_START_X : bRet = (rVal >>= nStartX); break; @@ -741,3 +742,4 @@ sal_Bool SvxObjectItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMe return bRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/sendreportgen.cxx b/svx/source/dialog/sendreportgen.cxx index 2690d4b392..75c8d9eb9e 100644 --- a/svx/source/dialog/sendreportgen.cxx +++ b/svx/source/dialog/sendreportgen.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,3 +52,5 @@ namespace svx{ } // namespace DocRecovery } // namespace svx + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/sendreportunx.cxx b/svx/source/dialog/sendreportunx.cxx index 657399ca3c..2362cc3bea 100644 --- a/svx/source/dialog/sendreportunx.cxx +++ b/svx/source/dialog/sendreportunx.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -270,3 +271,5 @@ namespace svx{ } // namespace DocRecovery } // namespace svx + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/sendreportw32.cxx b/svx/source/dialog/sendreportw32.cxx index 61c4daa0f7..b50dc0c0ca 100644 --- a/svx/source/dialog/sendreportw32.cxx +++ b/svx/source/dialog/sendreportw32.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,6 +39,7 @@ #include <tchar.h> #include <stdio.h> #include <systools/win32/uwinapi.h> +#include <sal/macros.h> // need to undef min and max macros from MS headers here to make // the std::min and std::max from stl visible again @@ -198,7 +200,7 @@ namespace svx{ TCHAR szTempPath[MAX_PATH]; TCHAR szFileName[MAX_PATH]; - GetTempPath( elementsof(szTempPath), szTempPath ); + GetTempPath( SAL_N_ELEMENTS(szTempPath), szTempPath ); GetTempFileName( szTempPath, TEXT("DSC"), 0, szFileName ); FILE *fp = _tfopen( szFileName, _T("wb") ); @@ -225,7 +227,7 @@ namespace svx{ ZeroMemory( &StartupInfo, sizeof(StartupInfo) ); StartupInfo.cb = sizeof(StartupInfo.cb); - sntprintf( szBuffer, elementsof(szBuffer), + sntprintf( szBuffer, SAL_N_ELEMENTS(szBuffer), _T("%s -noui -load -send"), szPath ); @@ -258,3 +260,5 @@ namespace svx{ } // namespace DocRecovery } // namespace svx + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/simptabl.cxx b/svx/source/dialog/simptabl.cxx index c32d151d90..a3c1814d7b 100644 --- a/svx/source/dialog/simptabl.cxx +++ b/svx/source/dialog/simptabl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ #include <svx/simptabl.hxx> #include <vcl/svapp.hxx> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #include <unotools/intlwrapper.hxx> // SvxSimpTblContainer ------------------------------------------------------ @@ -226,7 +225,6 @@ void SvxSimpleTable::Paint( const Rectangle& rRect ) SvHeaderTabListBox::Paint(rRect ); USHORT nPrivTabCount = TabCount(); - USHORT nPos = 0; USHORT nNewSize = ( nPrivTabCount > 0 ) ? (USHORT)GetTab(0) : 0; long nOffset=-GetXOffset(); @@ -240,6 +238,7 @@ void SvxSimpleTable::Paint( const Rectangle& rRect ) if(nPrivTabCount>aHeaderBar.GetItemCount()) nPrivTabCount=aHeaderBar.GetItemCount(); + USHORT nPos = 0; for(USHORT i=1;i<nPrivTabCount;i++) { nNewSize = static_cast< USHORT >( GetTab(i) ) - nPos; @@ -442,15 +441,14 @@ void SvxSimpleTable::HBarEndDrag() { HideTracking(); USHORT nPrivTabCount=TabCount(); - USHORT nPos=0; - USHORT nNewSize=0; if(nPrivTabCount) { if(nPrivTabCount>aHeaderBar.GetItemCount()) nPrivTabCount=aHeaderBar.GetItemCount(); - //for(USHORT i=1;i<=nPrivTabCount;i++) + USHORT nPos=0; + USHORT nNewSize=0; for(USHORT i=1;i<nPrivTabCount;i++) { nNewSize = static_cast< USHORT >( aHeaderBar.GetItemSize(i) ) + nPos; @@ -577,3 +575,4 @@ IMPL_LINK( SvxSimpleTable, CompareHdl, SvSortData*, pData) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/srchctrl.cxx b/svx/source/dialog/srchctrl.cxx index 080e9b8621..f6c9c4c118 100644 --- a/svx/source/dialog/srchctrl.cxx +++ b/svx/source/dialog/srchctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,3 +89,4 @@ void SvxSearchController::StateChanged( USHORT nSID, SfxItemState eState, } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/srchctrl.hxx b/svx/source/dialog/srchctrl.hxx index e3ffd2c556..3547c3ea8b 100644 --- a/svx/source/dialog/srchctrl.hxx +++ b/svx/source/dialog/srchctrl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,3 +50,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 3e4d0d49f3..86987695f4 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -// include --------------------------------------------------------------- +#include <sal/macros.h> #include <vcl/wrkwin.hxx> #include <vcl/morebtn.hxx> #include <vcl/msgbox.hxx> @@ -144,12 +145,12 @@ struct SearchDlg_Impl bDeltaCalculated( FALSE ), pRanges ( NULL ) { - aCommand1URL.Complete = aCommand1URL.Main = rtl::OUString::createFromAscii("vnd.sun.search:SearchViaComponent1"); - aCommand1URL.Protocol = rtl::OUString::createFromAscii("vnd.sun.search:"); - aCommand1URL.Path = rtl::OUString::createFromAscii("SearchViaComponent1"); - aCommand2URL.Complete = aCommand2URL.Main = rtl::OUString::createFromAscii("vnd.sun.search:SearchViaComponent2"); - aCommand2URL.Protocol = rtl::OUString::createFromAscii("vnd.sun.search:"); - aCommand2URL.Path = rtl::OUString::createFromAscii("SearchViaComponent2"); + aCommand1URL.Complete = aCommand1URL.Main = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.search:SearchViaComponent1")); + aCommand1URL.Protocol = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.search:")); + aCommand1URL.Path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SearchViaComponent1")); + aCommand2URL.Complete = aCommand2URL.Main = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.search:SearchViaComponent2")); + aCommand2URL.Protocol = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.search:")); + aCommand2URL.Path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SearchViaComponent2")); } ~SearchDlg_Impl() { delete[] pRanges; } }; @@ -498,7 +499,7 @@ void SvxSearchDialog::Construct_Impl() // vnd.sun.star::SearchViaComponent1 and 2 are supported const uno::Reference< frame::XFrame >xFrame = rBindings.GetActiveFrame(); const uno::Reference< frame::XDispatchProvider > xDispatchProv(xFrame, uno::UNO_QUERY); - rtl::OUString sTarget = rtl::OUString::createFromAscii("_self"); + rtl::OUString sTarget(RTL_CONSTASCII_USTRINGPARAM("_self")); bool bSearchComponent1 = false; bool bSearchComponent2 = false; @@ -659,6 +660,11 @@ INT32 SvxSearchDialog::GetTransliterationFlags() const return nTransliterationFlags; } +void SvxSearchDialog::SetSaveToModule(bool b) +{ + pImpl->bSaveToModule = b; +} + // ----------------------------------------------------------------------- void SvxSearchDialog::ApplyTransliterationFlags_Impl( INT32 nSettings ) @@ -777,10 +783,10 @@ void SvxSearchDialog::CalculateDelta_Impl() try { ::rtl::OUString aModuleIdentifier = xModuleManager->identify( xFrame ); - bCalcApp = aModuleIdentifier.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" ); - bDrawApp = aModuleIdentifier.equalsAscii( "com.sun.star.drawing.DrawingDocument" ); - bImpressApp = aModuleIdentifier.equalsAscii( "com.sun.star.presentation.PresentationDocument" ); - bWriterApp = aModuleIdentifier.equalsAscii( "com.sun.star.text.TextDocument" ); + bCalcApp = aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) ); + bDrawApp = aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ); + bImpressApp = aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ); + bWriterApp = aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) ); } catch ( uno::Exception& ) { @@ -889,7 +895,7 @@ void SvxSearchDialog::CalculateDelta_Impl() if ( nOffset > 0 ) { long nH = LogicToPixel( Size( 0, nOffset ), MAP_APPFONT ).Height(); - for ( i = 0; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent ) + for ( i = 0; i < SAL_N_ELEMENTS( pWins ); ++i, ++pCurrent ) { if ( ( bCalcApp && i < nCalcCtrlCount ) || ( i == nCalcCtrlCount && aCJKOptions.IsCJKFontEnabled() ) @@ -926,9 +932,36 @@ void SvxSearchDialog::CalculateDelta_Impl() // ----------------------------------------------------------------------- +namespace { + +class ToggleSaveToModule +{ +public: + ToggleSaveToModule(SvxSearchDialog& rDialog, bool bValue) : + mrDialog(rDialog), mbValue(bValue) + { + mrDialog.SetSaveToModule(mbValue); + } + + ~ToggleSaveToModule() + { + mrDialog.SetSaveToModule(!mbValue); + } +private: + SvxSearchDialog& mrDialog; + bool mbValue; +}; + +} + void SvxSearchDialog::Init_Impl( int bSearchPattern ) { DBG_ASSERT( pSearchItem, "SearchItem == 0" ); + + // We don't want to save any intermediate state to the module while the + // dialog is being initialized. + ToggleSaveToModule aNoModuleSave(*this, false); + bWriter = ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_WRITER ); pImpl->bMultiLineEdit = FALSE; @@ -979,7 +1012,7 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) CalculateDelta_Impl(); - FASTBOOL bDraw = FALSE; + bool bDraw = FALSE; if ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_CALC ) { Link aLink = LINK( this, SvxSearchDialog, FlagHdl_Impl ); @@ -1078,12 +1111,10 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) aSimilarityBox.Check( pSearchItem->IsLevenshtein() ); bSet = TRUE; - pImpl->bSaveToModule = FALSE; FlagHdl_Impl( &aSimilarityBox ); FlagHdl_Impl( &aJapOptionsCB ); - pImpl->bSaveToModule = TRUE; - FASTBOOL bDisableSearch = FALSE; + bool bDisableSearch = FALSE; SfxViewShell* pViewShell = SfxViewShell::Current(); if ( pViewShell ) @@ -1142,14 +1173,14 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) } else { - FASTBOOL bSetSearch = ( ( nModifyFlag & MODIFY_SEARCH ) == 0 ); - FASTBOOL bSetReplace = ( ( nModifyFlag & MODIFY_REPLACE ) == 0 ); + bool bSetSearch = ( ( nModifyFlag & MODIFY_SEARCH ) == 0 ); + bool bSetReplace = ( ( nModifyFlag & MODIFY_REPLACE ) == 0 ); if ( pSearchItem->GetSearchString().Len() && bSetSearch ) aSearchLB.SetText( pSearchItem->GetSearchString() ); else if ( aSearchStrings.Count() ) { - FASTBOOL bAttributes = + bool bAttributes = ( ( pSearchList && pSearchList->Count() ) || ( pReplaceList && pReplaceList->Count() ) ); @@ -1434,7 +1465,7 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn ) { - FASTBOOL bInclusive = ( aLayoutBtn.GetText() == aLayoutStr ); + bool bInclusive = ( aLayoutBtn.GetText() == aLayoutStr ); if ( ( pBtn == &aSearchBtn ) || ( pBtn == &aSearchAllBtn ) || @@ -1531,12 +1562,6 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn ) } else if ( pBtn == &aSimilarityBtn ) { -//CHINA001 SvxSearchSimilarityDialog* pDlg = -//CHINA001 new SvxSearchSimilarityDialog( this, -//CHINA001 pSearchItem->IsLEVRelaxed(), -//CHINA001 pSearchItem->GetLEVOther(), -//CHINA001 pSearchItem->GetLEVShorter(), -//CHINA001 pSearchItem->GetLEVLonger() ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { @@ -1545,7 +1570,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn ) pSearchItem->GetLEVOther(), pSearchItem->GetLEVShorter(), pSearchItem->GetLEVLonger() ); - DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 + DBG_ASSERT(pDlg, "Dialogdiet fail!"); if ( pDlg && pDlg->Execute() == RET_OK ) { pSearchItem->SetLEVRelaxed( pDlg->IsRelaxed() ); @@ -1570,20 +1595,20 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn ) int nRet = aDlg->Execute(); //CHINA001 int nRet = aDlg.Execute(); if (RET_OK == nRet) //! true only if FillItemSet of SvxJSearchOptionsPage returns true { - INT32 nFlags = aDlg->GetTransliterationFlags(); //CHINA001 INT32 nFlags = aDlg.GetTransliterationFlags(); + INT32 nFlags = aDlg->GetTransliterationFlags(); pSearchItem->SetTransliterationFlags( nFlags ); ApplyTransliterationFlags_Impl( nFlags ); } - delete aDlg; //add for CHINA001 + delete aDlg; } } else if(pBtn == &aSearchComponent1PB || pBtn == &aSearchComponent2PB ) { uno::Sequence < beans::PropertyValue > aArgs(2); beans::PropertyValue* pArgs = aArgs.getArray(); - pArgs[0].Name = ::rtl::OUString::createFromAscii("SearchString"); + pArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SearchString")); pArgs[0].Value <<= ::rtl::OUString(aSearchLB.GetText()); - pArgs[1].Name = ::rtl::OUString::createFromAscii("ParentWindow"); + pArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")); pArgs[1].Value <<= VCLUnoHelper::GetInterface( LAYOUT_THIS_WINDOW (this) ); if(pBtn == &aSearchComponent1PB) { @@ -1609,16 +1634,23 @@ IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, ComboBox *, pEd ) else bSet = FALSE; + // Calc allows searching for empty cells. + bool bAllowEmptySearch = (pSearchItem->GetAppFlag() == SVX_SEARCHAPP_CALC); + if ( pEd == &aSearchLB || pEd == &aReplaceLB ) { - xub_StrLen nLBTxtLen = aSearchLB.GetText().Len(), nTxtLen; + xub_StrLen nSrchTxtLen = aSearchLB.GetText().Len(); + xub_StrLen nReplTxtLen = 0; + if (bAllowEmptySearch) + nReplTxtLen = aReplaceLB.GetText().Len(); + xub_StrLen nAttrTxtLen = 0; if ( !pImpl->bMultiLineEdit ) - nTxtLen = aSearchAttrText.GetText().Len(); + nAttrTxtLen = aSearchAttrText.GetText().Len(); else - nTxtLen = pImpl->aSearchFormats.GetText().Len(); + nAttrTxtLen = pImpl->aSearchFormats.GetText().Len(); - if ( nLBTxtLen || nTxtLen ) + if (nSrchTxtLen || nReplTxtLen || nAttrTxtLen) { EnableControl_Impl( &aSearchBtn ); EnableControl_Impl( &aReplaceBtn ); @@ -1842,19 +1874,19 @@ void SvxSearchDialog::EnableControls_Impl( const USHORT nFlags ) } else if ( !IsVisible() ) Show(); - FASTBOOL bNoSearch = TRUE; + bool bNoSearch = true; sal_Bool bEnableSearch = ( SEARCH_OPTIONS_SEARCH & nOptions ) != 0; aSearchBtn.Enable(bEnableSearch); if( bEnableSearch ) - bNoSearch = FALSE; + bNoSearch = false; if ( ( SEARCH_OPTIONS_SEARCH_ALL & nOptions ) != 0 ) { aSearchAllBtn.Enable(); - bNoSearch = FALSE; + bNoSearch = false; } else aSearchAllBtn.Disable(); @@ -1864,7 +1896,7 @@ void SvxSearchDialog::EnableControls_Impl( const USHORT nFlags ) aReplaceText.Enable(); aReplaceLB.Enable(); aReplaceTmplLB.Enable(); - bNoSearch = FALSE; + bNoSearch = false; } else { @@ -1876,7 +1908,7 @@ void SvxSearchDialog::EnableControls_Impl( const USHORT nFlags ) if ( ( SEARCH_OPTIONS_REPLACE_ALL & nOptions ) != 0 ) { aReplaceAllBtn.Enable(); - bNoSearch = FALSE; + bNoSearch = false; } else aReplaceAllBtn.Disable(); @@ -2170,12 +2202,12 @@ IMPL_LINK( SvxSearchDialog, FormatHdl_Impl, Button *, EMPTYARG ) aSet.DisableItem(rPool.GetWhich(SID_ATTR_PARA_PAGEBREAK)); aSet.DisableItem(rPool.GetWhich(SID_ATTR_PARA_KEEP)); - //CHINA001 SvxSearchFormatDialog* pDlg = new SvxSearchFormatDialog( this, aSet ); + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { SfxAbstractTabDialog* pDlg = pFact->CreateTabItemDialog( LAYOUT_THIS_WINDOW (this), aSet, RID_SVXDLG_SEARCHFORMAT ); - DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001 + DBG_ASSERT(pDlg, "Dialogdiet fail!"); aTxt.Insert( pDlg->GetText(), 0 ); pDlg->SetText( aTxt ); @@ -2247,7 +2279,6 @@ IMPL_LINK( SvxSearchDialog, AttributeHdl_Impl, Button *, EMPTYARG ) if ( !pSearchList || !pImpl->pRanges ) return 0; - //CHINA001 SvxSearchAttributeDialog* pDlg = new SvxSearchAttributeDialog( this, *pSearchList, pImpl->pRanges ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { @@ -2352,6 +2383,8 @@ String& SvxSearchDialog::BuildAttrText_Impl( String& rStr, ResStringArray aAttrNames( SVX_RES( RID_ATTR_NAMES ) ); + ResStringArray aAttrNames( SVX_RES( RID_ATTR_NAMES ) ); + for ( USHORT i = 0; i < pList->Count(); ++i ) { const SearchAttrItem& rItem = pList->GetObject(i); @@ -2547,3 +2580,4 @@ SfxChildWinInfo SvxSearchDialogWrapper::GetInfo() const return aInfo; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/stddlg.cxx b/svx/source/dialog/stddlg.cxx index 950c4f3a0a..16d0853b98 100644 --- a/svx/source/dialog/stddlg.cxx +++ b/svx/source/dialog/stddlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ // include --------------------------------------------------------------- -#ifndef _MSGBOX_HXX //autogen #include <vcl/msgbox.hxx> -#endif #include <svx/stddlg.hxx> @@ -59,9 +58,10 @@ SvxStandardDialog::SvxStandardDialog( Window *pParent, const ResId &rResId ) : // ----------------------------------------------------------------------- -__EXPORT SvxStandardDialog::~SvxStandardDialog() +SvxStandardDialog::~SvxStandardDialog() { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/strarray.cxx b/svx/source/dialog/strarray.cxx index 4bd93baef0..4ac0736121 100644 --- a/svx/source/dialog/strarray.cxx +++ b/svx/source/dialog/strarray.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,3 +98,4 @@ long SvxStringArray::GetValueByStr( const String& rStr ) const } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 51d7af6a11..86babe3667 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include <svx/dialmgr.hxx> -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> -#endif #include <tools/shl.hxx> #include <i18npool/mslangid.hxx> #include <svtools/valueset.hxx> @@ -103,9 +102,6 @@ static const sal_Char cSuffix[] = "Suffix"; static const sal_Char cBulletChar[] = "BulletChar"; static const sal_Char cBulletFontName[] = "BulletFontName"; -/* -----------------28.10.98 08:32------------------- - * - * --------------------------------------------------*/ // Die Auswahl an Bullets aus den StarSymbol static const sal_Unicode aBulletTypes[] = { @@ -158,7 +154,7 @@ static void lcl_PaintLevel(OutputDevice* pVDev, sal_Int16 nNumberingType, } void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { - static USHORT __READONLY_DATA aLinesArr[] = + static USHORT const aLinesArr[] = { 15, 10, 20, 30, @@ -449,17 +445,11 @@ SvxNumValueSet::SvxNumValueSet( Window* pParent, const ResId& rResId, USHORT nTy } } -/*-----------------08.02.97 12.38------------------- - ---------------------------------------------------*/ - - SvxNumValueSet::~SvxNumValueSet() +SvxNumValueSet::~SvxNumValueSet() { delete pVDev; } -/* -----------------------------30.01.01 16:24-------------------------------- - ---------------------------------------------------------------------------*/ void SvxNumValueSet::SetNumberingSettings( const Sequence<Sequence<PropertyValue> >& aNum, Reference<XNumberingFormatter>& xFormat, @@ -477,9 +467,7 @@ void SvxNumValueSet::SetNumberingSettings( SetItemText( i + 1, SVX_RESSTR( RID_SVXSTR_SINGLENUM_DESCRIPTIONS + i )); } } -/* -----------------------------31.01.01 09:50-------------------------------- - ---------------------------------------------------------------------------*/ void SvxNumValueSet::SetOutlineNumberingSettings( Sequence<Reference<XIndexAccess> >& rOutline, Reference<XNumberingFormatter>& xFormat, @@ -512,20 +500,13 @@ SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent, const ResId& rResId/*, co aFormatTimer.SetTimeoutHdl(LINK(this, SvxBmpNumValueSet, FormatHdl_Impl)); } -/*-----------------13.02.97 09.41------------------- - ---------------------------------------------------*/ - - SvxBmpNumValueSet::~SvxBmpNumValueSet() +SvxBmpNumValueSet::~SvxBmpNumValueSet() { GalleryExplorer::EndLocking(GALLERY_THEME_BULLETS); aFormatTimer.Stop(); } -/*-----------------13.02.97 09.41------------------- - ---------------------------------------------------*/ -void SvxBmpNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) +void SvxBmpNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { SvxNumValueSet::UserDraw(rUDEvt); @@ -555,10 +536,6 @@ void SvxBmpNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) } } -/*-----------------14.02.97 07.34------------------- - ---------------------------------------------------*/ - IMPL_LINK(SvxBmpNumValueSet, FormatHdl_Impl, Timer*, EMPTYARG) { // nur, wenn eine Grafik nicht da war, muss formatiert werden @@ -570,3 +547,5 @@ IMPL_LINK(SvxBmpNumValueSet, FormatHdl_Impl, Timer*, EMPTYARG) Invalidate(); return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/svxdlg.cxx b/svx/source/dialog/svxdlg.cxx index ad238f9591..6d87cdbb96 100644 --- a/svx/source/dialog/svxdlg.cxx +++ b/svx/source/dialog/svxdlg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. diff --git a/svx/source/dialog/svxgrahicitem.cxx b/svx/source/dialog/svxgrahicitem.cxx index d871d70d59..4fa6f6c689 100644 --- a/svx/source/dialog/svxgrahicitem.cxx +++ b/svx/source/dialog/svxgrahicitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -48,3 +49,5 @@ SfxPoolItem* SvxGraphicItem::Clone( SfxItemPool * ) const { return new SvxGraphicItem( *this ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 23ef03dab5..ab79250520 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,7 +55,6 @@ #include "editeng/protitem.hxx" #ifndef _APP_HXX #include <vcl/svapp.hxx> -#endif #ifndef RULER_TAB_RTL #define RULER_TAB_RTL ((USHORT)0x0010) #endif @@ -456,7 +456,7 @@ SvxRuler::SvxRuler } -__EXPORT SvxRuler::~SvxRuler() +SvxRuler::~SvxRuler() /* [Beschreibung] @@ -776,9 +776,7 @@ void SvxRuler::Update( const SvxProtectItem* pItem ) { if( pItem ) pRuler_Imp->aProtectItem = *pItem; } -/* -----------------------------22.08.2002 13:10------------------------------ - ---------------------------------------------------------------------------*/ void SvxRuler::UpdateTextRTL(const SfxBoolItem* pItem) { if(bActive && bHorz) @@ -2211,16 +2209,14 @@ ADD_DEBUG_TEXT("lLastLMargin: ", String::CreateFromInt32(pRuler_Imp->lLastLMargi //This includes the left border when the table is not limited //to a lower frame border. int nLimit; - long lLeft; if(GetDragType()==RULER_TYPE_BORDER) { nLimit=nIdx+1; - lLeft=(pBorders[nIdx].nPos+=lDiff); + pBorders[nIdx].nPos+=lDiff; } else { nLimit=0; - lLeft=pRuler_Imp->lLastLMargin+lDiff; } //in vertical tables the left borders have to be moved if(bHorz) @@ -2818,7 +2814,7 @@ void SvxRuler::EvalModifier() } -void __EXPORT SvxRuler::Click() +void SvxRuler::Click() /* [Beschreibung] @@ -3446,7 +3442,7 @@ void SvxRuler::CalcMinMax() } -long __EXPORT SvxRuler::StartDrag() +long SvxRuler::StartDrag() /* [Beschreibung] @@ -3532,7 +3528,7 @@ long __EXPORT SvxRuler::StartDrag() } -void __EXPORT SvxRuler::Drag() +void SvxRuler::Drag() /* [Beschreibung] @@ -3572,7 +3568,7 @@ void __EXPORT SvxRuler::Drag() } -void __EXPORT SvxRuler::EndDrag() +void SvxRuler::EndDrag() /* [Beschreibung] @@ -3645,7 +3641,7 @@ void __EXPORT SvxRuler::EndDrag() } -void __EXPORT SvxRuler::ExtraDown() +void SvxRuler::ExtraDown() /* [Beschreibung] @@ -3666,7 +3662,7 @@ void __EXPORT SvxRuler::ExtraDown() } -void __EXPORT SvxRuler::Notify(SfxBroadcaster&, const SfxHint& rHint) +void SvxRuler::Notify(SfxBroadcaster&, const SfxHint& rHint) /* [Beschreibung] @@ -3788,8 +3784,17 @@ void SvxRuler::Command( const CommandEvent& rCEvt ) (nId == FUNIT_M || nId == FUNIT_KM || nId == FUNIT_FOOT || - nId == FUNIT_MILE )) - aMenu.RemoveItem(i - 1); + nId == FUNIT_MILE || + nId == FUNIT_CHAR || + nId == FUNIT_LINE )) + { + if (( nId == FUNIT_CHAR ) && bHorz ) + ; + else if (( nId == FUNIT_LINE ) && !bHorz ) + ; + else + aMenu.RemoveItem(i - 1); + } } aMenu.Execute( this, rCEvt.GetMousePosPixel() ); } @@ -3966,11 +3971,11 @@ long SvxRuler::CalcPropMaxRight(USHORT nCol) const } } } -/*-- 29.11.2007 08:24:23--------------------------------------------------- - //#i24363# tab stops relative to indent - -----------------------------------------------------------------------*/ + +// Tab stops relative to indent (#i24363#) void SvxRuler::SetTabsRelativeToIndent( BOOL bRel ) { pRuler_Imp->bIsTabsRelativeToIndent = bRel; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index 98ebe2a51c..9e65330507 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -735,3 +736,4 @@ void SvxSwFrameExample::DrawRect_Impl(const Rectangle &rRect, const Color &rFill +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/swframeposstrings.cxx b/svx/source/dialog/swframeposstrings.cxx index 936e38ed10..210b22dd35 100644 --- a/svx/source/dialog/swframeposstrings.cxx +++ b/svx/source/dialog/swframeposstrings.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,23 +51,17 @@ SvxSwFramePosString_Impl::SvxSwFramePosString_Impl() : } FreeResource(); } -/*-- 04.03.2004 13:14:48--------------------------------------------------- - -----------------------------------------------------------------------*/ SvxSwFramePosString::SvxSwFramePosString() : pImpl(new SvxSwFramePosString_Impl) { } -/*-- 04.03.2004 13:14:48--------------------------------------------------- - -----------------------------------------------------------------------*/ SvxSwFramePosString::~SvxSwFramePosString() { delete pImpl; } -/*-- 04.03.2004 13:14:48--------------------------------------------------- - -----------------------------------------------------------------------*/ const String& SvxSwFramePosString::GetString(StringId eId) { DBG_ASSERT(eId >= 0 && eId < STR_MAX, "invalid StringId"); @@ -74,3 +69,5 @@ const String& SvxSwFramePosString::GetString(StringId eId) eId = LEFT; return pImpl->aStrings[eId]; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx index 2c632164bc..7c3205fb98 100644 --- a/svx/source/dialog/txencbox.cxx +++ b/svx/source/dialog/txencbox.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -252,3 +253,4 @@ BOOL SvxTextEncodingBox::IsTextEncodingSelected( const rtl_TextEncoding nEnc ) c return FALSE; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/txenctab.cxx b/svx/source/dialog/txenctab.cxx index 5cfdc73d50..d211cf0ba1 100644 --- a/svx/source/dialog/txenctab.cxx +++ b/svx/source/dialog/txenctab.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -74,3 +75,4 @@ rtl_TextEncoding SvxTextEncodingTable::GetTextEncoding( const String& rStr ) con return RTL_TEXTENCODING_DONTKNOW; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/wrapfield.cxx b/svx/source/dialog/wrapfield.cxx index 8d797fa5ad..a965fdf341 100644 --- a/svx/source/dialog/wrapfield.cxx +++ b/svx/source/dialog/wrapfield.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,3 +60,4 @@ void WrapField::Down() } // namespace svx +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/camera3d.cxx b/svx/source/engine3d/camera3d.cxx index c61e8dfdf3..2753de8e81 100644 --- a/svx/source/engine3d/camera3d.cxx +++ b/svx/source/engine3d/camera3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -390,3 +391,5 @@ void Camera3D::SetFocalLengthWithCorrect(double fLen) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/cube3d.cxx b/svx/source/engine3d/cube3d.cxx index 7dcf215cc8..ac5ee3cd76 100644 --- a/svx/source/engine3d/cube3d.cxx +++ b/svx/source/engine3d/cube3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -197,3 +198,5 @@ void E3dCubeObj::TakeObjNamePlural(XubString& rName) const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/deflt3d.cxx b/svx/source/engine3d/deflt3d.cxx index 45750cbcaa..ae5f9bc8be 100644 --- a/svx/source/engine3d/deflt3d.cxx +++ b/svx/source/engine3d/deflt3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -79,3 +80,5 @@ void E3dDefaultAttributes::Reset() } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx index 61f17c167e..e55f7975d4 100644 --- a/svx/source/engine3d/dragmt3d.cxx +++ b/svx/source/engine3d/dragmt3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -787,3 +788,5 @@ Pointer E3dDragMove::GetSdrDragPointer() const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/e3dsceneupdater.cxx b/svx/source/engine3d/e3dsceneupdater.cxx index 703ba77ae6..f5b71fc859 100644 --- a/svx/source/engine3d/e3dsceneupdater.cxx +++ b/svx/source/engine3d/e3dsceneupdater.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -128,3 +129,5 @@ E3DModifySceneSnapRectUpdater::~E3DModifySceneSnapRectUpdater() ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/e3dundo.cxx b/svx/source/engine3d/e3dundo.cxx index 6e291b4703..aaba36b066 100644 --- a/svx/source/engine3d/e3dundo.cxx +++ b/svx/source/engine3d/e3dundo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -178,3 +179,4 @@ void E3dAttributesUndoAction::Repeat() { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx index 30cc7f35d5..cf43b71af8 100644 --- a/svx/source/engine3d/extrud3d.cxx +++ b/svx/source/engine3d/extrud3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -262,3 +263,5 @@ SdrAttrObj* E3dExtrudeObj::GetBreakObj() } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index 8870af6344..fa61403c7a 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,17 +73,8 @@ SFX_IMPL_DOCKINGWINDOW( Svx3DChildWindow, SID_3D_WIN ) struct Svx3DWinImpl { SfxItemPool* pPool; - Image maImgLightOnH; - Image maImgLightOffH; }; -#define SETHCIMAGE(btn,res) \ -{ \ - Bitmap aBmp( SVX_RES( res ) ); \ - Image aImage( aBmp, COL_LIGHTMAGENTA ); \ - btn.SetModeImage( aImage, BMP_COLOR_HIGHCONTRAST ); \ -} - namespace { /** Get the dispatcher from the current view frame, or, if that is not available, from the given bindings. @@ -94,7 +86,7 @@ namespace { SfxDispatcher* LocalGetDispatcher (const SfxBindings* pBindings) { SfxDispatcher* pDispatcher = NULL; - + if (SfxViewFrame::Current() != NULL) pDispatcher = SfxViewFrame::Current()->GetDispatcher(); else if (pBindings != NULL) @@ -108,119 +100,119 @@ namespace { /************************************************************************* |* Svx3DWin - FloatingWindow \************************************************************************/ -__EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, +Svx3DWin::Svx3DWin( SfxBindings* pInBindings, SfxChildWindow *pCW, Window* pParent ) : SfxDockingWindow ( pInBindings, pCW, pParent, SVX_RES( RID_SVXFLOAT_3D ) ), - aBtnGeo ( this, SVX_RES( BTN_GEO ) ), - aBtnRepresentation ( this, SVX_RES( BTN_REPRESENTATION ) ), - aBtnLight ( this, SVX_RES( BTN_LIGHT ) ), - aBtnTexture ( this, SVX_RES( BTN_TEXTURE ) ), - aBtnMaterial ( this, SVX_RES( BTN_MATERIAL ) ), - aBtnUpdate ( this, SVX_RES( BTN_UPDATE ) ), - aBtnAssign ( this, SVX_RES( BTN_ASSIGN ) ), + aBtnGeo ( this, SVX_RES( BTN_GEO ) ), + aBtnRepresentation ( this, SVX_RES( BTN_REPRESENTATION ) ), + aBtnLight ( this, SVX_RES( BTN_LIGHT ) ), + aBtnTexture ( this, SVX_RES( BTN_TEXTURE ) ), + aBtnMaterial ( this, SVX_RES( BTN_MATERIAL ) ), + aBtnUpdate ( this, SVX_RES( BTN_UPDATE ) ), + aBtnAssign ( this, SVX_RES( BTN_ASSIGN ) ), // Geometrie - aFtPercentDiagonal ( this, SVX_RES( FT_PERCENT_DIAGONAL ) ), - aMtrPercentDiagonal ( this, SVX_RES( MTR_PERCENT_DIAGONAL ) ), - aFtBackscale ( this, SVX_RES( FT_BACKSCALE ) ), - aMtrBackscale ( this, SVX_RES( MTR_BACKSCALE ) ), - aFtEndAngle ( this, SVX_RES( FT_END_ANGLE ) ), - aMtrEndAngle ( this, SVX_RES( MTR_END_ANGLE ) ), - aFtDepth ( this, SVX_RES( FT_DEPTH ) ), - aMtrDepth ( this, SVX_RES( MTR_DEPTH ) ), - aFLGeometrie ( this, SVX_RES( FL_GEOMETRIE ) ), - - aFtHorizontal ( this, SVX_RES( FT_HORIZONTAL ) ), - aNumHorizontal ( this, SVX_RES( NUM_HORIZONTAL ) ), - aFtVertical ( this, SVX_RES( FT_VERTICAL ) ), - aNumVertical ( this, SVX_RES( NUM_VERTICAL ) ), - aFLSegments ( this, SVX_RES( FL_SEGMENTS ) ), - - aBtnNormalsObj ( this, SVX_RES( BTN_NORMALS_OBJ ) ), - aBtnNormalsFlat ( this, SVX_RES( BTN_NORMALS_FLAT ) ), - aBtnNormalsSphere ( this, SVX_RES( BTN_NORMALS_SPHERE ) ), - aBtnNormalsInvert ( this, SVX_RES( BTN_NORMALS_INVERT ) ), + aFtPercentDiagonal ( this, SVX_RES( FT_PERCENT_DIAGONAL ) ), + aMtrPercentDiagonal ( this, SVX_RES( MTR_PERCENT_DIAGONAL ) ), + aFtBackscale ( this, SVX_RES( FT_BACKSCALE ) ), + aMtrBackscale ( this, SVX_RES( MTR_BACKSCALE ) ), + aFtEndAngle ( this, SVX_RES( FT_END_ANGLE ) ), + aMtrEndAngle ( this, SVX_RES( MTR_END_ANGLE ) ), + aFtDepth ( this, SVX_RES( FT_DEPTH ) ), + aMtrDepth ( this, SVX_RES( MTR_DEPTH ) ), + aFLGeometrie ( this, SVX_RES( FL_GEOMETRIE ) ), + + aFtHorizontal ( this, SVX_RES( FT_HORIZONTAL ) ), + aNumHorizontal ( this, SVX_RES( NUM_HORIZONTAL ) ), + aFtVertical ( this, SVX_RES( FT_VERTICAL ) ), + aNumVertical ( this, SVX_RES( NUM_VERTICAL ) ), + aFLSegments ( this, SVX_RES( FL_SEGMENTS ) ), + + aBtnNormalsObj ( this, SVX_RES( BTN_NORMALS_OBJ ) ), + aBtnNormalsFlat ( this, SVX_RES( BTN_NORMALS_FLAT ) ), + aBtnNormalsSphere ( this, SVX_RES( BTN_NORMALS_SPHERE ) ), + aBtnNormalsInvert ( this, SVX_RES( BTN_NORMALS_INVERT ) ), aBtnTwoSidedLighting( this, SVX_RES( BTN_TWO_SIDED_LIGHTING ) ), - aFLNormals ( this, SVX_RES( FL_NORMALS ) ), + aFLNormals ( this, SVX_RES( FL_NORMALS ) ), aBtnDoubleSided ( this, SVX_RES( BTN_DOUBLE_SIDED ) ), // Darstellung - aFtShademode ( this, SVX_RES( FT_SHADEMODE ) ), - aLbShademode ( this, SVX_RES( LB_SHADEMODE ) ), - aBtnShadow3d ( this, SVX_RES( BTN_SHADOW_3D ) ), - aFtSlant ( this, SVX_RES( FT_SLANT ) ), - aMtrSlant ( this, SVX_RES( MTR_SLANT ) ), - aFLShadow ( this, SVX_RES( FL_SHADOW ) ), - aFtDistance ( this, SVX_RES( FT_DISTANCE ) ), - aMtrDistance ( this, SVX_RES( MTR_DISTANCE ) ), - aFtFocalLeng ( this, SVX_RES( FT_FOCAL_LENGTH ) ), - aMtrFocalLength ( this, SVX_RES( MTR_FOCAL_LENGTH ) ), - aFLCamera ( this, SVX_RES( FL_CAMERA ) ), - aFLRepresentation ( this, SVX_RES( FL_REPRESENTATION ) ), + aFtShademode ( this, SVX_RES( FT_SHADEMODE ) ), + aLbShademode ( this, SVX_RES( LB_SHADEMODE ) ), + aBtnShadow3d ( this, SVX_RES( BTN_SHADOW_3D ) ), + aFtSlant ( this, SVX_RES( FT_SLANT ) ), + aMtrSlant ( this, SVX_RES( MTR_SLANT ) ), + aFLShadow ( this, SVX_RES( FL_SHADOW ) ), + aFtDistance ( this, SVX_RES( FT_DISTANCE ) ), + aMtrDistance ( this, SVX_RES( MTR_DISTANCE ) ), + aFtFocalLeng ( this, SVX_RES( FT_FOCAL_LENGTH ) ), + aMtrFocalLength ( this, SVX_RES( MTR_FOCAL_LENGTH ) ), + aFLCamera ( this, SVX_RES( FL_CAMERA ) ), + aFLRepresentation ( this, SVX_RES( FL_REPRESENTATION ) ), // Beleuchtung - aBtnLight1 ( this, SVX_RES( BTN_LIGHT_1 ) ), - aBtnLight2 ( this, SVX_RES( BTN_LIGHT_2 ) ), - aBtnLight3 ( this, SVX_RES( BTN_LIGHT_3 ) ), - aBtnLight4 ( this, SVX_RES( BTN_LIGHT_4 ) ), - aBtnLight5 ( this, SVX_RES( BTN_LIGHT_5 ) ), - aBtnLight6 ( this, SVX_RES( BTN_LIGHT_6 ) ), - aBtnLight7 ( this, SVX_RES( BTN_LIGHT_7 ) ), - aBtnLight8 ( this, SVX_RES( BTN_LIGHT_8 ) ), - aLbLight1 ( this, SVX_RES( LB_LIGHT_1 ) ), - aLbLight2 ( this, SVX_RES( LB_LIGHT_2 ) ), - aLbLight3 ( this, SVX_RES( LB_LIGHT_3 ) ), - aLbLight4 ( this, SVX_RES( LB_LIGHT_4 ) ), - aLbLight5 ( this, SVX_RES( LB_LIGHT_5 ) ), - aLbLight6 ( this, SVX_RES( LB_LIGHT_6 ) ), - aLbLight7 ( this, SVX_RES( LB_LIGHT_7 ) ), - aLbLight8 ( this, SVX_RES( LB_LIGHT_8 ) ), - - aBtnLightColor ( this, SVX_RES( BTN_LIGHT_COLOR ) ), - aFTLightsource ( this, SVX_RES( FT_LIGHTSOURCE ) ), + aBtnLight1 ( this, SVX_RES( BTN_LIGHT_1 ) ), + aBtnLight2 ( this, SVX_RES( BTN_LIGHT_2 ) ), + aBtnLight3 ( this, SVX_RES( BTN_LIGHT_3 ) ), + aBtnLight4 ( this, SVX_RES( BTN_LIGHT_4 ) ), + aBtnLight5 ( this, SVX_RES( BTN_LIGHT_5 ) ), + aBtnLight6 ( this, SVX_RES( BTN_LIGHT_6 ) ), + aBtnLight7 ( this, SVX_RES( BTN_LIGHT_7 ) ), + aBtnLight8 ( this, SVX_RES( BTN_LIGHT_8 ) ), + aLbLight1 ( this, SVX_RES( LB_LIGHT_1 ) ), + aLbLight2 ( this, SVX_RES( LB_LIGHT_2 ) ), + aLbLight3 ( this, SVX_RES( LB_LIGHT_3 ) ), + aLbLight4 ( this, SVX_RES( LB_LIGHT_4 ) ), + aLbLight5 ( this, SVX_RES( LB_LIGHT_5 ) ), + aLbLight6 ( this, SVX_RES( LB_LIGHT_6 ) ), + aLbLight7 ( this, SVX_RES( LB_LIGHT_7 ) ), + aLbLight8 ( this, SVX_RES( LB_LIGHT_8 ) ), + + aBtnLightColor ( this, SVX_RES( BTN_LIGHT_COLOR ) ), + aFTLightsource ( this, SVX_RES( FT_LIGHTSOURCE ) ), // #99694# Keyboard shortcuts activate the next control, so the // order needed to be changed here - aFTAmbientlight ( this, SVX_RES( FT_AMBIENTLIGHT ) ), // Text label - aLbAmbientlight ( this, SVX_RES( LB_AMBIENTLIGHT ) ), // ListBox - aBtnAmbientColor ( this, SVX_RES( BTN_AMBIENT_COLOR ) ), // color button - - aFLLight ( this, SVX_RES( FL_LIGHT ) ), - - // Texturen - aFtTexKind ( this, SVX_RES( FT_TEX_KIND ) ), - aBtnTexLuminance ( this, SVX_RES( BTN_TEX_LUMINANCE ) ), - aBtnTexColor ( this, SVX_RES( BTN_TEX_COLOR ) ), - aFtTexMode ( this, SVX_RES( FT_TEX_MODE ) ), - aBtnTexReplace ( this, SVX_RES( BTN_TEX_REPLACE ) ), - aBtnTexModulate ( this, SVX_RES( BTN_TEX_MODULATE ) ), - aBtnTexBlend ( this, SVX_RES( BTN_TEX_BLEND ) ), - aFtTexProjectionX ( this, SVX_RES( FT_TEX_PROJECTION_X ) ), - aBtnTexObjectX ( this, SVX_RES( BTN_TEX_OBJECT_X ) ), - aBtnTexParallelX ( this, SVX_RES( BTN_TEX_PARALLEL_X ) ), - aBtnTexCircleX ( this, SVX_RES( BTN_TEX_CIRCLE_X ) ), - aFtTexProjectionY ( this, SVX_RES( FT_TEX_PROJECTION_Y ) ), - aBtnTexObjectY ( this, SVX_RES( BTN_TEX_OBJECT_Y ) ), - aBtnTexParallelY ( this, SVX_RES( BTN_TEX_PARALLEL_Y ) ), - aBtnTexCircleY ( this, SVX_RES( BTN_TEX_CIRCLE_Y ) ), - aFtTexFilter ( this, SVX_RES( FT_TEX_FILTER ) ), - aBtnTexFilter ( this, SVX_RES( BTN_TEX_FILTER ) ), - aFLTexture ( this, SVX_RES( FL_TEXTURE ) ), + aFTAmbientlight ( this, SVX_RES( FT_AMBIENTLIGHT ) ), // Text label + aLbAmbientlight ( this, SVX_RES( LB_AMBIENTLIGHT ) ), // ListBox + aBtnAmbientColor ( this, SVX_RES( BTN_AMBIENT_COLOR ) ), // color button + + aFLLight ( this, SVX_RES( FL_LIGHT ) ), + + // Textures + aFtTexKind ( this, SVX_RES( FT_TEX_KIND ) ), + aBtnTexLuminance ( this, SVX_RES( BTN_TEX_LUMINANCE ) ), + aBtnTexColor ( this, SVX_RES( BTN_TEX_COLOR ) ), + aFtTexMode ( this, SVX_RES( FT_TEX_MODE ) ), + aBtnTexReplace ( this, SVX_RES( BTN_TEX_REPLACE ) ), + aBtnTexModulate ( this, SVX_RES( BTN_TEX_MODULATE ) ), + aBtnTexBlend ( this, SVX_RES( BTN_TEX_BLEND ) ), + aFtTexProjectionX ( this, SVX_RES( FT_TEX_PROJECTION_X ) ), + aBtnTexObjectX ( this, SVX_RES( BTN_TEX_OBJECT_X ) ), + aBtnTexParallelX ( this, SVX_RES( BTN_TEX_PARALLEL_X ) ), + aBtnTexCircleX ( this, SVX_RES( BTN_TEX_CIRCLE_X ) ), + aFtTexProjectionY ( this, SVX_RES( FT_TEX_PROJECTION_Y ) ), + aBtnTexObjectY ( this, SVX_RES( BTN_TEX_OBJECT_Y ) ), + aBtnTexParallelY ( this, SVX_RES( BTN_TEX_PARALLEL_Y ) ), + aBtnTexCircleY ( this, SVX_RES( BTN_TEX_CIRCLE_Y ) ), + aFtTexFilter ( this, SVX_RES( FT_TEX_FILTER ) ), + aBtnTexFilter ( this, SVX_RES( BTN_TEX_FILTER ) ), + aFLTexture ( this, SVX_RES( FL_TEXTURE ) ), // Material - aFtMatFavorites ( this, SVX_RES( FT_MAT_FAVORITES ) ), - aLbMatFavorites ( this, SVX_RES( LB_MAT_FAVORITES ) ), - aFtMatColor ( this, SVX_RES( FT_MAT_COLOR ) ), - aLbMatColor ( this, SVX_RES( LB_MAT_COLOR ) ), - aBtnMatColor ( this, SVX_RES( BTN_MAT_COLOR ) ), - aFtMatEmission ( this, SVX_RES( FT_MAT_EMISSION ) ), - aLbMatEmission ( this, SVX_RES( LB_MAT_EMISSION ) ), - aBtnEmissionColor ( this, SVX_RES( BTN_EMISSION_COLOR ) ), - aFtMatSpecular ( this, SVX_RES( FT_MAT_SPECULAR ) ), - aLbMatSpecular ( this, SVX_RES( LB_MAT_SPECULAR ) ), - aBtnSpecularColor ( this, SVX_RES( BTN_SPECULAR_COLOR ) ), + aFtMatFavorites ( this, SVX_RES( FT_MAT_FAVORITES ) ), + aLbMatFavorites ( this, SVX_RES( LB_MAT_FAVORITES ) ), + aFtMatColor ( this, SVX_RES( FT_MAT_COLOR ) ), + aLbMatColor ( this, SVX_RES( LB_MAT_COLOR ) ), + aBtnMatColor ( this, SVX_RES( BTN_MAT_COLOR ) ), + aFtMatEmission ( this, SVX_RES( FT_MAT_EMISSION ) ), + aLbMatEmission ( this, SVX_RES( LB_MAT_EMISSION ) ), + aBtnEmissionColor ( this, SVX_RES( BTN_EMISSION_COLOR ) ), + aFtMatSpecular ( this, SVX_RES( FT_MAT_SPECULAR ) ), + aLbMatSpecular ( this, SVX_RES( LB_MAT_SPECULAR ) ), + aBtnSpecularColor ( this, SVX_RES( BTN_SPECULAR_COLOR ) ), aFtMatSpecularIntensity( this, SVX_RES( FT_MAT_SPECULAR_INTENSITY ) ), aMtrMatSpecularIntensity( this, SVX_RES( MTR_MAT_SPECULAR_INTENSITY ) ), aFLMatSpecular ( this, SVX_RES( FL_MAT_SPECULAR ) ), @@ -250,57 +242,11 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, pControllerItem(0L), pConvertTo3DItem(0L), pConvertTo3DLatheItem(0L), -// pPool ( NULL ), mpImpl ( new Svx3DWinImpl() ), mpRemember2DAttributes(NULL), bOnly3DChanged ( FALSE ) { - SETHCIMAGE( aBtnGeo, BMP_GEO_H ); - SETHCIMAGE( aBtnRepresentation, BMP_REPRESENTATION_H ); - SETHCIMAGE( aBtnLight, BMP_3DLIGHT_H ); - SETHCIMAGE( aBtnTexture, BMP_TEXTURE_H ); - SETHCIMAGE( aBtnMaterial, BMP_MATERIAL_H ); - SETHCIMAGE( aBtnUpdate, BMP_UPDATE_H ); - SETHCIMAGE( aBtnAssign, BMP_ASSIGN_H ); - SETHCIMAGE( aBtnNormalsObj, BMP_NORMALS_OBJ_H ); - SETHCIMAGE( aBtnNormalsFlat, BMP_NORMALS_FLAT_H ); - SETHCIMAGE( aBtnNormalsSphere, BMP_NORMALS_SPHERE_H ); - SETHCIMAGE( aBtnTwoSidedLighting, BMP_TWO_SIDED_LIGHTING_H ); - SETHCIMAGE( aBtnNormalsInvert, BMP_NORMALS_INVERT_H ); - SETHCIMAGE( aBtnDoubleSided, BMP_DOUBLE_SIDED_H ); - SETHCIMAGE( aBtnShadow3d, BMP_SHADOW_3D_H ); - SETHCIMAGE( aBtnLight1, BMP_LIGHT_H ); - SETHCIMAGE( aBtnLight2, BMP_LIGHT_H ); - SETHCIMAGE( aBtnLight3, BMP_LIGHT_H ); - SETHCIMAGE( aBtnLight4, BMP_LIGHT_H ); - SETHCIMAGE( aBtnLight5, BMP_LIGHT_H ); - SETHCIMAGE( aBtnLight6, BMP_LIGHT_H ); - SETHCIMAGE( aBtnLight7, BMP_LIGHT_H ); - SETHCIMAGE( aBtnLight8, BMP_LIGHT_H ); - SETHCIMAGE( aBtnLightColor, BMP_LIGHT_COLOR_H ); - SETHCIMAGE( aBtnAmbientColor, BMP_AMBIENT_COLOR_H ); - SETHCIMAGE( aBtnTexLuminance, BMP_TEX_LUMINANCE_H ); - SETHCIMAGE( aBtnTexColor, BMP_TEX_COLOR_H ); - SETHCIMAGE( aBtnTexReplace, BMP_TEX_REPLACE_H ); - SETHCIMAGE( aBtnTexModulate, BMP_TEX_MODULATE_H ); - SETHCIMAGE( aBtnTexBlend, BMP_TEX_BLEND_H ); - SETHCIMAGE( aBtnTexParallelX, BMP_TEX_PARALLEL_H ); - SETHCIMAGE( aBtnTexCircleX, BMP_TEX_CIRCLE_H ); - SETHCIMAGE( aBtnTexObjectX, BMP_TEX_OBJECT_H ); - SETHCIMAGE( aBtnTexParallelY, BMP_TEX_PARALLEL_H ); - SETHCIMAGE( aBtnTexCircleY, BMP_TEX_CIRCLE_H ); - SETHCIMAGE( aBtnTexObjectY, BMP_TEX_OBJECT_H ); - SETHCIMAGE( aBtnTexFilter, BMP_TEX_FILTER_H ); - SETHCIMAGE( aBtnMatColor, BMP_COLORDLG_H ); - SETHCIMAGE( aBtnEmissionColor, BMP_COLORDLG_H ); - SETHCIMAGE( aBtnSpecularColor, BMP_COLORDLG_H ); - SETHCIMAGE( aBtnPerspective, BMP_PERSPECTIVE_H ); - SETHCIMAGE( aBtnConvertTo3D, BMP_CHANGE_TO_3D_H ); - SETHCIMAGE( aBtnLatheObject, BMP_LATHE_OBJ_H ); - mpImpl->pPool = NULL; - mpImpl->maImgLightOnH = Image( SVX_RES( RID_SVXIMAGE_LIGHT_ON_H ) ); - mpImpl->maImgLightOffH = Image( SVX_RES( RID_SVXIMAGE_LIGHT_OFF_H ) ); FreeResource(); // Metrik einstellen @@ -350,7 +296,7 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aBtnLight7.SetClickHdl( aLink ); aBtnLight8.SetClickHdl( aLink ); - // Texturen + // Textures aBtnTexLuminance.SetClickHdl( aLink ); aBtnTexColor.SetClickHdl( aLink ); aBtnTexReplace.SetClickHdl( aLink ); @@ -419,7 +365,7 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, } // ----------------------------------------------------------------------- -__EXPORT Svx3DWin::~Svx3DWin() +Svx3DWin::~Svx3DWin() { //delete pMatFavSetList; delete p3DView; @@ -461,13 +407,12 @@ void Svx3DWin::Reset() bool Svx3DWin::GetUILightState( ImageButton& aBtn ) const { - return (aBtn.GetModeImage() == aImgLightOn) || (aBtn.GetModeImage() == mpImpl->maImgLightOnH); + return (aBtn.GetModeImage() == aImgLightOn); } void Svx3DWin::SetUILightState( ImageButton& aBtn, bool bState ) { aBtn.SetModeImage( bState ? aImgLightOn : aImgLightOff ); - aBtn.SetModeImage( bState ? mpImpl->maImgLightOnH : mpImpl->maImgLightOffH, BMP_COLOR_HIGHCONTRAST ); } // ----------------------------------------------------------------------- @@ -498,7 +443,6 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) // construct field values const SfxPoolItem* pItem; - //BOOL bUpdate = FALSE; // evtl. PoolUnit ermitteln if( !mpImpl->pPool ) @@ -1402,7 +1346,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) } -// Texturen +// Textures // Art if( bBitmap ) { @@ -2112,7 +2056,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) else rAttrs.InvalidateItem(SDRATTR_3DSCENE_AMBIENTCOLOR); -// Texturen +// Textures // Art nValue = 3; if( aBtnTexLuminance.IsChecked() ) @@ -2221,7 +2165,7 @@ void Svx3DWin::GetAttr( SfxItemSet& rAttrs ) } // ----------------------------------------------------------------------- -void __EXPORT Svx3DWin::Resize() +void Svx3DWin::Resize() { if ( !IsFloatingMode() || !GetFloatingWindow()->IsRollUp() ) @@ -2524,7 +2468,7 @@ IMPL_LINK( Svx3DWin, ClickViewTypeHdl, void *, pBtn ) } } - // Texturen + // Textures if( eViewType == VIEWTYPE_TEXTURE ) { aFtTexKind.Show(); @@ -2716,7 +2660,7 @@ IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn ) ClickLightHdl( pBtn ); bUpdatePreview = TRUE; } - // Texturen + // Textures else if( pBtn == &aBtnTexLuminance || pBtn == &aBtnTexColor ) { @@ -3269,7 +3213,7 @@ ColorLB* Svx3DWin::GetLbByButton( const PushButton* pBtn ) |* Ableitung vom SfxChildWindow als "Behaelter" fuer Effekte |* \************************************************************************/ -__EXPORT Svx3DChildWindow::Svx3DChildWindow( Window* _pParent, +Svx3DChildWindow::Svx3DChildWindow( Window* _pParent, USHORT nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : @@ -3297,7 +3241,7 @@ Svx3DCtrlItem::Svx3DCtrlItem( USHORT _nId, } // ----------------------------------------------------------------------- -void __EXPORT Svx3DCtrlItem::StateChanged( USHORT /*nSId*/, +void Svx3DCtrlItem::StateChanged( USHORT /*nSId*/, SfxItemState /*eState*/, const SfxPoolItem* /*pItem*/ ) { } @@ -3331,3 +3275,4 @@ void SvxConvertTo3DItem::StateChanged(UINT16 /*_nId*/, SfxItemState eState, cons } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/float3d.src b/svx/source/engine3d/float3d.src index 791fb8de37..3f165742a5 100644 --- a/svx/source/engine3d/float3d.src +++ b/svx/source/engine3d/float3d.src @@ -255,7 +255,7 @@ DockingWindow RID_SVXFLOAT_3D Maximum = 100 ; Last = 100 ; Unit = FUNIT_CUSTOM ; - CustomUnitText = " %" ; + CustomUnitText = "%" ; }; FixedText FT_BACKSCALE { @@ -276,7 +276,7 @@ DockingWindow RID_SVXFLOAT_3D SpinSize = 5 ; Maximum = 10000 ; Unit = FUNIT_CUSTOM ; - CustomUnitText = " %" ; + CustomUnitText = "%" ; Last = 10000 ; }; FixedText FT_END_ANGLE @@ -1025,16 +1025,6 @@ DockingWindow RID_SVXFLOAT_3D Text [ en-US ] = "Textures" ; }; // Material - /* Control CTL_MATERIAL - { - //HelpId = HID_SD_CTL_FAVORITES ; - Border = TRUE ; - Pos = MAP_APPFONT ( BORDER + 6 , GROUP_Y + 9 ) ; - Size = MAP_APPFONT ( GROUP_WIDTH - 12 , GROUP_HEIGHT - 15 ) ; - TabStop = TRUE ; - Hide = TRUE ; - }; -*/ // Materialeditor FixedText FT_MAT_FAVORITES { @@ -1173,7 +1163,7 @@ DockingWindow RID_SVXFLOAT_3D Repeat = TRUE ; Spin = TRUE ; Unit = FUNIT_CUSTOM ; - CustomUnitText = " %" ; + CustomUnitText = "%" ; Minimum = 1 ; First = 1 ; Maximum = 100 ; @@ -1213,155 +1203,6 @@ DockingWindow RID_SVXFLOAT_3D Text [ en-US ] = "Material" ; }; - Bitmap BMP_GEO_H - { - File = "3dgeo_h.bmp"; - }; - - Bitmap BMP_REPRESENTATION_H - { - File = "3drepres_h.bmp"; - }; - - Bitmap BMP_3DLIGHT_H - { - File = "3dlight_h.bmp"; - }; - - Bitmap BMP_TEXTURE_H - { - File = "3dtextur_h.bmp"; - }; - - Bitmap BMP_MATERIAL_H - { - File = "material_h.bmp"; - }; - - Bitmap BMP_UPDATE_H - { - File = "sc10350_h.bmp"; - }; - - Bitmap BMP_ASSIGN_H - { - File = "apply_h.bmp"; - }; - - Bitmap BMP_CHANGE_TO_3D_H - { - File = "convrt3d_h.bmp"; - }; - - Bitmap BMP_LATHE_OBJ_H - { - File = "rotate3d_h.bmp"; - }; - - Bitmap BMP_PERSPECTIVE_H - { - File = "persp3d_h.bmp"; - }; - - Bitmap BMP_NORMALS_OBJ_H - { - File = "normobjs_h.bmp"; - }; - - Bitmap BMP_NORMALS_FLAT_H - { - File = "normflat_h.bmp"; - }; - - Bitmap BMP_NORMALS_SPHERE_H - { - File = "normsphe_h.bmp"; - }; - - Bitmap BMP_NORMALS_INVERT_H - { - File = "invert3d_h.bmp"; - }; - - Bitmap BMP_TWO_SIDED_LIGHTING_H - { - File = "lght2sid_h.bmp"; - }; - - Bitmap BMP_DOUBLE_SIDED_H - { - File = "doublesi_h.bmp"; - }; - - Bitmap BMP_SHADOW_3D_H - { - File = "shadow3d_h.bmp"; - }; - - Bitmap BMP_LIGHT_H - { - File = "light_h.bmp"; - }; - - Bitmap BMP_LIGHT_COLOR_H - { - File = "colordlg_h.bmp"; - }; - - Bitmap BMP_AMBIENT_COLOR_H - { - File = "colordlg_h.bmp"; - }; - - Bitmap BMP_TEX_LUMINANCE_H - { - File = "luminanc_h.bmp"; - }; - - Bitmap BMP_TEX_COLOR_H - { - File = "color_h.bmp"; - }; - - Bitmap BMP_TEX_REPLACE_H - { - File = "replac3d_h.bmp"; - }; - - Bitmap BMP_TEX_MODULATE_H - { - File = "modula3d_h.bmp"; - }; - - Bitmap BMP_TEX_BLEND_H - { - File = "blend3d_h.bmp"; - }; - - Bitmap BMP_TEX_OBJECT_H - { - File = "objspc3d_h.bmp"; - }; - - Bitmap BMP_TEX_PARALLEL_H - { - File = "parallel_h.bmp"; - }; - - Bitmap BMP_TEX_CIRCLE_H - { - File = "sphere3d_h.bmp"; - }; - - Bitmap BMP_TEX_FILTER_H - { - File = "filter3d_h.bmp"; - }; - - Bitmap BMP_COLORDLG_H - { - File = "colordlg_h.bmp"; - }; }; Image RID_SVXIMAGE_LIGHT_ON @@ -1376,115 +1217,43 @@ Image RID_SVXIMAGE_LIGHT_OFF MASKCOLOR }; -Image RID_SVXIMAGE_LIGHT_ON_H -{ - ImageBitmap = Bitmap { File = "lighton_h.bmp" ; }; - MASKCOLOR -}; - -Image RID_SVXIMAGE_LIGHT_OFF_H -{ - ImageBitmap = Bitmap { File = "light_h.bmp" ; }; - MASKCOLOR -}; - Image RID_SVXIMAGE_COLORDLG { ImageBitmap = Bitmap { File = "colordlg.bmp" ; }; MASKCOLOR }; -Image RID_SVXIMAGE_COLORDLG_H -{ - ImageBitmap = Bitmap { File = "colordlg_h.bmp" ; }; - MASKCOLOR -}; - -/*Image RID_SVXIMAGE_LIGHT_ON_SELECTED { - ImageBitmap = Bitmap { File = "lightons.bmp" ; }; - MASKCOLOR -}; -Image RID_SVXIMAGE_LIGHT_OFF_SELECTED { - ImageBitmap = Bitmap { File = "lightsel.bmp" ; }; - MASKCOLOR -};*/ - String RID_SVXFLOAT3D_FAVORITE { Text [ en-US ] = "Favorite"; }; + String RID_SVXFLOAT3D_FIX_X { Text [ en-US ] = "X"; }; + String RID_SVXFLOAT3D_FIX_Y { Text [ en-US ] = "Y"; }; + String RID_SVXFLOAT3D_FIX_Z { Text [ en-US ] = "Z"; }; + String RID_SVXFLOAT3D_FIX_R { Text [ en-US ] = "R:"; }; + String RID_SVXFLOAT3D_FIX_G { Text [ en-US ] = "G:"; }; + String RID_SVXFLOAT3D_FIX_B { Text [ en-US ] = "B:"; - }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx index ca46e66fdd..c7f461ded8 100644 --- a/svx/source/engine3d/helperhittest3d.cxx +++ b/svx/source/engine3d/helperhittest3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -293,3 +294,5 @@ bool checkHitSingle3DObject( ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/helperminimaldepth3d.cxx b/svx/source/engine3d/helperminimaldepth3d.cxx index 6fb31d6e19..bbe70996a5 100644 --- a/svx/source/engine3d/helperminimaldepth3d.cxx +++ b/svx/source/engine3d/helperminimaldepth3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -210,3 +211,5 @@ double getMinimalDepthInViewCoordinates(const E3dCompoundObject& rObject) ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/helperminimaldepth3d.hxx b/svx/source/engine3d/helperminimaldepth3d.hxx index 94f09f9f41..9a7fd359c8 100644 --- a/svx/source/engine3d/helperminimaldepth3d.hxx +++ b/svx/source/engine3d/helperminimaldepth3d.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,3 +59,5 @@ double getMinimalDepthInViewCoordinates(const E3dCompoundObject& rObject); #endif // INCLUDED_SVX_HELPERMINIMALDEPTH_HXX // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx index c8cae7068d..97240bb366 100644 --- a/svx/source/engine3d/lathe3d.cxx +++ b/svx/source/engine3d/lathe3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -275,3 +276,5 @@ SdrAttrObj* E3dLatheObj::GetBreakObj() } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index dd3c8403ad..c8ab23123d 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1278,3 +1279,5 @@ sal_Bool E3dCompoundObject::IsAOrdNumRemapCandidate(E3dScene*& prScene) const ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/objfac3d.cxx b/svx/source/engine3d/objfac3d.cxx index e4925cbbb4..f7d4d4f551 100644 --- a/svx/source/engine3d/objfac3d.cxx +++ b/svx/source/engine3d/objfac3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -108,3 +109,4 @@ IMPL_LINK( E3dObjFactory, MakeObject, SdrObjFactory*, pObjFactory) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/polygn3d.cxx b/svx/source/engine3d/polygn3d.cxx index 308f96067f..e2512d071f 100644 --- a/svx/source/engine3d/polygn3d.cxx +++ b/svx/source/engine3d/polygn3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -359,3 +360,5 @@ void E3dPolygonObj::SetLineOnly(BOOL bNew) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/polysc3d.cxx b/svx/source/engine3d/polysc3d.cxx index 0771c06cf5..65bd0a3e97 100644 --- a/svx/source/engine3d/polysc3d.cxx +++ b/svx/source/engine3d/polysc3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,5 @@ UINT16 E3dPolyScene::GetObjIdentifier() const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 31c4aa947c..8fab22d248 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -92,6 +93,7 @@ ImpRemap3DDepth::ImpRemap3DDepth(sal_uInt32 nOrdNum, double fMinimalDepth) ImpRemap3DDepth::ImpRemap3DDepth(sal_uInt32 nOrdNum) : mnOrdNum(nOrdNum), + mfMinimalDepth(0.0), mbIsScene(sal_True) { } @@ -840,7 +842,7 @@ basegfx::B2DPolyPolygon E3dScene::TakeCreatePoly(const SdrDragStat& /*rDrag*/) c return TakeXorPoly(); } -FASTBOOL E3dScene::BegCreate(SdrDragStat& rStat) +bool E3dScene::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); @@ -850,7 +852,7 @@ FASTBOOL E3dScene::BegCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL E3dScene::MovCreate(SdrDragStat& rStat) +bool E3dScene::MovCreate(SdrDragStat& rStat) { Rectangle aRect1; rStat.TakeCreateRect(aRect1); @@ -862,7 +864,7 @@ FASTBOOL E3dScene::MovCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL E3dScene::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool E3dScene::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { Rectangle aRect1; rStat.TakeCreateRect(aRect1); @@ -872,7 +874,7 @@ FASTBOOL E3dScene::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2); } -FASTBOOL E3dScene::BckCreate(SdrDragStat& /*rStat*/) +bool E3dScene::BckCreate(SdrDragStat& /*rStat*/) { return FALSE; } @@ -882,3 +884,5 @@ void E3dScene::BrkCreate(SdrDragStat& /*rStat*/) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/sphere3d.cxx b/svx/source/engine3d/sphere3d.cxx index f7fde7bab7..d707fcac99 100644 --- a/svx/source/engine3d/sphere3d.cxx +++ b/svx/source/engine3d/sphere3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -224,3 +225,5 @@ void E3dSphereObj::TakeObjNamePlural(XubString& rName) const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/svx3ditems.cxx b/svx/source/engine3d/svx3ditems.cxx index ce4c86ae3f..fba7365d12 100644 --- a/svx/source/engine3d/svx3ditems.cxx +++ b/svx/source/engine3d/svx3ditems.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,40 +43,40 @@ using namespace ::rtl; using namespace ::com::sun::star; ////////////////////////////////////////////////////////////////////////////// -Svx3DPercentDiagonalItem::Svx3DPercentDiagonalItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, nVal) +Svx3DPercentDiagonalItem::Svx3DPercentDiagonalItem(sal_uInt16 nVal) +: SfxUInt16Item(SDRATTR_3DOBJ_PERCENT_DIAGONAL, nVal) {} -Svx3DBackscaleItem::Svx3DBackscaleItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal) +Svx3DBackscaleItem::Svx3DBackscaleItem(sal_uInt16 nVal) +: SfxUInt16Item(SDRATTR_3DOBJ_BACKSCALE, nVal) {} -Svx3DDepthItem::Svx3DDepthItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal) +Svx3DDepthItem::Svx3DDepthItem(sal_uInt32 nVal) +: SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, nVal) {} -Svx3DHorizontalSegmentsItem::Svx3DHorizontalSegmentsItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal) +Svx3DHorizontalSegmentsItem::Svx3DHorizontalSegmentsItem(sal_uInt32 nVal) +: SfxUInt32Item(SDRATTR_3DOBJ_HORZ_SEGS, nVal) {} -Svx3DVerticalSegmentsItem::Svx3DVerticalSegmentsItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal) +Svx3DVerticalSegmentsItem::Svx3DVerticalSegmentsItem(sal_uInt32 nVal) +: SfxUInt32Item(SDRATTR_3DOBJ_VERT_SEGS, nVal) {} -Svx3DEndAngleItem::Svx3DEndAngleItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, nVal) +Svx3DEndAngleItem::Svx3DEndAngleItem(sal_uInt32 nVal) +: SfxUInt32Item(SDRATTR_3DOBJ_END_ANGLE, nVal) {} -Svx3DDoubleSidedItem::Svx3DDoubleSidedItem(BOOL bVal) -: SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, bVal) +Svx3DDoubleSidedItem::Svx3DDoubleSidedItem(BOOL bVal) +: SfxBoolItem(SDRATTR_3DOBJ_DOUBLE_SIDED, bVal) {} ////////////////////////////////////////////////////////////////////////////// // #i28528# // Added extra Item (Bool) for chart2 to be able to show reduced line geometry -Svx3DReducedLineGeometryItem::Svx3DReducedLineGeometryItem(BOOL bVal) -: SfxBoolItem(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY, bVal) +Svx3DReducedLineGeometryItem::Svx3DReducedLineGeometryItem(BOOL bVal) +: SfxBoolItem(SDRATTR_3DOBJ_REDUCED_LINE_GEOMETRY, bVal) {} sal_uInt16 Svx3DReducedLineGeometryItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const @@ -98,183 +99,183 @@ SfxPoolItem* Svx3DReducedLineGeometryItem::Create(SvStream& rIn, sal_uInt16 nIte ////////////////////////////////////////////////////////////////////////////// -Svx3DNormalsKindItem::Svx3DNormalsKindItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DOBJ_NORMALS_KIND, nVal) +Svx3DNormalsKindItem::Svx3DNormalsKindItem(sal_uInt16 nVal) +: SfxUInt16Item(SDRATTR_3DOBJ_NORMALS_KIND, nVal) {} -Svx3DNormalsInvertItem::Svx3DNormalsInvertItem(BOOL bVal) -: SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, bVal) +Svx3DNormalsInvertItem::Svx3DNormalsInvertItem(BOOL bVal) +: SfxBoolItem(SDRATTR_3DOBJ_NORMALS_INVERT, bVal) {} -Svx3DTextureProjectionXItem::Svx3DTextureProjectionXItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_X, nVal) +Svx3DTextureProjectionXItem::Svx3DTextureProjectionXItem(sal_uInt16 nVal) +: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_X, nVal) {} -Svx3DTextureProjectionYItem::Svx3DTextureProjectionYItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_Y, nVal) +Svx3DTextureProjectionYItem::Svx3DTextureProjectionYItem(sal_uInt16 nVal) +: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_PROJ_Y, nVal) {} -Svx3DShadow3DItem::Svx3DShadow3DItem(BOOL bVal) -: SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, bVal) +Svx3DShadow3DItem::Svx3DShadow3DItem(BOOL bVal) +: SfxBoolItem(SDRATTR_3DOBJ_SHADOW_3D, bVal) {} -Svx3DMaterialColorItem::Svx3DMaterialColorItem(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_COLOR) +Svx3DMaterialColorItem::Svx3DMaterialColorItem(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_COLOR) {} -Svx3DMaterialEmissionItem::Svx3DMaterialEmissionItem(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_EMISSION) +Svx3DMaterialEmissionItem::Svx3DMaterialEmissionItem(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_EMISSION) {} -Svx3DMaterialSpecularItem::Svx3DMaterialSpecularItem(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_SPECULAR) +Svx3DMaterialSpecularItem::Svx3DMaterialSpecularItem(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DOBJ_MAT_SPECULAR) {} -Svx3DMaterialSpecularIntensityItem::Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, nVal) +Svx3DMaterialSpecularIntensityItem::Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal) +: SfxUInt16Item(SDRATTR_3DOBJ_MAT_SPECULAR_INTENSITY, nVal) {} -Svx3DTextureKindItem::Svx3DTextureKindItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_KIND, nVal) +Svx3DTextureKindItem::Svx3DTextureKindItem(sal_uInt16 nVal) +: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_KIND, nVal) {} -Svx3DTextureModeItem::Svx3DTextureModeItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_MODE, nVal) +Svx3DTextureModeItem::Svx3DTextureModeItem(sal_uInt16 nVal) +: SfxUInt16Item(SDRATTR_3DOBJ_TEXTURE_MODE, nVal) {} -Svx3DTextureFilterItem::Svx3DTextureFilterItem(BOOL bVal) -: SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, bVal) +Svx3DTextureFilterItem::Svx3DTextureFilterItem(BOOL bVal) +: SfxBoolItem(SDRATTR_3DOBJ_TEXTURE_FILTER, bVal) {} -Svx3DPerspectiveItem::Svx3DPerspectiveItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, nVal) +Svx3DPerspectiveItem::Svx3DPerspectiveItem(sal_uInt16 nVal) +: SfxUInt16Item(SDRATTR_3DSCENE_PERSPECTIVE, nVal) {} -Svx3DDistanceItem::Svx3DDistanceItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal) +Svx3DDistanceItem::Svx3DDistanceItem(sal_uInt32 nVal) +: SfxUInt32Item(SDRATTR_3DSCENE_DISTANCE, nVal) {} -Svx3DFocalLengthItem::Svx3DFocalLengthItem(sal_uInt32 nVal) -: SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal) +Svx3DFocalLengthItem::Svx3DFocalLengthItem(sal_uInt32 nVal) +: SfxUInt32Item(SDRATTR_3DSCENE_FOCAL_LENGTH, nVal) {} -Svx3DTwoSidedLightingItem::Svx3DTwoSidedLightingItem(BOOL bVal) -: SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, bVal) +Svx3DTwoSidedLightingItem::Svx3DTwoSidedLightingItem(BOOL bVal) +: SfxBoolItem(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING, bVal) {} -Svx3DLightcolor1Item::Svx3DLightcolor1Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_1) +Svx3DLightcolor1Item::Svx3DLightcolor1Item(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_1) {} -Svx3DLightcolor2Item::Svx3DLightcolor2Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_2) +Svx3DLightcolor2Item::Svx3DLightcolor2Item(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_2) {} -Svx3DLightcolor3Item::Svx3DLightcolor3Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_3) +Svx3DLightcolor3Item::Svx3DLightcolor3Item(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_3) {} -Svx3DLightcolor4Item::Svx3DLightcolor4Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_4) +Svx3DLightcolor4Item::Svx3DLightcolor4Item(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_4) {} -Svx3DLightcolor5Item::Svx3DLightcolor5Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_5) +Svx3DLightcolor5Item::Svx3DLightcolor5Item(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_5) {} -Svx3DLightcolor6Item::Svx3DLightcolor6Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_6) +Svx3DLightcolor6Item::Svx3DLightcolor6Item(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_6) {} -Svx3DLightcolor7Item::Svx3DLightcolor7Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_7) +Svx3DLightcolor7Item::Svx3DLightcolor7Item(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_7) {} -Svx3DLightcolor8Item::Svx3DLightcolor8Item(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_8) +Svx3DLightcolor8Item::Svx3DLightcolor8Item(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DSCENE_LIGHTCOLOR_8) {} -Svx3DAmbientcolorItem::Svx3DAmbientcolorItem(const Color& rCol) -: SvxColorItem(rCol, SDRATTR_3DSCENE_AMBIENTCOLOR) +Svx3DAmbientcolorItem::Svx3DAmbientcolorItem(const Color& rCol) +: SvxColorItem(rCol, SDRATTR_3DSCENE_AMBIENTCOLOR) {} -Svx3DLightOnOff1Item::Svx3DLightOnOff1Item(BOOL bVal) -: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, bVal) +Svx3DLightOnOff1Item::Svx3DLightOnOff1Item(BOOL bVal) +: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_1, bVal) {} -Svx3DLightOnOff2Item::Svx3DLightOnOff2Item(BOOL bVal) -: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, bVal) +Svx3DLightOnOff2Item::Svx3DLightOnOff2Item(BOOL bVal) +: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_2, bVal) {} -Svx3DLightOnOff3Item::Svx3DLightOnOff3Item(BOOL bVal) -: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, bVal) +Svx3DLightOnOff3Item::Svx3DLightOnOff3Item(BOOL bVal) +: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_3, bVal) {} -Svx3DLightOnOff4Item::Svx3DLightOnOff4Item(BOOL bVal) -: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, bVal) +Svx3DLightOnOff4Item::Svx3DLightOnOff4Item(BOOL bVal) +: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_4, bVal) {} -Svx3DLightOnOff5Item::Svx3DLightOnOff5Item(BOOL bVal) -: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, bVal) +Svx3DLightOnOff5Item::Svx3DLightOnOff5Item(BOOL bVal) +: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_5, bVal) {} -Svx3DLightOnOff6Item::Svx3DLightOnOff6Item(BOOL bVal) -: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, bVal) +Svx3DLightOnOff6Item::Svx3DLightOnOff6Item(BOOL bVal) +: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_6, bVal) {} -Svx3DLightOnOff7Item::Svx3DLightOnOff7Item(BOOL bVal) -: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, bVal) +Svx3DLightOnOff7Item::Svx3DLightOnOff7Item(BOOL bVal) +: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_7, bVal) {} -Svx3DLightOnOff8Item::Svx3DLightOnOff8Item(BOOL bVal) -: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, bVal) +Svx3DLightOnOff8Item::Svx3DLightOnOff8Item(BOOL bVal) +: SfxBoolItem(SDRATTR_3DSCENE_LIGHTON_8, bVal) {} -Svx3DLightDirection1Item::Svx3DLightDirection1Item(const basegfx::B3DVector& rVec) -: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec) +Svx3DLightDirection1Item::Svx3DLightDirection1Item(const basegfx::B3DVector& rVec) +: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_1, rVec) {} -Svx3DLightDirection2Item::Svx3DLightDirection2Item(const basegfx::B3DVector& rVec) -: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, rVec) +Svx3DLightDirection2Item::Svx3DLightDirection2Item(const basegfx::B3DVector& rVec) +: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_2, rVec) {} -Svx3DLightDirection3Item::Svx3DLightDirection3Item(const basegfx::B3DVector& rVec) -: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, rVec) +Svx3DLightDirection3Item::Svx3DLightDirection3Item(const basegfx::B3DVector& rVec) +: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_3, rVec) {} -Svx3DLightDirection4Item::Svx3DLightDirection4Item(const basegfx::B3DVector& rVec) -: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, rVec) +Svx3DLightDirection4Item::Svx3DLightDirection4Item(const basegfx::B3DVector& rVec) +: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_4, rVec) {} -Svx3DLightDirection5Item::Svx3DLightDirection5Item(const basegfx::B3DVector& rVec) -: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, rVec) +Svx3DLightDirection5Item::Svx3DLightDirection5Item(const basegfx::B3DVector& rVec) +: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_5, rVec) {} -Svx3DLightDirection6Item::Svx3DLightDirection6Item(const basegfx::B3DVector& rVec) -: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, rVec) +Svx3DLightDirection6Item::Svx3DLightDirection6Item(const basegfx::B3DVector& rVec) +: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_6, rVec) {} -Svx3DLightDirection7Item::Svx3DLightDirection7Item(const basegfx::B3DVector& rVec) -: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, rVec) +Svx3DLightDirection7Item::Svx3DLightDirection7Item(const basegfx::B3DVector& rVec) +: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_7, rVec) {} -Svx3DLightDirection8Item::Svx3DLightDirection8Item(const basegfx::B3DVector& rVec) -: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec) +Svx3DLightDirection8Item::Svx3DLightDirection8Item(const basegfx::B3DVector& rVec) +: SvxB3DVectorItem(SDRATTR_3DSCENE_LIGHTDIRECTION_8, rVec) {} -Svx3DShadowSlantItem::Svx3DShadowSlantItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal) +Svx3DShadowSlantItem::Svx3DShadowSlantItem(sal_uInt16 nVal) +: SfxUInt16Item(SDRATTR_3DSCENE_SHADOW_SLANT, nVal) {} -Svx3DShadeModeItem::Svx3DShadeModeItem(sal_uInt16 nVal) -: SfxUInt16Item(SDRATTR_3DSCENE_SHADE_MODE, nVal) +Svx3DShadeModeItem::Svx3DShadeModeItem(sal_uInt16 nVal) +: SfxUInt16Item(SDRATTR_3DSCENE_SHADE_MODE, nVal) {} ////////////////////////////////////////////////////////////////////////////// // #107245# -Svx3DSmoothNormalsItem::Svx3DSmoothNormalsItem(BOOL bVal) -: SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_NORMALS, bVal) +Svx3DSmoothNormalsItem::Svx3DSmoothNormalsItem(BOOL bVal) +: SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_NORMALS, bVal) {} sal_uInt16 Svx3DSmoothNormalsItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const @@ -298,8 +299,8 @@ SfxPoolItem* Svx3DSmoothNormalsItem::Create(SvStream& rIn, sal_uInt16 nItemVersi ////////////////////////////////////////////////////////////////////////////// // #107245# -Svx3DSmoothLidsItem::Svx3DSmoothLidsItem(BOOL bVal) -: SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_LIDS, bVal) +Svx3DSmoothLidsItem::Svx3DSmoothLidsItem(BOOL bVal) +: SfxBoolItem(SDRATTR_3DOBJ_SMOOTH_LIDS, bVal) {} sal_uInt16 Svx3DSmoothLidsItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const @@ -323,8 +324,8 @@ SfxPoolItem* Svx3DSmoothLidsItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) ////////////////////////////////////////////////////////////////////////////// // #107245# -Svx3DCharacterModeItem::Svx3DCharacterModeItem(BOOL bVal) -: SfxBoolItem(SDRATTR_3DOBJ_CHARACTER_MODE, bVal) +Svx3DCharacterModeItem::Svx3DCharacterModeItem(BOOL bVal) +: SfxBoolItem(SDRATTR_3DOBJ_CHARACTER_MODE, bVal) {} sal_uInt16 Svx3DCharacterModeItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const @@ -348,8 +349,8 @@ SfxPoolItem* Svx3DCharacterModeItem::Create(SvStream& rIn, sal_uInt16 nItemVersi ////////////////////////////////////////////////////////////////////////////// // #107245# -Svx3DCloseFrontItem::Svx3DCloseFrontItem(BOOL bVal) -: SfxBoolItem(SDRATTR_3DOBJ_CLOSE_FRONT, bVal) +Svx3DCloseFrontItem::Svx3DCloseFrontItem(BOOL bVal) +: SfxBoolItem(SDRATTR_3DOBJ_CLOSE_FRONT, bVal) {} sal_uInt16 Svx3DCloseFrontItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const @@ -373,8 +374,8 @@ SfxPoolItem* Svx3DCloseFrontItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) ////////////////////////////////////////////////////////////////////////////// // #107245# -Svx3DCloseBackItem::Svx3DCloseBackItem(BOOL bVal) -: SfxBoolItem(SDRATTR_3DOBJ_CLOSE_BACK, bVal) +Svx3DCloseBackItem::Svx3DCloseBackItem(BOOL bVal) +: SfxBoolItem(SDRATTR_3DOBJ_CLOSE_BACK, bVal) {} sal_uInt16 Svx3DCloseBackItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const @@ -398,150 +399,152 @@ SfxPoolItem* Svx3DCloseBackItem::Create(SvStream& rIn, sal_uInt16 nItemVersion) ////////////////////////////////////////////////////////////////////////////// // Svx3DNormalsKindItem: use drawing::NormalsKind -sal_Bool Svx3DNormalsKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool Svx3DNormalsKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::NormalsKind)GetValue(); - return sal_True; + return true; } -sal_Bool Svx3DNormalsKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool Svx3DNormalsKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::NormalsKind eVar; if(!(rVal >>= eVar)) - return sal_False; + return false; SetValue((sal_Int16)eVar); - return sal_True; + return true; } -SfxPoolItem* Svx3DNormalsKindItem::Clone(SfxItemPool* /*pPool*/) const -{ +SfxPoolItem* Svx3DNormalsKindItem::Clone(SfxItemPool* /*pPool*/) const +{ return new Svx3DNormalsKindItem(*this); } // Svx3DTextureProjectionXItem: use drawing::TextureProjectionMode -sal_Bool Svx3DTextureProjectionXItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool Svx3DTextureProjectionXItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::TextureProjectionMode)GetValue(); - return sal_True; + return true; } -sal_Bool Svx3DTextureProjectionXItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool Svx3DTextureProjectionXItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::TextureProjectionMode eVar; if(!(rVal >>= eVar)) - return sal_False; + return false; SetValue((sal_Int16)eVar); - return sal_True; + return true; } -SfxPoolItem* Svx3DTextureProjectionXItem::Clone(SfxItemPool* /*pPool*/) const -{ +SfxPoolItem* Svx3DTextureProjectionXItem::Clone(SfxItemPool* /*pPool*/) const +{ return new Svx3DTextureProjectionXItem(*this); } // Svx3DTextureProjectionYItem: use drawing::TextureProjectionMode -sal_Bool Svx3DTextureProjectionYItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool Svx3DTextureProjectionYItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::TextureProjectionMode)GetValue(); - return sal_True; + return true; } -sal_Bool Svx3DTextureProjectionYItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool Svx3DTextureProjectionYItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::TextureProjectionMode eVar; if(!(rVal >>= eVar)) - return sal_False; + return false; SetValue((sal_Int16)eVar); - return sal_True; + return true; } -SfxPoolItem* Svx3DTextureProjectionYItem::Clone(SfxItemPool* /*pPool*/) const -{ +SfxPoolItem* Svx3DTextureProjectionYItem::Clone(SfxItemPool* /*pPool*/) const +{ return new Svx3DTextureProjectionYItem(*this); } // Svx3DTextureKindItem: use drawing::TextureKind -sal_Bool Svx3DTextureKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool Svx3DTextureKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::TextureKind)GetValue(); - return sal_True; + return true; } -sal_Bool Svx3DTextureKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool Svx3DTextureKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::TextureKind eVar; if(!(rVal >>= eVar)) - return sal_False; + return false; SetValue((sal_Int16)eVar); - return sal_True; + return true; } -SfxPoolItem* Svx3DTextureKindItem::Clone(SfxItemPool* /*pPool*/) const -{ +SfxPoolItem* Svx3DTextureKindItem::Clone(SfxItemPool* /*pPool*/) const +{ return new Svx3DTextureKindItem(*this); } // Svx3DTextureModeItem: use drawing:TextureMode -sal_Bool Svx3DTextureModeItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool Svx3DTextureModeItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::TextureMode)GetValue(); - return sal_True; + return true; } -sal_Bool Svx3DTextureModeItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool Svx3DTextureModeItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::TextureMode eVar; if(!(rVal >>= eVar)) - return sal_False; + return false; SetValue((sal_Int16)eVar); - return sal_True; + return true; } -SfxPoolItem* Svx3DTextureModeItem::Clone(SfxItemPool* /*pPool*/) const -{ +SfxPoolItem* Svx3DTextureModeItem::Clone(SfxItemPool* /*pPool*/) const +{ return new Svx3DTextureModeItem(*this); } // Svx3DPerspectiveItem: use drawing::ProjectionMode -sal_Bool Svx3DPerspectiveItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool Svx3DPerspectiveItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::ProjectionMode)GetValue(); - return sal_True; + return true; } -sal_Bool Svx3DPerspectiveItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool Svx3DPerspectiveItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::ProjectionMode eVar; if(!(rVal >>= eVar)) - return sal_False; + return false; SetValue((sal_Int16)eVar); - return sal_True; + return true; } -SfxPoolItem* Svx3DPerspectiveItem::Clone(SfxItemPool* /*pPool*/) const -{ +SfxPoolItem* Svx3DPerspectiveItem::Clone(SfxItemPool* /*pPool*/) const +{ return new Svx3DPerspectiveItem(*this); } // Svx3DShadeModeItem: use drawing::ShadeMode -sal_Bool Svx3DShadeModeItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool Svx3DShadeModeItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::ShadeMode)GetValue(); - return sal_True; + return true; } -sal_Bool Svx3DShadeModeItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool Svx3DShadeModeItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::ShadeMode eVar; if(!(rVal >>= eVar)) - return sal_False; + return false; SetValue((sal_Int16)eVar); - return sal_True; + return true; } -SfxPoolItem* Svx3DShadeModeItem::Clone(SfxItemPool* /*pPool*/) const -{ +SfxPoolItem* Svx3DShadeModeItem::Clone(SfxItemPool* /*pPool*/) const +{ return new Svx3DShadeModeItem(*this); } // EOF + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 85808a4a81..f00e03524c 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -294,9 +295,6 @@ void E3dView::DrawMarkedObj(OutputDevice& rOut) const } } - // bei allen direkt selektierten Objekten auf selektiert setzen - SdrMark* pM = NULL; - for(nObjs = 0;nObjs < nCnt;nObjs++) { SdrObject *pObj = GetMarkedObjectByIndex(nObjs); @@ -306,7 +304,6 @@ void E3dView::DrawMarkedObj(OutputDevice& rOut) const E3dObject* p3DObj = (E3dObject*)pObj; p3DObj->SetSelected(TRUE); pScene = p3DObj->GetScene(); - pM = GetSdrMarkByIndex(nObjs); } } @@ -1925,3 +1922,5 @@ void E3dView::CheckPossibilities() } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx index ab2a25ca74..16ae78fe90 100644 --- a/svx/source/engine3d/view3d1.cxx +++ b/svx/source/engine3d/view3d1.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -228,3 +229,4 @@ double E3dView::GetDefaultCamFocal() return (double)((const SfxUInt32Item&)pMod->GetItemPool().GetDefaultItem(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/viewpt3d2.cxx b/svx/source/engine3d/viewpt3d2.cxx index ed95cd8e6c..cb3b42b9f5 100644 --- a/svx/source/engine3d/viewpt3d2.cxx +++ b/svx/source/engine3d/viewpt3d2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -392,3 +393,5 @@ void Viewport3D::SetFarClipDist(double fNewFCD) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx index f61cbeac29..57e812cd3e 100644 --- a/svx/source/fmcomp/dbaexchange.cxx +++ b/svx/source/fmcomp/dbaexchange.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,16 +34,12 @@ #include <com/sun/star/sdbcx/XTablesSupplier.hpp> #include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp> #include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp> -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif #include <comphelper/extract.hxx> #include <sot/formats.hxx> #include <sot/exchange.hxx> #include <comphelper/propertysetinfo.hxx> -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif #include <tools/urlobj.hxx> //........................................................................ @@ -730,3 +727,4 @@ namespace svx //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/fmcomp/dbaobjectex.cxx b/svx/source/fmcomp/dbaobjectex.cxx index 0da3e9ec1a..8f50991d31 100644 --- a/svx/source/fmcomp/dbaobjectex.cxx +++ b/svx/source/fmcomp/dbaobjectex.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,16 +33,12 @@ #include <com/sun/star/sdbcx/XTablesSupplier.hpp> #include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp> #include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp> -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif #include <comphelper/extract.hxx> #include <sot/formats.hxx> #include <sot/exchange.hxx> #include <comphelper/propertysetinfo.hxx> -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif //........................................................................ namespace svx @@ -185,3 +182,4 @@ namespace svx //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 21cc3e224d..8ea2e9a0ca 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -353,7 +354,7 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt ) // not interested in any results Reference< XPropertySet > xStatProps(xStatement,UNO_QUERY); - xStatProps->setPropertyValue(rtl::OUString::createFromAscii("MaxRows"), makeAny(sal_Int32(0))); + xStatProps->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MaxRows")), makeAny(sal_Int32(0))); xResultSet = xStatement->executeQuery(); Reference< XColumnsSupplier > xSupplyCols(xResultSet, UNO_QUERY); @@ -506,14 +507,13 @@ IMPL_LINK( FmGridHeader, OnAsyncExecuteDrop, void*, /*NOTINTERESTEDIN*/ ) } catch(Exception&) { - DBG_ERROR("FmGridHeader::ExecuteDrop: Exception occured!"); + DBG_ERROR("FmGridHeader::ExecuteDrop: Exception occurred!"); } - sal_Int32 nPreferedType = -1; sal_Bool bDateNTimeCol = sal_False; if (aPossibleTypes.Count() != 0) { - nPreferedType = aPossibleTypes[0]; + sal_Int32 nPreferedType = aPossibleTypes[0]; if ((m_pImpl->nDropAction == DND_ACTION_LINK) && (aPossibleTypes.Count() > 1)) { ImageList aImageList( SVX_RES(RID_SVXIMGLIST_FMEXPL) ); @@ -1099,7 +1099,7 @@ void FmGridControl::propertyChange(const ::com::sun::star::beans::PropertyChange if (eStatus != xRow->GetStatus()) { xRow->SetStatus(eStatus); - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; RowModified(GetCurrentPos()); } } @@ -1172,7 +1172,7 @@ void FmGridControl::DeleteSelectedRows() // #100312# ------------ Reference< ::com::sun::star::util::XURLTransformer > xTransformer( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer")), UNO_QUERY); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), UNO_QUERY); if( xTransformer.is() ) xTransformer->parseStrict( aUrl ); @@ -1551,7 +1551,7 @@ void FmGridControl::ColumnResized(sal_uInt16 nId) DbGridControl::ColumnResized(nId); // Wert ans model uebergeben - DbGridColumn* pCol = DbGridControl::GetColumns().GetObject(GetModelColumnPos(nId)); + DbGridColumn* pCol = DbGridControl::GetColumns().at( GetModelColumnPos(nId) ); Reference< ::com::sun::star::beans::XPropertySet > xColModel(pCol->getModel()); if (xColModel.is()) { @@ -1597,7 +1597,7 @@ void FmGridControl::ColumnMoved(sal_uInt16 nId) { // suchen der Spalte und verschieben im Model // ColumnPos holen - DbGridColumn* pCol = DbGridControl::GetColumns().GetObject(GetModelColumnPos(nId)); + DbGridColumn* pCol = DbGridControl::GetColumns().at( GetModelColumnPos(nId) ); Reference< ::com::sun::star::beans::XPropertySet > xCol; // Einfuegen muß sich an den Column Positionen orientieren @@ -1660,7 +1660,7 @@ void FmGridControl::InitColumnsByModels(const Reference< ::com::sun::star::conta nWidth = LogicToPixel(Point(nWidth,0),MAP_10TH_MM).X(); AppendColumn(aName, (sal_uInt16)nWidth); - DbGridColumn* pCol = DbGridControl::GetColumns().GetObject(i); + DbGridColumn* pCol = DbGridControl::GetColumns().at( i ); pCol->setModel(xCol); } @@ -1694,7 +1694,7 @@ void FmGridControl::InitColumnByField( Reference< XPropertySet > xField; _rxColumnModel->getPropertyValue( FM_PROP_BOUNDFIELD ) >>= xField; - + if ( !xField.is() && /*sFieldName.getLength() && */_rxFieldsByNames->hasByName( sFieldName ) ) // #i93452# do not check for name length _rxFieldsByNames->getByName( sFieldName ) >>= xField; @@ -1794,7 +1794,7 @@ void FmGridControl::HideColumn(sal_uInt16 nId) if (nPos == (sal_uInt16)-1) return; - DbGridColumn* pColumn = GetColumns().GetObject(nPos); + DbGridColumn* pColumn = GetColumns().at( nPos ); if (pColumn->IsHidden()) GetPeer()->columnHidden(pColumn); @@ -1826,7 +1826,7 @@ void FmGridControl::ShowColumn(sal_uInt16 nId) if (nPos == (sal_uInt16)-1) return; - DbGridColumn* pColumn = GetColumns().GetObject(nPos); + DbGridColumn* pColumn = GetColumns().at( nPos ); if (!pColumn->IsHidden()) GetPeer()->columnVisible(pColumn); @@ -1838,7 +1838,7 @@ void FmGridControl::ShowColumn(sal_uInt16 nId) //------------------------------------------------------------------------------ sal_Bool FmGridControl::selectBookmarks(const Sequence< Any >& _rBookmarks) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // need to lock the SolarMutex so that no paint call disturbs us ... if ( !m_pSeekCursor ) @@ -2127,7 +2127,7 @@ void FmGridControl::KeyInput( const KeyEvent& rKEvt ) } catch(const Exception&) { - OSL_ENSURE(0,"exception occured while deleting a column"); + OSL_ENSURE(0,"exception occurred while deleting a column"); } } } @@ -2142,3 +2142,4 @@ void FmGridControl::KeyInput( const KeyEvent& rKEvt ) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 21c27bf0cc..cf4ef83a45 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,6 +65,7 @@ #include <cppuhelper/typeprovider.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <tools/diagnose_ex.h> +#include <sal/macros.h> using namespace ::svxform; using namespace ::com::sun::star::container; @@ -430,7 +432,7 @@ sal_Bool SAL_CALL FmXGridControl::supportsService(const ::rtl::OUString& Service //------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL FmXGridControl::getImplementationName() throw() { - return ::rtl::OUString::createFromAscii("com.sun.star.form.FmXGridControl"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.FmXGridControl")); } //------------------------------------------------------------------------------ @@ -438,14 +440,14 @@ sal_Bool SAL_CALL FmXGridControl::supportsService(const ::rtl::OUString& Service { Sequence< ::rtl::OUString > aServiceNames(2); aServiceNames[0] = FM_SUN_CONTROL_GRIDCONTROL; - aServiceNames[1] = ::rtl::OUString::createFromAscii("com.sun.star.awt.UnoControl"); + aServiceNames[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControl")); return aServiceNames; } //------------------------------------------------------------------------------ void SAL_CALL FmXGridControl::dispose() throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EventObject aEvt; aEvt.Source = static_cast< ::cppu::OWeakObject* >(this); @@ -459,14 +461,14 @@ void SAL_CALL FmXGridControl::dispose() throw( RuntimeException ) //------------------------------------------------------------------------------ ::rtl::OUString FmXGridControl::GetComponentServiceName() { - ::rtl::OUString aName = ::rtl::OUString::createFromAscii("DBGrid"); + ::rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("DBGrid")); return aName; } //------------------------------------------------------------------------------ sal_Bool SAL_CALL FmXGridControl::setModel(const Reference< ::com::sun::star::awt::XControlModel >& rModel) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if (!UnoControl::setModel(rModel)) return sal_False; @@ -678,7 +680,7 @@ void FmXGridControl::addModifyListener(const Reference< ::com::sun::star::util:: //------------------------------------------------------------------------------ sal_Bool SAL_CALL FmXGridControl::select( const Any& _rSelection ) throw (IllegalArgumentException, RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XSelectionSupplier > xPeer(getPeer(), UNO_QUERY); return xPeer->select(_rSelection); } @@ -686,7 +688,7 @@ sal_Bool SAL_CALL FmXGridControl::select( const Any& _rSelection ) throw (Illega //------------------------------------------------------------------------------ Any SAL_CALL FmXGridControl::getSelection( ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XSelectionSupplier > xPeer(getPeer(), UNO_QUERY); return xPeer->getSelection(); } @@ -753,7 +755,7 @@ void SAL_CALL FmXGridControl::removeModifyListener(const Reference< ::com::sun:: //------------------------------------------------------------------------------ void SAL_CALL FmXGridControl::draw( sal_Int32 x, sal_Int32 y ) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; m_bInDraw = sal_True; UnoControl::draw(x, y); m_bInDraw = sal_False; @@ -766,7 +768,7 @@ void SAL_CALL FmXGridControl::setDesignMode(sal_Bool bOn) throw( RuntimeExceptio // --- <mutex_lock> --- { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XRowSetSupplier > xGrid(getPeer(), UNO_QUERY); @@ -801,7 +803,7 @@ void SAL_CALL FmXGridControl::setDesignMode(sal_Bool bOn) throw( RuntimeExceptio // prepare firing an event aModeChangeEvent.Source = *this; - aModeChangeEvent.NewMode = ::rtl::OUString::createFromAscii( mbDesignMode ? "design" : "alive" ); + aModeChangeEvent.NewMode = mbDesignMode ? ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "design" )) : ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "alive" )); } // --- </mutex_lock> --- @@ -942,7 +944,7 @@ void SAL_CALL FmXGridControl::setCurrentColumnPosition(sal_Int16 nPos) throw( Ru Reference< XGridControl > xGrid( getPeer(), UNO_QUERY ); if ( xGrid.is() ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; xGrid->setCurrentColumnPosition( nPos ); } } @@ -1351,7 +1353,7 @@ Sequence< sal_Bool > SAL_CALL FmXGridPeer::queryFieldDataType( const Type& xType sal_uInt16 nModelPos = pGrid->GetModelColumnPos(pGrid->GetColumnIdFromViewPos((sal_uInt16)i)); DBG_ASSERT(nModelPos != (sal_uInt16)-1, "FmXGridPeer::queryFieldDataType : no model pos !"); - pCol = aColumns.GetObject(nModelPos); + pCol = aColumns[ nModelPos ]; const DbGridRowRef xRow = pGrid->GetSeekRow(); xFieldContent = (xRow.Is() && xRow->HasField(pCol->GetFieldPos())) ? xRow->GetField(pCol->GetFieldPos()).getColumn() : Reference< ::com::sun::star::sdb::XColumn > (); if (!xFieldContent.is()) @@ -1468,7 +1470,7 @@ void FmXGridPeer::CellModified() //------------------------------------------------------------------------------ void FmXGridPeer::propertyChange(const PropertyChangeEvent& evt) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // want to do a lot of VCL stuff here ... // this should not be (deadlock) critical, as by definition, every component should release // any own mutexes before notifying @@ -1547,7 +1549,7 @@ void FmXGridPeer::propertyChange(const PropertyChangeEvent& evt) throw( RuntimeE // it design mode it doesn't matter if (!isDesignMode()) { - DbGridColumn* pCol = pGrid->GetColumns().GetObject(i); + DbGridColumn* pCol = pGrid->GetColumns().at( i ); pCol->SetAlignmentFromModel(-1); bInvalidateColumn = sal_True; @@ -1696,7 +1698,7 @@ void FmXGridPeer::addColumnListeners(const Reference< XPropertySet >& xCol) Reference< XPropertySetInfo > xInfo = xCol->getPropertySetInfo(); Property aPropDesc; const ::rtl::OUString* pProps = aPropsListenedTo; - const ::rtl::OUString* pPropsEnd = pProps + sizeof( aPropsListenedTo ) / sizeof( aPropsListenedTo[ 0 ] ); + const ::rtl::OUString* pPropsEnd = pProps + SAL_N_ELEMENTS( aPropsListenedTo ); for (; pProps != pPropsEnd; ++pProps) { if ( xInfo->hasPropertyByName( *pProps ) ) @@ -1719,7 +1721,7 @@ void FmXGridPeer::removeColumnListeners(const Reference< XPropertySet >& xCol) }; Reference< XPropertySetInfo > xInfo = xCol->getPropertySetInfo(); - for (sal_uInt16 i=0; i<sizeof(aPropsListenedTo)/sizeof(aPropsListenedTo[0]); ++i) + for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(aPropsListenedTo); ++i) if (xInfo->hasPropertyByName(aPropsListenedTo[i])) xCol->removePropertyChangeListener(aPropsListenedTo[i], this); } @@ -1810,7 +1812,7 @@ sal_Bool FmXGridPeer::isDesignMode() throw( RuntimeException ) //------------------------------------------------------------------------------ void FmXGridPeer::elementInserted(const ContainerEvent& evt) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); // Handle Column beruecksichtigen @@ -1831,7 +1833,7 @@ void FmXGridPeer::elementInserted(const ContainerEvent& evt) throw( RuntimeExcep pGrid->AppendColumn(aName, (sal_uInt16)nWidth, (sal_Int16)::comphelper::getINT32(evt.Accessor)); // jetzt die Spalte setzen - DbGridColumn* pCol = pGrid->GetColumns().GetObject(::comphelper::getINT32(evt.Accessor)); + DbGridColumn* pCol = pGrid->GetColumns().at( ::comphelper::getINT32(evt.Accessor) ); pCol->setModel(xNewColumn); Any aHidden = xNewColumn->getPropertyValue(FM_PROP_HIDDEN); @@ -1844,7 +1846,7 @@ void FmXGridPeer::elementInserted(const ContainerEvent& evt) throw( RuntimeExcep //------------------------------------------------------------------------------ void FmXGridPeer::elementReplaced(const ContainerEvent& evt) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); @@ -1875,7 +1877,7 @@ void FmXGridPeer::elementReplaced(const ContainerEvent& evt) throw( RuntimeExcep sal_uInt16 nNewPos = pGrid->GetModelColumnPos(nNewId); // set the model of the new column - DbGridColumn* pCol = pGrid->GetColumns().GetObject(nNewPos); + DbGridColumn* pCol = pGrid->GetColumns().at( nNewPos ); // for initializong this grid column, we need the fields of the grid's data source Reference< XColumnsSupplier > xSuppColumns; @@ -1900,7 +1902,7 @@ void FmXGridPeer::elementReplaced(const ContainerEvent& evt) throw( RuntimeExcep //------------------------------------------------------------------------------ void FmXGridPeer::elementRemoved(const ContainerEvent& evt) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); @@ -1918,7 +1920,7 @@ void FmXGridPeer::elementRemoved(const ContainerEvent& evt) throw( RuntimeExcept //------------------------------------------------------------------------------ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& Value) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); @@ -1940,9 +1942,9 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V // need to forward this to the columns DbGridColumns& rColumns = const_cast<DbGridColumns&>(pGrid->GetColumns()); - DbGridColumn* pLoop = rColumns.First(); - while (pLoop) + for ( size_t i = 0, n = rColumns.size(); i < n; ++i ) { + DbGridColumn* pLoop = rColumns[ i ]; FmXGridCell* pXCell = pLoop->GetCell(); if (pXCell) { @@ -1951,8 +1953,6 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V else pXCell->SetTextLineColor(aTextLineColor); } - - pLoop = rColumns.Next(); } if (isDesignMode()) @@ -2347,7 +2347,7 @@ void FmXGridPeer::setCurrentColumnPosition(sal_Int16 nPos) throw( RuntimeExcepti //------------------------------------------------------------------------------ void FmXGridPeer::selectionChanged(const EventObject& evt) throw( RuntimeException ) { - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); if (pGrid) @@ -2437,8 +2437,7 @@ Any FmXGridPeer::getByIndex(sal_Int32 _nIndex) throw( IndexOutOfBoundsException, // get the list position sal_uInt16 nPos = pGrid->GetModelColumnPos(nId); - DbGridColumn* pCol = pGrid->GetColumns().GetObject(nPos); -// DBG_ASSERT(pCol && pCol->GetCell(), "FmXGridPeer::getByIndex(): Invalid cell"); + DbGridColumn* pCol = pGrid->GetColumns().at( nPos ); Reference< ::com::sun::star::awt::XControl > xControl(pCol->GetCell()); aElement <<= xControl; @@ -2734,13 +2733,13 @@ void FmXGridPeer::resetted(const EventObject& rEvent) throw( RuntimeException ) FmGridControl* pGrid = (FmGridControl*)GetWindow(); if (!pGrid) return; - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; pGrid->resetCurrentRow(); } // if the cursor fired a reset event we seem to be on the insert row else if (m_xCursor == rEvent.Source) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; FmGridControl* pGrid = (FmGridControl*) GetWindow(); if (pGrid && pGrid->IsOpen()) pGrid->positioned(rEvent); @@ -2761,7 +2760,7 @@ Sequence<sal_uInt16>& FmXGridPeer::getSupportedGridSlots() DbGridControl::NavigationBar::RECORD_NEW, SID_FM_RECORD_UNDO }; - aSupported.realloc(sizeof(nSupported)/sizeof(nSupported[0])); + aSupported.realloc(SAL_N_ELEMENTS(nSupported)); sal_uInt16* pSupported = aSupported.getArray(); for (sal_uInt16 i=0; i<aSupported.getLength(); ++i, ++pSupported) *pSupported = nSupported[i]; @@ -2783,7 +2782,7 @@ Sequence< ::com::sun::star::util::URL>& FmXGridPeer::getSupportedURLs() FMURL_RECORD_MOVETONEW, FMURL_RECORD_UNDO }; - aSupported.realloc(sizeof(sSupported)/sizeof(sSupported[0])); + aSupported.realloc(SAL_N_ELEMENTS(sSupported)); ::com::sun::star::util::URL* pSupported = aSupported.getArray(); sal_uInt16 i; @@ -2793,7 +2792,7 @@ Sequence< ::com::sun::star::util::URL>& FmXGridPeer::getSupportedURLs() // let an ::com::sun::star::util::URL-transformer normalize the URLs Reference< ::com::sun::star::util::XURLTransformer > xTransformer( ::comphelper::getProcessServiceFactory()->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), UNO_QUERY); pSupported = aSupported.getArray(); if (xTransformer.is()) @@ -2960,3 +2959,4 @@ IMPL_LINK(FmXGridPeer, OnExecuteGridSlot, void*, pSlot) return 0; // not handled } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index d8d07f23f9..88337d5a1e 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" - +#include <sal/macros.h> #include "fmprop.hrc" #include "svx/fmresids.hrc" #include "svx/fmtools.hxx" @@ -673,7 +674,7 @@ void DbCellControl::implAdjustGenericFieldSetting( const Reference< XPropertySet //------------------------------------------------------------------------------ void DbCellControl::_propertyChanged(const PropertyChangeEvent& _rEvent) throw(RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XPropertySet > xSourceProps( _rEvent.Source, UNO_QUERY ); @@ -735,7 +736,7 @@ void DbCellControl::ImplInitWindow( Window& rParent, const InitWindowFacet _eIni if ( ( _eInitWhat & InitWritingMode ) != 0 ) { - for ( size_t i=0; i < sizeof( pWindows ) / sizeof( pWindows[0] ); ++i ) + for ( size_t i=0; i < SAL_N_ELEMENTS( pWindows ); ++i ) { if ( pWindows[i] ) pWindows[i]->EnableRTL( rParent.IsRTLEnabled() ); @@ -744,7 +745,7 @@ void DbCellControl::ImplInitWindow( Window& rParent, const InitWindowFacet _eIni if ( ( _eInitWhat & InitFont ) != 0 ) { - for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) + for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i) { if ( !pWindows[i] ) continue; @@ -776,7 +777,7 @@ void DbCellControl::ImplInitWindow( Window& rParent, const InitWindowFacet _eIni sal_Bool bTextLineColor = rParent.IsTextLineColor(); Color aTextLineColor( rParent.GetTextLineColor() ); - for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) + for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i) { if ( pWindows[i] ) { @@ -797,7 +798,7 @@ void DbCellControl::ImplInitWindow( Window& rParent, const InitWindowFacet _eIni if (rParent.IsControlBackground()) { Color aColor( rParent.GetControlBackground()); - for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) + for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i) { if ( pWindows[i] ) { @@ -4045,7 +4046,7 @@ void SAL_CALL FmXCheckBoxCell::removeActionListener( const Reference< awt::XActi //------------------------------------------------------------------ void SAL_CALL FmXCheckBoxCell::setLabel( const ::rtl::OUString& _Label ) throw (RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( m_pColumn ) { DbGridControl& rGrid( m_pColumn->GetParent() ); @@ -4841,3 +4842,4 @@ IMPL_LINK( FmXFilterCell, OnCommit, void*, EMPTYARG ) return 1; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/fmcomp/gridcols.cxx b/svx/source/fmcomp/gridcols.cxx index 0ba38bbd37..aa6c9132ed 100644 --- a/svx/source/fmcomp/gridcols.cxx +++ b/svx/source/fmcomp/gridcols.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,8 +89,8 @@ namespace //------------------------------------------------------------------------------ sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName) { - const ::rtl::OUString aModelPrefix = ::rtl::OUString::createFromAscii("com.sun.star.form.component."); - const ::rtl::OUString aCompatibleModelPrefix = ::rtl::OUString::createFromAscii("stardiv.one.form.component."); + const ::rtl::OUString aModelPrefix(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.")); + const ::rtl::OUString aCompatibleModelPrefix(RTL_CONSTASCII_USTRINGPARAM("stardiv.one.form.component.")); sal_Int32 nTypeId = -1; if (aModelName == FM_COMPONENT_EDIT) @@ -112,3 +113,4 @@ sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName) return nTypeId; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 34d1e05906..d315301b81 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,18 +29,15 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#ifndef _SVX_FMHELP_HRC +#include <sal/macros.h> #include "fmhelp.hrc" -#endif #include <svx/gridctrl.hxx> #include "gridcell.hxx" #include "svx/dbtoolsclient.hxx" #include "svx/fmtools.hxx" #include <svtools/stringtransfer.hxx> -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif #include <svtools/stringtransfer.hxx> #include <com/sun/star/sdbc/ResultSetConcurrency.hpp> #include <com/sun/star/accessibility/XAccessible.hpp> @@ -64,9 +62,7 @@ #include "svx/fmresids.hrc" #endif -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include <tools/shl.hxx> #include <svx/dialmgr.hxx> #include "fmservs.hxx" @@ -739,7 +735,6 @@ void DbGridControl::NavigationBar::SetState(sal_uInt16 nWhich) // event (ImplGenerateMouseMove) even if nothing happened. This may lead to some unwanted effects, so we // do this check. // For further explanation see Bug 69900. - // FS - 18.11.99 pWnd->Enable(bAvailable); } @@ -785,7 +780,7 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) case STATE_CHANGE_MIRRORING: { BOOL bIsRTLEnabled = IsRTLEnabled(); - for ( size_t i=0; i < sizeof( pWindows ) / sizeof( pWindows[0] ); ++i ) + for ( size_t i=0; i < SAL_N_ELEMENTS( pWindows ); ++i ) pWindows[i]->EnableRTL( bIsRTLEnabled ); } break; @@ -799,7 +794,7 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) if ( IsControlFont() ) aFont.Merge( GetControlFont() ); - for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) + for (size_t i=0; i < SAL_N_ELEMENTS(pWindows); ++i) { pWindows[i]->SetZoom(aZoom); pWindows[i]->SetZoomedPointFont(aFont); @@ -828,7 +823,7 @@ DbGridRow::DbGridRow(CursorWrapper* pCur, sal_Bool bPaintCursor) Reference< XPropertySet > xColSet; ::cppu::extractInterface(xColSet, xColumns->getByIndex(i)); pColumn = new DataColumn(xColSet); - m_aVariants.Insert(pColumn, LIST_APPEND); + m_aVariants.push_back( pColumn ); } if (pCur->rowDeleted()) @@ -866,9 +861,9 @@ DbGridRow::DbGridRow(CursorWrapper* pCur, sal_Bool bPaintCursor) //------------------------------------------------------------------------------ DbGridRow::~DbGridRow() { - sal_uInt32 nCount = m_aVariants.Count(); - for (sal_uInt32 i = 0; i < nCount; i++) - delete m_aVariants.GetObject(i); + for ( size_t i = 0, n = m_aVariants.size(); i < n; ++i ) + delete m_aVariants[ i ]; + m_aVariants.clear(); } //------------------------------------------------------------------------------ @@ -1095,9 +1090,9 @@ void DbGridControl::Select() //------------------------------------------------------------------------------ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat ) { - for ( sal_uInt32 i = 0; i < m_aColumns.Count(); ++i ) + for ( size_t i = 0; i < m_aColumns.size(); ++i ) { - DbGridColumn* pCol = m_aColumns.GetObject(i); + DbGridColumn* pCol = m_aColumns[ i ]; if (pCol) pCol->ImplInitWindow( GetDataWindow(), _eInitWhat ); } @@ -1169,8 +1164,8 @@ void DbGridControl::RemoveRows() // alle Columns deinitialisieren // existieren Spalten, dann alle Controller freigeben - for (sal_uInt32 i = 0; i < m_aColumns.Count(); i++) - m_aColumns.GetObject(i)->Clear(); + for (size_t i = 0; i < m_aColumns.size(); i++) + m_aColumns[ i ]->Clear(); DELETEZ(m_pSeekCursor); DELETEZ(m_pDataCursor); @@ -1494,7 +1489,7 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt // retrieve the datebase of the Numberformatter try { - xSupplier->getNumberFormatSettings()->getPropertyValue(rtl::OUString::createFromAscii("NullDate")) >>= m_aNullDate; + xSupplier->getNumberFormatSettings()->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NullDate"))) >>= m_aNullDate; } catch(Exception&) { @@ -1673,9 +1668,9 @@ void DbGridControl::RemoveColumns() if ( IsEditing() ) DeactivateCell(); - for (sal_uInt32 i = 0; i < m_aColumns.Count(); i++) - delete m_aColumns.GetObject(i); - m_aColumns.Clear(); + for (size_t i = 0, n = m_aColumns.size(); i < n; i++) + delete m_aColumns[ i ]; + m_aColumns.clear(); DbGridControl_Base::RemoveColumns(); } @@ -1698,7 +1693,7 @@ sal_uInt16 DbGridControl::AppendColumn(const XubString& rName, sal_uInt16 nWidth sal_Int16 nViewPos = nModelPos; while (nModelPos--) { - if (m_aColumns.GetObject(nModelPos)->IsHidden()) + if ( m_aColumns[ nModelPos ]->IsHidden() ) --nViewPos; } // restore nModelPos, we need it later @@ -1708,16 +1703,20 @@ sal_uInt16 DbGridControl::AppendColumn(const XubString& rName, sal_uInt16 nWidth } // calculate the new id - for (nId=1; (GetModelColumnPos(nId) != GRID_COLUMN_NOT_FOUND) && (nId<=m_aColumns.Count()); ++nId) + for (nId=1; (GetModelColumnPos(nId) != GRID_COLUMN_NOT_FOUND) && (nId <= m_aColumns.size()); ++nId) ; DBG_ASSERT(GetViewColumnPos(nId) == (sal_uInt16)-1, "DbGridControl::AppendColumn : inconsistent internal state !"); // my column's models say "there is no column with id nId", but the view (the base class) says "there is a column ..." DbGridControl_Base::AppendColumn(rName, nWidth, nRealPos, nId); if (nModelPos == HEADERBAR_APPEND) - m_aColumns.Insert(CreateColumn(nId), LIST_APPEND); + m_aColumns.push_back( CreateColumn(nId) ); else - m_aColumns.Insert(CreateColumn(nId), nModelPos); + { + DbGridColumns::iterator it = m_aColumns.begin(); + ::std::advance( it, nModelPos ); + m_aColumns.insert( it, CreateColumn(nId) ); + } return nId; } @@ -1727,7 +1726,11 @@ void DbGridControl::RemoveColumn(sal_uInt16 nId) { sal_Int16 nIndex = GetModelColumnPos(nId); DbGridControl_Base::RemoveColumn(nId); - delete m_aColumns.Remove(nIndex); + + delete m_aColumns[ nIndex ]; + DbGridColumns::iterator it = m_aColumns.begin(); + ::std::advance( it, nIndex ); + m_aColumns.erase( it ); } //------------------------------------------------------------------------------ @@ -1738,7 +1741,7 @@ void DbGridControl::ColumnMoved(sal_uInt16 nId) // remove the col from the model sal_Int16 nOldModelPos = GetModelColumnPos(nId); #ifdef DBG_UTIL - DbGridColumn* pCol = m_aColumns.GetObject((sal_uInt32)nOldModelPos); + DbGridColumn* pCol = m_aColumns[ (sal_uInt32)nOldModelPos ]; DBG_ASSERT(!pCol->IsHidden(), "DbGridControl::ColumnMoved : moved a hidden col ? how this ?"); #endif @@ -1750,9 +1753,9 @@ void DbGridControl::ColumnMoved(sal_uInt16 nId) // from that we can compute the new model pos sal_uInt16 nNewModelPos; - for (nNewModelPos = 0; nNewModelPos < m_aColumns.Count(); ++nNewModelPos) + for (nNewModelPos = 0; nNewModelPos < m_aColumns.size(); ++nNewModelPos) { - if (!m_aColumns.GetObject(nNewModelPos)->IsHidden()) + if (!m_aColumns[ nNewModelPos ]->IsHidden()) { if (!nNewViewPos) break; @@ -1760,7 +1763,7 @@ void DbGridControl::ColumnMoved(sal_uInt16 nId) --nNewViewPos; } } - DBG_ASSERT(nNewModelPos<m_aColumns.Count(), "DbGridControl::ColumnMoved : could not find the new model position !"); + DBG_ASSERT( nNewModelPos < m_aColumns.size(), "DbGridControl::ColumnMoved : could not find the new model position !"); // this will work. of course the model isn't fully consistent with our view right now, but let's // look at the situation : a column has been moved with in the VIEW from pos m to n, say m<n (in the @@ -1813,14 +1816,23 @@ void DbGridControl::ColumnMoved(sal_uInt16 nId) // +---+---+---+---+---+---+ // // Now, all is consistent again. - // (except of the hidden column : The cycling of the cols occured on the model, not on the view. maybe + // (except of the hidden column : The cycling of the cols occurred on the model, not on the view. maybe // the user expected the latter but there really is no good argument against our method ;) ...) // // And no, this large explanation isn't just because I wanted to play a board game or something like // that. It's because it took me a while to see it myself, and the whole theme (hidden cols, model col // positions, view col positions) is really painful (at least for me) so the above pictures helped me a lot ;) - m_aColumns.Insert(m_aColumns.Remove((sal_uInt32)nOldModelPos), nNewModelPos); + + DbGridColumn* temp = m_aColumns[ nOldModelPos ]; + + DbGridColumns::iterator it = m_aColumns.begin(); + ::std::advance( it, nOldModelPos ); + m_aColumns.erase( it ); + + it = m_aColumns.begin(); + ::std::advance( it, nNewModelPos ); + m_aColumns.insert( it, temp ); } //------------------------------------------------------------------------------ @@ -2053,7 +2065,8 @@ void DbGridControl::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uI if (!IsValid(m_xPaintRow)) return; - DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColumnId)); + size_t Location = GetModelColumnPos(nColumnId); + DbGridColumn* pColumn = (Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; if (pColumn) { Rectangle aArea(rRect); @@ -2245,9 +2258,9 @@ void DbGridControl::forceROController(sal_Bool bForce) m_bForceROController = bForce; // alle Columns durchgehen und denen Bescheid geben - for (sal_uInt16 i=0; i<m_aColumns.Count(); ++i) + for ( size_t i=0; i < m_aColumns.size(); ++i ) { - DbGridColumn* pColumn = m_aColumns.GetObject(i); + DbGridColumn* pColumn = m_aColumns[ i ]; if (!pColumn) continue; @@ -2278,7 +2291,7 @@ void DbGridControl::forceROController(sal_Bool bForce) void DbGridControl::AdjustDataSource(sal_Bool bFull) { TRACE_RANGE("DbGridControl::AdjustDataSource"); - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; // wird die aktuelle Zeile gerade neu bestimmt, // wird kein abgleich vorgenommen @@ -2718,9 +2731,9 @@ void DbGridControl::SetFilterMode(sal_Bool bMode) m_xEmptyRow = new DbGridRow(); // setting the new filter controls - for (sal_uInt16 i = 0; i<m_aColumns.Count(); ++i) + for ( size_t i = 0; i < m_aColumns.size(); ++i ) { - DbGridColumn* pCurCol = m_aColumns.GetObject(i); + DbGridColumn* pCurCol = m_aColumns[ i ]; if (!pCurCol->IsHidden()) pCurCol->UpdateControl(); } @@ -2736,7 +2749,8 @@ void DbGridControl::SetFilterMode(sal_Bool bMode) // ----------------------------------------------------------------------------- String DbGridControl::GetCellText(long _nRow, USHORT _nColId) const { - DbGridColumn* pColumn = m_aColumns.GetObject( GetModelColumnPos( _nColId ) ); + size_t Location = GetModelColumnPos( _nColId ); + DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; String sRet; if ( const_cast<DbGridControl*>(this)->SeekRow(_nRow) ) sRet = GetCurrentRowCellText(pColumn, m_xPaintRow); @@ -2757,7 +2771,8 @@ sal_uInt32 DbGridControl::GetTotalCellWidth(long nRow, sal_uInt16 nColId) { if (SeekRow(nRow)) { - DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColId)); + size_t Location = GetModelColumnPos( nColId ); + DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; return GetDataWindow().GetTextWidth(GetCurrentRowCellText(pColumn,m_xPaintRow)); } else @@ -2810,7 +2825,7 @@ void DbGridControl::PostExecuteRowContextMenu(sal_uInt16 /*nRow*/, const PopupMe void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) throw( RuntimeException ) { TRACE_RANGE("DbGridControl::DataSourcePropertyChanged"); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // prop "IsModified" changed ? // during update don't care about the modified state if (!IsUpdating() && evt.PropertyName.compareTo(FM_PROP_ISMODIFIED) == COMPARE_EQUAL) @@ -2872,7 +2887,8 @@ void DbGridControl::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) if (GetDataWindow().IsMouseCaptured()) GetDataWindow().ReleaseMouse(); - DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColId)); + size_t Location = GetModelColumnPos( nColId ); + DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; OStringTransferable* pTransferable = new OStringTransferable(GetCurrentRowCellText(pColumn,m_xPaintRow)); Reference< XTransferable > xEnsureDelete(pTransferable); pTransferable->StartDrag(this, DND_ACTION_COPY); @@ -2892,7 +2908,7 @@ sal_Bool DbGridControl::canCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId) void DbGridControl::copyCellText(sal_Int32 _nRow, sal_Int16 _nColId) { DBG_ASSERT(canCopyCellText(_nRow, _nColId), "DbGridControl::copyCellText: invalid call!"); - DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(_nColId)); + DbGridColumn* pColumn = m_aColumns[ GetModelColumnPos(_nColId) ]; SeekRow(_nRow); OStringTransfer::CopyString( GetCurrentRowCellText( pColumn,m_xPaintRow ), this ); } @@ -3044,7 +3060,8 @@ CellController* DbGridControl::GetController(long /*nRow*/, sal_uInt16 nColumnId if (!IsValid(m_xCurrentRow) || !IsEnabled()) return NULL; - DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColumnId)); + size_t Location = GetModelColumnPos(nColumnId); + DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; if (!pColumn) return NULL; @@ -3083,7 +3100,8 @@ CellController* DbGridControl::GetController(long /*nRow*/, sal_uInt16 nColumnId //------------------------------------------------------------------------------ void DbGridControl::InitController(CellControllerRef& /*rController*/, long /*nRow*/, sal_uInt16 nColumnId) { - DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColumnId)); + size_t Location = GetModelColumnPos(nColumnId); + DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; if (pColumn) pColumn->UpdateFromField(m_xCurrentRow, m_xFormatter); } @@ -3296,7 +3314,8 @@ sal_Bool DbGridControl::SaveModified() if (!DbGridControl_Base::IsModified()) return sal_True; - DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(GetCurColumnId())); + size_t Location = GetModelColumnPos( GetCurColumnId() ); + DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; sal_Bool bOK = pColumn->Commit(); DBG_ASSERT( Controller().Is(), "DbGridControl::SaveModified: was modified, by have no controller?!" ); if ( !Controller().Is() ) @@ -3488,7 +3507,8 @@ void DbGridControl::KeyInput( const KeyEvent& rEvt ) sal_uInt16 nColId = GetCurColumnId(); if (nRow >= 0 && nRow < GetRowCount() && nColId < ColCount()) { - DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColId)); + size_t Location = GetModelColumnPos( nColId ); + DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; OStringTransfer::CopyString( GetCurrentRowCellText( pColumn,m_xPaintRow ), this ); return; } @@ -3512,7 +3532,8 @@ void DbGridControl::HideColumn(sal_uInt16 nId) // don't use my own RemoveColumn, this would remove it from m_aColumns, too // update my model - DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nId)); + size_t Location = GetModelColumnPos( nId ); + DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; DBG_ASSERT(pColumn, "DbGridControl::HideColumn : somebody did hide a nonexistent column !"); if (pColumn) { @@ -3533,7 +3554,7 @@ void DbGridControl::ShowColumn(sal_uInt16 nId) if (nPos == (sal_uInt16)-1) return; - DbGridColumn* pColumn = m_aColumns.GetObject(nPos); + DbGridColumn* pColumn = m_aColumns[ nPos ]; if (!pColumn->IsHidden()) { DBG_ASSERT(GetViewColumnPos(nId) != (sal_uInt16)-1, "DbGridControl::ShowColumn : inconsistent internal state !"); @@ -3546,9 +3567,9 @@ void DbGridControl::ShowColumn(sal_uInt16 nId) // to determine the new view position we need an adjacent non-hidden column sal_uInt16 nNextNonHidden = (sal_uInt16)-1; // first search the cols to the right - for (sal_uInt16 i = nPos + 1; i<m_aColumns.Count(); ++i) + for ( size_t i = nPos + 1; i < m_aColumns.size(); ++i ) { - DbGridColumn* pCurCol = m_aColumns.GetObject(i); + DbGridColumn* pCurCol = m_aColumns[ i ]; if (!pCurCol->IsHidden()) { nNextNonHidden = i; @@ -3558,9 +3579,9 @@ void DbGridControl::ShowColumn(sal_uInt16 nId) if ((nNextNonHidden == (sal_uInt16)-1) && (nPos > 0)) { // then to the left - for (sal_uInt16 i = nPos; i>0; --i) + for ( size_t i = nPos; i > 0; --i ) { - DbGridColumn* pCurCol = m_aColumns.GetObject(i-1); + DbGridColumn* pCurCol = m_aColumns[ i-1 ]; if (!pCurCol->IsHidden()) { nNextNonHidden = i-1; @@ -3570,7 +3591,7 @@ void DbGridControl::ShowColumn(sal_uInt16 nId) } sal_uInt16 nNewViewPos = (nNextNonHidden == (sal_uInt16)-1) ? 1 // there is no visible column -> insert behinde the handle col - : GetViewColumnPos(m_aColumns.GetObject(nNextNonHidden)->GetId()) + 1; + : GetViewColumnPos( m_aColumns[ nNextNonHidden ]->GetId() ) + 1; // the first non-handle col has "view pos" 0, but the pos arg for InsertDataColumn expects // a position 1 for the first non-handle col -> +1 DBG_ASSERT(nNewViewPos != (sal_uInt16)-1, "DbGridControl::ShowColumn : inconsistent internal state !"); @@ -3594,13 +3615,13 @@ void DbGridControl::ShowColumn(sal_uInt16 nId) //------------------------------------------------------------------------------ sal_uInt16 DbGridControl::GetColumnIdFromModelPos( sal_uInt16 nPos ) const { - if (nPos >= m_aColumns.Count()) + if (nPos >= m_aColumns.size()) { DBG_ERROR("DbGridControl::GetColumnIdFromModelPos : invalid argument !"); return (sal_uInt16)-1; } - DbGridColumn* pCol = m_aColumns.GetObject(nPos); + DbGridColumn* pCol = m_aColumns[ nPos ]; #if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL // in der Debug-Version rechnen wir die ModelPos in eine ViewPos um und vergleichen das mit dem Wert, // den wir zurueckliefern werden (nId an der entsprechenden Col in m_aColumns) @@ -3608,8 +3629,8 @@ sal_uInt16 DbGridControl::GetColumnIdFromModelPos( sal_uInt16 nPos ) const if (!pCol->IsHidden()) { // macht nur Sinn, wenn die Spalte sichtbar ist sal_uInt16 nViewPos = nPos; - for (sal_uInt16 i=0; i<m_aColumns.Count() && i<nPos; ++i) - if (m_aColumns.GetObject(i)->IsHidden()) + for ( size_t i = 0; i < m_aColumns.size() && i < nPos; ++i) + if ( m_aColumns[ i ]->IsHidden()) --nViewPos; DBG_ASSERT(pCol && GetColumnIdFromViewPos(nViewPos) == pCol->GetId(), @@ -3622,8 +3643,8 @@ sal_uInt16 DbGridControl::GetColumnIdFromModelPos( sal_uInt16 nPos ) const //------------------------------------------------------------------------------ sal_uInt16 DbGridControl::GetModelColumnPos( sal_uInt16 nId ) const { - for (sal_uInt16 i=0; i<m_aColumns.Count(); ++i) - if (m_aColumns.GetObject(i)->GetId() == nId) + for ( size_t i = 0; i < m_aColumns.size(); ++i ) + if ( m_aColumns[ i ]->GetId() == nId ) return i; return GRID_COLUMN_NOT_FOUND; @@ -3634,7 +3655,7 @@ void DbGridControl::implAdjustInSolarThread(BOOL _bRows) { TRACE_RANGE("DbGridControl::implAdjustInSolarThread"); ::osl::MutexGuard aGuard(m_aAdjustSafety); - if (::vos::OThread::getCurrentIdentifier() != Application::GetMainThreadIdentifier()) + if (::osl::Thread::getCurrentIdentifier() != Application::GetMainThreadIdentifier()) { m_nAsynAdjustEvent = PostUserEvent(LINK(this, DbGridControl, OnAsyncAdjust), reinterpret_cast< void* >( _bRows )); m_bPendingAdjustRows = _bRows; @@ -3732,9 +3753,9 @@ void DbGridControl::ConnectToFields() m_pFieldListeners = pListeners; } - for (sal_Int32 i=0; i<(sal_Int32)m_aColumns.Count(); ++i) + for ( size_t i = 0; i < m_aColumns.size(); ++i ) { - DbGridColumn* pCurrent = m_aColumns.GetObject(i); + DbGridColumn* pCurrent = m_aColumns[ i ]; sal_uInt16 nViewPos = pCurrent ? GetViewColumnPos(pCurrent->GetId()) : (sal_uInt16)-1; if ((sal_uInt16)-1 == nViewPos) continue; @@ -3779,7 +3800,8 @@ void DbGridControl::FieldValueChanged(sal_uInt16 _nId, const PropertyChangeEvent // all other cases are handled elsewhere return; - DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(_nId)); + size_t Location = GetModelColumnPos( _nId ); + DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; if (pColumn) { sal_Bool bAcquiredPaintSafety = sal_False; @@ -3797,7 +3819,7 @@ void DbGridControl::FieldValueChanged(sal_uInt16 _nId, const PropertyChangeEvent return; } // here we got the solar mutex, transfer it to a guard for safety reasons - ::vos::OGuard aPaintSafety(Application::GetSolarMutex()); + SolarMutexGuard aPaintSafety; Application::GetSolarMutex().release(); // and finally do the update ... @@ -3863,7 +3885,8 @@ Reference<XAccessible > DbGridControl::CreateAccessibleControl( sal_Int32 _nInde Reference< XAccessible > DbGridControl::CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) { USHORT nColumnId = GetColumnId( _nColumnPos ); - DbGridColumn* pColumn = m_aColumns.GetObject(GetModelColumnPos(nColumnId)); + size_t Location = GetModelColumnPos(nColumnId); + DbGridColumn* pColumn = ( Location < m_aColumns.size() ) ? m_aColumns[ Location ] : NULL; if ( pColumn ) { Reference< ::com::sun::star::awt::XControl> xInt(pColumn->GetCell()); @@ -3891,3 +3914,4 @@ Reference< XAccessible > DbGridControl::CreateAccessibleCell( sal_Int32 _nRow, s // ----------------------------------------------------------------------------- +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/fmcomp/trace.cxx b/svx/source/fmcomp/trace.cxx index 55b8ef1bd3..b43aece3d8 100644 --- a/svx/source/fmcomp/trace.cxx +++ b/svx/source/fmcomp/trace.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,22 +36,22 @@ //============================================================================== //------------------------------------------------------------------------------ -::vos::OMutex Tracer::s_aMapSafety; -::std::map< ::vos::OThread::TThreadIdentifier, INT32, ::std::less< ::vos::OThread::TThreadIdentifier > > +::osl::Mutex Tracer::s_aMapSafety; +::std::map< ::oslThreadIdentifier, INT32, ::std::less< oslThreadIdentifier > > Tracer::s_aThreadIndents; //------------------------------------------------------------------------------ Tracer::Tracer(const char* _pBlockDescription) :m_sBlockDescription(_pBlockDescription) { - ::vos::OGuard aGuard(s_aMapSafety); - INT32 nIndent = s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ]++; + ::osl::MutexGuard aGuard(s_aMapSafety); + INT32 nIndent = s_aThreadIndents[ ::osl::Thread::getCurrentIdentifier() ]++; ByteString sIndent; while (nIndent--) sIndent += '\t'; - ByteString sThread( ByteString::CreateFromInt32( (INT32)::vos::OThread::getCurrentIdentifier() ) ); + ByteString sThread( ByteString::CreateFromInt32( (INT32)::osl::Thread::getCurrentIdentifier() ) ); sThread += '\t'; ByteString sMessage(sThread); @@ -63,14 +64,14 @@ Tracer::Tracer(const char* _pBlockDescription) //------------------------------------------------------------------------------ Tracer::~Tracer() { - ::vos::OGuard aGuard(s_aMapSafety); - INT32 nIndent = --s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ]; + ::osl::MutexGuard aGuard(s_aMapSafety); + INT32 nIndent = --s_aThreadIndents[ ::osl::Thread::getCurrentIdentifier() ]; ByteString sIndent; while (nIndent--) sIndent += '\t'; - ByteString sThread( ByteString::CreateFromInt32( (INT32)::vos::OThread::getCurrentIdentifier() ) ); + ByteString sThread( ByteString::CreateFromInt32( (INT32)::osl::Thread::getCurrentIdentifier() ) ); sThread += '\t'; ByteString sMessage(sThread); @@ -83,14 +84,14 @@ Tracer::~Tracer() //------------------------------------------------------------------------------ void Tracer::TraceString(const char* _pMessage) { - ::vos::OGuard aGuard(s_aMapSafety); - INT32 nIndent = s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ]; + ::osl::MutexGuard aGuard(s_aMapSafety); + INT32 nIndent = s_aThreadIndents[ ::osl::Thread::getCurrentIdentifier() ]; ByteString sIndent; while (nIndent--) sIndent += '\t'; - ByteString sThread( ByteString::CreateFromInt32( (INT32)::vos::OThread::getCurrentIdentifier() ) ); + ByteString sThread( ByteString::CreateFromInt32( (INT32)::osl::Thread::getCurrentIdentifier() ) ); sThread += '\t'; ByteString sMessage(sThread); @@ -104,14 +105,14 @@ void Tracer::TraceString(const char* _pMessage) //------------------------------------------------------------------------------ void Tracer::TraceString1StringParam(const char* _pMessage, const char* _pParam) { - ::vos::OGuard aGuard(s_aMapSafety); - INT32 nIndent = s_aThreadIndents[ ::vos::OThread::getCurrentIdentifier() ]; + ::osl::MutexGuard aGuard(s_aMapSafety); + INT32 nIndent = s_aThreadIndents[ ::osl::Thread::getCurrentIdentifier() ]; ByteString sIndent; while (nIndent--) sIndent += '\t'; - ByteString sThread( ByteString::CreateFromInt32( (INT32)::vos::OThread::getCurrentIdentifier() ) ); + ByteString sThread( ByteString::CreateFromInt32( (INT32)::osl::Thread::getCurrentIdentifier() ) ); sThread += '\t'; ByteString sMessage(sThread); @@ -122,3 +123,5 @@ void Tracer::TraceString1StringParam(const char* _pMessage, const char* _pParam) DBG_TRACE1(sMessage.GetBuffer(), _pParam); } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/fmcomp/xmlexchg.cxx b/svx/source/fmcomp/xmlexchg.cxx index fb9597ca69..a04aedb430 100644 --- a/svx/source/fmcomp/xmlexchg.cxx +++ b/svx/source/fmcomp/xmlexchg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -91,3 +92,4 @@ namespace svx //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx index a402be52b9..4e64d4cb41 100644 --- a/svx/source/form/ParseContext.cxx +++ b/svx/source/form/ParseContext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,7 @@ #include <unotools/syslocale.hxx> #include <vcl/svapp.hxx> #include <tools/debug.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> using namespace svxform; using namespace ::connectivity; @@ -49,7 +50,7 @@ DBG_NAME(OSystemParseContext) OSystemParseContext::OSystemParseContext() : IParseContext() { DBG_CTOR(OSystemParseContext,NULL); - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ::svx::StringListResource aKeywords( SVX_RES( RID_RSC_SQL_INTERNATIONAL ) ); aKeywords.get( m_aLocalizedKeywords ); @@ -71,7 +72,7 @@ OSystemParseContext::~OSystemParseContext() ::rtl::OUString OSystemParseContext::getErrorMessage(ErrorCode _eCode) const { String aMsg; - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; switch (_eCode) { case ERROR_GENERAL: aMsg = SVX_RES(RID_STR_SVT_SQL_SYNTAX_ERROR); break; @@ -170,7 +171,7 @@ IParseContext::InternationalKeyCode OSystemParseContext::getIntlKeyCode(const :: KEY_COLLECT, KEY_FUSION, KEY_INTERSECTION }; - sal_uInt32 nCount = sizeof Intl_TokenID / sizeof Intl_TokenID[0]; + sal_uInt32 nCount = SAL_N_ELEMENTS( Intl_TokenID ); for (sal_uInt32 i = 0; i < nCount; i++) { ::rtl::OString aKey = getIntlKeywordAscii(Intl_TokenID[i]); @@ -247,3 +248,4 @@ const OSystemParseContext* OParseContextClient::getParseContext() const +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/dataaccessdescriptor.cxx b/svx/source/form/dataaccessdescriptor.cxx index 32ca4a7cd8..5b75dbe2f3 100644 --- a/svx/source/form/dataaccessdescriptor.cxx +++ b/svx/source/form/dataaccessdescriptor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -565,3 +566,4 @@ namespace svx //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx index dddf4d5b46..19fc170b93 100644 --- a/svx/source/form/databaselocationinput.cxx +++ b/svx/source/form/databaselocationinput.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -312,3 +313,5 @@ namespace svx //........................................................................ } // namespace svx //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/datalistener.cxx b/svx/source/form/datalistener.cxx index 46a6038d00..7488ea83c8 100644 --- a/svx/source/form/datalistener.cxx +++ b/svx/source/form/datalistener.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -96,3 +97,4 @@ namespace svxform } // namespace svxform //............................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 25c0880a5d..ded1f16153 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,6 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" +#include <sal/macros.h> #include "datanavi.hxx" #include "fmservs.hxx" @@ -304,14 +306,12 @@ namespace svxform m_pNaviWin ( _pNaviWin ), m_bHasModel ( false ), m_eGroup ( _eGroup ), - m_TbxImageList ( SVX_RES( IL_TBX_BMPS ) ), - m_TbxHCImageList( SVX_RES( IL_TBX_BMPS_HC ) ) + m_TbxImageList ( SVX_RES( IL_TBX_BMPS ) ) { FreeResource(); - const ImageList& rImageList = - GetBackground().GetColor().IsDark() ? m_TbxHCImageList : m_TbxImageList; + const ImageList& rImageList = m_TbxImageList; m_aToolBox.SetItemImage( TBI_ITEM_ADD, rImageList.GetImage( IID_ITEM_ADD ) ); m_aToolBox.SetItemImage( TBI_ITEM_ADD_ELEMENT, rImageList.GetImage( IID_ITEM_ADD_ELEMENT ) ); m_aToolBox.SetItemImage( TBI_ITEM_ADD_ATTRIBUTE, rImageList.GetImage( IID_ITEM_ADD_ATTRIBUTE ) ); @@ -708,7 +708,7 @@ namespace svxform { try { - String sDelim( RTL_CONSTASCII_STRINGPARAM( ": " ) ); + String sDelim( RTL_CONSTASCII_USTRINGPARAM( ": " ) ); ::rtl::OUString sTemp; pNode->m_xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp; sNewName += String( sTemp ); @@ -775,9 +775,7 @@ namespace svxform SvLBoxEntry* XFormsPage::AddEntry( ItemNode* _pNewNode, bool _bIsElement ) { SvLBoxEntry* pParent = m_aItemList.FirstSelected(); - const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode() - ? m_pNaviWin->GetItemHCImageList() - : m_pNaviWin->GetItemImageList(); + const ImageList& rImageList = m_pNaviWin->GetItemImageList(); USHORT nImageID = ( _bIsElement ) ? IID_ELEMENT : IID_ATTRIBUTE; Image aImage = rImageList.GetImage( nImageID ); ::rtl::OUString sName; @@ -985,9 +983,7 @@ namespace svxform SvLBoxEntry* XFormsPage::AddEntry( const Reference< XPropertySet >& _rEntry ) { SvLBoxEntry* pEntry = NULL; - const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode() - ? m_pNaviWin->GetItemHCImageList() - : m_pNaviWin->GetItemImageList(); + const ImageList& rImageList = m_pNaviWin->GetItemImageList(); Image aImage = rImageList.GetImage( IID_ELEMENT ); ItemNode* pNode = new ItemNode( _rEntry ); @@ -1035,7 +1031,7 @@ namespace svxform { try { - String sDelim( RTL_CONSTASCII_STRINGPARAM( ": " ) ); + String sDelim( RTL_CONSTASCII_USTRINGPARAM( ": " ) ); ::rtl::OUString sName; _rEntry->getPropertyValue( PN_BINDING_ID ) >>= sTemp; sName += String( sTemp ); @@ -1241,9 +1237,7 @@ namespace svxform m_xUIHelper = Reference< css::xforms::XFormsUIHelper1 >( _xModel, UNO_QUERY ); String sRet; m_bHasModel = true; - const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode() - ? m_pNaviWin->GetItemHCImageList() - : m_pNaviWin->GetItemImageList(); + const ImageList& rImageList = m_pNaviWin->GetItemImageList(); switch ( m_eGroup ) { @@ -1256,13 +1250,13 @@ namespace svxform if ( xContainer.is() ) m_pNaviWin->AddContainerBroadcaster( xContainer ); - USHORT nIter = 0; Reference< XEnumerationAccess > xNumAccess( _xModel->getInstances(), UNO_QUERY ); if ( xNumAccess.is() ) { Reference < XEnumeration > xNum = xNumAccess->createEnumeration(); if ( xNum.is() && xNum->hasMoreElements() ) { + USHORT nIter = 0; while ( xNum->hasMoreElements() ) { if ( nIter == _nPagePos ) @@ -1342,7 +1336,7 @@ namespace svxform { Image aImage1 = rImageList.GetImage( IID_ELEMENT ); Image aImage2 = rImageList.GetImage( IID_ELEMENT ); - String sDelim( RTL_CONSTASCII_STRINGPARAM( ": " ) ); + String sDelim( RTL_CONSTASCII_USTRINGPARAM( ": " ) ); while ( xNum->hasMoreElements() ) { Reference< XPropertySet > xPropSet; @@ -1559,7 +1553,6 @@ namespace svxform m_bIsNotifyDisabled ( false ), m_aItemImageList ( SVX_RES( IL_ITEM_BMPS ) ), - m_aItemHCImageList ( SVX_RES( IL_ITEM_BMPS_HC ) ), m_xDataListener ( new DataListener( this ) ) { @@ -1892,6 +1885,7 @@ namespace svxform m_aTabCtrl.SetPageText( nId, sNewName ); bIsDocModified = true; } + delete(pPage); } break; } @@ -2924,7 +2918,7 @@ namespace svxform &m_aCalculateBtn }; Window** pCurrent = pWinsForHide; - for ( ; i < sizeof( pWinsForHide ) / sizeof( pWinsForHide[ 0 ] ); ++i, ++pCurrent ) + for ( ; i < SAL_N_ELEMENTS( pWinsForHide ); ++i, ++pCurrent ) (*pCurrent)->Hide(); Window* pWinsForMove[] = @@ -2932,7 +2926,7 @@ namespace svxform &m_aButtonsFL, &m_aOKBtn, &m_aEscBtn, &m_aHelpBtn }; pCurrent = pWinsForMove; - for ( i = 0; i < sizeof( pWinsForMove ) / sizeof( pWinsForMove[ 0 ] ); ++i, ++pCurrent ) + for ( i = 0; i < SAL_N_ELEMENTS( pWinsForMove ); ++i, ++pCurrent ) { Point aNewPos = (*pCurrent)->GetPosPixel(); aNewPos.Y() -= nDelta; @@ -3534,7 +3528,7 @@ namespace svxform Reference < XEnumeration > xNum = xNumAccess->createEnumeration(); if ( xNum.is() && xNum->hasMoreElements() ) { - String sDelim( RTL_CONSTASCII_STRINGPARAM( ": " ) ); + String sDelim( RTL_CONSTASCII_USTRINGPARAM( ": " ) ); while ( xNum->hasMoreElements() ) { Reference< XPropertySet > xPropSet; @@ -3730,3 +3724,4 @@ namespace svxform //............................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/datanavi.src b/svx/source/form/datanavi.src index c399620667..cc37435ac3 100644 --- a/svx/source/form/datanavi.src +++ b/svx/source/form/datanavi.src @@ -106,12 +106,6 @@ IdCount = { 5 ; } ; MASKCOLOR IMG_LST }; - ImageList IL_TBX_BMPS_HC - { - Prefix = "tbh"; - MASKCOLOR - IMG_LST - }; #undef IMG_LST }; @@ -247,12 +241,6 @@ IdCount = { 6 ; } ; MASKCOLOR IMG_LST2 }; - ImageList IL_ITEM_BMPS_HC - { - Prefix = "dah"; - MASKCOLOR - IMG_LST2 - }; }; QueryBox RID_QRY_REMOVE_MODEL diff --git a/svx/source/form/dbcharsethelper.cxx b/svx/source/form/dbcharsethelper.cxx index f4acf0a32d..3e9b4ff8a5 100644 --- a/svx/source/form/dbcharsethelper.cxx +++ b/svx/source/form/dbcharsethelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -57,3 +58,4 @@ namespace svxform +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx index ed31ec7c0b..f97f0b230b 100644 --- a/svx/source/form/dbtoolsclient.cxx +++ b/svx/source/form/dbtoolsclient.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -110,8 +111,8 @@ namespace svxform OSL_ENSURE(NULL == s_hDbtoolsModule, "ODbtoolsClient::registerClient: inconsistence: already have a module!"); OSL_ENSURE(NULL == s_pFactoryCreationFunc, "ODbtoolsClient::registerClient: inconsistence: already have a factory function!"); - const ::rtl::OUString sModuleName = ::rtl::OUString::createFromAscii( - SVLIBRARY( "dbtools" ) + const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM( + SVLIBRARY( "dbtools" )) ); // load the dbtools library @@ -121,7 +122,7 @@ namespace svxform if (NULL != s_hDbtoolsModule) { // get the symbol for the method creating the factory - const ::rtl::OUString sFactoryCreationFunc = ::rtl::OUString::createFromAscii("createDataAccessToolsFactory"); + const ::rtl::OUString sFactoryCreationFunc( RTL_CONSTASCII_USTRINGPARAM("createDataAccessToolsFactory") ); // reinterpret_cast<createDataAccessToolsFactoryFunction> s_pFactoryCreationFunc = (createDataAccessToolsFactoryFunction)( osl_getFunctionSymbol(s_hDbtoolsModule, sFactoryCreationFunc.pData)); @@ -160,7 +161,7 @@ namespace svxform } //-------------------------------------------------------------------- - //add by BerryJia for fixing Bug97420 Time:2002-9-12-11:00(PRC time) + bool OStaticDataAccessTools::ensureLoaded() const { if ( !ODbtoolsClient::ensureLoaded() ) @@ -364,3 +365,4 @@ namespace svxform //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/delayedevent.cxx b/svx/source/form/delayedevent.cxx index b5a11768e1..95a08c1589 100644 --- a/svx/source/form/delayedevent.cxx +++ b/svx/source/form/delayedevent.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -66,3 +67,5 @@ namespace svxform //........................................................................ } // namespace svxform //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 925a4cac34..a19dc06e4e 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -163,20 +164,16 @@ FmParentData::~FmParentData() //======================================================================== TYPEINIT1(FmFormItem, FmParentData); //------------------------------------------------------------------------ -Image FmFormItem::GetImage( BmpColorMode _eMode ) const +Image FmFormItem::GetImage( BmpColorMode /* _eMode */) const { static Image aImage; - static Image aImage_HC; if (!aImage) { ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) ); - ImageList aNavigatorImages_HC( SVX_RES( RID_SVXIMGLIST_FMEXPL_HC ) ); - aImage = aNavigatorImages.GetImage( RID_SVXIMG_FORM ); - aImage_HC = aNavigatorImages_HC.GetImage( RID_SVXIMG_FORM ); } - return ( BMP_COLOR_HIGHCONTRAST == _eMode ) ? aImage_HC : aImage; + return aImage; } //======================================================================== @@ -198,20 +195,16 @@ FmFilterItem* FmFilterItems::Find( const ::sal_Int32 _nFilterComponentIndex ) co } //------------------------------------------------------------------------ -Image FmFilterItems::GetImage( BmpColorMode _eMode ) const +Image FmFilterItems::GetImage( BmpColorMode /* _eMode */ ) const { static Image aImage; - static Image aImage_HC; if (!aImage) { ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) ); - ImageList aNavigatorImages_HC( SVX_RES( RID_SVXIMGLIST_FMEXPL_HC ) ); - aImage = aNavigatorImages.GetImage( RID_SVXIMG_FILTER ); - aImage_HC = aNavigatorImages_HC.GetImage( RID_SVXIMG_FILTER ); } - return ( BMP_COLOR_HIGHCONTRAST == _eMode ) ? aImage_HC : aImage; + return aImage; } //======================================================================== @@ -229,20 +222,16 @@ FmFilterItem::FmFilterItem( const Reference< XMultiServiceFactory >& _rxFactory, } //------------------------------------------------------------------------ -Image FmFilterItem::GetImage( BmpColorMode _eMode ) const +Image FmFilterItem::GetImage( BmpColorMode /* _eMode */ ) const { static Image aImage; - static Image aImage_HC; if (!aImage) { ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) ); - ImageList aNavigatorImages_HC( SVX_RES( RID_SVXIMGLIST_FMEXPL_HC ) ); - aImage = aNavigatorImages.GetImage( RID_SVXIMG_FIELD ); - aImage_HC = aNavigatorImages_HC.GetImage( RID_SVXIMG_FIELD ); } - return ( BMP_COLOR_HIGHCONTRAST == _eMode ) ? aImage_HC : aImage; + return aImage; } //======================================================================== @@ -1171,22 +1160,11 @@ FmFilterNavigator::FmFilterNavigator( Window* pParent ) SetHelpId( HID_FILTER_NAVIGATOR ); { - { - ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) ); - SetNodeBitmaps( - aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ), - aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ), - BMP_COLOR_NORMAL - ); - } - { - ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL_HC ) ); - SetNodeBitmaps( - aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ), - aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ), - BMP_COLOR_HIGHCONTRAST - ); - } + ImageList aNavigatorImages( SVX_RES( RID_SVXIMGLIST_FMEXPL ) ); + SetNodeBitmaps( + aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ), + aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ) + ); } m_pModel = new FmFilterModel(comphelper::getProcessServiceFactory()); @@ -1234,7 +1212,7 @@ void FmFilterNavigator::UpdateContent(const Reference< XIndexAccess > & xControl if (pEntry) { if (!IsExpanded(pEntry)) - Expand(pEntry); + Expand(pEntry); Select(pEntry, sal_True); } } @@ -1434,19 +1412,19 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt ) return rEvt.mnAction; } // ----------------------------------------------------------------------------- -namespace +namespace { FmFilterItems* getTargetItems(SvLBoxEntry* _pTarget) { FmFilterData* pData = static_cast<FmFilterData*>(_pTarget->GetUserData()); - FmFilterItems* pTargetItems = pData->ISA(FmFilterItems) - ? + FmFilterItems* pTargetItems = pData->ISA(FmFilterItems) + ? PTR_CAST(FmFilterItems,pData) - : + : PTR_CAST(FmFilterItems,pData->GetParent()); return pTargetItems; } -} +} //------------------------------------------------------------------------ sal_Int8 FmFilterNavigator::ExecuteDrop( const ExecuteDropEvent& rEvt ) { @@ -1472,7 +1450,7 @@ sal_Int8 FmFilterNavigator::ExecuteDrop( const ExecuteDropEvent& rEvt ) SetCurEntry(pEntry); insertFilterItem(m_aControlExchange->getDraggedEntries(),pTargetItems,DND_ACTION_COPY == rEvt.mnAction); - + return sal_True; } @@ -2083,3 +2061,5 @@ FmFilterNavigatorWinMgr::FmFilterNavigatorWinMgr( Window *_pParent, sal_uInt16 _ //........................................................................ } // namespace svxform //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index edd90acdc3..b569f806e7 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -228,7 +229,7 @@ FmPropBrw::FmPropBrw( const Reference< XMultiServiceFactory >& _xORB, SfxBinding try { // create a frame wrapper for myself - m_xMeAsFrame = Reference< XFrame >(m_xORB->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Frame")), UNO_QUERY); + m_xMeAsFrame = Reference< XFrame >(m_xORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Frame")) ), UNO_QUERY); if (m_xMeAsFrame.is()) { // create an intermediate window, which is to be the container window of the frame @@ -241,7 +242,7 @@ FmPropBrw::FmPropBrw( const Reference< XMultiServiceFactory >& _xORB, SfxBinding m_xFrameContainerWindow = VCLUnoHelper::GetInterface ( pContainerWindow ); m_xMeAsFrame->initialize( m_xFrameContainerWindow ); - m_xMeAsFrame->setName(::rtl::OUString::createFromAscii("form property browser")); + m_xMeAsFrame->setName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("form property browser")) ); if ( _pBindings->GetDispatcher() ) { ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFramesSupplier > @@ -306,7 +307,7 @@ FmPropBrw::~FmPropBrw() , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DialogParentWindow" ) ) , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlContext" ) ) , ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlShapeAccess" ) ) }; - for ( size_t i = 0; i < sizeof(pProps)/sizeof(pProps[0]); ++i ) + for ( size_t i = 0; i < SAL_N_ELEMENTS(pProps); ++i ) xName->removeByName( pProps[i] ); } } @@ -593,7 +594,7 @@ void FmPropBrw::impl_createPropertyBrowser_throw( FmFormShell* _pFormShell ) ::cppu::ContextEntry_Init( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlShapeAccess" ) ), makeAny( xControlMap ) ) }; m_xInspectorContext.set( - ::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ), + ::cppu::createComponentContext( aHandlerContextInfo, SAL_N_ELEMENTS( aHandlerContextInfo ), xOwnContext ) ); bool bEnableHelpSection = lcl_shouldEnableHelpSection( m_xORB ); @@ -716,7 +717,9 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool } catch (Exception&) { - DBG_ERROR("FmPropBrw::StateChanged: Exception occured!"); + DBG_ERROR("FmPropBrw::StateChanged: Exception occurred!"); } m_bInStateChange = false; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmcontrolbordermanager.cxx b/svx/source/form/fmcontrolbordermanager.cxx index a4f3ed9c16..fbbd9eb15c 100644 --- a/svx/source/form/fmcontrolbordermanager.cxx +++ b/svx/source/form/fmcontrolbordermanager.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,13 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#ifndef SVX_SOURCE_FORM_FMCONTROLBORDERMANAGER_HXX #include "fmcontrolbordermanager.hxx" -#endif -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif /** === begin UNO includes === **/ #include <com/sun/star/form/validation/XValidatableFormComponent.hpp> @@ -443,3 +440,4 @@ namespace svxform } // namespace svxform //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx index bd4ebdef6e..f812c56f0b 100644 --- a/svx/source/form/fmcontrollayout.cxx +++ b/svx/source/form/fmcontrollayout.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -143,7 +144,8 @@ namespace svxform Reference< XPropertySetInfo > xStylePSI( xStyle->getPropertySetInfo(), UNO_SET_THROW ); // determine the script type associated with the system locale - const LocaleDataWrapper& rSysLocaleData = SvtSysLocale().GetLocaleData(); + const SvtSysLocale aSysLocale; + const LocaleDataWrapper& rSysLocaleData = aSysLocale.GetLocaleData(); const sal_Int16 eSysLocaleScriptType = MsLangId::getScriptType( MsLangId::convertLocaleToLanguage( rSysLocaleData.getLocale() ) ); // depending on this script type, use the right property from the document's style which controls the @@ -249,9 +251,9 @@ namespace svxform OSL_VERIFY( aVisualEffect >>= sVisualEffect ); sal_Int16 nVisualEffect = VisualEffect::NONE; - if ( sVisualEffect.equalsAscii( "flat" ) ) + if ( sVisualEffect.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "flat" ) ) ) nVisualEffect = VisualEffect::FLAT; - else if ( sVisualEffect.equalsAscii( "3D" ) ) + else if ( sVisualEffect.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "3D" ) ) ) nVisualEffect = VisualEffect::LOOK3D; if ( xPSI->hasPropertyByName( FM_PROP_BORDER ) ) @@ -326,3 +328,4 @@ namespace svxform } // namespace svxform //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmdmod.cxx b/svx/source/form/fmdmod.cxx index 194e13f95e..70aaa82878 100644 --- a/svx/source/form/fmdmod.cxx +++ b/svx/source/form/fmdmod.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" +#include <sal/macros.h> #include <svx/fmdmod.hxx> #include "fmservs.hxx" #include <fmobj.hxx> @@ -40,11 +42,11 @@ using namespace ::svxform; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxFmMSFactory::createInstance(const ::rtl::OUString& ServiceSpecifier) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ) { ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xRet; - if ( ServiceSpecifier.indexOf( ::rtl::OUString::createFromAscii("com.sun.star.form.component.") ) == 0 ) + if ( ServiceSpecifier.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.")) ) == 0 ) { xRet = ::comphelper::getProcessServiceFactory()->createInstance(ServiceSpecifier); } - else if ( ServiceSpecifier == ::rtl::OUString( ::rtl::OUString::createFromAscii("com.sun.star.drawing.ControlShape") ) ) + else if ( ServiceSpecifier == ::rtl::OUString( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape")) ) ) { SdrObject* pObj = new FmFormObj(OBJ_FM_CONTROL); xRet = *new SvxShapeControl(pObj); @@ -86,7 +88,7 @@ using namespace ::svxform; FM_SUN_COMPONENT_IMAGECONTROL }; - static const sal_uInt16 nSvxComponentServiceNameListCount = sizeof(aSvxComponentServiceNameList) / sizeof ( aSvxComponentServiceNameList[0] ); + static const sal_uInt16 nSvxComponentServiceNameListCount = SAL_N_ELEMENTS(aSvxComponentServiceNameList); ::com::sun::star::uno::Sequence< ::rtl::OUString > aSeq( nSvxComponentServiceNameListCount ); ::rtl::OUString* pStrings = aSeq.getArray(); @@ -105,19 +107,19 @@ using namespace ::svxform; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xRet; sal_uInt16 nTokenCount = ServiceName.getTokenCount('.'); if (nTokenCount == 5 && - ServiceName.getToken( 0, '.' ) == ::rtl::OUString::createFromAscii("stardiv") && - ServiceName.getToken( 1, '.' ) == ::rtl::OUString::createFromAscii("one") && - ServiceName.getToken( 2, '.' ) == ::rtl::OUString::createFromAscii("form") && - ServiceName.getToken( 3, '.' ) == ::rtl::OUString::createFromAscii("component")) + ServiceName.getToken( 0, '.' ) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("stardiv")) && + ServiceName.getToken( 1, '.' ) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("one")) && + ServiceName.getToken( 2, '.' ) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("form")) && + ServiceName.getToken( 3, '.' ) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("component")) ) { xRet = ::comphelper::getProcessServiceFactory()->createInstance(ServiceName); } else if (nTokenCount == 4 && - ServiceName.getToken( 0, '.' ) == ::rtl::OUString::createFromAscii("stardiv") && - ServiceName.getToken( 1, '.' ) == ::rtl::OUString::createFromAscii("one") && - ServiceName.getToken( 2, '.' ) == ::rtl::OUString::createFromAscii("drawing") && - ServiceName.getToken( 3, '.' ) == ::rtl::OUString::createFromAscii("ControlShape")) + ServiceName.getToken( 0, '.' ) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("stardiv")) && + ServiceName.getToken( 1, '.' ) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("one")) && + ServiceName.getToken( 2, '.' ) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("drawing")) && + ServiceName.getToken( 3, '.' ) == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlShape")) ) { SdrObject* pObj = new FmFormObj(); xRet = *new SvxShapeControl(pObj); @@ -129,3 +131,4 @@ using namespace ::svxform; */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmdocumentclassification.cxx b/svx/source/form/fmdocumentclassification.cxx index 40e3b2b3a3..bbef532dd0 100644 --- a/svx/source/form/fmdocumentclassification.cxx +++ b/svx/source/form/fmdocumentclassification.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#ifndef SVX_SOURCE_FORM_FMDOCUMENTCLASSIFICATION_HXX #include "fmdocumentclassification.hxx" -#endif #include "svx/dbtoolsclient.hxx" /** === begin UNO includes === **/ @@ -212,3 +211,4 @@ namespace svxform } // namespace svxform //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmdpage.cxx b/svx/source/form/fmdpage.cxx index f591fe3624..899d292381 100644 --- a/svx/source/form/fmdpage.cxx +++ b/svx/source/form/fmdpage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,8 +96,8 @@ SdrObject *SvxFmDrawPage::_CreateSdrObject( const ::com::sun::star::uno::Referen { ::rtl::OUString aShapeType( xDescr->getShapeType() ); - if ( aShapeType.equalsAscii( "com.sun.star.drawing.ShapeControl" ) // compatibility - || aShapeType.equalsAscii( "com.sun.star.drawing.ControlShape" ) + if ( aShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.ShapeControl" ) ) // compatibility + || aShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.ControlShape" ) ) ) return new FmFormObj( OBJ_FM_CONTROL ); else @@ -144,3 +145,4 @@ sal_Bool SAL_CALL SvxFmDrawPage::hasForms(void) throw( ::com::sun::star::uno::Ru } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx index 4337d20871..ea2d670596 100644 --- a/svx/source/form/fmexch.cxx +++ b/svx/source/form/fmexch.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -441,3 +442,4 @@ namespace svxform } //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index 6691258c60..aabc72c25e 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,12 +34,9 @@ #endif #ifndef _SVX_FMEXPL_HRC #include "fmexpl.hrc" -#endif #include "fmexpl.hxx" -#ifndef _SVX_FMHELP_HRC #include "fmhelp.hrc" -#endif #include <svx/fmglob.hxx> #include "fmservs.hxx" #include <svx/fmmodel.hxx> @@ -46,13 +44,9 @@ #include "fmundo.hxx" #include "fmpgeimp.hxx" -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif #include <svx/dialmgr.hxx> #include "svx/svditer.hxx" #include <svx/svdouno.hxx> @@ -71,9 +65,7 @@ #include <sfx2/request.hxx> #include <tools/shl.hxx> -#ifndef _WRKWIN_HXX //autogen #include <vcl/wrkwin.hxx> -#endif #include <vcl/sound.hxx> #include <svx/fmshell.hxx> #include "fmshimp.hxx" @@ -221,6 +213,43 @@ FmEntryDataList::~FmEntryDataList() DBG_DTOR(FmEntryDataList,NULL); } +//------------------------------------------------------------------------ +FmEntryData* FmEntryDataList::remove( FmEntryData* pItem ) +{ + for ( FmEntryDataBaseList::iterator it = maEntryDataList.begin(); + it < maEntryDataList.end(); + ++it + ) + { + if ( *it == pItem ) + { + maEntryDataList.erase( it ); + break; + } + } + return pItem; +} + +//------------------------------------------------------------------------ +void FmEntryDataList::insert( FmEntryData* pItem, size_t Index ) +{ + if ( Index < maEntryDataList.size() ) + { + FmEntryDataBaseList::iterator it = maEntryDataList.begin(); + ::std::advance( it, Index ); + maEntryDataList.insert( it, pItem ); + } + else + maEntryDataList.push_back( pItem ); +} + +//------------------------------------------------------------------------ +void FmEntryDataList::clear() +{ + for ( size_t i = 0, n = maEntryDataList.size(); i < n; ++i ) + delete maEntryDataList[ i ]; + maEntryDataList.clear(); +} //======================================================================== // class FmEntryData @@ -263,16 +292,15 @@ FmEntryData::FmEntryData( const FmEntryData& rEntryData ) pChildList = new FmEntryDataList(); aText = rEntryData.GetText(); m_aNormalImage = rEntryData.GetNormalImage(); - m_aHCImage = rEntryData.GetHCImage(); pParent = rEntryData.GetParent(); FmEntryData* pChildData; - sal_uInt32 nEntryCount = rEntryData.GetChildList()->Count(); - for( sal_uInt32 i=0; i<nEntryCount; i++ ) + size_t nEntryCount = rEntryData.GetChildList()->size(); + for( size_t i = 0; i < nEntryCount; i++ ) { - pChildData = rEntryData.GetChildList()->GetObject(i); + pChildData = rEntryData.GetChildList()->at( i ); FmEntryData* pNewChildData = pChildData->Clone(); - pChildList->Insert( pNewChildData, LIST_APPEND ); + pChildList->insert( pNewChildData, size_t(-1) ); } m_xNormalizedIFace = rEntryData.m_xNormalizedIFace; @@ -284,13 +312,7 @@ FmEntryData::FmEntryData( const FmEntryData& rEntryData ) void FmEntryData::Clear() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmEntryData::Clear" ); - for (;;) - { - FmEntryData* pEntryData = GetChildList()->Remove(ULONG(0)); - if (pEntryData == NULL) - break; - delete pEntryData; - } + GetChildList()->clear(); } //------------------------------------------------------------------------ @@ -328,16 +350,19 @@ sal_Bool FmEntryData::IsEqualWithoutChilds( FmEntryData* pEntryData ) TYPEINIT1( FmFormData, FmEntryData ); DBG_NAME(FmFormData); //------------------------------------------------------------------------ -FmFormData::FmFormData( const Reference< XForm >& _rxForm, const ImageList& _rNormalImages, const ImageList& _rHCImages, FmFormData* _pParent ) - :FmEntryData( _pParent, _rxForm ) - ,m_xForm( _rxForm ) +FmFormData::FmFormData( + const Reference< XForm >& _rxForm, + const ImageList& _rNormalImages, + FmFormData* _pParent +) +: FmEntryData( _pParent, _rxForm ), + m_xForm( _rxForm ) { DBG_CTOR(FmEntryData,NULL); ////////////////////////////////////////////////////////////////////// // Images setzen m_aNormalImage = _rNormalImages.GetImage( RID_SVXIMG_FORM ); - m_aHCImage = _rHCImages.GetImage( RID_SVXIMG_FORM ); ////////////////////////////////////////////////////////////////////// // Titel setzen @@ -395,16 +420,19 @@ sal_Bool FmFormData::IsEqualWithoutChilds( FmEntryData* pEntryData ) TYPEINIT1( FmControlData, FmEntryData ); DBG_NAME(FmControlData); //------------------------------------------------------------------------ -FmControlData::FmControlData( const Reference< XFormComponent >& _rxComponent, const ImageList& _rNormalImages, const ImageList& _rHCImages, FmFormData* _pParent ) - :FmEntryData( _pParent, _rxComponent ) - ,m_xFormComponent( _rxComponent ) +FmControlData::FmControlData( + const Reference< XFormComponent >& _rxComponent, + const ImageList& _rNormalImages, + FmFormData* _pParent +) +: FmEntryData( _pParent, _rxComponent ), + m_xFormComponent( _rxComponent ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmControlData::FmControlData" ); DBG_CTOR(FmControlData,NULL); ////////////////////////////////////////////////////////////////////// // Images setzen m_aNormalImage = GetImage( _rNormalImages ); - m_aHCImage = GetImage( _rHCImages ); ////////////////////////////////////////////////////////////////////// // Titel setzen @@ -565,7 +593,10 @@ sal_Bool FmControlData::IsEqualWithoutChilds( FmEntryData* pEntryData ) } //------------------------------------------------------------------------ -void FmControlData::ModelReplaced( const Reference< XFormComponent >& _rxNew, const ImageList& _rNormalImages, const ImageList& _rHCImages ) +void FmControlData::ModelReplaced( + const Reference< XFormComponent >& _rxNew, + const ImageList& _rNormalImages +) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmControlData::ModelReplaced" ); m_xFormComponent = _rxNew; @@ -573,7 +604,6 @@ void FmControlData::ModelReplaced( const Reference< XFormComponent >& _rxNew, co // Images neu setzen m_aNormalImage = GetImage( _rNormalImages ); - m_aHCImage = GetImage( _rHCImages ); } //............................................................................ @@ -705,3 +735,5 @@ namespace svxform //............................................................................ } // namespace svxform //............................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmexpl.src b/svx/source/form/fmexpl.src index af8b9ec951..450927cfb6 100644 --- a/svx/source/form/fmexpl.src +++ b/svx/source/form/fmexpl.src @@ -298,13 +298,6 @@ ImageList RID_SVXIMGLIST_FMEXPL NAVIGATOR_IMAGEIDS; }; -ImageList RID_SVXIMGLIST_FMEXPL_HC -{ - Prefix = "sxh"; - MaskColor = Color { Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; }; - NAVIGATOR_IMAGEIDS; -}; - ModalDialog RID_SVXDLG_SETFORM { HelpID = "svx:ModalDialog:RID_SVXDLG_SETFORM"; diff --git a/svx/source/form/fmitems.cxx b/svx/source/form/fmitems.cxx index abf1662bb0..bb7748e001 100644 --- a/svx/source/form/fmitems.cxx +++ b/svx/source/form/fmitems.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,3 +68,4 @@ SfxPoolItem* FmInterfaceItem::Create( SvStream& /*rStrm*/, sal_uInt16 ) const +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx index 2ad86712d5..ab61edb44b 100644 --- a/svx/source/form/fmmodel.cxx +++ b/svx/source/form/fmmodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -112,7 +113,7 @@ FmFormModel::FmFormModel(const XubString& rPath, SfxItemPool* pPool, SfxObjectSh |* \************************************************************************/ FmFormModel::FmFormModel(SfxItemPool* pPool, SfxObjectShell* pPers, - FASTBOOL bUseExtColorTable + bool bUseExtColorTable ) :SdrModel(pPool, pPers, bUseExtColorTable, LOADREFCOUNTS) ,m_pImpl(NULL) @@ -133,7 +134,7 @@ FmFormModel::FmFormModel(SfxItemPool* pPool, SfxObjectShell* pPers, |* \************************************************************************/ FmFormModel::FmFormModel(const XubString& rPath, SfxItemPool* pPool, SfxObjectShell* pPers, - FASTBOOL bUseExtColorTable) + bool bUseExtColorTable) :SdrModel(rPath, pPool, pPers, bUseExtColorTable, LOADREFCOUNTS) ,m_pImpl( NULL ) ,m_pObjShell(0) @@ -173,7 +174,7 @@ FmFormModel::~FmFormModel() |* Erzeugt eine neue Seite |* \************************************************************************/ -SdrPage* FmFormModel::AllocPage(FASTBOOL bMasterPage) +SdrPage* FmFormModel::AllocPage(bool bMasterPage) { return new FmFormPage(*this, NULL, bMasterPage); } @@ -367,3 +368,5 @@ FmXUndoEnvironment& FmFormModel::GetUndoEnv() { return *m_pImpl->pUndoEnv; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index 93c4a96b0d..2175c3813f 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -374,7 +375,7 @@ void FmFormObj::clonedFrom(const FmFormObj* _pSource) Reference< XInterface > xSourceContainer = xSourceAsChild->getParent(); m_xEnvironmentHistory = Reference< XIndexContainer >( - ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.form.Forms")), + ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.Forms")) ), UNO_QUERY); DBG_ASSERT(m_xEnvironmentHistory.is(), "FmFormObj::clonedFrom : could not create a forms collection !"); @@ -656,7 +657,7 @@ void FmFormObj::SetUnoControlModel( const Reference< com::sun::star::awt::XContr } //------------------------------------------------------------------ -FASTBOOL FmFormObj::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd ) +bool FmFormObj::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd ) { bool bResult = SdrUnoObj::EndCreate(rStat, eCmd); if ( bResult && SDRCREATE_FORCEEND == eCmd && rStat.GetView() ) @@ -734,3 +735,5 @@ void FmFormObj::NbcSetLayer(SdrLayerID nLayer) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmobjfac.cxx b/svx/source/form/fmobjfac.cxx index d413a60081..199983a8dc 100644 --- a/svx/source/form/fmobjfac.cxx +++ b/svx/source/form/fmobjfac.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,22 +37,14 @@ #include "svx/fmobjfac.hxx" #endif -#ifndef _FM_FMGLOB_HXX #include <svx/fmglob.hxx> -#endif -#ifndef _FM_FMOBJ_HXX #include "fmobj.hxx" -#endif #include "fmshimp.hxx" -#ifndef _FM_FMSHELL_HXX #include <svx/fmshell.hxx> -#endif -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include "tbxform.hxx" #include <tools/resid.hxx> @@ -65,9 +58,7 @@ #include "fmexpl.hxx" #include "filtnav.hxx" -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif #include "fmPropBrw.hxx" #include "datanavi.hxx" @@ -276,3 +267,4 @@ IMPL_LINK(FmFormObjFactory, MakeObject, SdrObjFactory*, pObjFactory) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index 5cbd91fc68..7c32d51b64 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" +#include <sal/macros.h> #define ENABLE_BYTESTRING_STREAM_OPERATORS #include <svx/fmpage.hxx> @@ -37,27 +39,21 @@ #include <svx/fmmodel.hxx> #ifndef SVX_LIGHT -#ifndef _SVX_FMOBJ_HXX #include "fmobj.hxx" #endif -#endif #ifndef SVX_LIGHT #ifndef _SVX_FMRESIDS_HRC #include "svx/fmresids.hrc" #endif -#endif #include <tools/shl.hxx> #include <svx/dialmgr.hxx> #ifndef SVX_LIGHT -#ifndef _SVX_FMPGEIMP_HXX #include "fmpgeimp.hxx" #endif -#endif #ifndef SVX_LIGHT -#ifndef _SFX_OBJSH_HXX //autogen #include <sfx2/objsh.hxx> #endif #endif @@ -68,12 +64,8 @@ #ifndef SVX_LIGHT -#ifndef _SVX_FMGLOB_HXX #include <svx/fmglob.hxx> -#endif -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif #include "fmundo.hxx" #include "svx/fmtools.hxx" using namespace ::svxform; @@ -89,7 +81,7 @@ using com::sun::star::container::XNameContainer; TYPEINIT1(FmFormPage, SdrPage); //------------------------------------------------------------------ -FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, FASTBOOL bMasterPage) +FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, bool bMasterPage) :SdrPage(rModel, bMasterPage) #ifndef SVX_LIGHT ,m_pImpl( new FmFormPageImpl( *this ) ) @@ -155,7 +147,7 @@ void FmFormPage::SetModel(SdrModel* pNewModel) } } } - catch( ::com::sun::star::uno::Exception ex ) + catch( ::com::sun::star::uno::Exception const& ) { OSL_ENSURE( sal_False, "UNO Exception caught resetting model for m_pImpl (FmFormPageImpl) in FmFormPage::SetModel" ); } @@ -241,7 +233,7 @@ sal_Bool FmFormPage::RequestHelp( Window* pWindow, SdrView* pView, INET_PROT_HTTPS, INET_PROT_JAVASCRIPT, INET_PROT_IMAP, INET_PROT_POP3, INET_PROT_VIM, INET_PROT_LDAP }; - for (sal_uInt16 i=0; i<sizeof(s_aQuickHelpSupported)/sizeof(s_aQuickHelpSupported[0]); ++i) + for (sal_uInt16 i=0; i < SAL_N_ELEMENTS(s_aQuickHelpSupported); ++i) if (s_aQuickHelpSupported[i] == aProtocol) { aHelpText = INetURLObject::decode(aUrl.GetURLNoPass(), '%', INetURLObject::DECODE_UNAMBIGUOUS); @@ -280,3 +272,5 @@ SdrObject* FmFormPage::RemoveObject(ULONG nObjNum) #endif return pObj; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index 296bb63b2b..7aeeccc51e 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -334,7 +335,7 @@ const Reference< XNameContainer >& FmFormPageImpl::getForms( bool _bForceCreate { m_bAttemptedFormCreation = true; - const ::rtl::OUString sFormsCollectionServiceName = ::rtl::OUString::createFromAscii("com.sun.star.form.Forms"); + const ::rtl::OUString sFormsCollectionServiceName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.Forms") ); m_xForms = Reference< XNameContainer > ( ::comphelper::getProcessServiceFactory()->createInstance( sFormsCollectionServiceName ), UNO_QUERY @@ -737,3 +738,5 @@ void FmFormPageImpl::formObjectRemoved( const FmFormObj& _object ) DBG_UNHANDLED_EXCEPTION(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index cf3033730d..b1c391d92f 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,6 +37,8 @@ #include <com/sun/star/container/XHierarchicalNameAccess.hpp> #include <com/sun/star/reflection/XInterfaceMethodTypeDescription.hpp> #include <com/sun/star/lang/DisposedException.hpp> +#include <com/sun/star/lang/EventObject.hpp> +#include <com/sun/star/awt/XControl.hpp> /** === end UNO includes === **/ #include <tools/diagnose_ex.h> #include <cppuhelper/implbase1.hxx> @@ -43,7 +46,7 @@ #include <comphelper/componentcontext.hxx> #include <comphelper/processfactory.hxx> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <sfx2/objsh.hxx> #include <boost/shared_ptr.hpp> @@ -71,6 +74,9 @@ namespace svxform using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::XInterface; + using ::com::sun::star::lang::EventObject; + using ::com::sun::star::awt::XControl; + using ::com::sun::star::beans::XPropertySet; /** === end UNO using === **/ class FormScriptingEnvironment; @@ -206,7 +212,7 @@ namespace svxform Reference< XHierarchicalNameAccess > xTypeDescriptions( aContext.getSingleton( "com.sun.star.reflection.theTypeDescriptionManager" ), UNO_QUERY_THROW ); ::rtl::OUString sMethodDescription( _rListenerType ); - sMethodDescription += ::rtl::OUString::createFromAscii( "::" ); + sMethodDescription += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "::" )); sMethodDescription += _rMethodName; Reference< XInterfaceMethodTypeDescription > xMethod( xTypeDescriptions->getByHierarchicalName( sMethodDescription ), UNO_QUERY_THROW ); @@ -413,8 +419,19 @@ namespace svxform { Sequence< sal_Int16 > aOutArgsIndex; Sequence< Any > aOutArgs; - - m_rObjectShell.CallXScript( m_sScriptCode, _rArguments, _rSynchronousResult, aOutArgsIndex, aOutArgs ); + EventObject aEvent; + Any aCaller; + if ( ( _rArguments.getLength() > 0 ) && ( _rArguments[ 0 ] >>= aEvent ) ) + { + try + { + Reference< XControl > xControl( aEvent.Source, UNO_QUERY_THROW ); + Reference< XPropertySet > xProps( xControl->getModel(), UNO_QUERY_THROW ); + aCaller = xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ) ); + } + catch( Exception& ) {} + } + m_rObjectShell.CallXScript( m_sScriptCode, _rArguments, _rSynchronousResult, aOutArgsIndex, aOutArgs, true, aCaller.hasValue() ? &aCaller : 0 ); } //................................................................ @@ -475,7 +492,7 @@ namespace svxform //-------------------------------------------------------------------- void FormScriptingEnvironment::doFireScriptEvent( const ScriptEvent& _rEvent, Any* _pSyncronousResult ) { - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexClearableGuard aSolarGuard; ::osl::ClearableMutexGuard aGuard( m_aMutex ); if ( m_bDisposed ) @@ -489,7 +506,7 @@ namespace svxform // the script to execute PScript pScript; - if ( !_rEvent.ScriptType.equalsAscii( "StarBasic" ) ) + if ( !_rEvent.ScriptType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StarBasic" ) ) ) { pScript.reset( new NewStyleUNOScript( *xObjectShell, _rEvent.ScriptCode ) ); } @@ -538,7 +555,7 @@ namespace svxform { // object shells are not thread safe, so guard the destruction - ::vos::OGuard aSolarGuarsReset( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuarsReset; xObjectShell = NULL; } } @@ -561,3 +578,4 @@ namespace svxform } // namespace svxform //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmservs.cxx b/svx/source/form/fmservs.cxx index fc922b4b19..8e578f5ec0 100644 --- a/svx/source/form/fmservs.cxx +++ b/svx/source/form/fmservs.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -104,3 +105,5 @@ namespace svxform }; } // namespace svxform + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 7de248e0d8..59b3fb9d3e 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,18 +32,14 @@ #include <svx/fmshell.hxx> #include "svx/fmtools.hxx" #include "fmservs.hxx" -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif #include "fmpgeimp.hxx" #include "fmitems.hxx" #include "fmundo.hxx" #include <vcl/waitobj.hxx> #include <com/sun/star/form/XLoadable.hpp> #include <com/sun/star/container/XNamed.hpp> -#ifndef _COM_SUN_STAR_SDDB_PRIVILEGE_HPP_ #include <com/sun/star/sdbcx/Privilege.hpp> -#endif #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XMultiPropertySet.hpp> #include <com/sun/star/beans/XFastPropertySet.hpp> @@ -67,9 +64,7 @@ #include "svx/svditer.hxx" #include "fmobj.hxx" -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #ifndef _SVX_FMRESIDS_HRC #include "svx/fmresids.hrc" @@ -125,9 +120,7 @@ #define FmFormShell #include "svxslots.hxx" -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include "tbxform.hxx" #include <comphelper/property.hxx> #include <com/sun/star/beans/PropertyValue.hpp> @@ -815,7 +808,7 @@ void FmFormShell::Execute(SfxRequest &rReq) } if ( nRecord != -1 ) - rController->execute( nSlot, ::rtl::OUString::createFromAscii( "Position" ), makeAny( (sal_Int32)nRecord ) ); + rController->execute( nSlot, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Position" )), makeAny( (sal_Int32)nRecord ) ); rReq.Done(); } break; @@ -1514,3 +1507,5 @@ void FmFormShell::SetDesignMode( sal_Bool _bDesignMode ) if ( pModel ) pModel->GetUndoEnv().UnLock(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index f79f19814f..52e8a6fcc7 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -524,8 +525,8 @@ sal_Bool IsSearchableControl( const ::com::sun::star::uno::Reference< ::com::sun { switch ( (TriState)xCheckBox->getState() ) { - case STATE_NOCHECK: *_pCurrentText = ::rtl::OUString::createFromAscii( "0" ); break; - case STATE_CHECK: *_pCurrentText = ::rtl::OUString::createFromAscii( "1" ); break; + case STATE_NOCHECK: *_pCurrentText = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "0" )); break; + case STATE_CHECK: *_pCurrentText = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "1" )); break; default: *_pCurrentText = ::rtl::OUString(); break; } } @@ -652,7 +653,7 @@ DBG_NAME(FmXFormShell); //------------------------------------------------------------------------ FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame ) :FmXFormShell_BASE(m_aMutex) - ,FmXFormShell_CFGBASE(::rtl::OUString::createFromAscii("Office.Common/Misc"), CONFIG_MODE_DELAYED_UPDATE) + ,FmXFormShell_CFGBASE(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Misc")), CONFIG_MODE_DELAYED_UPDATE) ,m_eNavigate( NavigationBarMode_NONE ) ,m_nInvalidationEvent( 0 ) ,m_nActivationEvent( 0 ) @@ -690,7 +691,7 @@ FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame ) implAdjustConfigCache(); // and register for changes on this settings Sequence< ::rtl::OUString > aNames(1); - aNames[0] = ::rtl::OUString::createFromAscii("FormControlPilotsEnabled"); + aNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormControlPilotsEnabled")); EnableNotification(aNames); } @@ -850,7 +851,7 @@ void SAL_CALL FmXFormShell::propertyChange(const PropertyChangeEvent& evt) throw // (Solche Paints passieren zum Beispiel, wenn man einfach nur eine andere Applikation ueber das Office legt und wieder // zurueckschaltet). // Deshalb die Benutzung des SolarMutex, der sichert das ab. - ::vos::IMutex& rSolarSafety = Application::GetSolarMutex(); + ::osl::SolarMutex& rSolarSafety = Application::GetSolarMutex(); if (rSolarSafety.tryToAcquire()) { m_pShell->GetViewShell()->GetViewFrame()->GetBindings().Invalidate(SID_FM_RECORD_TOTAL , sal_True, sal_False); @@ -1115,8 +1116,8 @@ PopupMenu* FmXFormShell::GetConversionMenu() PopupMenu* pNewMenu = new PopupMenu(SVX_RES( RID_FMSHELL_CONVERSIONMENU )); - ImageList aImageList( SVX_RES( bIsHiContrastMode ? RID_SVXIMGLIST_FMEXPL_HC : RID_SVXIMGLIST_FMEXPL) ); - for ( size_t i = 0; i < sizeof( nConvertSlots ) / sizeof( nConvertSlots[0] ); ++i ) + ImageList aImageList( SVX_RES( RID_SVXIMGLIST_FMEXPL) ); + for ( size_t i = 0; i < SAL_N_ELEMENTS( nConvertSlots ); ++i ) { // das entsprechende Image dran pNewMenu->SetItemImage(nConvertSlots[i], aImageList.GetImage(nCreateSlots[i])); @@ -1164,7 +1165,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent OSL_ENSURE( isSolelySelected( _rxObject ), "FmXFormShell::executeControlConversionSlot: hmm ... shouldn't this parameter be redundant?" ); - for ( size_t lookupSlot = 0; lookupSlot < sizeof( nConvertSlots ) / sizeof( nConvertSlots[0] ); ++lookupSlot ) + for ( size_t lookupSlot = 0; lookupSlot < SAL_N_ELEMENTS( nConvertSlots ); ++lookupSlot ) { if (nConvertSlots[lookupSlot] == _nSlotId) { @@ -1221,7 +1222,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent } // replace the mdoel within the parent container - Reference< XIndexContainer> xIndexParent(xChild->getParent(), UNO_QUERY); //Modified by BerryJia for fixing Bug102516 Time(China):2002-9-5 16:00 + Reference< XIndexContainer> xIndexParent(xChild->getParent(), UNO_QUERY); if (xIndexParent.is()) { // the form container works with FormComponents @@ -1230,7 +1231,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent Any aNewModel(makeAny(xComponent)); try { - //Modified by BerryJia for fixing Bug102516 Time(China):2002-9-5 16:00 + sal_Int32 nIndex = getElementPos(xParent, xOldModel); if (nIndex>=0 && nIndex<xParent->getCount()) xIndexParent->replaceByIndex(nIndex, aNewModel); @@ -1379,10 +1380,10 @@ bool FmXFormShell::canConvertCurrentSelectionToControl( sal_Int16 nConversionSlo ) return false; // those types cannot be converted - DBG_ASSERT(sizeof(nConvertSlots)/sizeof(nConvertSlots[0]) == sizeof(nObjectTypes)/sizeof(nObjectTypes[0]), + DBG_ASSERT(SAL_N_ELEMENTS(nConvertSlots) == SAL_N_ELEMENTS(nObjectTypes), "FmXFormShell::canConvertCurrentSelectionToControl: nConvertSlots & nObjectTypes must have the same size !"); - for ( size_t i = 0; i < sizeof( nConvertSlots ) / sizeof( nConvertSlots[0] ); ++i ) + for ( size_t i = 0; i < SAL_N_ELEMENTS( nConvertSlots ); ++i ) if (nConvertSlots[i] == nConversionSlot) return nObjectTypes[i] != nObjectType; @@ -1703,7 +1704,7 @@ sal_Bool FmXFormShell::GetY2KState(sal_uInt16& n) { try { - Any aVal( xSet->getPropertyValue(::rtl::OUString::createFromAscii("TwoDigitDateStart")) ); + Any aVal( xSet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TwoDigitDateStart"))) ); aVal >>= n; return sal_True; } @@ -1736,11 +1737,11 @@ void FmXFormShell::SetY2KState(sal_uInt16 n) { Any aVal; aVal <<= n; - xSet->setPropertyValue(::rtl::OUString::createFromAscii("TwoDigitDateStart"), aVal); + xSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TwoDigitDateStart")), aVal); } catch(Exception&) { - DBG_ERROR("FmXFormShell::SetY2KState: Exception occured!"); + DBG_ERROR("FmXFormShell::SetY2KState: Exception occurred!"); } } @@ -1777,11 +1778,11 @@ void FmXFormShell::SetY2KState(sal_uInt16 n) { Any aVal; aVal <<= n; - xSet->setPropertyValue(::rtl::OUString::createFromAscii("TwoDigitDateStart"), aVal); + xSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TwoDigitDateStart")), aVal); } catch(Exception&) { - DBG_ERROR("FmXFormShell::SetY2KState: Exception occured!"); + DBG_ERROR("FmXFormShell::SetY2KState: Exception occurred!"); } } @@ -1848,7 +1849,7 @@ namespace { return ( _nWhich == SID_FM_RECORD_FIRST ) || ( _nWhich == SID_FM_RECORD_PREV ) - || ( _nWhich == SID_FM_RECORD_NEXT ) + || ( _nWhich == SID_FM_RECORD_NEXT ) || ( _nWhich == SID_FM_RECORD_LAST ) || ( _nWhich == SID_FM_RECORD_NEW ); } @@ -1995,7 +1996,7 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle stopListening(); - impl_switchActiveControllerListening( false ); + impl_switchActiveControllerListening( false ); m_aActiveControllerFeatures.dispose(); m_xActiveController = xController; @@ -2123,7 +2124,7 @@ bool FmXFormShell::setCurrentSelection( const InterfaceBag& _rSelection ) impl_updateCurrentForm( xNewCurrentForm ); // ensure some slots are updated - for ( size_t i = 0; i < sizeof( SelObjectSlotMap ) / sizeof( SelObjectSlotMap[0] ); ++i ) + for ( size_t i = 0; i < SAL_N_ELEMENTS( SelObjectSlotMap ); ++i ) InvalidateSlot( SelObjectSlotMap[i], sal_False); return true; @@ -2163,7 +2164,7 @@ void FmXFormShell::impl_updateCurrentForm( const Reference< XForm >& _rxNewCurFo pPage->GetImpl().setCurForm( m_xCurrentForm ); // ensure the UI which depends on the current form is up-to-date - for ( size_t i = 0; i < sizeof( DlgSlotMap ) / sizeof( DlgSlotMap[0] ); ++i ) + for ( size_t i = 0; i < SAL_N_ELEMENTS( DlgSlotMap ); ++i ) InvalidateSlot( DlgSlotMap[i], sal_False ); } @@ -3175,7 +3176,7 @@ void FmXFormShell::stopFiltering(sal_Bool bSave) } catch(Exception&) { - DBG_ERROR("FmXFormShell::stopFiltering: Exception occured!"); + DBG_ERROR("FmXFormShell::stopFiltering: Exception occurred!"); } if (!isRowSetAlive(xFormSet)) @@ -3277,7 +3278,7 @@ void FmXFormShell::CreateExternalView() // the frame the external view is displayed in sal_Bool bAlreadyExistent = m_xExternalViewController.is(); Reference< ::com::sun::star::frame::XFrame> xExternalViewFrame; - ::rtl::OUString sFrameName = ::rtl::OUString::createFromAscii("_beamer"); + ::rtl::OUString sFrameName(RTL_CONSTASCII_USTRINGPARAM("_beamer")); sal_Int32 nSearchFlags = ::com::sun::star::frame::FrameSearchFlag::CHILDREN | ::com::sun::star::frame::FrameSearchFlag::CREATE; Reference< runtime::XFormController > xCurrentNavController( getNavController()); @@ -3361,7 +3362,7 @@ void FmXFormShell::CreateExternalView() URL aClearURL; aClearURL.Complete = FMURL_GRIDVIEW_CLEARVIEW; - Reference< ::com::sun::star::frame::XDispatch> xClear( xCommLink->queryDispatch(aClearURL, ::rtl::OUString::createFromAscii(""), 0)); + Reference< ::com::sun::star::frame::XDispatch> xClear( xCommLink->queryDispatch(aClearURL, ::rtl::OUString(), 0)); if (xClear.is()) xClear->dispatch(aClearURL, Sequence< PropertyValue>()); } @@ -3378,10 +3379,10 @@ void FmXFormShell::CreateExternalView() // collect the dispatchers we will need URL aAddColumnURL; aAddColumnURL.Complete = FMURL_GRIDVIEW_ADDCOLUMN; - Reference< ::com::sun::star::frame::XDispatch> xAddColumnDispatch( xCommLink->queryDispatch(aAddColumnURL, ::rtl::OUString::createFromAscii(""), 0)); + Reference< ::com::sun::star::frame::XDispatch> xAddColumnDispatch( xCommLink->queryDispatch(aAddColumnURL, ::rtl::OUString(), 0)); URL aAttachURL; aAttachURL.Complete = FMURL_GRIDVIEW_ATTACHTOFORM; - Reference< ::com::sun::star::frame::XDispatch> xAttachDispatch( xCommLink->queryDispatch(aAttachURL, ::rtl::OUString::createFromAscii(""), 0)); + Reference< ::com::sun::star::frame::XDispatch> xAttachDispatch( xCommLink->queryDispatch(aAttachURL, ::rtl::OUString(), 0)); if (xAddColumnDispatch.is() && xAttachDispatch.is()) { @@ -3547,7 +3548,7 @@ void FmXFormShell::CreateExternalView() aColumnProps.realloc(pColumnProps - aColumnProps.getArray()); // columns props are a dispatch argument - pDispatchArgs->Name = ::rtl::OUString::createFromAscii("ColumnProperties"); // TODO : fmurl.* + pDispatchArgs->Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnProperties")); // TODO : fmurl.* pDispatchArgs->Value = makeAny(aColumnProps); ++pDispatchArgs; DBG_ASSERT(nDispatchArgs == (pDispatchArgs - aDispatchArgs.getConstArray()), @@ -3634,7 +3635,7 @@ void FmXFormShell::CreateExternalView() ++pDispatchArgs; // the - pDispatchArgs->Name = ::rtl::OUString::createFromAscii("ColumnProperties"); // TODO : fmurl.* + pDispatchArgs->Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ColumnProperties")); // TODO : fmurl.* pDispatchArgs->Value = makeAny(aListBoxDescription); ++pDispatchArgs; DBG_ASSERT(nDispatchArgs == (pDispatchArgs - aDispatchArgs.getConstArray()), @@ -3685,7 +3686,7 @@ void FmXFormShell::implAdjustConfigCache() { // get (cache) the wizard usage flag Sequence< ::rtl::OUString > aNames(1); - aNames[0] = ::rtl::OUString::createFromAscii("FormControlPilotsEnabled"); + aNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormControlPilotsEnabled")); Sequence< Any > aFlags = GetProperties(aNames); if (1 == aFlags.getLength()) m_bUseWizards = ::cppu::any2bool(aFlags[0]); @@ -3717,7 +3718,7 @@ void FmXFormShell::SetWizardUsing(sal_Bool _bUseThem) m_bUseWizards = _bUseThem; Sequence< ::rtl::OUString > aNames(1); - aNames[0] = ::rtl::OUString::createFromAscii("FormControlPilotsEnabled"); + aNames[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormControlPilotsEnabled")); Sequence< Any > aValues(1); aValues[0] = ::cppu::bool2any(m_bUseWizards); PutProperties(aNames, aValues); @@ -4257,3 +4258,5 @@ void ControlConversionMenuController::StateChanged(sal_uInt16 nSID, SfxItemState } //============================================================================== + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmsrccfg.cxx b/svx/source/form/fmsrccfg.cxx index e859142ad9..263cf3b138 100644 --- a/svx/source/form/fmsrccfg.cxx +++ b/svx/source/form/fmsrccfg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,9 +46,6 @@ namespace svxform // = struct FmSearchParams - Parameter einer Suche // ==================================================================== - //--------------------------------------------------------------------- - //--- 20.08.01 18:17:34 ----------------------------------------------- - FmSearchParams::FmSearchParams() :nTransliterationFlags( 0 ) ,nSearchForType ( 0 ) @@ -72,17 +70,11 @@ namespace svxform | TransliterationModules_IGNORE_CASE; } - //--------------------------------------------------------------------- - //--- 21.08.01 13:31:48 ----------------------------------------------- - sal_Bool FmSearchParams::isIgnoreWidthCJK( ) const { return 0 != (nTransliterationFlags & TransliterationModules_IGNORE_WIDTH); } - //--------------------------------------------------------------------- - //--- 21.08.01 13:32:03 ----------------------------------------------- - void FmSearchParams::setIgnoreWidthCJK( sal_Bool _bIgnore ) { if ( _bIgnore ) @@ -91,17 +83,11 @@ namespace svxform nTransliterationFlags &= ~TransliterationModules_IGNORE_WIDTH; } - //--------------------------------------------------------------------- - //--- 21.08.01 13:47:52 ----------------------------------------------- - sal_Bool FmSearchParams::isCaseSensitive( ) const { return 0 == (nTransliterationFlags & TransliterationModules_IGNORE_CASE); } - //--------------------------------------------------------------------- - //--- 21.08.01 13:48:00 ----------------------------------------------- - void FmSearchParams::setCaseSensitive( sal_Bool _bCase ) { if ( _bCase ) @@ -120,9 +106,6 @@ namespace svxform sal_Int16 nValue; }; - //--------------------------------------------------------------------- - //--- 20.08.01 18:28:38 ----------------------------------------------- - static const Ascii2Int16* lcl_getSearchForTypeValueMap() { static const Ascii2Int16 s_aSearchForTypeMap[] = @@ -135,9 +118,6 @@ namespace svxform return s_aSearchForTypeMap; } - //--------------------------------------------------------------------- - //--- 20.08.01 18:28:38 ----------------------------------------------- - static const Ascii2Int16* lcl_getSearchPositionValueMap() { static const Ascii2Int16 s_aSearchPositionMap[] = @@ -151,9 +131,6 @@ namespace svxform return s_aSearchPositionMap; } - //--------------------------------------------------------------------- - //--- 20.08.01 18:30:15 ----------------------------------------------- - static sal_Int16 lcl_implMapAsciiValue( const ::rtl::OUString& _rAsciiValue, const Ascii2Int16* _pMap ) { // search the map for the given ascii value @@ -175,9 +152,6 @@ namespace svxform return -1; } - //--------------------------------------------------------------------- - //--- 20.08.01 18:33:06 ----------------------------------------------- - static const sal_Char* lcl_implMapIntValue( const sal_Int16 _nValue, const Ascii2Int16* _pMap ) { // search the map for the given integer value @@ -207,9 +181,6 @@ namespace svxform #define TA( c ) &c, getCppuType( &c ) - //--------------------------------------------------------------------- - //--- 20.08.01 18:19:59 ----------------------------------------------- - FmSearchConfigItem::FmSearchConfigItem() :OConfigurationValueContainer( ::comphelper::getProcessServiceFactory(), m_aMutex, "/org.openoffice.Office.DataAccess/FormSearchOptions", CVC_UPDATE_ACCESS | CVC_LAZY_UPDATE, 2 ) { @@ -255,17 +226,11 @@ namespace svxform read( ); } - //--------------------------------------------------------------------- - //--- 20.08.01 18:19:57 ----------------------------------------------- - FmSearchConfigItem::~FmSearchConfigItem() { commit( ); } - //--------------------------------------------------------------------- - //--- 20.08.01 18:20:48 ----------------------------------------------- - void FmSearchConfigItem::implTranslateFromConfig( ) { // the search-for string @@ -299,9 +264,6 @@ namespace svxform if ( m_bIsIgnoreMiddleDot ) nTransliterationFlags |= TransliterationModules_ignoreMiddleDot_ja_JP; } - //--------------------------------------------------------------------- - //--- 20.08.01 18:42:23 ----------------------------------------------- - void FmSearchConfigItem::implTranslateToConfig( ) { // the search-for string @@ -334,9 +296,6 @@ namespace svxform m_bIsIgnoreMiddleDot = ( 0 != ( nTransliterationFlags & TransliterationModules_ignoreMiddleDot_ja_JP ) ); } - //--------------------------------------------------------------------- - //--- 20.08.01 18:20:01 ----------------------------------------------- - const FmSearchParams& FmSearchConfigItem::getParams() const { // ensure that the properties which are not stored directly are up-to-date @@ -346,9 +305,6 @@ namespace svxform return *this; } - //--------------------------------------------------------------------- - //--- 20.08.01 18:41:57 ----------------------------------------------- - void FmSearchConfigItem::setParams( const FmSearchParams& _rParams ) { // copy the FmSearchParams part @@ -361,3 +317,5 @@ namespace svxform //........................................................................ } // namespace svxform //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index c37fa76daf..a3562f259c 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,18 +51,14 @@ #include <com/sun/star/i18n/TransliterationModules.hpp> #include <com/sun/star/i18n/CollatorOptions.hpp> -#ifndef _COM_SUN_STAR_SDDB_XCOLUMNSSUPPLIER_HPP_ #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> -#endif #include <com/sun/star/util/XNumberFormatter.hpp> #include <com/sun/star/util/NumberFormat.hpp> #include <com/sun/star/util/XNumberFormatsSupplier.hpp> #include <com/sun/star/util/XNumberFormats.hpp> #include <comphelper/processfactory.hxx> -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif #include "fmservs.hxx" #include "svx/fmsrcimp.hxx" #include <svx/fmsearch.hxx> @@ -218,8 +215,8 @@ CheckBoxWrapper::CheckBoxWrapper(const Reference< ::com::sun::star::awt::XCheckB { switch ((TriState)m_xBox->getState()) { - case STATE_NOCHECK: return rtl::OUString::createFromAscii("0"); - case STATE_CHECK: return rtl::OUString::createFromAscii("1"); + case STATE_NOCHECK: return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0")); + case STATE_CHECK: return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("1")); default: break; } return rtl::OUString(); @@ -253,7 +250,7 @@ sal_Bool FmSearchEngine::MoveCursor() else m_xSearchCursor.previous(); } - catch(::com::sun::star::sdbc::SQLException e) + catch(::com::sun::star::sdbc::SQLException const& e) { #if OSL_DEBUG_LEVEL > 0 String sDebugMessage; @@ -264,7 +261,7 @@ sal_Bool FmSearchEngine::MoveCursor() #endif bSuccess = sal_False; } - catch(Exception e) + catch(Exception const& e) { #if OSL_DEBUG_LEVEL > 0 UniString sDebugMessage; @@ -427,7 +424,7 @@ FmSearchEngine::SEARCH_RESULT FmSearchEngine::SearchSpecial(sal_Bool _bSearchFor sal_Bool bMovedAround(sal_False); do { - if (m_eMode == SM_ALLOWSCHEDULE) //CHINA001 if (m_eMode == FmSearchDialog::SM_ALLOWSCHEDULE) + if (m_eMode == SM_ALLOWSCHEDULE) { Application::Reschedule(); Application::Reschedule(); @@ -494,7 +491,7 @@ FmSearchEngine::SEARCH_RESULT FmSearchEngine::SearchWildcard(const ::rtl::OUStri sal_Bool bMovedAround(sal_False); do { - if (m_eMode == SM_ALLOWSCHEDULE) //CHINA001 if (m_eMode == FmSearchDialog::SM_ALLOWSCHEDULE) + if (m_eMode == SM_ALLOWSCHEDULE) { Application::Reschedule(); Application::Reschedule(); @@ -596,7 +593,7 @@ FmSearchEngine::SEARCH_RESULT FmSearchEngine::SearchRegularApprox(const ::rtl::O sal_Bool bMovedAround(sal_False); do { - if (m_eMode == SM_ALLOWSCHEDULE) //CHINA001 if (m_eMode == FmSearchDialog::SM_ALLOWSCHEDULE) + if (m_eMode == SM_ALLOWSCHEDULE) { Application::Reschedule(); Application::Reschedule(); @@ -685,7 +682,8 @@ DBG_NAME(FmSearchEngine); //------------------------------------------------------------------------ FmSearchEngine::FmSearchEngine(const Reference< XMultiServiceFactory >& _rxORB, const Reference< XResultSet > & xCursor, const ::rtl::OUString& sVisibleFields, - const Reference< XNumberFormatsSupplier > & xFormatSupplier, FMSEARCH_MODE eMode)//CHINA001 const Reference< XNumberFormatsSupplier > & xFormatSupplier, FmSearchDialog::SEARCH_MODE eMode) + const Reference< XNumberFormatsSupplier > & xFormatSupplier, FMSEARCH_MODE eMode) + :m_xSearchCursor(xCursor) ,m_xFormatSupplier(xFormatSupplier) ,m_aCharacterClassficator( _rxORB, SvtSysLocale().GetLocaleData().getLocale() ) @@ -723,7 +721,7 @@ FmSearchEngine::FmSearchEngine(const Reference< XMultiServiceFactory >& _rxORB, //------------------------------------------------------------------------ FmSearchEngine::FmSearchEngine(const Reference< XMultiServiceFactory >& _rxORB, const Reference< XResultSet > & xCursor, const ::rtl::OUString& sVisibleFields, - const InterfaceArray& arrFields, FMSEARCH_MODE eMode)//CHINA001 const InterfaceArray& arrFields, FmSearchDialog::SEARCH_MODE eMode) + const InterfaceArray& arrFields, FMSEARCH_MODE eMode) :m_xSearchCursor(xCursor) ,m_aCharacterClassficator( _rxORB, SvtSysLocale().GetLocaleData().getLocale() ) ,m_aStringCompare( _rxORB ) @@ -912,7 +910,7 @@ void FmSearchEngine::Init(const ::rtl::OUString& sVisibleFields) } catch(Exception&) { - DBG_ERROR("Exception occured!"); + DBG_ERROR("Exception occurred!"); } } @@ -1010,14 +1008,14 @@ void FmSearchEngine::SearchNextImpl() switch (m_nPosition) { case MATCHING_ANYWHERE : - strSearchExpression = ::rtl::OUString::createFromAscii("*") + strSearchExpression - + ::rtl::OUString::createFromAscii("*"); + strSearchExpression = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) + strSearchExpression + + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")); break; case MATCHING_BEGINNING : - strSearchExpression = strSearchExpression + ::rtl::OUString::createFromAscii("*"); + strSearchExpression = strSearchExpression + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")); break; case MATCHING_END : - strSearchExpression = ::rtl::OUString::createFromAscii("*") + strSearchExpression; + strSearchExpression = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")) + strSearchExpression; break; case MATCHING_WHOLETEXT : break; @@ -1182,14 +1180,14 @@ void FmSearchEngine::ImplStartNextSearch() m_bCancelAsynchRequest = sal_False; m_bSearchingCurrently = sal_True; - if (m_eMode == SM_USETHREAD)//CHINA001 if (m_eMode == FmSearchDialog::SM_USETHREAD) + if (m_eMode == SM_USETHREAD) { FmSearchThread* pSearcher = new FmSearchThread(this); // der loescht sich nach Beendigung selber ... pSearcher->setTerminationHandler(LINK(this, FmSearchEngine, OnSearchTerminated)); pSearcher->createSuspended(); - pSearcher->setPriority(::vos::OThread::TPriority_Lowest); + pSearcher->setPriority(osl_Thread_PriorityLowest); pSearcher->resume(); } else @@ -1299,3 +1297,4 @@ void FmSearchEngine::RebuildUsedFields(sal_Int32 nFieldIndex, sal_Bool bForce) InvalidatePreviousLoc(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmtextcontroldialogs.cxx b/svx/source/form/fmtextcontroldialogs.cxx index 5eef81a893..8eb52d3fdc 100644 --- a/svx/source/form/fmtextcontroldialogs.cxx +++ b/svx/source/form/fmtextcontroldialogs.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,7 +30,6 @@ #include "precompiled_svx.hxx" #include "fmtextcontroldialogs.hxx" #include <svx/dialmgr.hxx> -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> #endif @@ -129,3 +129,4 @@ namespace svx } // namespace svx //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmtextcontrolfeature.cxx b/svx/source/form/fmtextcontrolfeature.cxx index d82a253b3d..1bf8ea49ef 100644 --- a/svx/source/form/fmtextcontrolfeature.cxx +++ b/svx/source/form/fmtextcontrolfeature.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -129,3 +130,4 @@ namespace svx } // namespace svx //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 8a99070be3..6f7e0ac3eb 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,7 +74,7 @@ #include <tools/diagnose_ex.h> #include <vcl/msgbox.hxx> #include <vcl/outdev.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <memory> @@ -342,7 +343,7 @@ namespace svx //-------------------------------------------------------------------- void SAL_CALL FmMouseListenerAdapter::mousePressed( const awt::MouseEvent& _rEvent ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // is this a request for a context menu? if ( _rEvent.PopupTrigger ) { @@ -1396,3 +1397,5 @@ namespace svx //........................................................................ } // namespace svx //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx index 3409125a5f..767e35db9c 100644 --- a/svx/source/form/fmtools.cxx +++ b/svx/source/form/fmtools.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -152,10 +153,10 @@ void displayException(const Any& _rExcept, Window* _pParent) Reference< XWindow > xParentWindow = VCLUnoHelper::GetInterface(pParentWindow); Sequence< Any > aArgs(2); - aArgs[0] <<= PropertyValue(::rtl::OUString::createFromAscii("SQLException"), 0, _rExcept, PropertyState_DIRECT_VALUE); - aArgs[1] <<= PropertyValue(::rtl::OUString::createFromAscii("ParentWindow"), 0, makeAny(xParentWindow), PropertyState_DIRECT_VALUE); + aArgs[0] <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLException")), 0, _rExcept, PropertyState_DIRECT_VALUE); + aArgs[1] <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")), 0, makeAny(xParentWindow), PropertyState_DIRECT_VALUE); - static ::rtl::OUString s_sDialogServiceName = ::rtl::OUString::createFromAscii("com.sun.star.sdb.ErrorMessageDialog"); + static ::rtl::OUString s_sDialogServiceName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ErrorMessageDialog") ); Reference< XExecutableDialog > xErrorDialog( ::comphelper::getProcessServiceFactory()->createInstanceWithArguments(s_sDialogServiceName, aArgs), UNO_QUERY); if (xErrorDialog.is()) @@ -494,3 +495,4 @@ sal_Bool isRowSetAlive(const Reference< XInterface >& _rxRowSet) return bIsAlive; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 6e74359bc9..51af64faa9 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -598,8 +599,8 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt) FM_PROP_TEXT, FM_PROP_STATE, FM_PROP_DATE, FM_PROP_TIME, FM_PROP_VALUE, FM_PROP_SELECT_SEQ, FM_PROP_EFFECTIVE_VALUE }; - sal_Int32 nDefaultValueProps = sizeof(pDefaultValueProperties)/sizeof(pDefaultValueProperties[0]); - OSL_ENSURE(sizeof(aValueProperties)/sizeof(aValueProperties[0]) == nDefaultValueProps, + sal_Int32 nDefaultValueProps = SAL_N_ELEMENTS(pDefaultValueProperties); + OSL_ENSURE(SAL_N_ELEMENTS(aValueProperties) == nDefaultValueProps, "FmXUndoEnvironment::propertyChange: inconsistence!"); for (sal_Int32 i=0; i<nDefaultValueProps; ++i) { @@ -755,7 +756,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt) // TODO: this is a potential race condition: two threads here could in theory // add their undo actions out-of-order - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; rModel.AddUndo(new FmUndoPropertyAction(rModel, evt)); } } @@ -777,7 +778,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt) void SAL_CALL FmXUndoEnvironment::elementInserted(const ContainerEvent& evt) throw(::com::sun::star::uno::RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXUndoEnvironment::elementInserted" ); - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); // neues Object zum lauschen @@ -803,7 +804,7 @@ void FmXUndoEnvironment::implSetModified() void SAL_CALL FmXUndoEnvironment::elementReplaced(const ContainerEvent& evt) throw(::com::sun::star::uno::RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXUndoEnvironment::elementReplaced" ); - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); Reference< XInterface > xIface; @@ -821,7 +822,7 @@ void SAL_CALL FmXUndoEnvironment::elementReplaced(const ContainerEvent& evt) thr void SAL_CALL FmXUndoEnvironment::elementRemoved(const ContainerEvent& evt) throw(::com::sun::star::uno::RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXUndoEnvironment::elementRemoved" ); - ::vos::OClearableGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); Reference< XInterface > xIface( evt.Element, UNO_QUERY ); @@ -1347,3 +1348,5 @@ String FmUndoModelReplaceAction::GetComment() const RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmUndoModelReplaceAction::GetComment" ); return SVX_RES(RID_STR_UNDO_MODEL_REPLACE); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index 438cab3c30..4a58d025dc 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -622,3 +623,4 @@ Reference< runtime::XFormController > FmFormView::GetFormController( const Refer return pImpl->getFormController( _rxForm, _rDevice ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 6c5df886a0..3f6f88efe1 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1916,3 +1917,5 @@ DocumentType FmXFormView::impl_getDocumentType() const return GetFormShell()->GetImpl()->getDocumentType(); return eUnknownDocumentType; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 99b7dab4ce..f5a419597f 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -545,7 +546,7 @@ namespace svxform const PropertyValue* pInfoEnd = pInfo + aInfo.getLength(); for ( ; pInfo != pInfoEnd; ++pInfo ) { - if ( pInfo->Name.equalsAscii( "PreferDosLikeLineEnds" ) ) + if ( pInfo->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferDosLikeLineEnds" ) ) ) { pInfo->Value >>= bDosLineEnds; break; @@ -731,3 +732,5 @@ namespace svxform //........................................................................ } // namespace svxform //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 67ce99abcc..51f6539706 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -481,7 +482,7 @@ class FmXAutoControl: public UnoControl public: FmXAutoControl(){} - virtual ::rtl::OUString GetComponentServiceName() {return ::rtl::OUString::createFromAscii("Edit");} + virtual ::rtl::OUString GetComponentServiceName() {return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Edit"));} virtual void SAL_CALL createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw( RuntimeException ); protected: @@ -894,6 +895,7 @@ void FormController::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons aFilter.append( aRowFilter.makeStringAndClear() ); aFilter.appendAscii( " )" ); } + aFilter.appendAscii( " )" ); } } catch( const Exception& ) @@ -1235,7 +1237,7 @@ void FormController::disposing(void) // clean up our children for (FmFormControllers::const_iterator i = m_aChilds.begin(); - i != m_aChilds.end(); i++) + i != m_aChilds.end(); ++i) { // search the position of the model within the form Reference< XFormComponent > xForm((*i)->getModel(), UNO_QUERY); @@ -3192,7 +3194,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) xQueryColumns->getByName(pRefValues[j].Name) >>= xSet; // get the RealName - xSet->getPropertyValue(::rtl::OUString::createFromAscii("RealName")) >>= aRealName; + xSet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RealName"))) >>= aRealName; // compare the condition field name and the RealName if (aCompare(aRealName, pRefValues[j].Name)) @@ -3205,7 +3207,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) for (sal_Int32 n = 0, nCount = xColumnsByIndex->getCount(); n < nCount; n++) { xColumnsByIndex->getByIndex(n) >>= xSet; - xSet->getPropertyValue(::rtl::OUString::createFromAscii("RealName")) >>= aRealName; + xSet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RealName"))) >>= aRealName; if (aCompare(aRealName, pRefValues[j].Name)) { // get the column by its alias @@ -3233,10 +3235,10 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) if (aRow.find((*iter).xText) != aRow.end()) { ::rtl::OUString aCompText = aRow[(*iter).xText]; - aCompText += ::rtl::OUString::createFromAscii(" "); + aCompText += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); ::rtl::OString aVal = m_xParser->getContext().getIntlKeywordAscii(OParseContext::KEY_AND); aCompText += ::rtl::OUString(aVal.getStr(),aVal.getLength(),RTL_TEXTENCODING_ASCII_US); - aCompText += ::rtl::OUString::createFromAscii(" "); + aCompText += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); aCompText += ::comphelper::getString(pRefValues[j].Value); aRow[(*iter).xText] = aCompText; } @@ -3383,9 +3385,9 @@ void FormController::startFiltering() { // create a filter control Sequence< Any > aCreationArgs( 3 ); - aCreationArgs[ 0 ] <<= NamedValue( ::rtl::OUString::createFromAscii( "MessageParent" ), makeAny( VCLUnoHelper::GetInterface( getDialogParentWindow() ) ) ); - aCreationArgs[ 1 ] <<= NamedValue( ::rtl::OUString::createFromAscii( "NumberFormatter" ), makeAny( xFormatter ) ); - aCreationArgs[ 2 ] <<= NamedValue( ::rtl::OUString::createFromAscii( "ControlModel" ), makeAny( xModel ) ); + aCreationArgs[ 0 ] <<= NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MessageParent")), makeAny( VCLUnoHelper::GetInterface( getDialogParentWindow() ) ) ); + aCreationArgs[ 1 ] <<= NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NumberFormatter")), makeAny( xFormatter ) ); + aCreationArgs[ 2 ] <<= NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlModel")), makeAny( xModel ) ); Reference< XControl > xFilterControl( m_aContext.createComponentWithArguments( "com.sun.star.form.control.FilterControl", aCreationArgs ), UNO_QUERY @@ -4141,7 +4143,7 @@ FormController::interceptedQueryDispatch( const URL& aURL, Reference< XDispatch > xReturn; // dispatches handled by ourself if ( ( aURL.Complete == FMURL_CONFIRM_DELETION ) - || ( ( aURL.Complete.equalsAscii( "private:/InteractionHandler" ) ) + || ( ( aURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:/InteractionHandler" ) ) ) && ensureInteractionHandler() ) ) @@ -4182,7 +4184,7 @@ void SAL_CALL FormController::dispatch( const URL& _rURL, const Sequence< Proper return; } - if ( _rURL.Complete.equalsAscii( "private:/InteractionHandler" ) ) + if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:/InteractionHandler" ) ) ) { Reference< XInteractionRequest > xRequest; OSL_VERIFY( _rArgs[0].Value >>= xRequest ); diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx index 960716c3c9..81d622d80b 100644 --- a/svx/source/form/formcontrolling.cxx +++ b/svx/source/form/formcontrolling.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,6 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" +#include <sal/macros.h> #include "formcontrolling.hxx" #include "fmurl.hxx" #include "svx/svxids.hrc" @@ -120,7 +122,7 @@ namespace svx { FMURL_FORM_APPLY_FILTER, SID_FM_FORM_FILTERED, FormFeature::ToggleApplyFilter }, { FMURL_FORM_REMOVE_FILTER, SID_FM_REMOVE_FILTER_SORT, FormFeature::RemoveFilterAndSort } }; - for ( size_t i=0; i<sizeof(aDescriptions)/sizeof(aDescriptions[0]); ++i ) + for ( size_t i=0; i < SAL_N_ELEMENTS(aDescriptions); ++i ) s_aFeatureDescriptions.push_back( aDescriptions[i] ); } }; @@ -461,7 +463,7 @@ namespace svx if ( bSuccess ) return true; - // display the error. Prefer the one reported in errorOccured over the one caught. + // display the error. Prefer the one reported in errorOccurred over the one caught. if ( m_aOperationError.hasValue() ) displayException( m_aOperationError ); else if ( aError.hasValue() ) @@ -533,7 +535,7 @@ namespace svx SID_FM_FILTER_START, SID_FM_VIEW_AS_GRID }; - sal_Int32 nFeatureCount = sizeof( pSupportedFeatures ) / sizeof( pSupportedFeatures[ 0 ] ); + sal_Int32 nFeatureCount = SAL_N_ELEMENTS( pSupportedFeatures ); aSupportedFeatures.resize( nFeatureCount ); ::std::copy( pSupportedFeatures, pSupportedFeatures + nFeatureCount, aSupportedFeatures.begin() ); @@ -543,7 +545,7 @@ namespace svx //-------------------------------------------------------------------- void SAL_CALL FormControllerHelper::errorOccured( const SQLErrorEvent& _Event ) throw (RuntimeException) { - OSL_ENSURE( !m_aOperationError.hasValue(), "FormControllerHelper::errorOccured: two errors during one operation?" ); + OSL_ENSURE( !m_aOperationError.hasValue(), "FormControllerHelper::errorOccurred: two errors during one operation?" ); m_aOperationError = _Event.Reason; } @@ -602,3 +604,5 @@ namespace svx //........................................................................ } // namespace svx //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/formfeaturedispatcher.cxx b/svx/source/form/formfeaturedispatcher.cxx index 55bbc2aea5..b64ffad561 100644 --- a/svx/source/form/formfeaturedispatcher.cxx +++ b/svx/source/form/formfeaturedispatcher.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -239,3 +240,5 @@ namespace svx //........................................................................ } // namespace svx //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/formtoolbars.cxx b/svx/source/form/formtoolbars.cxx index 6a7c738fde..a0835a864a 100644 --- a/svx/source/form/formtoolbars.cxx +++ b/svx/source/form/formtoolbars.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> /** === end UNO includes === **/ -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif //........................................................................ namespace svxform @@ -115,3 +114,4 @@ namespace svxform } // namespace svxform //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index 39a738a5bf..da5ac5ffa7 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,8 +60,8 @@ #include <com/sun/star/datatransfer/XTransferable.hpp> #include <svx/sdrpaintwindow.hxx> -#include <svx/svxdlg.hxx> //CHINA001 -#include <svx/dialogs.hrc> //CHINA001 +#include <svx/svxdlg.hxx> +#include <svx/dialogs.hrc> #include <rtl/logfile.hxx> //............................................................................ namespace svxform @@ -203,24 +204,17 @@ namespace svxform SetHelpId( HID_FORM_NAVIGATOR ); m_aNavigatorImages = ImageList( SVX_RES( RID_SVXIMGLIST_FMEXPL ) ); - m_aNavigatorImagesHC = ImageList( SVX_RES( RID_SVXIMGLIST_FMEXPL_HC ) ); SetNodeBitmaps( m_aNavigatorImages.GetImage( RID_SVXIMG_COLLAPSEDNODE ), - m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ), - BMP_COLOR_NORMAL - ); - SetNodeBitmaps( - m_aNavigatorImagesHC.GetImage( RID_SVXIMG_COLLAPSEDNODE ), - m_aNavigatorImagesHC.GetImage( RID_SVXIMG_EXPANDEDNODE ), - BMP_COLOR_HIGHCONTRAST + m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE ) ); SetDragDropMode(0xFFFF); EnableInplaceEditing( sal_True ); SetSelectionMode(MULTIPLE_SELECTION); - m_pNavModel = new NavigatorTreeModel( m_aNavigatorImages, m_aNavigatorImagesHC ); + m_pNavModel = new NavigatorTreeModel( m_aNavigatorImages ); Clear(); StartListening( *m_pNavModel ); @@ -667,11 +661,8 @@ namespace svxform SvLBoxEntry* pEntry = FindEntry( pData ); if (pEntry) { // das Image neu setzen - SetCollapsedEntryBmp( pEntry, pData->GetNormalImage(), BMP_COLOR_NORMAL ); - SetExpandedEntryBmp( pEntry, pData->GetNormalImage(), BMP_COLOR_NORMAL ); - - SetCollapsedEntryBmp( pEntry, pData->GetHCImage(), BMP_COLOR_HIGHCONTRAST ); - SetExpandedEntryBmp( pEntry, pData->GetHCImage(), BMP_COLOR_HIGHCONTRAST ); + SetCollapsedEntryBmp( pEntry, pData->GetNormalImage() ); + SetExpandedEntryBmp( pEntry, pData->GetNormalImage() ); } } @@ -691,13 +682,6 @@ namespace svxform Image aRootImage( m_aNavigatorImages.GetImage( RID_SVXIMG_FORMS ) ); m_pRootEntry = InsertEntry( SVX_RES(RID_STR_FORMS), aRootImage, aRootImage, NULL, sal_False, 0, NULL ); - - if ( m_pRootEntry ) - { - Image aHCRootImage( m_aNavigatorImagesHC.GetImage( RID_SVXIMG_FORMS ) ); - SetExpandedEntryBmp( m_pRootEntry, aHCRootImage, BMP_COLOR_HIGHCONTRAST ); - SetCollapsedEntryBmp( m_pRootEntry, aHCRootImage, BMP_COLOR_HIGHCONTRAST ); - } } else if (!m_bMarkingObjects && rHint.ISA(FmNavRequestSelectHint)) { // wenn m_bMarkingObjects sal_True ist, markiere ich gerade selber Objekte, und da der ganze Mechanismus dahinter synchron ist, @@ -732,12 +716,6 @@ namespace svxform pEntryData->GetNormalImage(), pEntryData->GetNormalImage(), pParentEntry, sal_False, nRelPos, pEntryData ); - if ( pNewEntry ) - { - SetExpandedEntryBmp( pNewEntry, pEntryData->GetHCImage(), BMP_COLOR_HIGHCONTRAST ); - SetCollapsedEntryBmp( pNewEntry, pEntryData->GetHCImage(), BMP_COLOR_HIGHCONTRAST ); - } - ////////////////////////////////////////////////////////////////////// // Wenn Root-Eintrag Root expandieren if( !pParentEntry ) @@ -746,11 +724,11 @@ namespace svxform ////////////////////////////////////////////////////////////////////// // Childs einfuegen FmEntryDataList* pChildList = pEntryData->GetChildList(); - sal_uInt32 nChildCount = pChildList->Count(); + size_t nChildCount = pChildList->size(); FmEntryData* pChildData; - for( sal_uInt32 i=0; i<nChildCount; i++ ) + for( size_t i = 0; i < nChildCount; i++ ) { - pChildData = pChildList->GetObject(i); + pChildData = pChildList->at( i ); Insert( pChildData, LIST_APPEND ); } @@ -1193,9 +1171,9 @@ namespace svxform // beim Vater austragen if (pCurrentParentUserData) - pCurrentParentUserData->GetChildList()->Remove(pCurrentUserData); + pCurrentParentUserData->GetChildList()->remove( pCurrentUserData ); else - GetNavModel()->GetRootList()->Remove(pCurrentUserData); + GetNavModel()->GetRootList()->remove( pCurrentUserData ); // aus dem Container entfernen sal_Int32 nIndex = getElementPos(Reference< XIndexAccess > (xContainer, UNO_QUERY), xCurrentChild); @@ -1265,9 +1243,9 @@ namespace svxform // dann dem Parent das neue Child if (pTargetData) - pTargetData->GetChildList()->Insert(pCurrentUserData, nIndex); + pTargetData->GetChildList()->insert( pCurrentUserData, nIndex ); else - GetNavModel()->GetRootList()->Insert(pCurrentUserData, nIndex); + GetNavModel()->GetRootList()->insert( pCurrentUserData, nIndex ); // dann bei mir selber bekanntgeben und neu selektieren SvLBoxEntry* pNew = Insert( pCurrentUserData, nIndex ); @@ -1463,7 +1441,7 @@ namespace svxform if (!xNewForm.is()) return; - FmFormData* pNewFormData = new FmFormData( xNewForm, m_aNavigatorImages, m_aNavigatorImagesHC, pParentFormData ); + FmFormData* pNewFormData = new FmFormData( xNewForm, m_aNavigatorImages, pParentFormData ); ////////////////////////////////////////////////////////////////////// // Namen setzen @@ -1528,7 +1506,7 @@ namespace svxform if (!xNewComponent.is()) return NULL; - FmControlData* pNewFormControlData = new FmControlData( xNewComponent, m_aNavigatorImages, m_aNavigatorImagesHC, pParentFormData ); + FmControlData* pNewFormControlData = new FmControlData( xNewComponent, m_aNavigatorImages, pParentFormData ); ////////////////////////////////////////////////////////////////////// // Namen setzen @@ -1582,7 +1560,7 @@ namespace svxform aNewName = aBaseName; if( i>0 ) { - aNewName += ::rtl::OUString::createFromAscii(" "); + aNewName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ")); aNewName += ::rtl::OUString::valueOf(i).getStr(); } @@ -1917,7 +1895,7 @@ namespace svxform // if the entry still has children, we skipped deletion of one of those children. // This may for instance be because the shape is in a hidden layer, where we're unable // to remove it - if ( pCurrent->GetChildList()->Count() ) + if ( pCurrent->GetChildList()->size() ) continue; // noch ein kleines Problem, bevor ich das ganz loesche : wenn es eine Form ist und die Shell diese als CurrentObject @@ -2195,9 +2173,9 @@ namespace svxform { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::MarkViewObjects" ); FmFormShell* pFormShell = GetNavModel()->GetFormShell(); - if( !pFormShell ) + if( !pFormShell ) return; - + // first collect all sdrobjects ::std::set< Reference< XFormComponent > > aObjects; CollectObjects(pFormData,bDeep,aObjects); @@ -2222,7 +2200,7 @@ namespace svxform { // unfortunately, the writer doesn't like marking an already-marked object, again, so reset the mark first pFormView->MarkObj( pSdrObject, pPageView, !bMark, sal_False ); - } + } } // while ( aIter.IsMore() ) if ( bMark ) { @@ -2246,14 +2224,14 @@ namespace svxform FmEntryDataList* pChildList = pFormData->GetChildList(); FmEntryData* pEntryData; FmControlData* pControlData; - for( sal_uInt32 i=0; i < pChildList->Count(); ++i ) + for( size_t i = 0; i < pChildList->size(); ++i ) { - pEntryData = pChildList->GetObject(i); + pEntryData = pChildList->at( i ); if( pEntryData->ISA(FmControlData) ) { pControlData = (FmControlData*)pEntryData; _rObjects.insert(pControlData->GetFormComponent()); - } // if( pEntryData->ISA(FmControlData) ) + } // if( pEntryData->ISA(FmControlData) ) else if (bDeep && (pEntryData->ISA(FmFormData))) CollectObjects((FmFormData*)pEntryData,bDeep,_rObjects); } // for( sal_uInt32 i=0; i<pChildList->Count(); i++ ) @@ -2262,10 +2240,10 @@ namespace svxform void NavigatorTree::MarkViewObj( FmControlData* pControlData, sal_Bool bMarkHandles, sal_Bool bMark) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::MarkViewObj" ); - if( !pControlData ) + if( !pControlData ) return; FmFormShell* pFormShell = GetNavModel()->GetFormShell(); - if( !pFormShell ) + if( !pFormShell ) return; ////////////////////////////////////////////////////////////////////// @@ -2297,7 +2275,7 @@ namespace svxform continue; bPaint = true; - + } // while ( aIter.IsMore() ) if ( bPaint ) { @@ -2320,3 +2298,4 @@ namespace svxform //............................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx index 2f4a3ddde7..aec323d0a1 100644 --- a/svx/source/form/navigatortreemodel.cxx +++ b/svx/source/form/navigatortreemodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -215,12 +216,11 @@ namespace svxform //======================================================================== //------------------------------------------------------------------------ - NavigatorTreeModel::NavigatorTreeModel( const ImageList& _rNormalImages, const ImageList& _rHCImages ) + NavigatorTreeModel::NavigatorTreeModel( const ImageList& _rNormalImages ) :m_pFormShell(NULL) ,m_pFormPage(NULL) ,m_pFormModel(NULL) ,m_aNormalImages( _rNormalImages ) - ,m_aHCImages( _rHCImages ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTreeModel::NavigatorTreeModel" ); m_pPropChangeList = new OFormComponentObserver(this); @@ -271,15 +271,7 @@ namespace svxform ////////////////////////////////////////////////////////////////////// // RootList loeschen - FmEntryData* pChildData; - FmEntryDataList* pRootList = GetRootList(); - - for( sal_uInt32 i=pRootList->Count(); i>0; i-- ) - { - pChildData = pRootList->GetObject(i-1); - pRootList->Remove( pChildData ); - delete pChildData; - } + GetRootList()->clear(); ////////////////////////////////////////////////////////////////////// // UI benachrichtigen @@ -383,9 +375,9 @@ namespace svxform } if (pFolder) - pFolder->GetChildList()->Insert( pEntry, nRelPos ); + pFolder->GetChildList()->insert( pEntry, nRelPos ); else - GetRootList()->Insert( pEntry, nRelPos ); + GetRootList()->insert( pEntry, nRelPos ); ////////////////////////////////////////////////////////////////////// // UI benachrichtigen @@ -466,13 +458,13 @@ namespace svxform // beim Vater austragen if (pFolder) - pFolder->GetChildList()->Remove(pEntry); + pFolder->GetChildList()->remove( pEntry ); else { - GetRootList()->Remove(pEntry); + GetRootList()->remove( pEntry ); ////////////////////////////////////////////////////////////////////// // Wenn keine Form mehr in der Root, an der Shell CurForm zuruecksetzen - if (!GetRootList()->Count()) + if ( !GetRootList()->size() ) m_pFormShell->GetImpl()->forgetCurrentForm(); } @@ -498,10 +490,9 @@ namespace svxform return; FmEntryDataList* pChildList = pFormData->GetChildList(); - sal_uInt32 nCount = pChildList->Count(); - for (sal_uInt32 i = nCount; i > 0; i--) + for ( size_t i = pChildList->size(); i > 0; ) { - FmEntryData* pEntryData = pChildList->GetObject(i - 1); + FmEntryData* pEntryData = pChildList->at( --i ); ////////////////////////////////////////////////////////////////////// // Child ist Form -> rekursiver Aufruf @@ -545,15 +536,14 @@ namespace svxform ////////////////////////////////////////////////////////////////////// // Alle Eintraege dieses Zweiges loeschen FmEntryDataList* pChildList = pParentData->GetChildList(); - FmEntryData* pChildData; - for( sal_uInt32 i=pChildList->Count(); i>0; i-- ) + for( size_t i = pChildList->size(); i > 0; ) { - pChildData = pChildList->GetObject(i-1); + FmEntryData* pChildData = pChildList->at( --i ); if( pChildData->ISA(FmFormData) ) ClearBranch( (FmFormData*)pChildData ); - pChildList->Remove( pChildData ); + pChildList->remove( pChildData ); } } @@ -577,7 +567,7 @@ namespace svxform "NavigatorTreeModel::FillBranch : the root container should supply only elements of type XForm"); xForms->getByIndex(i) >>= xSubForm; - pSubFormData = new FmFormData( xSubForm, m_aNormalImages, m_aHCImages, pFormData ); + pSubFormData = new FmFormData( xSubForm, m_aNormalImages, pFormData ); Insert( pSubFormData, LIST_APPEND ); ////////////////////////////////////////////////////////////// @@ -607,7 +597,7 @@ namespace svxform if (xSubForm.is()) { // die aktuelle Component ist eine Form - pSubFormData = new FmFormData(xSubForm, m_aNormalImages, m_aHCImages, pFormData); + pSubFormData = new FmFormData(xSubForm, m_aNormalImages, pFormData); Insert(pSubFormData, LIST_APPEND); ////////////////////////////////////////////////////////////// @@ -616,7 +606,7 @@ namespace svxform } else { - pNewControlData = new FmControlData(xCurrentComponent, m_aNormalImages, m_aHCImages, pFormData); + pNewControlData = new FmControlData(xCurrentComponent, m_aNormalImages, pFormData); Insert(pNewControlData, LIST_APPEND); } } @@ -639,7 +629,7 @@ namespace svxform if (xParentForm.is()) pParentData = (FmFormData*)FindData( xParentForm, GetRootList() ); - pFormData = new FmFormData( xForm, m_aNormalImages, m_aHCImages, pParentData ); + pFormData = new FmFormData( xForm, m_aNormalImages, pParentData ); Insert( pFormData, nRelPos ); } @@ -657,7 +647,7 @@ namespace svxform FmFormData* pParentData = (FmFormData*)FindData( xForm, GetRootList() ); if( !pParentData ) { - pParentData = new FmFormData( xForm, m_aNormalImages, m_aHCImages, NULL ); + pParentData = new FmFormData( xForm, m_aNormalImages, NULL ); Insert( pParentData, LIST_APPEND ); } @@ -665,7 +655,7 @@ namespace svxform { ////////////////////////////////////////////////////////// // Neue EntryData setzen - FmEntryData* pNewEntryData = new FmControlData( xComp, m_aNormalImages, m_aHCImages, pParentData ); + FmEntryData* pNewEntryData = new FmControlData( xComp, m_aNormalImages, pParentData ); ////////////////////////////////////////////////////////// // Neue EntryData einfuegen @@ -674,12 +664,15 @@ namespace svxform } //------------------------------------------------------------------------ - void NavigatorTreeModel::ReplaceFormComponent(const Reference< XFormComponent > & xOld, const Reference< XFormComponent > & xNew) + void NavigatorTreeModel::ReplaceFormComponent( + const Reference< XFormComponent > & xOld, + const Reference< XFormComponent > & xNew + ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTreeModel::ReplaceFormComponent" ); FmEntryData* pData = FindData(xOld, GetRootList(), sal_True); DBG_ASSERT(pData && pData->ISA(FmControlData), "NavigatorTreeModel::ReplaceFormComponent : invalid argument !"); - ((FmControlData*)pData)->ModelReplaced( xNew, m_aNormalImages, m_aHCImages ); + ((FmControlData*)pData)->ModelReplaced( xNew, m_aNormalImages ); FmNavModelReplacedHint aReplacedHint( pData ); Broadcast( aReplacedHint ); @@ -692,9 +685,9 @@ namespace svxform // normalize Reference< XInterface > xIFace( xElement, UNO_QUERY ); - for (sal_uInt16 i=0; i < pDataList->Count(); i++) + for ( size_t i = 0; i < pDataList->size(); i++ ) { - FmEntryData* pEntryData = pDataList->GetObject(i); + FmEntryData* pEntryData = pDataList->at( i ); if ( pEntryData->GetElement().get() == xIFace.get() ) return pEntryData; else if (bRecurs) @@ -721,9 +714,9 @@ namespace svxform FmEntryData* pEntryData; FmEntryData* pChildData; - for( sal_uInt16 i=0; i<pDataList->Count(); i++ ) + for( size_t i = 0; i < pDataList->size(); i++ ) { - pEntryData = pDataList->GetObject(i); + pEntryData = pDataList->at( i ); aEntryText = pEntryData->GetText(); if (rText == aEntryText) @@ -988,9 +981,9 @@ namespace svxform ::rtl::OUString aChildText; FmEntryData* pChildData; - for( sal_uInt16 i=0; i<pChildList->Count(); i++ ) + for( size_t i = 0; i < pChildList->size(); i++ ) { - pChildData = pChildList->GetObject(i); + pChildData = pChildList->at( i ); aChildText = pChildData->GetText(); ////////////////////////////////////////////////////////////////////// @@ -999,7 +992,7 @@ namespace svxform && (pEntryData!=pChildData) ) { - + SQLContext aError; aError.Message = String(SVX_RES(RID_ERR_CONTEXT_ADDFORM)); @@ -1124,3 +1117,4 @@ namespace svxform //............................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/sdbdatacolumn.cxx b/svx/source/form/sdbdatacolumn.cxx index 1bdc4bc41b..084bad82c2 100644 --- a/svx/source/form/sdbdatacolumn.cxx +++ b/svx/source/form/sdbdatacolumn.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -285,3 +286,5 @@ namespace svxform //.............................................................................. } // namespace svxform //.............................................................................. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/sqlparserclient.cxx b/svx/source/form/sqlparserclient.cxx index bd5b5b0dd7..f50e67d9ca 100644 --- a/svx/source/form/sqlparserclient.cxx +++ b/svx/source/form/sqlparserclient.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60,3 +61,4 @@ namespace svxform //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/stringlistresource.cxx b/svx/source/form/stringlistresource.cxx index e7bb12ca5e..9e06f0851f 100644 --- a/svx/source/form/stringlistresource.cxx +++ b/svx/source/form/stringlistresource.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,3 +70,5 @@ namespace svx //........................................................................ } // namespace svx //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 388cf761b2..c9afa4c7b9 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,21 +45,15 @@ #include <comphelper/processfactory.hxx> #include <comphelper/stl_types.hxx> -#ifndef _SVX_FMHELP_HRC #include "fmhelp.hrc" -#endif #include <svx/fmshell.hxx> #include "fmshimp.hxx" #include "svx/dbtoolsclient.hxx" #include <svx/fmpage.hxx> -#ifndef _SVX_FMPGEIMP_HXX #include "fmpgeimp.hxx" -#endif -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif #ifndef _SVX_FMRESIDS_HRC #include "svx/fmresids.hrc" @@ -474,3 +469,4 @@ FmFieldWinMgr::FmFieldWinMgr(Window* _pParent, sal_uInt16 _nId, } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index 65fb2bf97a..7a02d07107 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,7 +43,6 @@ #include <vcl/sound.hxx> #include <svx/dialmgr.hxx> -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> #endif #include "svx/tbxctl.hxx" @@ -52,9 +52,7 @@ #include "svx/fmresids.hrc" #endif #include "fmitems.hxx" -#ifndef _SVX_FMHELP_HRC #include "fmhelp.hrc" -#endif #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/imagemgr.hxx> @@ -213,11 +211,7 @@ void SvxFmTbxCtlConfig::StateChanged(USHORT nSID, SfxItemState eState, const Sfx { // set a new image, matching to this slot rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlot )); - Image aImage = GetImage( m_xFrame, - aSlotURL, - hasBigImages(), - GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode() ); - + Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() ); GetToolBox().SetItemImage( GetId(), aImage ); nLastSlot = nSlot; } @@ -414,7 +408,7 @@ SvxFmTbxCtlRecTotal::~SvxFmTbxCtlRecTotal() Window* SvxFmTbxCtlRecTotal::CreateItemWindow( Window* pParent ) { pFixedText = new FixedText( pParent ); - String aSample( "123456", sizeof( "123456" ) - 1 ); + String aSample(RTL_CONSTASCII_USTRINGPARAM("123456")); Size aSize( pFixedText->GetTextWidth( aSample ), pFixedText->GetTextHeight( ) ); aSize.Width() += 12; pFixedText->SetSizePixel( aSize ); @@ -475,3 +469,4 @@ SvxFmTbxPrevRec::SvxFmTbxPrevRec( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/typeconversionclient.cxx b/svx/source/form/typeconversionclient.cxx index 74e6c17c02..b20b75a7dd 100644 --- a/svx/source/form/typeconversionclient.cxx +++ b/svx/source/form/typeconversionclient.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,3 +57,4 @@ namespace svxform //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/typemap.cxx b/svx/source/form/typemap.cxx index c3978e4785..a29d318a2d 100644 --- a/svx/source/form/typemap.cxx +++ b/svx/source/form/typemap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,3 +64,4 @@ #define SFX_TYPEMAP #include "svxslots.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/xfm_addcondition.cxx b/svx/source/form/xfm_addcondition.cxx index 5c8e50b212..1911c06f81 100644 --- a/svx/source/form/xfm_addcondition.cxx +++ b/svx/source/form/xfm_addcondition.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#ifndef SVX_SOURCE_FORM_XFM_ADDCONDITION_HXX #include "xfm_addcondition.hxx" -#endif /** === begin UNO includes === **/ /** === end UNO includes === **/ @@ -73,7 +72,7 @@ namespace svxform //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL OAddConditionDialog_GetImplementationName() { - return ::rtl::OUString::createFromAscii( "org.openoffice.comp.svx.OAddConditionDialog" ); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.svx.OAddConditionDialog")); } //==================================================================== @@ -191,3 +190,4 @@ namespace svxform } // namespace svxformv //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/codec.cxx b/svx/source/gallery2/codec.cxx index efd63a2b4f..c9067aa789 100644 --- a/svx/source/gallery2/codec.cxx +++ b/svx/source/gallery2/codec.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -171,3 +172,5 @@ void GalleryCodec::Read( SvStream& rStmToRead ) } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/codec.hxx b/svx/source/gallery2/codec.hxx index 0da253ce70..d5985dcbd2 100644 --- a/svx/source/gallery2/codec.hxx +++ b/svx/source/gallery2/codec.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,3 +50,5 @@ public: static BOOL IsCoded( SvStream& rStm, UINT32& rVersion ); }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galbrws.cxx b/svx/source/gallery2/galbrws.cxx index c1dd8ec4d8..421f1dba31 100644 --- a/svx/source/gallery2/galbrws.cxx +++ b/svx/source/gallery2/galbrws.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -283,3 +284,5 @@ IMPL_LINK( GalleryBrowser, SplitHdl, void*, EMPTYARG ) return 0L; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index fd219c6379..02f7b1e9ce 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,8 +43,7 @@ #include "gallery.hrc" #include <algorithm> -#include <svx/svxdlg.hxx> //CHINA001 -//CHINA001 #include <svx/dialogs.hrc> //CHINA001 +#include <svx/svxdlg.hxx> // -------------- // - Namespaces - @@ -237,7 +237,7 @@ void GalleryBrowser1::ImplFillExchangeData( const GalleryTheme* pThm, ExchangeDa util::DateTime aDateTimeModified; DateTime aDateTime; - aCnt.getPropertyValue( OUString::createFromAscii( "DateModified" ) ) >>= aDateTimeModified; + aCnt.getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "DateModified" )) ) >>= aDateTimeModified; ::utl::typeConvert( aDateTimeModified, aDateTime ); rData.aThemeChangeDate = aDateTime; rData.aThemeChangeTime = aDateTime; @@ -407,17 +407,17 @@ void GalleryBrowser1::ImplExecute( USHORT nId ) case( MN_ACTUALIZE ): { GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this ); - //CHINA001 ActualizeProgress aActualizeProgress( this, pTheme ); + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { VclAbstractRefreshableDialog* aActualizeProgress = pFact->CreateActualizeProgressDialog( this, pTheme ); DBG_ASSERT(aActualizeProgress, "Dialogdiet fail!");//CHINA001 - aActualizeProgress->Update(); //CHINA001 aActualizeProgress.Update(); - aActualizeProgress->Execute(); //CHINA001 aActualizeProgress.Execute(); + aActualizeProgress->Update(); + aActualizeProgress->Execute(); mpGallery->ReleaseTheme( pTheme, *this ); - delete aActualizeProgress; //add CHINA001 + delete aActualizeProgress; } } break; @@ -433,15 +433,15 @@ void GalleryBrowser1::ImplExecute( USHORT nId ) { GalleryTheme* pTheme = mpGallery->AcquireTheme( GetSelectedTheme(), *this ); const String aOldName( pTheme->GetName() ); - //CHINA001 TitleDialog aDlg( this, aOldName ); + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 AbstractTitleDialog* aDlg = pFact->CreateTitleDialog( this, aOldName ); DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 - if( aDlg->Execute() == RET_OK ) //CHINA001 if( aDlg.Execute() == RET_OK ) + if( aDlg->Execute() == RET_OK ) { - const String aNewName( aDlg->GetTitle() ); //CHINA001 aDlg.GetTitle() ); + const String aNewName( aDlg->GetTitle() ); if( aNewName.Len() && ( aNewName != aOldName ) ) { @@ -459,7 +459,7 @@ void GalleryBrowser1::ImplExecute( USHORT nId ) } } mpGallery->ReleaseTheme( pTheme, *this ); - delete aDlg; //add CHINA001 + delete aDlg; } break; @@ -469,16 +469,16 @@ void GalleryBrowser1::ImplExecute( USHORT nId ) if( pTheme && !pTheme->IsReadOnly() && !pTheme->IsImported() ) { - //CHINA001 GalleryIdDialog aDlg( this, pTheme ); + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { AbstractGalleryIdDialog* aDlg = pFact->CreateGalleryIdDialog( this, pTheme ); DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 - if( aDlg->Execute() == RET_OK ) //CHINA001 if( aDlg.Execute() == RET_OK ) - pTheme->SetId( aDlg->GetId(), TRUE ); //CHINA001 pTheme->SetId( aDlg.GetId(), TRUE ); - delete aDlg; //add CHINA001 + if( aDlg->Execute() == RET_OK ) + pTheme->SetId( aDlg->GetId(), TRUE ); + delete aDlg; } } @@ -713,3 +713,4 @@ IMPL_LINK( GalleryBrowser1, ClickNewThemeHdl, void*, EMPTYARG ) return 0L; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx index a5354d8282..7f4862cda7 100644 --- a/svx/source/gallery2/galbrws1.hxx +++ b/svx/source/gallery2/galbrws1.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -133,3 +134,5 @@ public: void ShowContextMenu(); BOOL KeyInput( const KeyEvent& rKEvt, Window* pWindow ); }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 5d89ca8c34..421a34e613 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,8 +55,7 @@ #include "gallery.hrc" #include <vcl/svapp.hxx> #include <svx/fmmodel.hxx> -#include <svx/svxdlg.hxx> //CHINA001 -//CHINA001 #include <svx/dialogs.hrc> //CHINA001 +#include <svx/svxdlg.hxx> // ----------- // - Defines - @@ -193,7 +193,7 @@ GalleryThemePopup::GalleryThemePopup( const GalleryTheme* pTheme, ULONG nObjectP EnableItem( MN_ADDMENU, pAddMenu->IsItemEnabled( MN_ADD ) || pAddMenu->IsItemEnabled( MN_ADD_LINK ) ); EnableItem( MN_PREVIEW, bValidURL ); - + CheckItem( MN_PREVIEW, mbPreview ); if( mpTheme->IsReadOnly() || !mpTheme->GetObjectCount() ) @@ -203,7 +203,7 @@ GalleryThemePopup::GalleryThemePopup( const GalleryTheme* pTheme, ULONG nObjectP if( mpTheme->IsReadOnly() ) EnableItem( MN_PASTECLIPBOARD, FALSE ); - + if( !mpTheme->GetObjectCount() ) EnableItem( MN_COPYCLIPBOARD, FALSE ); } @@ -268,9 +268,9 @@ void GalleryThemePopup::StateChanged( USHORT nSID, SfxItemState eState, const Sf { SfxBoolItem* pBoolItem = PTR_CAST( SfxBoolItem, pItem ); const SgaObjKind eObjKind = mpTheme->GetObjectKind( mnObjectPos ); - + DBG_ASSERT( pBoolItem || pBoolItem == 0, "SfxBoolItem erwartet!"); - + GetPopupMenu( MN_ADDMENU )->EnableItem( MN_ADD, pBoolItem->GetValue() && ( eObjKind != SGA_OBJ_SOUND ) ); } } @@ -309,7 +309,7 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, mpIconView ( new GalleryIconView( this, NULL ) ), mpListView ( new GalleryListView( this, NULL ) ), mpPreview ( new GalleryPreview( this, NULL ) ), - maViewBox ( this ), + maViewBox ( this ), maSeparator ( this, WB_VERT ), maInfoBar ( this, WB_LEFT | WB_VCENTER ), mnCurActionPos ( 0xffffffff ), @@ -372,7 +372,7 @@ void GalleryBrowser2::InitSettings() aInfoFont.SetWeight( WEIGHT_BOLD ); aInfoFont.SetColor( GALLERY_FG_COLOR ); maInfoBar.SetControlFont( aInfoFont ); - + maInfoBar.SetBackground( Wallpaper( GALLERY_DLG_COLOR ) ); maInfoBar.SetControlBackground( GALLERY_DLG_COLOR ); @@ -399,7 +399,7 @@ void GalleryBrowser2::Resize() mpIconView->Hide(); mpListView->Hide(); - mpPreview->Hide(); + mpPreview->Hide(); const Size aOutSize( GetOutputSizePixel() ); const Size aBoxSize( maViewBox.GetOutputSizePixel() ); @@ -407,10 +407,10 @@ void GalleryBrowser2::Resize() const long nInfoBarX = aBoxSize.Width() + ( nOffset * 3 ) + nSepWidth; const Point aPt( 0, aBoxSize.Height() + 3 ); const Size aSz( aOutSize.Width(), aOutSize.Height() - aPt.Y() ); - + maSeparator.SetPosSizePixel( Point( aBoxSize.Width() + nOffset, 0 ), Size( nSepWidth, aBoxSize.Height() ) ); maInfoBar.SetPosSizePixel( Point( nInfoBarX, 0 ), Size( aOutSize.Width() - nInfoBarX, aBoxSize.Height() ) ); - + mpIconView->SetPosSizePixel( aPt, aSz ); mpListView->SetPosSizePixel( aPt, aSz ); mpPreview->SetPosSizePixel( aPt, aSz ); @@ -557,7 +557,7 @@ BOOL GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) INetURLObject aURL; const_cast< GalleryTheme* >( mpCurTheme )->GetURL( nItemId - 1, aURL ); - + const BOOL bValidURL = ( aURL.GetProtocol() != INET_PROT_NOT_VALID ); BOOL bPreview = bValidURL; BOOL bAdd = bValidURL; @@ -594,7 +594,7 @@ BOOL GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) nExecuteId = MN_ADD; } break; - + case( KEY_DELETE ): case( KEY_D ): { @@ -631,12 +631,12 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName ) delete mpIconView, mpIconView = NULL; delete mpListView, mpListView = NULL; delete mpPreview, mpPreview = NULL; - + if( mpCurTheme ) mpGallery->ReleaseTheme( mpCurTheme, *this ); mpCurTheme = mpGallery->AcquireTheme( rThemeName, *this ); - + mpIconView = new GalleryIconView( this, mpCurTheme ); mpListView = new GalleryListView( this, mpCurTheme ); mpPreview = new GalleryPreview( this, mpCurTheme ); @@ -718,7 +718,7 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode ) if( mpCurTheme ) mpCurTheme->GetGraphic( nPos, aGraphic ); - + mpPreview->SetGraphic( aGraphic ); mpPreview->Show(); @@ -815,7 +815,7 @@ void GalleryBrowser2::ImplUpdateViews( USHORT nSelectionId ) { mpIconView->Hide(); mpListView->Hide(); - mpPreview->Hide(); + mpPreview->Hide(); mpIconView->Clear(); mpListView->Clear(); @@ -883,11 +883,11 @@ ULONG GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& rSelP { const Size aOutputSizePixel( GetOutputSizePixel() ); ULONG nRet = 0; - + if( GALLERYBROWSERMODE_PREVIEW == GetMode() ) { nRet = ( ( GALLERYBROWSERMODE_ICON == meLastMode ) ? mpIconView->GetSelectItemId() : ( mpListView->FirstSelectedRow() + 1 ) ); - + if( pSelPos ) rSelPos = GetPointerPosPixel(); else @@ -922,7 +922,7 @@ ULONG GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& rSelP rSelPos.X() = Max( Min( rSelPos.X(), aOutputSizePixel.Width() - 1L ), 0L ); rSelPos.Y() = Max( Min( rSelPos.Y(), aOutputSizePixel.Height() - 1L ), 0L ); - + if( nRet && ( !mpCurTheme || ( nRet > mpCurTheme->GetObjectCount() ) ) ) { nRet = 0; @@ -962,7 +962,7 @@ void GalleryBrowser2::ImplExecute( USHORT nId ) sal_uInt32 nFormat = 0; mbCurActionIsLinkage = ( MN_ADD_LINK == nId ); - + switch( mpCurTheme->GetObjectKind( mnCurActionPos ) ) { case( SGA_OBJ_BMP ): @@ -984,7 +984,7 @@ void GalleryBrowser2::ImplExecute( USHORT nId ) } const SfxUInt32Item aItem( SID_GALLERY_FORMATS, nFormat ); - SfxViewFrame::Current()->GetBindings().GetDispatcher()->Execute( + SfxViewFrame::Current()->GetBindings().GetDispatcher()->Execute( SID_GALLERY_FORMATS, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L ); } break; @@ -1010,7 +1010,7 @@ void GalleryBrowser2::ImplExecute( USHORT nId ) if( pObj ) { const String aOldTitle( GetItemText( *mpCurTheme, *pObj, GALLERY_ITEM_TITLE ) ); - //CHINA001 TitleDialog aDlg( this, aOldTitle ); + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { @@ -1018,7 +1018,7 @@ void GalleryBrowser2::ImplExecute( USHORT nId ) DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 if( aDlg->Execute() == RET_OK )//CHINA001 if( aDlg.Execute() == RET_OK ) { - String aNewTitle( aDlg->GetTitle() );//CHINA001 String aNewTitle( aDlg.GetTitle() ); + String aNewTitle( aDlg->GetTitle() ); if( ( !aNewTitle.Len() && pObj->GetTitle().Len() ) || ( aNewTitle != aOldTitle ) ) { @@ -1031,7 +1031,7 @@ void GalleryBrowser2::ImplExecute( USHORT nId ) } mpCurTheme->ReleaseObject( pObj ); - delete aDlg; //add CHINA001 + delete aDlg; } } } @@ -1123,7 +1123,7 @@ String GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const SgaObject if( aPath.Len() && ( nItemTextFlags & GALLERY_ITEM_TITLE ) ) aRet += ')'; } - + return aRet; } @@ -1154,7 +1154,7 @@ String GalleryBrowser2::GetFilterName() const GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter(); INetURLObject aURL; mpCurTheme->GetURL( mnCurActionPos, aURL ); sal_uInt16 nFilter = pFilter->GetImportFormatNumberForShortName( aURL.GetExtension() ); - + if( GRFILTER_FORMAT_DONTKNOW != nFilter ) aFilterName = pFilter->GetImportFormatName( nFilter ); } @@ -1220,7 +1220,7 @@ IMPL_LINK( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox ) SetMode( GALLERYBROWSERMODE_ICON ); else if( pBox->GetCurItemId() == TBX_ID_LIST ) SetMode( GALLERYBROWSERMODE_LIST ); - + return 0L; } @@ -1228,26 +1228,26 @@ IMPL_LINK( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox ) IMPL_LINK( GalleryBrowser2, MiscHdl, void*, EMPTYARG ) { - const sal_Bool bHC = maViewBox.GetSettings().GetStyleSettings().GetHighContrastMode(); - maViewBox.SetOutStyle( maMiscOptions.GetToolboxStyle() ); - - BitmapEx aIconBmpEx = BitmapEx( Image( GAL_RESID( bHC? RID_SVXIMG_GALLERY_VIEW_ICON_HC : RID_SVXIMG_GALLERY_VIEW_ICON ) ).GetBitmapEx() ); - BitmapEx aListBmpEx = BitmapEx( Image( GAL_RESID( bHC? RID_SVXIMG_GALLERY_VIEW_LIST_HC : RID_SVXIMG_GALLERY_VIEW_LIST ) ).GetBitmapEx() ); - + + BitmapEx aIconBmpEx = BitmapEx( Image( GAL_RESID( RID_SVXIMG_GALLERY_VIEW_ICON ) ).GetBitmapEx() ); + BitmapEx aListBmpEx = BitmapEx( Image( GAL_RESID( RID_SVXIMG_GALLERY_VIEW_LIST ) ).GetBitmapEx() ); + if( maMiscOptions.AreCurrentSymbolsLarge() ) { const Size aLargeSize( 24, 24); - + aIconBmpEx.Scale( aLargeSize ); aListBmpEx.Scale( aLargeSize ); } - + maViewBox.SetItemImage( TBX_ID_ICON, aIconBmpEx ); maViewBox.SetItemImage( TBX_ID_LIST, aListBmpEx ); maViewBox.SetSizePixel( maViewBox.CalcWindowSizePixel() ); - + Resize(); return 0L; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 8ff3ab275b..7dcc9705ea 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -721,3 +722,5 @@ void GalleryListView::StartDrag( sal_Int8, const Point& rPosPixel ) { ( (GalleryBrowser2*) GetParent() )->StartDrag( this, &rPosPixel ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx index 476f4d5137..6c5eb97ac8 100644 --- a/svx/source/gallery2/galexpl.cxx +++ b/svx/source/gallery2/galexpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -513,3 +514,5 @@ BOOL GalleryExplorer::DrawCentered( OutputDevice* pOut, const FmFormModel& rMode { return SgaObjectSvDraw::DrawCentered( pOut, rModel ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/gallery.src b/svx/source/gallery2/gallery.src index 5600bebf82..c6f9696a7e 100644 --- a/svx/source/gallery2/gallery.src +++ b/svx/source/gallery2/gallery.src @@ -257,19 +257,6 @@ Image RID_SVXIMG_GALLERY_VIEW_LIST MASKCOLOR }; -Image RID_SVXIMG_GALLERY_VIEW_ICON_HC -{ - ImageBitmap = Bitmap { File = "galicon_h.bmp"; }; - MASKCOLOR -}; - -Image RID_SVXIMG_GALLERY_VIEW_LIST_HC -{ - ImageBitmap = Bitmap { File = "gallist_h.bmp"; }; - MASKCOLOR -}; - - /******************************************************************************/ Menu RID_SVXMN_GALLERY1 diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index eeeb6bb76c..a2f0cc960e 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -209,12 +210,14 @@ Gallery::Gallery( const String& rMultiPath ) Gallery::~Gallery() { // Themen-Liste loeschen - for( GalleryThemeEntry* pThemeEntry = aThemeList.First(); pThemeEntry; pThemeEntry = aThemeList.Next() ) - delete pThemeEntry; + for ( size_t i = 0, n = aThemeList.size(); i < n; ++i ) + delete aThemeList[ i ]; + aThemeList.clear(); // Import-Liste loeschen - for( GalleryImportThemeEntry* pImportEntry = aImportList.First(); pImportEntry; pImportEntry = aImportList.Next() ) - delete pImportEntry; + for ( size_t i = 0, n = aImportList.size(); i < n; ++i ) + delete aImportList[ i ]; + aImportList.clear(); } // ------------------------------------------------------------------------ @@ -285,7 +288,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR ::ucbhelper::Content aCnt( rBaseURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv ); uno::Sequence< OUString > aProps( 1 ); - aProps.getArray()[ 0 ] = OUString::createFromAscii( "Url" ); + aProps.getArray()[ 0 ] = OUString(RTL_CONSTASCII_USTRINGPARAM("Url")); uno::Reference< sdbc::XResultSet > xResultSet( aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY ) ); @@ -333,10 +336,10 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR if(aThmURL.GetExtension().equalsIgnoreAsciiCaseAscii("thm")) { - INetURLObject aSdgURL( aThmURL); aSdgURL.SetExtension( OUString::createFromAscii( "sdg" ) ); - INetURLObject aSdvURL( aThmURL ); aSdvURL.SetExtension( OUString::createFromAscii( "sdv" ) ); - const OUString aTitleProp( OUString::createFromAscii( "Title" ) ); - const OUString aReadOnlyProp( OUString::createFromAscii( "IsReadOnly" ) ); + INetURLObject aSdgURL( aThmURL); aSdgURL.SetExtension( OUString(RTL_CONSTASCII_USTRINGPARAM("sdg")) ); + INetURLObject aSdvURL( aThmURL ); aSdvURL.SetExtension( OUString(RTL_CONSTASCII_USTRINGPARAM("sdv")) ); + const OUString aTitleProp( RTL_CONSTASCII_USTRINGPARAM("Title") ); + const OUString aReadOnlyProp( RTL_CONSTASCII_USTRINGPARAM("IsReadOnly") ); OUString aTitle; sal_Bool bReadOnly = sal_False; @@ -432,7 +435,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR { const ULONG nFileNumber = (ULONG) String(aThmURL.GetBase()).Erase( 0, 2 ).Erase( 6 ).ToInt32(); - aThemeList.Insert( pEntry, LIST_APPEND ); + aThemeList.push_back( pEntry ); if( nFileNumber > nLastFileNumber ) nLastFileNumber = nFileNumber; @@ -487,10 +490,10 @@ void Gallery::ImplLoadImports() UINT16 i; UINT16 nTempCharSet; - for( pImportEntry = aImportList.First(); pImportEntry; pImportEntry = aImportList.Next() ) - delete pImportEntry; + for ( size_t j = 0, n = aImportList.size(); j < n; ++j ) + delete aImportList[ j ]; + aImportList.clear(); - aImportList.Clear(); *pIStm >> nInventor; if( nInventor == COMPAT_FORMAT( 'S', 'G', 'A', '3' ) ) @@ -502,14 +505,14 @@ void Gallery::ImplLoadImports() pImportEntry = new GalleryImportThemeEntry; *pIStm >> *pImportEntry; - aImportList.Insert( pImportEntry, LIST_APPEND ); + aImportList.push_back( pImportEntry ); aFile = INetURLObject( pImportEntry->aURL ); pThemeEntry = new GalleryThemeEntry( aFile, pImportEntry->aUIName, String(aFile.GetBase()).Erase( 0, 2 ).Erase( 6 ).ToInt32(), TRUE, TRUE, FALSE, 0, FALSE ); - aThemeList.Insert( pThemeEntry, LIST_APPEND ); + aThemeList.push_back( pThemeEntry ); } } @@ -531,10 +534,10 @@ void Gallery::ImplWriteImportList() const UINT32 nInventor = (UINT32) COMPAT_FORMAT( 'S', 'G', 'A', '3' ); const UINT16 nId = 0x0004; - *pOStm << nInventor << nId << (UINT32) aImportList.Count() << (UINT16) gsl_getSystemTextEncoding(); + *pOStm << nInventor << nId << (UINT32) aImportList.size() << (UINT16) gsl_getSystemTextEncoding(); - for( GalleryImportThemeEntry* pImportEntry = aImportList.First(); pImportEntry; pImportEntry = aImportList.Next() ) - *pOStm << *pImportEntry; + for ( size_t i = 0, n = aImportList.size(); i < n; ++i ) + *pOStm << *aImportList[ i ]; if( pOStm->GetError() ) ErrorHandler::HandleError( ERRCODE_IO_GENERAL ); @@ -550,9 +553,9 @@ GalleryThemeEntry* Gallery::ImplGetThemeEntry( const String& rThemeName ) GalleryThemeEntry* pFound = NULL; if( rThemeName.Len() ) - for( GalleryThemeEntry* pEntry = aThemeList.First(); pEntry && !pFound; pEntry = aThemeList.Next() ) - if( rThemeName == pEntry->GetThemeName() ) - pFound = pEntry; + for ( size_t i = 0, n = aThemeList.size(); i < n && !pFound; ++i ) + if( rThemeName == aThemeList[ i ]->GetThemeName() ) + pFound = aThemeList[ i ]; return pFound; } @@ -561,13 +564,10 @@ GalleryThemeEntry* Gallery::ImplGetThemeEntry( const String& rThemeName ) GalleryImportThemeEntry* Gallery::ImplGetImportThemeEntry( const String& rImportName ) { - GalleryImportThemeEntry* pFound = NULL; - - for( GalleryImportThemeEntry* pImportEntry = aImportList.First(); pImportEntry && !pFound; pImportEntry = aImportList.Next() ) - if ( rImportName == pImportEntry->aUIName ) - pFound = pImportEntry; - - return pFound; + for ( size_t i = 0, n = aImportList.size(); i < n; ++i ) + if ( rImportName == aImportList[ i ]->aUIName ) + return aImportList[ i ]; + return NULL; } // ------------------------------------------------------------------------ @@ -576,10 +576,9 @@ String Gallery::GetThemeName( ULONG nThemeId ) const { GalleryThemeEntry* pFound = NULL; - for( ULONG n = 0, nCount = aThemeList.Count(); n < nCount; n++ ) + for ( size_t i = 0, n = aThemeList.size(); i < n && !pFound; ++i ) { - GalleryThemeEntry* pEntry = aThemeList.GetObject( n ); - + GalleryThemeEntry* pEntry = aThemeList[ i ]; if( nThemeId == pEntry->GetId() ) pFound = pEntry; } @@ -631,7 +630,7 @@ BOOL Gallery::CreateTheme( const String& rThemeName, UINT32 nNumFrom ) nLastFileNumber, FALSE, FALSE, TRUE, 0, FALSE ); - aThemeList.Insert( pNewEntry, LIST_APPEND ); + aThemeList.push_back( pNewEntry ); delete( new GalleryTheme( this, pNewEntry ) ); Broadcast( GalleryHint( GALLERY_HINT_THEME_CREATED, rThemeName ) ); bRet = TRUE; @@ -695,14 +694,14 @@ BOOL Gallery::CreateImportTheme( const INetURLObject& rURL, const String& rImpor } pImportTheme->SetImportName( aNewName ); - aThemeList.Insert( pThemeEntry, LIST_APPEND ); + aThemeList.push_back( pThemeEntry ); // Thema in Import-Liste eintragen und Import-Liste speichern GalleryImportThemeEntry* pImportEntry = new GalleryImportThemeEntry; pImportEntry->aThemeName = pImportEntry->aUIName = aNewName; pImportEntry->aURL = rURL; pImportEntry->aImportName = rImportName; - aImportList.Insert( pImportEntry, LIST_APPEND ); + aImportList.push_back( pImportEntry ); ImplWriteImportList(); bRet = TRUE; } @@ -776,8 +775,15 @@ BOOL Gallery::RemoveTheme( const String& rThemeName ) if( pImportEntry ) { - delete aImportList.Remove( pImportEntry ); - ImplWriteImportList(); + for ( GalleryImportThemeList::iterator it = aImportList.begin(); it < aImportList.end(); ++it ) + { + if ( *it == pImportEntry ) + { + delete pImportEntry; + aImportList.erase( it ); + break; + } + } } } else @@ -799,7 +805,15 @@ BOOL Gallery::RemoveTheme( const String& rThemeName ) } } - delete aThemeList.Remove( pThemeEntry ); + for ( GalleryThemeList::iterator it = aThemeList.begin(); it < aThemeList.end(); ++it ) + { + if ( pThemeEntry == *it ) { + delete pThemeEntry; + aThemeList.erase( it ); + break; + } + } + Broadcast( GalleryHint( GALLERY_HINT_THEME_REMOVED, rThemeName ) ); bRet = TRUE; diff --git a/svx/source/gallery2/gallerydrawmodel.hxx b/svx/source/gallery2/gallerydrawmodel.hxx index e7ba22ee4d..0c6bd7d6e6 100644 --- a/svx/source/gallery2/gallerydrawmodel.hxx +++ b/svx/source/gallery2/gallerydrawmodel.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,3 +43,4 @@ private: FmFormModel* mpFormModel; }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 21609ac1e5..6239691a40 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -284,7 +285,7 @@ BOOL FileExists( const INetURLObject& rURL ) ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >() ); OUString aTitle; - aCnt.getPropertyValue( OUString::createFromAscii( "Title" ) ) >>= aTitle; + aCnt.getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ) >>= aTitle; bRet = ( aTitle.getLength() > 0 ); } catch( const ucb::ContentCreationException& ) @@ -318,11 +319,11 @@ BOOL CreateDir( const INetURLObject& rURL ) uno::Sequence< OUString > aProps( 1 ); uno::Sequence< uno::Any > aValues( 1 ); - aProps.getArray()[ 0 ] = OUString::createFromAscii( "Title" ); + aProps.getArray()[ 0 ] = OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); aValues.getArray()[ 0 ] = uno::makeAny( OUString( aNewFolderURL.GetName() ) ); ::ucbhelper::Content aContent( aNewFolderURL.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv ); - bRet = aParent.insertNewContent( OUString::createFromAscii( "application/vnd.sun.staroffice.fsys-folder" ), aProps, aValues, aContent ); + bRet = aParent.insertNewContent( OUString(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.staroffice.fsys-folder")), aProps, aValues, aContent ); } catch( const ucb::ContentCreationException& ) { @@ -348,7 +349,7 @@ BOOL CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ) { ::ucbhelper::Content aDestPath( rDstURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >() ); - aDestPath.executeCommand( OUString::createFromAscii( "transfer" ), + aDestPath.executeCommand( OUString(RTL_CONSTASCII_USTRINGPARAM("transfer")), uno::makeAny( ucb::TransferInfo( sal_False, rSrcURL.GetMainURL( INetURLObject::NO_DECODE ), rDstURL.GetName(), ucb::NameClash::OVERWRITE ) ) ); bRet = TRUE; @@ -377,7 +378,7 @@ BOOL KillFile( const INetURLObject& rURL ) try { ::ucbhelper::Content aCnt( rURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >() ); - aCnt.executeCommand( OUString::createFromAscii( "delete" ), uno::makeAny( sal_Bool( sal_True ) ) ); + aCnt.executeCommand( OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), uno::makeAny( sal_Bool( sal_True ) ) ); } catch( const ucb::ContentCreationException& ) { @@ -408,7 +409,7 @@ GalleryProgress::GalleryProgress( GraphicFilter* pFilter ) : if( xMgr.is() ) { uno::Reference< awt::XProgressMonitor > xMonitor( xMgr->createInstance( - ::rtl::OUString::createFromAscii( "com.sun.star.awt.XProgressMonitor" ) ), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.XProgressMonitor")) ), uno::UNO_QUERY ); if ( xMonitor.is() ) @@ -667,3 +668,5 @@ void GalleryTransferable::StartDrag( Window* pWindow, sal_Int8 nDragSourceAction TransferableHelper::StartDrag( pWindow, nDragSourceActions, nDragPointer, nDragImage ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index 106eeff6d8..6a727c3662 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -605,3 +606,5 @@ void SgaObjectSvDraw::ReadData( SvStream& rIn, UINT16& rReadVersion ) rIn >> aTmpStr; aTitle = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index eb3098d968..60f1fcfb91 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,7 +77,7 @@ using namespace ::com::sun::star; GalleryTheme::GalleryTheme( Gallery* pGallery, GalleryThemeEntry* pThemeEntry ) : pParent ( pGallery ), pThm ( pThemeEntry ), - mnThemeLockCount ( 0 ), + mnThemeLockCount ( 0 ), mnBroadcasterLockCount( 0 ), nDragPos ( 0 ), bDragging ( FALSE ) @@ -93,12 +94,14 @@ GalleryTheme::~GalleryTheme() { ImplWrite(); - for( GalleryObject* pEntry = aObjectList.First(); pEntry; pEntry = aObjectList.Next() ) + for ( size_t i = 0, n = aObjectList.size(); i < n; ++i ) { + GalleryObject* pEntry = aObjectList[ i ]; Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< ULONG >( pEntry ) ) ); delete pEntry; Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< ULONG >( pEntry ) ) ); } + aObjectList.clear(); } // ------------------------------------------------------------------------ @@ -109,7 +112,7 @@ void GalleryTheme::ImplCreateSvDrawStorage() { aSvDrawStorageRef = new SvStorage( FALSE, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), pThm->IsReadOnly() ? STREAM_READ : STREAM_STD_READWRITE ); // #i50423# ReadOnly may not been set though the file can't be written (because of security reasons) - if ( ( aSvDrawStorageRef->GetError() != ERRCODE_NONE ) && !pThm->IsReadOnly() ) + if ( ( aSvDrawStorageRef->GetError() != ERRCODE_NONE ) && !pThm->IsReadOnly() ) aSvDrawStorageRef = new SvStorage( FALSE, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ); } else @@ -118,7 +121,7 @@ void GalleryTheme::ImplCreateSvDrawStorage() // ------------------------------------------------------------------------ -BOOL GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, ULONG nPos, GalleryObject* pExistentEntry ) +BOOL GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry ) { SvStream* pOStm = ::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE ); BOOL bRet = FALSE; @@ -136,7 +139,14 @@ BOOL GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, ULONG nPos, Galler if( !pExistentEntry ) { pEntry = new GalleryObject; - aObjectList.Insert( pEntry, nPos ); + if ( nPos < aObjectList.size() ) + { + GalleryObjectList::iterator it = aObjectList.begin(); + ::std::advance( it, nPos ); + aObjectList.insert( it, pEntry ); + } + else + aObjectList.push_back( pEntry ); } else pEntry = pExistentEntry; @@ -250,14 +260,10 @@ void GalleryTheme::ImplWrite() const GalleryObject* GalleryTheme::ImplGetGalleryObject( const INetURLObject& rURL ) { - GalleryObject* pEntry = aObjectList.First(); - GalleryObject* pFoundEntry = NULL; - - for( ; pEntry && !pFoundEntry; pEntry = aObjectList.Next() ) - if( pEntry->aURL == rURL ) - pFoundEntry = pEntry; - - return pFoundEntry; + for ( size_t i = 0, n = aObjectList.size(); i < n; ++i ) + if ( aObjectList[ i ]->aURL == rURL ) + return aObjectList[ i ]; + return NULL; } // ------------------------------------------------------------------------ @@ -344,9 +350,12 @@ INetURLObject GalleryTheme::ImplCreateUniqueURL( SgaObjKind eObjKind, ULONG nFor bExists = FALSE; - for( GalleryObject* pEntry = aObjectList.First(); pEntry && !bExists; pEntry = aObjectList.Next() ) - if( pEntry->aURL == aNewURL ) + for ( size_t i = 0, n = aObjectList.size(); i < n; ++i ) + if ( aObjectList[ i ]->aURL == aNewURL ) + { bExists = TRUE; + break; + } } else { @@ -393,15 +402,15 @@ void GalleryTheme::ImplBroadcast( ULONG nUpdatePos ) BOOL GalleryTheme::UnlockTheme() { DBG_ASSERT( mnThemeLockCount, "Theme is not locked" ); - + BOOL bRet = FALSE; - + if( mnThemeLockCount ) { --mnThemeLockCount; bRet = TRUE; } - + return bRet; } @@ -423,12 +432,16 @@ BOOL GalleryTheme::InsertObject( const SgaObject& rObj, ULONG nInsertPos ) if( rObj.IsValid() ) { - GalleryObject* pEntry = aObjectList.First(); GalleryObject* pFoundEntry = NULL; - - for( ; pEntry && !pFoundEntry; pEntry = aObjectList.Next() ) - if( pEntry->aURL == rObj.GetURL() ) - pFoundEntry = pEntry; + size_t iFoundPos = 0; + for ( size_t n = aObjectList.size(); iFoundPos < n; ++iFoundPos ) + { + if ( aObjectList[ iFoundPos ]->aURL == rObj.GetURL() ) + { + pFoundEntry = aObjectList[ iFoundPos ]; + break; + } + } if( pFoundEntry ) { @@ -455,7 +468,7 @@ BOOL GalleryTheme::InsertObject( const SgaObject& rObj, ULONG nInsertPos ) ImplWriteSgaObject( rObj, nInsertPos, NULL ); ImplSetModified( bRet = TRUE ); - ImplBroadcast( pFoundEntry ? aObjectList.GetPos( pFoundEntry ) : nInsertPos ); + ImplBroadcast( pFoundEntry ? iFoundPos : nInsertPos ); } return bRet; @@ -463,9 +476,9 @@ BOOL GalleryTheme::InsertObject( const SgaObject& rObj, ULONG nInsertPos ) // ------------------------------------------------------------------------ -SgaObject* GalleryTheme::AcquireObject( ULONG nPos ) +SgaObject* GalleryTheme::AcquireObject( size_t nPos ) { - return ImplReadSgaObject( aObjectList.GetObject( nPos ) ); + return ImplReadSgaObject( aObjectList[ nPos ] ); } // ------------------------------------------------------------------------ @@ -477,11 +490,18 @@ void GalleryTheme::ReleaseObject( SgaObject* pObject ) // ------------------------------------------------------------------------ -BOOL GalleryTheme::RemoveObject( ULONG nPos ) +BOOL GalleryTheme::RemoveObject( size_t nPos ) { - GalleryObject* pEntry = aObjectList.Remove( nPos ); + GalleryObject* pEntry = NULL; + if ( nPos < aObjectList.size() ) + { + GalleryObjectList::iterator it = aObjectList.begin(); + ::std::advance( it, nPos ); + pEntry = *it; + aObjectList.erase( it ); + } - if( !aObjectList.Count() ) + if( aObjectList.empty() ) KillFile( GetSdgURL() ); if( pEntry ) @@ -502,25 +522,28 @@ BOOL GalleryTheme::RemoveObject( ULONG nPos ) // ------------------------------------------------------------------------ -BOOL GalleryTheme::ChangeObjectPos( ULONG nOldPos, ULONG nNewPos ) +BOOL GalleryTheme::ChangeObjectPos( size_t nOldPos, size_t nNewPos ) { BOOL bRet = FALSE; - if( nOldPos != nNewPos ) + if( nOldPos != nNewPos + && nOldPos < aObjectList.size() + ) { - GalleryObject* pEntry = aObjectList.GetObject( nOldPos ); + GalleryObject* pEntry = aObjectList[ nOldPos ]; - if( pEntry ) - { - aObjectList.Insert( pEntry, nNewPos ); + GalleryObjectList::iterator it = aObjectList.begin(); + ::std::advance( it, nNewPos ); + aObjectList.insert( it, pEntry ); - if( nNewPos < nOldPos ) - nOldPos++; + if( nNewPos < nOldPos ) nOldPos++; - aObjectList.Remove( nOldPos ); - ImplSetModified( bRet = TRUE ); - ImplBroadcast( ( nNewPos < nOldPos ) ? nNewPos : ( nNewPos - 1 ) ); - } + it = aObjectList.begin(); + ::std::advance( it, nOldPos ); + aObjectList.erase( it ); + + ImplSetModified( bRet = TRUE ); + ImplBroadcast( ( nNewPos < nOldPos ) ? nNewPos : ( nNewPos - 1 ) ); } return bRet; @@ -535,22 +558,21 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg Graphic aGraphic; String aFormat; GalleryObject* pEntry; - const ULONG nCount = aObjectList.Count(); - ULONG i; + const size_t nCount = aObjectList.size(); LockBroadcaster(); bAbortActualize = FALSE; // LoeschFlag zuruecksetzen - for ( i = 0; i < nCount; i++ ) - aObjectList.GetObject( i )->bDummy = FALSE; + for (size_t i = 0; i < nCount; i++) + aObjectList[ i ]->bDummy = FALSE; - for( i = 0; ( i < nCount ) && !bAbortActualize; i++ ) + for(size_t i = 0; ( i < nCount ) && !bAbortActualize; i++) { if( pProgress ) pProgress->Update( i, nCount - 1 ); - pEntry = aObjectList.GetObject( i ); + pEntry = aObjectList[ i ]; const INetURLObject aURL( pEntry->aURL ); @@ -615,19 +637,19 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg } // remove all entries with set flag - pEntry = aObjectList.First(); - while( pEntry ) + for ( size_t i = 0; i < aObjectList.size(); ) { + pEntry = aObjectList[ i ]; if( pEntry->bDummy ) { Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< ULONG >( pEntry ) ) ); - delete aObjectList.Remove( pEntry ); + GalleryObjectList::iterator it = aObjectList.begin(); + ::std::advance( it, i ); + aObjectList.erase( it ); + delete pEntry; Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< ULONG >( pEntry ) ) ); - - pEntry = aObjectList.GetCurObject(); } - else - pEntry = aObjectList.Next(); + else ++i; } // update theme @@ -643,19 +665,18 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg if( pIStm && pTmpStm ) { - pEntry = aObjectList.First(); - - while( pEntry ) + for ( size_t i = 0, n = aObjectList.size(); i < n; ++i ) { + pEntry = aObjectList[ i ]; SgaObject* pObj; switch( pEntry->eObjKind ) { - case( SGA_OBJ_BMP ): pObj = new SgaObjectBmp(); break; - case( SGA_OBJ_ANIM ): pObj = new SgaObjectAnim(); break; - case( SGA_OBJ_INET ): pObj = new SgaObjectINet(); break; - case( SGA_OBJ_SVDRAW ): pObj = new SgaObjectSvDraw(); break; - case (SGA_OBJ_SOUND): pObj = new SgaObjectSound(); break; + case( SGA_OBJ_BMP ): pObj = new SgaObjectBmp(); break; + case( SGA_OBJ_ANIM ): pObj = new SgaObjectAnim(); break; + case( SGA_OBJ_INET ): pObj = new SgaObjectINet(); break; + case( SGA_OBJ_SVDRAW ): pObj = new SgaObjectSvDraw(); break; + case (SGA_OBJ_SOUND): pObj = new SgaObjectSound(); break; default: pObj = NULL; @@ -670,8 +691,6 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg *pTmpStm << *pObj; delete pObj; } - - pEntry = aObjectList.Next(); } } else @@ -722,7 +741,6 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, BO if( pIStm ) { String aThemeName; - sal_uInt32 nThemeId = 0; sal_uInt16 nVersion; BOOL bThemeNameFromResource = FALSE; @@ -730,6 +748,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, BO if( nVersion <= 0x00ff ) { + sal_uInt32 nThemeId = 0; ByteString aTmpStr; *pIStm >> aTmpStr; aThemeName = String( aTmpStr.GetBuffer(), RTL_TEXTENCODING_UTF8 ); @@ -1004,7 +1023,7 @@ BOOL GalleryTheme::InsertModel( const FmFormModel& rModel, ULONG nInsertPos ) FmFormModel* pFormModel = (FmFormModel*) &rModel; pFormModel->BurnInStyleSheetAttributes(); - + { uno::Reference< io::XOutputStream > xDocOut( new utl::OOutputStreamWrapper( aMemStm ) ); @@ -1180,12 +1199,12 @@ BOOL GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, ULONG ::ucbhelper::Content aCnt( rFileOrDirURL.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment >() ); sal_Bool bFolder = false; - aCnt.getPropertyValue( OUString::createFromAscii( "IsFolder" ) ) >>= bFolder; + aCnt.getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")) ) >>= bFolder; if( bFolder ) { uno::Sequence< OUString > aProps( 1 ); - aProps.getArray()[ 0 ] = OUString::createFromAscii( "Url" ); + aProps.getArray()[ 0 ] = OUString(RTL_CONSTASCII_USTRINGPARAM("Url")); uno::Reference< sdbc::XResultSet > xResultSet( aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY ) ); if( xResultSet.is() ) @@ -1455,14 +1474,14 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) sal_uInt32 nId1, nId2; BOOL bRel; - for( pObj = aObjectList.First(); pObj; pObj = aObjectList.Next() ) + for( size_t i = 0, n = aObjectList.size(); i < n; ++i ) { + pObj = aObjectList[ i ]; Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< ULONG >( pObj ) ) ); delete pObj; Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< ULONG >( pObj ) ) ); } - - aObjectList.Clear(); + aObjectList.clear(); for( sal_uInt32 i = 0; i < nCount; i++ ) { @@ -1526,7 +1545,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) } } - aObjectList.Insert( pObj, LIST_APPEND ); + aObjectList.push_back( pObj ); } rIStm >> nId1 >> nId2; diff --git a/svx/source/gallery2/galtheme.src b/svx/source/gallery2/galtheme.src index 8f84949aad..99de47ab4c 100644 --- a/svx/source/gallery2/galtheme.src +++ b/svx/source/gallery2/galtheme.src @@ -300,42 +300,732 @@ String RID_GALLERYSTR_THEME_DUMMY5 Text = "Dummy 5"; }; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_SHAPES_POLYGONS +{ +Text [ en-US ] = "Shapes - polygons"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_SHAPES_1 +{ +Text [ en-US ] = "Shapes 1"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_SHAPES_2 +{ +Text [ en-US ] = "Shapes 2"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_ANIMALS +{ +Text [ en-US ] = "Animals"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_CARS +{ +Text [ en-US ] = "Cars"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_BUGS +{ +Text [ en-US ] = "Bugs"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_CISCO_OTHER +{ +Text [ en-US ] = "Cisco - Other"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_CISCO_MEDIA +{ +Text [ en-US ] = "Cisco - Media"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_CISCO_PRODUCTS +{ +Text [ en-US ] = "Cisco - Products"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_CISCO_WAN_LAN +{ +Text [ en-US ] = "Cisco - WAN - LAN"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_DOMINO_USUAL +{ +Text [ en-US ] = "Domino - usual"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_DOMINO_NUMBERED +{ +Text [ en-US ] = "Domino - numbered"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_ELECTRONICS_PARTS_1 +{ +Text [ en-US ] = "Electronics - parts 1"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_ELECTRONICS_PARTS_2 +{ +Text [ en-US ] = "Electronics - parts 2"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_ELECTRONICS_PARTS_3 +{ +Text [ en-US ] = "Electronics - parts 3"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_ELECTRONICS_PARTS_4 +{ +Text [ en-US ] = "Electronics - parts 4"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_ELECTRONICS_CIRCUIT +{ +Text [ en-US ] = "Electronics - circuit"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_ELECTRONICS_SIGNS +{ +Text [ en-US ] = "Electronics - signs"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_ELECTRONICS_GAUGES +{ +Text [ en-US ] = "Electronics - gauges"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_PEOPLE_1 +{ +Text [ en-US ] = "People"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_ARCHITECTURE_OVERLAY +{ +Text [ en-US ] = "Architecture - overlay"; +}; +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_ARCHITECTURE_FURNITURES +{ +Text [ en-US ] = "Architecture - furnitures"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_ARCHITECTURE_BUILDINGS +{ +Text [ en-US ] = "Architecture - buildings"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_ARCHITECTURE_BATHROOM_KITCHEN +{ +Text [ en-US ] = "Architecture - bathroom, kitchen"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_ARCHITECTURE_KITCHEN +{ +Text [ en-US ] = "Architecture - kitchen"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_ARCHITECTURE_WINDOWS_DOORS +{ +Text [ en-US ] = "Architecture - windows, doors"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_FLOWCHARTS_1 +{ +Text [ en-US ] = "Flowcharts"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_FLOWCHARTS_2 +{ +Text [ en-US ] = "Flowcharts 2"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_FORALSTUDIOA +{ +Text [ en-US ] = "Foral-StudioA"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_FAUNA +{ +Text [ en-US ] = "Photos - Fauna"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_BUILDINGS +{ +Text [ en-US ] = "Photos - Buildings"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_PLANTS +{ +Text [ en-US ] = "Photos - Plants"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_STATUES +{ +Text [ en-US ] = "Photos - Statues"; +}; +// --------------------------------------------------------------------------- +String RID_GALLERYSTR_THEME_PHOTOS_LANDSCAPES +{ +Text [ en-US ] = "Photos - Landscapes"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_CITIES +{ +Text [ en-US ] = "Photos - Cities"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_FLOWERS +{ +Text [ en-US ] = "Photos - Flowers"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_THERAPEUTICS_GENERAL +{ +Text [ en-US ] = "Therapeutics - general"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_WEATHER +{ +Text [ en-US ] = "Weather"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_VECHILES +{ +Text [ en-US ] = "Vehicles"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_SIGNS +{ +Text [ en-US ] = "Signs"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_BLUE_MAN +{ +Text [ en-US ] = "Blue Man"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CHEMISTRY_AMINO_ACIDS +{ +Text [ en-US ] = "Chemistry - Amino acids"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_LOGICAL_SIGNS +{ +Text [ en-US ] = "Logical signs"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_LOGICAL_GATES +{ +Text [ en-US ] = "Logical gates"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_LOGOS +{ +Text [ en-US ] = "Logos"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_SMILES +{ +Text [ en-US ] = "Smilies"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_ARROWS_1 +{ +Text [ en-US ] = "Arrows"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_01_CLOCK +{ +Text [ en-US ] = "Clock - 01 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_02_CLOCK +{ +Text [ en-US ] = "Clock - 02 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_03_CLOCK +{ +Text [ en-US ] = "Clock - 03 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_04_CLOCK +{ +Text [ en-US ] = "Clock - 04 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_05_CLOCK +{ +Text [ en-US ] = "Clock - 05 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_06_CLOCK +{ +Text [ en-US ] = "Clock - 06 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_07_CLOCK +{ +Text [ en-US ] = "Clock - 07 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_08_CLOCK +{ +Text [ en-US ] = "Clock - 08 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_09_CLOCK +{ +Text [ en-US ] = "Clock - 09 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_10_CLOCK +{ +Text [ en-US ] = "Clock - 10 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_11_CLOCK +{ +Text [ en-US ] = "Clock - 11 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CLOCK_12_CLOCK +{ +Text [ en-US ] = "Clock - 12 clock"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PNEUMATIC_PARTS +{ +Text [ en-US ] = "Pneumatic - parts"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_COMPUTER_GENERAL +{ +Text [ en-US ] = "Computer - general"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_COMPUTER_NETWORK +{ +Text [ en-US ] = "Computer - network"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_COMPUTER_NETWORK_DEVICES +{ +Text [ en-US ] = "Computer - network devices"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_COMPUTER_WIFI +{ +Text [ en-US ] = "Computer - WIFI"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_NUMBERS +{ +Text [ en-US ] = "Numbers"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_SIGNS_DANGER +{ +Text [ en-US ] = "Signs - danger"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_OBJECTS +{ +Text [ en-US ] = "Objects"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_AFRICA +{ +Text [ en-US ] = "Maps - Africa"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_UNITED_STATES_OF_AMERICA +{ +Text [ en-US ] = "Maps - United States of America"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_AUSTRALIA +{ +Text [ en-US ] = "Maps - Australia"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_ASIA +{ +Text [ en-US ] = "Maps - Asia"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_SOUTH_AMERICA +{ +Text [ en-US ] = "Maps - South America"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_EUROPE +{ +Text [ en-US ] = "Maps - Europe"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_EUROPE_1 +{ +Text [ en-US ] = "Maps - Europe 1"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_FRANCE +{ +Text [ en-US ] = "Maps - France"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_FRANCE_COUNTRIES +{ +Text [ en-US ] = "Maps - France - countries"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_SIGNS +{ +Text [ en-US ] = "Maps - signs"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_CANADA +{ +Text [ en-US ] = "Maps - Canada"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_CONTINENTS +{ +Text [ en-US ] = "Maps - Continents"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_MIDDLE_EAST +{ +Text [ en-US ] = "Maps - Middle East"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_MIDDLE_AMERICA +{ +Text [ en-US ] = "Maps - Middle America"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_MIDDLE_AGES +{ +Text [ en-US ] = "Maps - Middle ages"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_MEXICO +{ +Text [ en-US ] = "Maps - Mexico"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_ANCIENT_TIMES +{ +Text [ en-US ] = "Maps - Ancient times"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_SYMBOLS +{ +Text [ en-US ] = "Maps - symbols"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_HISTORY_1900 +{ +Text [ en-US ] = "Maps - history - 1900"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MAPS_WORLD +{ +Text [ en-US ] = "Maps - World"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_CROPS +{ +Text [ en-US ] = "Crops"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_FRACTIONS +{ +Text [ en-US ] = "Fractions"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_FLAGS_1 +{ +Text [ en-US ] = "Flags"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MUSIC_INSTRUMENTS +{ +Text [ en-US ] = "Music - instruments"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_MUSIC_SHEET_MUSIC +{ +Text [ en-US ] = "Music - sheet music"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_SPECIAL_PICTOGRAMM +{ +Text [ en-US ] = "Special Pictogramms"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_CELEBRATION +{ +Text [ en-US ] = "Photos - Celebration"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_FOODSANDDRINKS +{ +Text [ en-US ] = "Photos - Foods and Drinks"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_HUMANS +{ +Text [ en-US ] = "Photos - Humans"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_OBJECTS +{ +Text [ en-US ] = "Photos - Objects"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_SPACE +{ +Text [ en-US ] = "Photos - Space"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_PHOTOS_TRAVEL +{ +Text [ en-US ] = "Photos - Travel"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_OPENOFFICEORG_LOGOS +{ +Text [ en-US ] = "OpenOffice.org logos"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_RELIGION +{ +Text [ en-US ] = "Religion"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_BUILDINGS +{ +Text [ en-US ] = "Buildings"; +}; + +// ---------------------------------------------------------------------------+ + +String RID_GALLERYSTR_THEME_HOMEPAGE2 +{ +Text [ en-US ] = "Homepage 2"; +}; + +// --------------------------------------------------------------------------- + +String RID_GALLERYSTR_THEME_ELEMENTSBULLETS2 +{ +Text [ en-US ] = "Bullets 2"; +}; +// --------------------------------------------------------------------------- diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx index f2a541b0f2..ac6c478ed2 100644 --- a/svx/source/gengal/gengal.cxx +++ b/svx/source/gengal/gengal.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -80,7 +81,7 @@ typedef ::std::list<rtl::OUString> FileNameList; class GalApp : public Application { public: - virtual void Main(); + virtual int Main(); protected: Reference<XMultiServiceFactory> xMSF; @@ -263,23 +264,23 @@ void GalApp::InitUCB() rtl::OUString aEmpty; Sequence< Any > aArgs(6); aArgs[0] - <<= rtl::OUString::createFromAscii(UCB_CONFIGURATION_KEY1_LOCAL); + <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY1_LOCAL)); aArgs[1] - <<= rtl::OUString::createFromAscii(UCB_CONFIGURATION_KEY2_OFFICE); - aArgs[2] <<= rtl::OUString::createFromAscii("PIPE"); + <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY2_OFFICE)); + aArgs[2] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PIPE")); aArgs[3] <<= aEmpty; - aArgs[4] <<= rtl::OUString::createFromAscii("PORTAL"); + aArgs[4] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PORTAL")); aArgs[5] <<= aEmpty; if (! ::ucbhelper::ContentBroker::initialize( xMSF, aArgs ) ) fprintf( stderr, "Failed to init content broker\n" ); } -void GalApp::Main() +int GalApp::Main() { bool bHelp = false; rtl::OUString aPath, aDestDir; - rtl::OUString aName = rtl::OUString::createFromAscii( "Default name" ); + rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("Default name")); UINT32 nNumFrom = 0; FileNameList aFiles; @@ -287,20 +288,20 @@ void GalApp::Main() { rtl::OUString aParam = GetCommandLineParam( i ); - if( aParam.equalsAscii( "--help" ) || - aParam.equalsAscii( "-h" ) ) + if( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--help" ) ) || + aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" ) ) ) bHelp = true; - else if ( aParam.equalsAscii( "--name" ) ) + else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--name" ) ) ) aName = GetCommandLineParam( ++i ); - else if ( aParam.equalsAscii( "--path" ) ) + else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--path" ) ) ) aPath = Smartify( GetCommandLineParam( ++i ) ); - else if ( aParam.equalsAscii( "--destdir" ) ) + else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--destdir" ) ) ) aDestDir = GetCommandLineParam( ++i ); - else if ( aParam.equalsAscii( "--number-from" ) ) + else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--number-from" ) ) ) nNumFrom = GetCommandLineParam( ++i ).ToInt32(); else @@ -310,10 +311,13 @@ void GalApp::Main() if( bHelp ) { PrintHelp(); - return; + return EXIT_SUCCESS; } createTheme( aName, aPath, aDestDir, nNumFrom, aFiles ); + return EXIT_SUCCESS; } GalApp aGalApp; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/AccessibleFrameSelector.hxx b/svx/source/inc/AccessibleFrameSelector.hxx index f578e5de18..437a261f8f 100644 --- a/svx/source/inc/AccessibleFrameSelector.hxx +++ b/svx/source/inc/AccessibleFrameSelector.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -147,3 +148,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/DGColorNameLookUp.hxx b/svx/source/inc/DGColorNameLookUp.hxx index 4f2b3cd392..808e51f5a1 100644 --- a/svx/source/inc/DGColorNameLookUp.hxx +++ b/svx/source/inc/DGColorNameLookUp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,3 +98,5 @@ private: } // end of namespace accessibility #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx index fb92cb45f7..4512b3b0db 100644 --- a/svx/source/inc/GraphCtlAccessibleContext.hxx +++ b/svx/source/inc/GraphCtlAccessibleContext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,17 +30,13 @@ #ifndef _SVXGRAPHACCESSIBLECONTEXT_HXX #define _SVXGRAPHACCESSIBLECONTEXT_HXX -#ifndef _CPPUHELPER_IMPLBASE7_HXX_ #include <cppuhelper/compbase7.hxx> -#endif #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/accessibility/XAccessible.hpp> #include <com/sun/star/accessibility/XAccessibleComponent.hpp> #include <com/sun/star/accessibility/XAccessibleContext.hpp> #include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp> -#ifndef _COM_SUN_STAR_ACCESSIBILITY_IllegalAccessibleComponentStateException_HPP_ #include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp> -#endif #include <com/sun/star/accessibility/XAccessibleSelection.hpp> #include <com/sun/star/beans/XPropertyChangeListener.hpp> #include <cppuhelper/weak.hxx> @@ -47,7 +44,7 @@ #include <com/sun/star/lang/XTypeProvider.hpp> #include <com/sun/star/lang/XServiceName.hpp> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <comphelper/broadcasthelper.hxx> #include <svl/lstner.hxx> @@ -279,3 +276,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx index a32993e907..89ae259237 100644 --- a/svx/source/inc/charmapacc.hxx +++ b/svx/source/inc/charmapacc.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -25,13 +26,11 @@ * ************************************************************************/ -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <tools/list.hxx> #include <tools/color.hxx> #include <tools/string.hxx> -#ifndef _IMAGE_HXX #include <vcl/image.hxx> -#endif #include <rtl/uuid.h> #include <comphelper/accessibleselectionhelper.hxx> #include <com/sun/star/accessibility/XAccessibleTable.hpp> @@ -276,3 +275,4 @@ namespace svx } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/clonelist.hxx b/svx/source/inc/clonelist.hxx index 7b9a8902a3..f252200345 100644 --- a/svx/source/inc/clonelist.hxx +++ b/svx/source/inc/clonelist.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,3 +56,5 @@ public: }; #endif // _CLONELIST_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/datalistener.hxx b/svx/source/inc/datalistener.hxx index 3c8b5d24a7..b41427489d 100644 --- a/svx/source/inc/datalistener.hxx +++ b/svx/source/inc/datalistener.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -77,3 +78,4 @@ namespace svxform #endif // #ifndef _SVX_DATALISTENER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/datanavi.hrc b/svx/source/inc/datanavi.hrc index fac792e7d1..7559eff63a 100644 --- a/svx/source/inc/datanavi.hrc +++ b/svx/source/inc/datanavi.hrc @@ -38,17 +38,20 @@ // Controls #define TB_ITEMS 10 #define LB_ITEMS 11 + // Menu items #define MID_INSERT_CONTROL 100 + // ToolBox items #define TBI_ITEM_ADD 10 #define TBI_ITEM_ADD_ELEMENT 11 #define TBI_ITEM_ADD_ATTRIBUTE 12 #define TBI_ITEM_EDIT 13 #define TBI_ITEM_REMOVE 14 + // ImageLists #define IL_TBX_BMPS 20 -#define IL_TBX_BMPS_HC 21 + // ImageIndexes #define IID_ITEM_ADD 1 #define IID_ITEM_ADD_ELEMENT 2 @@ -62,6 +65,7 @@ #define MB_MODELS 11 #define TC_ITEMS 12 #define MB_INSTANCES 13 + // MenuItems #define MID_MODELS_ADD 10 #define MID_MODELS_EDIT 11 @@ -70,13 +74,15 @@ #define MID_INSTANCES_EDIT 21 #define MID_INSTANCES_REMOVE 22 #define MID_SHOW_DETAILS 30 + // TabPage Ids #define TID_SUBMISSION 10 #define TID_BINDINGS 11 #define TID_INSTANCE 12 + // ImageLists #define IL_ITEM_BMPS 30 -#define IL_ITEM_BMPS_HC 31 + // ImageIndexes #define IID_GROUP_CLOSED 1 #define IID_GROUP_OPEN 2 diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx index aa285ee039..3f5b91e630 100644 --- a/svx/source/inc/datanavi.hxx +++ b/svx/source/inc/datanavi.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -151,7 +152,6 @@ namespace svxform bool m_bHasModel; DataGroupType m_eGroup; ImageList m_TbxImageList; - ImageList m_TbxHCImageList; // these strings are not valid on the Submission and Binding Page // mb: furthermore these are properties of an instance, thus // it would be much better to get/set them through the UIHelper @@ -233,7 +233,6 @@ namespace svxform Size m_a2Size; Size m_a3Size; ImageList m_aItemImageList; - ImageList m_aItemHCImageList; PageList m_aPageList; ContainerList m_aContainerList; EventTargetList m_aEventTargetList; @@ -273,7 +272,6 @@ namespace svxform void RemoveBroadcaster(); inline const ImageList& GetItemImageList() const { return m_aItemImageList; } - inline const ImageList& GetItemHCImageList() const { return m_aItemHCImageList; } inline bool IsShowDetails() const { return m_bShowDetails; } inline void DisableNotify( bool _bDisable ) { m_bIsNotifyDisabled = _bDisable; } }; @@ -599,3 +597,4 @@ namespace svxform #endif // _SVX_DATANAVI_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/delayedevent.hxx b/svx/source/inc/delayedevent.hxx index e01e44a326..8f85a52087 100644 --- a/svx/source/inc/delayedevent.hxx +++ b/svx/source/inc/delayedevent.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -85,3 +86,5 @@ namespace svxform //........................................................................ #endif // SVX_DELAYEDLINK_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx index da91352adc..214752a19c 100644 --- a/svx/source/inc/docrecovery.hxx +++ b/svx/source/inc/docrecovery.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,13 +30,9 @@ #define _SVX_DOCRECOVERY_HXX #include <vcl/tabpage.hxx> -#ifndef _SV_TABDIALOG_HXX #include <vcl/tabdlg.hxx> -#endif #include <vcl/dialog.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/fixed.hxx> #include <svtools/svmedit2.hxx> #include <svtools/svtreebx.hxx> @@ -51,47 +48,47 @@ //=============================================== // const -#define RECOVERY_CMDPART_PROTOCOL ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:") - -#define RECOVERY_CMDPART_DO_PREPARE_EMERGENCY_SAVE ::rtl::OUString::createFromAscii("/doPrepareEmergencySave" ) -#define RECOVERY_CMDPART_DO_EMERGENCY_SAVE ::rtl::OUString::createFromAscii("/doEmergencySave" ) -#define RECOVERY_CMDPART_DO_RECOVERY ::rtl::OUString::createFromAscii("/doAutoRecovery" ) -#define RECOVERY_CMDPART_DO_CRASHREPORT ::rtl::OUString::createFromAscii("/doCrashReport" ) -#define RECOVERY_CMDPART_DO_ENTRY_BACKUP ::rtl::OUString::createFromAscii("/doEntryBackup" ) -#define RECOVERY_CMDPART_DO_ENTRY_CLEANUP ::rtl::OUString::createFromAscii("/doEntryCleanUp" ) - -#define RECOVERY_CMD_DO_PREPARE_EMERGENCY_SAVE ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:/doPrepareEmergencySave") -#define RECOVERY_CMD_DO_EMERGENCY_SAVE ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:/doEmergencySave" ) -#define RECOVERY_CMD_DO_RECOVERY ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:/doAutoRecovery" ) -#define RECOVERY_CMD_DO_CRASHREPORT ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:/doCrashReport" ) -#define RECOVERY_CMD_DO_ENTRY_BACKUP ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:/doEntryBackup" ) -#define RECOVERY_CMD_DO_ENTRY_CLEANUP ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:/doEntryCleanUp" ) - -#define SERVICENAME_PROGRESSFACTORY ::rtl::OUString::createFromAscii("com.sun.star.task.StatusIndicatorFactory") -#define SERVICENAME_URLTRANSFORMER ::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" ) -#define SERVICENAME_RECOVERYCORE ::rtl::OUString::createFromAscii("com.sun.star.frame.AutoRecovery" ) -#define SERVICENAME_FOLDERPICKER ::rtl::OUString::createFromAscii("com.sun.star.ui.dialogs.FolderPicker" ) -#define SERVICENAME_DESKTOP ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop" ) - -#define PROP_PARENTWINDOW ::rtl::OUString::createFromAscii("Window" ) -#define PROP_STATUSINDICATOR ::rtl::OUString::createFromAscii("StatusIndicator" ) -#define PROP_DISPATCHASYNCHRON ::rtl::OUString::createFromAscii("DispatchAsynchron") -#define PROP_SAVEPATH ::rtl::OUString::createFromAscii("SavePath" ) -#define PROP_ENTRYID ::rtl::OUString::createFromAscii("EntryID" ) -#define PROP_ALLOWPARENTSHOW ::rtl::OUString::createFromAscii("AllowParentShow" ) - -#define STATEPROP_ID ::rtl::OUString::createFromAscii("ID" ) -#define STATEPROP_STATE ::rtl::OUString::createFromAscii("DocumentState") -#define STATEPROP_ORGURL ::rtl::OUString::createFromAscii("OriginalURL" ) -#define STATEPROP_TEMPURL ::rtl::OUString::createFromAscii("TempURL" ) -#define STATEPROP_FACTORYURL ::rtl::OUString::createFromAscii("FactoryURL" ) -#define STATEPROP_TEMPLATEURL ::rtl::OUString::createFromAscii("TemplateURL" ) -#define STATEPROP_TITLE ::rtl::OUString::createFromAscii("Title" ) -#define STATEPROP_MODULE ::rtl::OUString::createFromAscii("Module" ) - -#define RECOVERY_OPERATIONSTATE_START ::rtl::OUString::createFromAscii("start" ) -#define RECOVERY_OPERATIONSTATE_STOP ::rtl::OUString::createFromAscii("stop" ) -#define RECOVERY_OPERATIONSTATE_UPDATE ::rtl::OUString::createFromAscii("update") +#define RECOVERY_CMDPART_PROTOCOL rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.autorecovery:")) + +#define RECOVERY_CMDPART_DO_PREPARE_EMERGENCY_SAVE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/doPrepareEmergencySave" )) +#define RECOVERY_CMDPART_DO_EMERGENCY_SAVE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/doEmergencySave" )) +#define RECOVERY_CMDPART_DO_RECOVERY rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/doAutoRecovery" )) +#define RECOVERY_CMDPART_DO_CRASHREPORT rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/doCrashReport" )) +#define RECOVERY_CMDPART_DO_ENTRY_BACKUP rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/doEntryBackup" )) +#define RECOVERY_CMDPART_DO_ENTRY_CLEANUP rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/doEntryCleanUp" )) + +#define RECOVERY_CMD_DO_PREPARE_EMERGENCY_SAVE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.autorecovery:/doPrepareEmergencySave")) +#define RECOVERY_CMD_DO_EMERGENCY_SAVE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.autorecovery:/doEmergencySave" )) +#define RECOVERY_CMD_DO_RECOVERY rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.autorecovery:/doAutoRecovery" )) +#define RECOVERY_CMD_DO_CRASHREPORT rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.autorecovery:/doCrashReport" )) +#define RECOVERY_CMD_DO_ENTRY_BACKUP rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.autorecovery:/doEntryBackup" )) +#define RECOVERY_CMD_DO_ENTRY_CLEANUP rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.autorecovery:/doEntryCleanUp" )) + +#define SERVICENAME_PROGRESSFACTORY rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.StatusIndicatorFactory")) +#define SERVICENAME_URLTRANSFORMER rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" )) +#define SERVICENAME_RECOVERYCORE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.AutoRecovery" )) +#define SERVICENAME_FOLDERPICKER rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" )) +#define SERVICENAME_DESKTOP rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) + +#define PROP_PARENTWINDOW rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Window" )) +#define PROP_STATUSINDICATOR rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "StatusIndicator" )) +#define PROP_DISPATCHASYNCHRON rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DispatchAsynchron")) +#define PROP_SAVEPATH rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SavePath" )) +#define PROP_ENTRYID rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "EntryID" )) +#define PROP_ALLOWPARENTSHOW rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "AllowParentShow" )) + +#define STATEPROP_ID rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ID" )) +#define STATEPROP_STATE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "DocumentState")) +#define STATEPROP_ORGURL rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OriginalURL" )) +#define STATEPROP_TEMPURL rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TempURL" )) +#define STATEPROP_FACTORYURL rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FactoryURL" )) +#define STATEPROP_TEMPLATEURL rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "TemplateURL" )) +#define STATEPROP_TITLE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" )) +#define STATEPROP_MODULE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Module" )) + +#define RECOVERY_OPERATIONSTATE_START rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "start" )) +#define RECOVERY_OPERATIONSTATE_STOP rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "stop" )) +#define RECOVERY_OPERATIONSTATE_UPDATE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "update")) #define DLG_RET_UNKNOWN -1 #define DLG_RET_OK 1 @@ -184,9 +181,6 @@ struct TURLInfo /// standard icon Image StandardImage; - /// high contrast icon - Image HCImage; - public: TURLInfo() @@ -612,9 +606,6 @@ class RecovDocList : public SvxSimpleTable Image m_aGreenCheckImg; Image m_aYellowCheckImg; Image m_aRedCrossImg; - Image m_aGreenCheckImgHC; - Image m_aYellowCheckImgHC; - Image m_aRedCrossImgHC; String m_aSuccessRecovStr; String m_aOrigDocRecovStr; @@ -971,3 +962,5 @@ class BrokenRecoveryDialog : public ModalDialog #undef css #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx index f069f2f797..8e53093354 100644 --- a/svx/source/inc/filtnav.hxx +++ b/svx/source/inc/filtnav.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -370,3 +371,4 @@ public: #endif // _SVX_FILTNAV_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmPropBrw.hxx b/svx/source/inc/fmPropBrw.hxx index 78b394f53e..b4765a799a 100644 --- a/svx/source/inc/fmPropBrw.hxx +++ b/svx/source/inc/fmPropBrw.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -122,3 +123,5 @@ private: void impl_createPropertyBrowser_throw( FmFormShell* _pFormShell ); }; #endif //SVX_FMPROPBRW_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmcontrolbordermanager.hxx b/svx/source/inc/fmcontrolbordermanager.hxx index 6f199fe715..3eddf6ce3f 100644 --- a/svx/source/inc/fmcontrolbordermanager.hxx +++ b/svx/source/inc/fmcontrolbordermanager.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -266,3 +267,5 @@ namespace svxform //........................................................................ #endif // SVX_SOURCE_INC_FMCONTROLBORDERMANAGER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmcontrollayout.hxx b/svx/source/inc/fmcontrollayout.hxx index 16ebaa7273..16000cfd33 100644 --- a/svx/source/inc/fmcontrollayout.hxx +++ b/svx/source/inc/fmcontrollayout.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,9 +33,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> /** === end UNO includes === **/ -#ifndef SVX_SOURCE_FORM_FMDOCUMENTCLASSIFICATION_HXX #include "fmdocumentclassification.hxx" -#endif #include <unotools/confignode.hxx> //........................................................................ @@ -91,3 +90,4 @@ namespace svxform #endif // SVX_SOURCE_INC_FMCONTROLLAYOUT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmdocumentclassification.hxx b/svx/source/inc/fmdocumentclassification.hxx index 5b649e7a1c..f6f528b687 100644 --- a/svx/source/inc/fmdocumentclassification.hxx +++ b/svx/source/inc/fmdocumentclassification.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -85,3 +86,4 @@ namespace svxform #endif // SVX_SOURCE_INC_FMDOCUMENTCLASSIFICATION_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx index 5cc486f304..b44293a59b 100644 --- a/svx/source/inc/fmexch.hxx +++ b/svx/source/inc/fmexch.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -281,3 +282,4 @@ namespace svxform #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx index ac87b4e38e..9e8ff4f1c4 100644 --- a/svx/source/inc/fmexpl.hxx +++ b/svx/source/inc/fmexpl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -156,7 +157,6 @@ private: protected: Image m_aNormalImage; - Image m_aHCImage; ::rtl::OUString aText; FmEntryDataList* pChildList; @@ -177,7 +177,6 @@ public: void SetParent( FmEntryData* pParentData ){ pParent = pParentData; } const Image& GetNormalImage() const { return m_aNormalImage; } - const Image& GetHCImage() const { return m_aHCImage; } ::rtl::OUString GetText() const { return aText; } FmEntryData* GetParent() const { return pParent; } @@ -205,13 +204,24 @@ public: }; //======================================================================== -DECLARE_LIST( FmEntryDataBaseList, FmEntryData* ) +typedef ::std::vector< FmEntryData* > FmEntryDataBaseList; -class FmEntryDataList : public FmEntryDataBaseList +class FmEntryDataList { +private: + FmEntryDataBaseList maEntryDataList; + public: FmEntryDataList(); virtual ~FmEntryDataList(); + + FmEntryData* at( size_t Index ) + { return ( Index < maEntryDataList.size() ) ? maEntryDataList[ Index ] : NULL; } + + size_t size() const { return maEntryDataList.size(); } + FmEntryData* remove( FmEntryData* pItem ); + void insert( FmEntryData* pItem, size_t Index ); + void clear(); }; //======================================================================== @@ -248,7 +258,6 @@ public: FmFormData( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& _rxForm, const ImageList& _rNormalImages, - const ImageList& _rHCImages, FmFormData* _pParent = NULL ); @@ -283,7 +292,6 @@ public: FmControlData( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& _rxComponent, const ImageList& _rNormalImages, - const ImageList& _rHCImages, FmFormData* _pParent ); FmControlData( const FmControlData& rControlData ); @@ -295,8 +303,7 @@ public: void ModelReplaced( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent >& _rxNew, - const ImageList& _rNormalImages, - const ImageList& _rHCImages + const ImageList& _rNormalImages ); }; @@ -361,7 +368,6 @@ namespace svxform OFormComponentObserver* m_pPropChangeList; ImageList m_aNormalImages; - ImageList m_aHCImages; void UpdateContent( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xForms ); FmControlData* CreateControlData( ::com::sun::star::form::XFormComponent* pFormComponent ); @@ -383,7 +389,7 @@ namespace svxform // Rueckgabe sal_True, wenn das Objekt eine FormComponent ist (oder rekursiv nur aus solchen besteht) public: - NavigatorTreeModel( const ImageList& _rNormalImages, const ImageList& _rHCImages ); + NavigatorTreeModel( const ImageList& _rNormalImages ); virtual ~NavigatorTreeModel(); void FillBranch( FmFormData* pParentData ); @@ -431,7 +437,6 @@ namespace svxform ListBoxEntrySet m_aCutEntries; // die Images, die ich brauche (und an FormDatas und EntryDatas weiterreiche) ImageList m_aNavigatorImages; - ImageList m_aNavigatorImagesHC; ::svxform::OControlExchangeHelper m_aControlExchange; @@ -450,7 +455,7 @@ namespace svxform sal_uInt16 m_nFormsSelected; sal_uInt16 m_nControlsSelected; sal_uInt16 m_nHiddenControls; // (die Zahl geht in m_nControlsSelected mit ein) - + unsigned short m_aTimerCounter; sal_Bool m_bDragDataDirty : 1; // dito @@ -610,3 +615,4 @@ namespace svxform #endif // _SVX_FMEXPL_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmitems.hxx b/svx/source/inc/fmitems.hxx index 49cfabfac9..350a39a043 100644 --- a/svx/source/inc/fmitems.hxx +++ b/svx/source/inc/fmitems.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,4 @@ inline FmInterfaceItem& FmInterfaceItem::operator=( const FmInterfaceItem &rCpy #endif // _SVX_FMITEMS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx index 881be1abb6..3febbb2c1f 100644 --- a/svx/source/inc/fmobj.hxx +++ b/svx/source/inc/fmobj.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,7 +112,7 @@ public: virtual void SetUnoControlModel( const ::com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >& _rxModel ); protected: - virtual FASTBOOL EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd ); + virtual bool EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd ); virtual void BrkCreate( SdrDragStat& rStat ); // #i70852# overload Layer interface to force to FormColtrol layer @@ -132,3 +133,4 @@ private: #endif // _FM_FMOBJ_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmpgeimp.hxx b/svx/source/inc/fmpgeimp.hxx index 8ff091e420..640f967003 100644 --- a/svx/source/inc/fmpgeimp.hxx +++ b/svx/source/inc/fmpgeimp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -168,3 +169,4 @@ private: #endif // _SVX_FMUNOPGE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmscriptingenv.hxx b/svx/source/inc/fmscriptingenv.hxx index be33c6e278..52f5e3cc97 100644 --- a/svx/source/inc/fmscriptingenv.hxx +++ b/svx/source/inc/fmscriptingenv.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,3 +98,4 @@ namespace svxform #endif // SVX_FMSCRIPTINGENV_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmservs.hxx b/svx/source/inc/fmservs.hxx index 6c1136a405..3dd289aeac 100644 --- a/svx/source/inc/fmservs.hxx +++ b/svx/source/inc/fmservs.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,3 +89,4 @@ namespace svxform #endif // _SVX_FMSERVS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index 28f951512c..4b94908fd9 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,7 +52,6 @@ #include <sfx2/app.hxx> #include <svx/svdmark.hxx> #include <svx/fmsearch.hxx> -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> #endif #include <svl/svarray.hxx> @@ -606,3 +606,5 @@ public: }; #endif // _SVX_FMSHIMP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmslotinvalidator.hxx b/svx/source/inc/fmslotinvalidator.hxx index 33ce626877..8c6a3e2682 100644 --- a/svx/source/inc/fmslotinvalidator.hxx +++ b/svx/source/inc/fmslotinvalidator.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,4 @@ namespace svx #endif // SVX_SOURCE_INC_FMSLOTINVALIDATOR_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmtextcontroldialogs.hxx b/svx/source/inc/fmtextcontroldialogs.hxx index d1ba826688..56ffb7526b 100644 --- a/svx/source/inc/fmtextcontroldialogs.hxx +++ b/svx/source/inc/fmtextcontroldialogs.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -68,3 +69,4 @@ namespace svx #endif // SVX_SOURCE_FORM_FMTEXTCONTROLDIALOGS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmtextcontrolfeature.hxx b/svx/source/inc/fmtextcontrolfeature.hxx index 896992cd47..932c40f83a 100644 --- a/svx/source/inc/fmtextcontrolfeature.hxx +++ b/svx/source/inc/fmtextcontrolfeature.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,4 @@ namespace svx #endif // SVX_SOURCE_INC_FMTEXTCONTROLFEATURE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmtextcontrolshell.hxx b/svx/source/inc/fmtextcontrolshell.hxx index ced974a61c..c65a8f4baf 100644 --- a/svx/source/inc/fmtextcontrolshell.hxx +++ b/svx/source/inc/fmtextcontrolshell.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -222,3 +223,4 @@ namespace svx #endif // SVX_SOURCE_INC_FMTEXTCONTROLSHELL_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmundo.hxx b/svx/source/inc/fmundo.hxx index 558e0bf42c..6967fe4424 100644 --- a/svx/source/inc/fmundo.hxx +++ b/svx/source/inc/fmundo.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -228,3 +229,4 @@ public: #endif //_SVX_FMUNDO_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmurl.hxx b/svx/source/inc/fmurl.hxx index 8a30df131a..2b8a686f1e 100644 --- a/svx/source/inc/fmurl.hxx +++ b/svx/source/inc/fmurl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,3 +59,5 @@ #define FMARG_ADDCOL_COLUMNPOS rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnPosition" ) ) #endif // _SVX_FMURL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/fmvwimp.hxx b/svx/source/inc/fmvwimp.hxx index 634cd17b05..b2813ed043 100644 --- a/svx/source/inc/fmvwimp.hxx +++ b/svx/source/inc/fmvwimp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -314,3 +315,4 @@ private: #endif // _SVX_FMVWIMP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/formcontrolfactory.hxx b/svx/source/inc/formcontrolfactory.hxx index 237297ad41..2b3a5796c3 100644 --- a/svx/source/inc/formcontrolfactory.hxx +++ b/svx/source/inc/formcontrolfactory.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -117,3 +118,5 @@ namespace svxform //........................................................................ #endif // SVX_FORMCONTROLMANAGER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/formcontrolling.hxx b/svx/source/inc/formcontrolling.hxx index a3b143e690..f334e30169 100644 --- a/svx/source/inc/formcontrolling.hxx +++ b/svx/source/inc/formcontrolling.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -306,3 +307,5 @@ namespace svx //........................................................................ #endif // SVX_FORMCONTROLLING_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/formfeaturedispatcher.hxx b/svx/source/inc/formfeaturedispatcher.hxx index c6b6d0e3b0..a042924fdf 100644 --- a/svx/source/inc/formfeaturedispatcher.hxx +++ b/svx/source/inc/formfeaturedispatcher.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -155,3 +156,5 @@ namespace svx //........................................................................ #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/formtoolbars.hxx b/svx/source/inc/formtoolbars.hxx index 030d5cf1ab..29900e4d1d 100644 --- a/svx/source/inc/formtoolbars.hxx +++ b/svx/source/inc/formtoolbars.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,3 +89,4 @@ namespace svxform #endif // SVX_SOURCE_INC_FORMTOOLBARS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/frmselimpl.hxx b/svx/source/inc/frmselimpl.hxx index 022842b293..f804560a21 100644 --- a/svx/source/inc/frmselimpl.hxx +++ b/svx/source/inc/frmselimpl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -303,3 +304,4 @@ typedef FrameBorderIterBase< FrameBorderPtrVec, FrameBorderPtrVec::iterator, Fra #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx index 31bd37114c..1f7fad2cc4 100644 --- a/svx/source/inc/gridcell.hxx +++ b/svx/source/inc/gridcell.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1154,3 +1155,4 @@ protected: #endif // _SVX_GRIDCELL_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/gridcols.hxx b/svx/source/inc/gridcols.hxx index ee8e4af826..4eafd5d0b4 100644 --- a/svx/source/inc/gridcols.hxx +++ b/svx/source/inc/gridcols.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60,3 +61,4 @@ sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName); #endif // _SVX_GRIDCOLS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/recoveryui.hxx b/svx/source/inc/recoveryui.hxx index 788419e824..64a9afa28a 100644 --- a/svx/source/inc/recoveryui.hxx +++ b/svx/source/inc/recoveryui.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -153,3 +154,5 @@ class RecoveryUI : public ::cppu::WeakImplHelper2< css::lang::XServiceInfo } // namespace svx #endif // _RECOVERYUI_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/sdbdatacolumn.hxx b/svx/source/inc/sdbdatacolumn.hxx index 1f41246b8b..1f12fc3e42 100644 --- a/svx/source/inc/sdbdatacolumn.hxx +++ b/svx/source/inc/sdbdatacolumn.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -138,3 +139,5 @@ namespace svxform //.............................................................................. } // namespace svxform //.............................................................................. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/sqlparserclient.hxx b/svx/source/inc/sqlparserclient.hxx index 1567530f90..41027e998d 100644 --- a/svx/source/inc/sqlparserclient.hxx +++ b/svx/source/inc/sqlparserclient.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,7 +45,7 @@ namespace svxform ,public ::svxform::OParseContextClient { private: - //add by BerryJia for fixing Bug97420 Time:2002-9-12-11:00(PRC time) + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB; protected: @@ -77,3 +78,4 @@ namespace svxform #endif // SVX_SQLPARSERCLIENT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/stringlistresource.hxx b/svx/source/inc/stringlistresource.hxx index 92e8b8114a..74bc17ab9f 100644 --- a/svx/source/inc/stringlistresource.hxx +++ b/svx/source/inc/stringlistresource.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -84,3 +85,5 @@ namespace svx //........................................................................ #endif // SVX_STRINGLISTRESOURCE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/svdoimp.hxx b/svx/source/inc/svdoimp.hxx index f95cb0c465..e150db6e5b 100644 --- a/svx/source/inc/svdoimp.hxx +++ b/svx/source/inc/svdoimp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,7 +41,7 @@ //#include <svx/xenum.hxx> //#include <basegfx/vector/b2dvector.hxx> #include <svx/rectenum.hxx> -//#include <basegfx/polygon/b2dpolypolygon.hxx> + class Bitmap; @@ -109,3 +110,5 @@ void ImpCalcBmpFillSizes( Size& rStartOffset, #endif // _SVX_SVDOIMP_HXX // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/svdoutlinercache.hxx b/svx/source/inc/svdoutlinercache.hxx index 9c978ffdf2..bfa824b902 100644 --- a/svx/source/inc/svdoutlinercache.hxx +++ b/svx/source/inc/svdoutlinercache.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,3 +53,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx index 69691dc653..835967b081 100644 --- a/svx/source/inc/svxrectctaccessiblecontext.hxx +++ b/svx/source/inc/svxrectctaccessiblecontext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,12 +45,9 @@ #include <com/sun/star/lang/XServiceName.hpp> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <com/sun/star/lang/DisposedException.hpp> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <cppuhelper/interfacecontainer.h> #include <cppuhelper/compbase6.hxx> -//#ifndef _CPPUHELPER_COMPBASE7_HXX_ -//#include <cppuhelper/compbase7.hxx> -//#endif #include <comphelper/broadcasthelper.hxx> #include <cppuhelper/implbase6.hxx> #include <comphelper/servicehelper.hxx> @@ -564,3 +562,5 @@ inline sal_Bool SvxRectCtlChildAccessibleContext::IsNotAlive( void ) const #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/tabwin.hxx b/svx/source/inc/tabwin.hxx index 6e03cbaca5..e086854d14 100644 --- a/svx/source/inc/tabwin.hxx +++ b/svx/source/inc/tabwin.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -139,3 +140,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/tbxform.hxx b/svx/source/inc/tbxform.hxx index 849981fefb..1935fcb366 100644 --- a/svx/source/inc/tbxform.hxx +++ b/svx/source/inc/tbxform.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include <vcl/field.hxx> #include <vcl/dialog.hxx> -#ifndef _SV_BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif //======================================================================== class SvxFmAbsRecWin : public NumericField @@ -164,3 +163,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/trace.hxx b/svx/source/inc/trace.hxx index c33cf02a2b..52991b4247 100644 --- a/svx/source/inc/trace.hxx +++ b/svx/source/inc/trace.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,8 +31,8 @@ #if defined(DBG_UTIL) #include <tools/string.hxx> -#include <vos/thread.hxx> -#include <vos/mutex.hxx> +#include <osl/thread.hxx> +#include <osl/mutex.hxx> #include <comphelper/stl_types.hxx> @@ -39,10 +40,10 @@ class Tracer { ByteString m_sBlockDescription; - DECLARE_STL_STDKEY_MAP( ::vos::OThread::TThreadIdentifier, sal_Int32, MapThreadId2Int ); + DECLARE_STL_STDKEY_MAP( ::oslThreadIdentifier, sal_Int32, MapThreadId2Int ); static MapThreadId2Int s_aThreadIndents; - static ::vos::OMutex s_aMapSafety; + static ::osl::Mutex s_aMapSafety; public: Tracer(const char* _pBlockDescription); @@ -66,3 +67,5 @@ public: #endif #endif // _TRACE_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/treevisitor.hxx b/svx/source/inc/treevisitor.hxx index 55aef2d9c3..11b10d505a 100644 --- a/svx/source/inc/treevisitor.hxx +++ b/svx/source/inc/treevisitor.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -107,3 +108,5 @@ bool TreeVisitor< ELEMENT, NODEINFO, PROCESSOR >::do_step() } #endif // SVX_TREE_VISITOR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/typeconversionclient.hxx b/svx/source/inc/typeconversionclient.hxx index 39439ba113..625ceaac7a 100644 --- a/svx/source/inc/typeconversionclient.hxx +++ b/svx/source/inc/typeconversionclient.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -91,3 +92,4 @@ namespace svxform #endif // SVX_TYPECONVERSION_CLIENT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/unogalthemeprovider.hxx b/svx/source/inc/unogalthemeprovider.hxx index 259ba08c54..d4764f06c6 100644 --- a/svx/source/inc/unogalthemeprovider.hxx +++ b/svx/source/inc/unogalthemeprovider.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,5 @@ private: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/unopolyhelper.hxx b/svx/source/inc/unopolyhelper.hxx index 8d474e8b49..c682f34f00 100644 --- a/svx/source/inc/unopolyhelper.hxx +++ b/svx/source/inc/unopolyhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,4 @@ SVX_DLLPUBLIC void SvxConvertB2DPolyPolygonToPolyPolygonBezier( const basegfx::B #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/xfm_addcondition.hxx b/svx/source/inc/xfm_addcondition.hxx index f6328082a3..36ec1896e8 100644 --- a/svx/source/inc/xfm_addcondition.hxx +++ b/svx/source/inc/xfm_addcondition.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -90,3 +91,4 @@ namespace svxform #endif // SVX_SOURCE_INC_XFM_ADDCONDITION_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/xmlxtexp.hxx b/svx/source/inc/xmlxtexp.hxx index bd621ac05f..ac190aaaba 100644 --- a/svx/source/inc/xmlxtexp.hxx +++ b/svx/source/inc/xmlxtexp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -68,3 +69,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/inc/xmlxtimp.hxx b/svx/source/inc/xmlxtimp.hxx index 76e4a8870a..c10985fabc 100644 --- a/svx/source/inc/xmlxtimp.hxx +++ b/svx/source/inc/xmlxtimp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,3 +63,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/intro/intro_tmpl.hrc b/svx/source/intro/intro_tmpl.hrc index 825b28a689..d789935427 100644 --- a/svx/source/intro/intro_tmpl.hrc +++ b/svx/source/intro/intro_tmpl.hrc @@ -28,7 +28,6 @@ #include <svx/svxids.hrc> #define RID_IMGLIST_TREEOPT (RID_OFA_START + 174) -#define RID_IMGLIST_TREEOPT_HC (RID_OFA_START + 175) #define OOO_CONTRIBUTOR_LIST \ ItemList = \ diff --git a/svx/source/intro/iso.src b/svx/source/intro/iso.src index 46585a7eb5..55e1945ba7 100644 --- a/svx/source/intro/iso.src +++ b/svx/source/intro/iso.src @@ -131,12 +131,6 @@ ImageList RID_IMGLIST_TREEOPT MASK_COL IMGLST_IDLST }; -ImageList RID_IMGLIST_TREEOPT_HC -{ - Prefix = "trh"; - MASK_COL - IMGLST_IDLST -}; #define MASK_COL2 MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; } ; #define X_IMAGE_LIST \ @@ -175,52 +169,4 @@ ImageList RID_SVTOOLS_IMAGELIST_SMALL X_IMAGE_LIST }; -ImageList RID_SVTOOLS_IMAGELIST_BIG_HIGHCONTRAST -{ - Prefix = "lxh"; - MASK_COL2 - X_IMAGE_LIST -}; - -ImageList RID_SVTOOLS_IMAGELIST_SMALL_HIGHCONTRAST -{ - Prefix = "sxh"; - MASK_COL2 - X_IMAGE_LIST -}; - // ******************************************************************* EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svx/source/intro/ooo.src b/svx/source/intro/ooo.src index c5b5114aa5..e2fa871c37 100644 --- a/svx/source/intro/ooo.src +++ b/svx/source/intro/ooo.src @@ -76,8 +76,9 @@ ModalDialog RID_DEFAULTABOUT Pos = MAP_APPFONT ( 174 , 6 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; }; - FixedText ABOUT_FTXT_VERSION + MultiLineEdit ABOUT_FTXT_VERSION { + Border = FALSE ; Pos = MAP_APPFONT ( 54 , 6 ) ; Size = MAP_APPFONT ( 118 , 16 ) ; WordBreak = TRUE ; @@ -146,20 +147,6 @@ ImageList RID_SVTOOLS_IMAGELIST_SMALL X_IMAGE_LIST }; -ImageList RID_SVTOOLS_IMAGELIST_BIG_HIGHCONTRAST -{ - Prefix = "lxh"; - MASK_COL2 - X_IMAGE_LIST -}; - -ImageList RID_SVTOOLS_IMAGELIST_SMALL_HIGHCONTRAST -{ - Prefix = "sxh"; - MASK_COL2 - X_IMAGE_LIST -}; - #define MASK_COL MaskColor = Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; } ; #define IMGLST_IDLST \ IdList = { \ @@ -186,11 +173,3 @@ ImageList RID_IMGLIST_TREEOPT MASK_COL IMGLST_IDLST }; - -ImageList RID_IMGLIST_TREEOPT_HC -{ - Prefix = "trh"; - MASK_COL - IMGLST_IDLST -}; - diff --git a/svx/source/items/SmartTagItem.cxx b/svx/source/items/SmartTagItem.cxx index 5dfdcac382..526b04977c 100644 --- a/svx/source/items/SmartTagItem.cxx +++ b/svx/source/items/SmartTagItem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,13 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -// include --------------------------------------------------------------- - #include <svx/SmartTagItem.hxx> -#ifndef _COM_SUN_STAR_SMARTTAGS_XSMARTTAGPROPERTIES_HPP_ #include <com/sun/star/container/XStringKeyMap.hpp> -#endif //#include <svl/memberid.hrc> @@ -72,14 +69,14 @@ SvxSmartTagItem::SvxSmartTagItem( const USHORT nId, // ----------------------------------------------------------------------- -sal_Bool SvxSmartTagItem::QueryValue( uno::Any& /* rVal */, BYTE /* nMemberId */ ) const +bool SvxSmartTagItem::QueryValue( uno::Any& /* rVal */, BYTE /* nMemberId */ ) const { - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool SvxSmartTagItem::PutValue( const uno::Any& /*rVal*/, BYTE /* nMemberId */) +bool SvxSmartTagItem::PutValue( const uno::Any& /*rVal*/, BYTE /* nMemberId */) { - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -121,3 +118,5 @@ SfxPoolItem* SvxSmartTagItem::Create(SvStream& , USHORT) const { return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx index ac96e23927..6cd41d513b 100644 --- a/svx/source/items/algitem.cxx +++ b/svx/source/items/algitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,16 +34,12 @@ #include <tools/stream.hxx> #include <com/sun/star/table/BorderLine.hpp> -#include <com/sun/star/table/CellVertJustify.hpp> #include <com/sun/star/table/ShadowLocation.hpp> #include <com/sun/star/table/TableBorder.hpp> #include <com/sun/star/table/ShadowFormat.hpp> #include <com/sun/star/table/CellRangeAddress.hpp> #include <com/sun/star/table/CellContentType.hpp> #include <com/sun/star/table/TableOrientation.hpp> -#include <com/sun/star/table/CellHoriJustify.hpp> -#include <com/sun/star/style/ParagraphAdjust.hpp> -#include "com/sun/star/style/VerticalAlignment.hpp" #include <com/sun/star/util/SortField.hpp> #include <com/sun/star/util/SortFieldType.hpp> #include <com/sun/star/table/CellOrientation.hpp> @@ -63,334 +60,9 @@ using namespace ::com::sun::star; // STATIC DATA ----------------------------------------------------------- //TYPEINIT1_AUTOFACTORY( SvxHorJustifyItem, SfxEnumItem ); -TYPEINIT1_FACTORY( SvxHorJustifyItem, SfxEnumItem, new SvxHorJustifyItem(SVX_HOR_JUSTIFY_STANDARD, 0)) -TYPEINIT1_FACTORY( SvxVerJustifyItem, SfxEnumItem, new SvxVerJustifyItem(SVX_VER_JUSTIFY_STANDARD, 0) ); TYPEINIT1_FACTORY( SvxOrientationItem, SfxEnumItem, new SvxOrientationItem(SVX_ORIENTATION_STANDARD, 0) ); TYPEINIT1_FACTORY( SvxMarginItem, SfxPoolItem, new SvxMarginItem(0) ); -// class SvxHorJustifyItem ----------------------------------------------- - - -SvxHorJustifyItem::SvxHorJustifyItem( const USHORT nId ) : - SfxEnumItem( nId, (USHORT)SVX_HOR_JUSTIFY_STANDARD ) -{ -} - -SvxHorJustifyItem::SvxHorJustifyItem( const SvxCellHorJustify eJustify, - const USHORT nId ) : - SfxEnumItem( nId, (USHORT)eJustify ) -{ -} - -//------------------------------------------------------------------------ - -SfxItemPresentation SvxHorJustifyItem::GetPresentation -( - SfxItemPresentation ePres, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, - XubString& rText, const IntlWrapper *) const -{ - switch ( ePres ) - { - case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); - return SFX_ITEM_PRESENTATION_NONE; - case SFX_ITEM_PRESENTATION_NAMELESS: - case SFX_ITEM_PRESENTATION_COMPLETE: - rText = GetValueText( GetValue() ); - return SFX_ITEM_PRESENTATION_COMPLETE; - default: ; //prevent warning - } - return SFX_ITEM_PRESENTATION_NONE; -} - -//------------------------------------------------------------------------ - -sal_Bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const -{ -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); - nMemberId &= ~CONVERT_TWIPS; - switch ( nMemberId ) - { - case MID_HORJUST_HORJUST: - { - table::CellHoriJustify eUno = table::CellHoriJustify_STANDARD; - switch ( (SvxCellHorJustify)GetValue() ) - { - case SVX_HOR_JUSTIFY_STANDARD: eUno = table::CellHoriJustify_STANDARD; break; - case SVX_HOR_JUSTIFY_LEFT: eUno = table::CellHoriJustify_LEFT; break; - case SVX_HOR_JUSTIFY_CENTER: eUno = table::CellHoriJustify_CENTER; break; - case SVX_HOR_JUSTIFY_RIGHT: eUno = table::CellHoriJustify_RIGHT; break; - case SVX_HOR_JUSTIFY_BLOCK: eUno = table::CellHoriJustify_BLOCK; break; - case SVX_HOR_JUSTIFY_REPEAT: eUno = table::CellHoriJustify_REPEAT; break; - } - rVal <<= eUno; - } - break; - case MID_HORJUST_ADJUST: - { - // ParagraphAdjust values, as in SvxAdjustItem - // (same value for ParaAdjust and ParaLastLineAdjust) - - sal_Int16 nAdjust = style::ParagraphAdjust_LEFT; - switch ( (SvxCellHorJustify)GetValue() ) - { - // ParagraphAdjust_LEFT is used for STANDARD and REPEAT - case SVX_HOR_JUSTIFY_STANDARD: - case SVX_HOR_JUSTIFY_REPEAT: - case SVX_HOR_JUSTIFY_LEFT: nAdjust = style::ParagraphAdjust_LEFT; break; - case SVX_HOR_JUSTIFY_CENTER: nAdjust = style::ParagraphAdjust_CENTER; break; - case SVX_HOR_JUSTIFY_RIGHT: nAdjust = style::ParagraphAdjust_RIGHT; break; - case SVX_HOR_JUSTIFY_BLOCK: nAdjust = style::ParagraphAdjust_BLOCK; break; - } - rVal <<= nAdjust; // as sal_Int16 - } - break; - } - return sal_True; -} - -sal_Bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) -{ -// sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); - nMemberId &= ~CONVERT_TWIPS; - switch ( nMemberId ) - { - case MID_HORJUST_HORJUST: - { - table::CellHoriJustify eUno; - if(!(rVal >>= eUno)) - { - sal_Int32 nValue = 0; - if(!(rVal >>= nValue)) - return sal_False; - eUno = (table::CellHoriJustify)nValue; - } - SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD; - switch (eUno) - { - case table::CellHoriJustify_STANDARD: eSvx = SVX_HOR_JUSTIFY_STANDARD; break; - case table::CellHoriJustify_LEFT: eSvx = SVX_HOR_JUSTIFY_LEFT; break; - case table::CellHoriJustify_CENTER: eSvx = SVX_HOR_JUSTIFY_CENTER; break; - case table::CellHoriJustify_RIGHT: eSvx = SVX_HOR_JUSTIFY_RIGHT; break; - case table::CellHoriJustify_BLOCK: eSvx = SVX_HOR_JUSTIFY_BLOCK; break; - case table::CellHoriJustify_REPEAT: eSvx = SVX_HOR_JUSTIFY_REPEAT; break; - default: ; //prevent warning - } - SetValue( (USHORT)eSvx ); - } - break; - case MID_HORJUST_ADJUST: - { - // property contains ParagraphAdjust values as sal_Int16 - sal_Int16 nVal = sal_Int16(); - if(!(rVal >>= nVal)) - return sal_False; - - SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD; - switch (nVal) - { - // STRETCH is treated as BLOCK - case style::ParagraphAdjust_LEFT: eSvx = SVX_HOR_JUSTIFY_LEFT; break; - case style::ParagraphAdjust_RIGHT: eSvx = SVX_HOR_JUSTIFY_RIGHT; break; - case style::ParagraphAdjust_STRETCH: - case style::ParagraphAdjust_BLOCK: eSvx = SVX_HOR_JUSTIFY_BLOCK; break; - case style::ParagraphAdjust_CENTER: eSvx = SVX_HOR_JUSTIFY_CENTER; break; - } - SetValue( (USHORT)eSvx ); - } - } - return sal_True; -} - -//------------------------------------------------------------------------ - -XubString SvxHorJustifyItem::GetValueText( USHORT nVal ) const -{ - DBG_ASSERT( nVal <= SVX_HOR_JUSTIFY_REPEAT, "enum overflow!" ); - return SVX_RESSTR(RID_SVXITEMS_HORJUST_STANDARD + nVal); -} - -//------------------------------------------------------------------------ - -SfxPoolItem* SvxHorJustifyItem::Clone( SfxItemPool* ) const -{ - return new SvxHorJustifyItem( *this ); -} - -//------------------------------------------------------------------------ - -SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, USHORT ) const -{ - USHORT nVal; - rStream >> nVal; - return new SvxHorJustifyItem( (SvxCellHorJustify)nVal, Which() ); -} -//------------------------------------------------------------------------ - -USHORT SvxHorJustifyItem::GetValueCount() const -{ - return SVX_HOR_JUSTIFY_REPEAT + 1; // letzter Enum-Wert + 1 -} - -// class SvxVerJustifyItem ----------------------------------------------- - -SvxVerJustifyItem::SvxVerJustifyItem( const USHORT nId ) : - SfxEnumItem( nId, (USHORT)SVX_VER_JUSTIFY_STANDARD ) -{ -} - -SvxVerJustifyItem::SvxVerJustifyItem( const SvxCellVerJustify eJustify, - const USHORT nId ) : - SfxEnumItem( nId, (USHORT)eJustify ) -{ -} - -//------------------------------------------------------------------------ - -SfxItemPresentation SvxVerJustifyItem::GetPresentation -( - SfxItemPresentation ePres, - SfxMapUnit /*eCoreUnit*/, - SfxMapUnit /*ePresUnit*/, - XubString& rText, - const IntlWrapper * ) const -{ - switch ( ePres ) - { - case SFX_ITEM_PRESENTATION_NONE: - rText.Erase(); - return SFX_ITEM_PRESENTATION_NONE; - case SFX_ITEM_PRESENTATION_NAMELESS: - case SFX_ITEM_PRESENTATION_COMPLETE: - rText = GetValueText( GetValue() ); - return SFX_ITEM_PRESENTATION_COMPLETE; - default: ; //prevent warning - } - return SFX_ITEM_PRESENTATION_NONE; -} - -//------------------------------------------------------------------------ - -sal_Bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const -{ - nMemberId &= ~CONVERT_TWIPS; - switch ( nMemberId ) - { - case MID_HORJUST_ADJUST: - { - style::VerticalAlignment eUno = style::VerticalAlignment_TOP; - switch ( (SvxCellVerJustify)GetValue() ) - { - case SVX_VER_JUSTIFY_TOP: eUno = style::VerticalAlignment_TOP; break; - case SVX_VER_JUSTIFY_CENTER: eUno = style::VerticalAlignment_MIDDLE; break; - case SVX_VER_JUSTIFY_BOTTOM: eUno = style::VerticalAlignment_BOTTOM; break; - default: ; //prevent warning - } - rVal <<= eUno; - break; - } - default: - { - table::CellVertJustify eUno = table::CellVertJustify_STANDARD; - switch ( (SvxCellVerJustify)GetValue() ) - { - case SVX_VER_JUSTIFY_STANDARD: eUno = table::CellVertJustify_STANDARD; break; - case SVX_VER_JUSTIFY_TOP: eUno = table::CellVertJustify_TOP; break; - case SVX_VER_JUSTIFY_CENTER: eUno = table::CellVertJustify_CENTER; break; - case SVX_VER_JUSTIFY_BOTTOM: eUno = table::CellVertJustify_BOTTOM; break; - default: ; //prevent warning - } - rVal <<= eUno; - break; - } - } - return sal_True; -} - -sal_Bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) -{ - nMemberId &= ~CONVERT_TWIPS; - switch ( nMemberId ) - { - case MID_HORJUST_ADJUST: - { - // property contains ParagraphAdjust values as sal_Int16 - style::VerticalAlignment nVal = style::VerticalAlignment_TOP; - if(!(rVal >>= nVal)) - return sal_False; - - SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD; - switch (nVal) - { - case style::VerticalAlignment_TOP: eSvx = SVX_VER_JUSTIFY_TOP; break; - case style::VerticalAlignment_MIDDLE: eSvx = SVX_VER_JUSTIFY_CENTER; break; - case style::VerticalAlignment_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break; - default:; - } - SetValue( (USHORT)eSvx ); - break; - } - default: - { - table::CellVertJustify eUno; - if(!(rVal >>= eUno)) - { - sal_Int32 nValue = 0; - if(!(rVal >>= nValue)) - return sal_False; - eUno = (table::CellVertJustify)nValue; - } - - SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD; - switch (eUno) - { - case table::CellVertJustify_STANDARD: eSvx = SVX_VER_JUSTIFY_STANDARD; break; - case table::CellVertJustify_TOP: eSvx = SVX_VER_JUSTIFY_TOP; break; - case table::CellVertJustify_CENTER: eSvx = SVX_VER_JUSTIFY_CENTER; break; - case table::CellVertJustify_BOTTOM: eSvx = SVX_VER_JUSTIFY_BOTTOM; break; - default: ; //prevent warning - } - SetValue( (USHORT)eSvx ); - break; - } - } - - return sal_True; -} - -//------------------------------------------------------------------------ - -XubString SvxVerJustifyItem::GetValueText( USHORT nVal ) const -{ - DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" ); - return SVX_RESSTR(RID_SVXITEMS_VERJUST_STANDARD + nVal); -} - -//------------------------------------------------------------------------ - -SfxPoolItem* SvxVerJustifyItem::Clone( SfxItemPool* ) const -{ - return new SvxVerJustifyItem( *this ); -} - -//------------------------------------------------------------------------ - -SfxPoolItem* SvxVerJustifyItem::Create( SvStream& rStream, USHORT ) const -{ - USHORT nVal; - rStream >> nVal; - return new SvxVerJustifyItem( (SvxCellVerJustify)nVal, Which() ); -} - -//------------------------------------------------------------------------ - -USHORT SvxVerJustifyItem::GetValueCount() const -{ - return SVX_VER_JUSTIFY_BOTTOM + 1; // letzter Enum-Wert + 1 -} - // class SvxOrientationItem ---------------------------------------------- SvxOrientationItem::SvxOrientationItem( const SvxCellOrientation eOrientation, @@ -430,7 +102,7 @@ SfxItemPresentation SvxOrientationItem::GetPresentation //------------------------------------------------------------------------ -sal_Bool SvxOrientationItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxOrientationItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const { table::CellOrientation eUno = table::CellOrientation_STANDARD; switch ( (SvxCellOrientation)GetValue() ) @@ -441,10 +113,10 @@ sal_Bool SvxOrientationItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) co case SVX_ORIENTATION_STACKED: eUno = table::CellOrientation_STACKED; break; } rVal <<= eUno; - return sal_True; + return true; } -sal_Bool SvxOrientationItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxOrientationItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) { table::CellOrientation eOrient; if(!(rVal >>= eOrient)) @@ -464,7 +136,7 @@ sal_Bool SvxOrientationItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ default: ; //prevent warning } SetValue( (USHORT)eSvx ); - return sal_True; + return true; } //------------------------------------------------------------------------ @@ -673,7 +345,7 @@ SvStream& SvxMarginItem::Store( SvStream &rStream, USHORT /*nItemVersion*/) cons //------------------------------------------------------------------------ -sal_Bool SvxMarginItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxMarginItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -694,14 +366,14 @@ sal_Bool SvxMarginItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const break; default: DBG_ERROR("unknown MemberId"); - return sal_False; + return false; } - return sal_True; + return true; } //------------------------------------------------------------------------ -sal_Bool SvxMarginItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxMarginItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = ( ( nMemberId & CONVERT_TWIPS ) != 0 ); long nMaxVal = bConvert ? TWIP_TO_MM100(SHRT_MAX) : SHRT_MAX; // Members sind sal_Int16 @@ -725,9 +397,9 @@ sal_Bool SvxMarginItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) break; default: DBG_ERROR("unknown MemberId"); - return sal_False; + return false; } - return sal_True; + return true; } //------------------------------------------------------------------------ @@ -763,3 +435,4 @@ sal_Bool SvxMarginItem::SetBottomMargin( sal_Int16 nBottom ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/chrtitem.cxx b/svx/source/items/chrtitem.cxx index f910e6010c..1103ef63a0 100644 --- a/svx/source/items/chrtitem.cxx +++ b/svx/source/items/chrtitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ // include --------------------------------------------------------------- #include <tools/stream.hxx> -#ifndef __SBX_SBXVARIABLE_HXX #include <basic/sbxvar.hxx> -#endif #if defined UNX && !defined LINUX #include <wchar.h> #endif @@ -193,7 +192,7 @@ SfxPoolItem* SvxChartTextOrderItem::Create(SvStream& rIn, USHORT /*nVer*/) const // ----------------------------------------------------------------------- -sal_Bool SvxChartTextOrderItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxChartTextOrderItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { // the order of the two enums is not equal, so a mapping is required ::com::sun::star::chart::ChartAxisArrangeOrderType eAO; @@ -213,12 +212,12 @@ sal_Bool SvxChartTextOrderItem::QueryValue( ::com::sun::star::uno::Any& rVal, BY rVal <<= eAO; - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxChartTextOrderItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxChartTextOrderItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) { // the order of the two enums is not equal, so a mapping is required ::com::sun::star::chart::ChartAxisArrangeOrderType eAO; @@ -229,7 +228,7 @@ sal_Bool SvxChartTextOrderItem::PutValue( const ::com::sun::star::uno::Any& rVal // also try an int (for Basic) sal_Int32 nAO = 0; if(!(rVal >>= nAO)) - return sal_False; + return false; eAO = static_cast< ::com::sun::star::chart::ChartAxisArrangeOrderType >( nAO ); } @@ -244,12 +243,12 @@ sal_Bool SvxChartTextOrderItem::PutValue( const ::com::sun::star::uno::Any& rVal case ::com::sun::star::chart::ChartAxisArrangeOrderType_AUTO: eOrder = CHTXTORDER_AUTO; break; default: - return sal_False; + return false; } SetValue( (USHORT)eOrder ); - return sal_True; + return true; } /************************************************************************* @@ -395,14 +394,14 @@ SfxFieldUnit SvxDoubleItem::GetUnit() const // ----------------------------------------------------------------------- -sal_Bool SvxDoubleItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxDoubleItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const { rVal <<= fVal; - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxDoubleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxDoubleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) { return rVal >>= fVal; } @@ -536,3 +535,4 @@ USHORT SvxChartRegressItem::GetVersion (USHORT nFileFormatVersion) const } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/clipfmtitem.cxx b/svx/source/items/clipfmtitem.cxx index b98c9f3f0a..42a4d10792 100644 --- a/svx/source/items/clipfmtitem.cxx +++ b/svx/source/items/clipfmtitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -78,7 +79,7 @@ SvxClipboardFmtItem::~SvxClipboardFmtItem() delete pImpl; } -BOOL SvxClipboardFmtItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxClipboardFmtItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { USHORT nCount = Count(); @@ -93,10 +94,10 @@ BOOL SvxClipboardFmtItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMe } rVal <<= aClipFormats; - return TRUE; + return true; } -sal_Bool SvxClipboardFmtItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxClipboardFmtItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) { ::com::sun::star::frame::status::ClipboardFormats aClipFormats; if ( rVal >>= aClipFormats ) @@ -108,10 +109,10 @@ sal_Bool SvxClipboardFmtItem::PutValue( const ::com::sun::star::uno::Any& rVal, for ( USHORT n=0; n < nCount; n++ ) AddClipbrdFormat( ULONG( aClipFormats.Identifiers[n] ), aClipFormats.Names[n], n ); - return sal_True; + return true; } - return sal_False; + return false; } int SvxClipboardFmtItem::operator==( const SfxPoolItem& rComp ) const @@ -178,3 +179,4 @@ const String& SvxClipboardFmtItem::GetClipbrdFormatName( USHORT nPos ) const } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx index b91c50d4cf..b498fcc1ce 100644 --- a/svx/source/items/customshapeitem.cxx +++ b/svx/source/items/customshapeitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -292,7 +293,7 @@ SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem( SvStream& /*rIn*/, sal_u } } -int __EXPORT SdrCustomShapeGeometryItem::operator==( const SfxPoolItem& rCmp ) const +int SdrCustomShapeGeometryItem::operator==( const SfxPoolItem& rCmp ) const { int bRet = SfxPoolItem::operator==( rCmp ); if ( bRet ) @@ -300,7 +301,7 @@ int __EXPORT SdrCustomShapeGeometryItem::operator==( const SfxPoolItem& rCmp ) c return bRet; } -SfxItemPresentation __EXPORT SdrCustomShapeGeometryItem::GetPresentation( +SfxItemPresentation SdrCustomShapeGeometryItem::GetPresentation( SfxItemPresentation ePresentation, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresentationMetric*/, XubString &rText, const IntlWrapper *) const { @@ -315,12 +316,12 @@ SfxItemPresentation __EXPORT SdrCustomShapeGeometryItem::GetPresentation( return ePresentation; } -SfxPoolItem* __EXPORT SdrCustomShapeGeometryItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const +SfxPoolItem* SdrCustomShapeGeometryItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const { return new SdrCustomShapeGeometryItem( rIn, nItemVersion ); } -SvStream& __EXPORT SdrCustomShapeGeometryItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const +SvStream& SdrCustomShapeGeometryItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const { if ( nItemVersion ) { @@ -329,7 +330,7 @@ SvStream& __EXPORT SdrCustomShapeGeometryItem::Store( SvStream& rOut, sal_uInt16 return rOut; } -SfxPoolItem* __EXPORT SdrCustomShapeGeometryItem::Clone( SfxItemPool * /*pPool*/ ) const +SfxPoolItem* SdrCustomShapeGeometryItem::Clone( SfxItemPool * /*pPool*/ ) const { SdrCustomShapeGeometryItem* pItem = new SdrCustomShapeGeometryItem( GetGeometry() ); // SdrCustomShapeGeometryItem* pItem = new SdrCustomShapeGeometryItem( *this ); @@ -345,7 +346,7 @@ SfxPoolItem* __EXPORT SdrCustomShapeGeometryItem::Clone( SfxItemPool * /*pPool*/ } #ifdef SDR_ISPOOLABLE -int __EXPORT SdrCustomShapeGeometryItem::IsPoolable() const +int SdrCustomShapeGeometryItem::IsPoolable() const { USHORT nId=Which(); return nId < SDRATTR_NOTPERSIST_FIRST || nId > SDRATTR_NOTPERSIST_LAST; @@ -355,17 +356,17 @@ sal_uInt16 SdrCustomShapeGeometryItem::GetVersion( sal_uInt16 /*nFileFormatVersi { return 1; } -sal_Bool SdrCustomShapeGeometryItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SdrCustomShapeGeometryItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const { rVal <<= aPropSeq; - return sal_True; + return true; } -sal_Bool SdrCustomShapeGeometryItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SdrCustomShapeGeometryItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) { if ( ! ( rVal >>= aPropSeq ) ) - return sal_False; + return false; else - return sal_True; + return true; } const uno::Sequence< beans::PropertyValue >& SdrCustomShapeGeometryItem::GetGeometry() const { @@ -384,3 +385,4 @@ SdrCustomShapeReplacementURLItem::SdrCustomShapeReplacementURLItem( const String : SfxStringItem( SDRATTR_CUSTOMSHAPE_REPLACEMENT_URL, rVal ) {} +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/drawitem.cxx b/svx/source/items/drawitem.cxx index 0104692ba6..1d0e219379 100644 --- a/svx/source/items/drawitem.cxx +++ b/svx/source/items/drawitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -104,19 +105,19 @@ SfxPoolItem* SvxColorTableItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -sal_Bool SvxColorTableItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxColorTableItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. // Please ask CD if you want to change this. sal_Int64 aValue = sal_Int64( (ULONG)pColorTable ); rVal = uno::makeAny( aValue ); - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxColorTableItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxColorTableItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. @@ -125,10 +126,10 @@ sal_Bool SvxColorTableItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE if ( rVal >>= aValue ) { pColorTable = (XColorTable *)(ULONG)aValue; - return sal_True; + return true; } - return sal_False; + return false; } //================================================================== @@ -188,19 +189,19 @@ SfxPoolItem* SvxGradientListItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -sal_Bool SvxGradientListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxGradientListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. // Please ask CD if you want to change this. sal_Int64 aValue = sal_Int64( (ULONG)pGradientList ); rVal = uno::makeAny( aValue ); - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxGradientListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxGradientListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. @@ -209,10 +210,10 @@ sal_Bool SvxGradientListItem::PutValue( const com::sun::star::uno::Any& rVal, BY if ( rVal >>= aValue ) { pGradientList = (XGradientList *)(ULONG)aValue; - return sal_True; + return true; } - return sal_False; + return false; } //================================================================== @@ -272,19 +273,19 @@ SfxPoolItem* SvxHatchListItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -sal_Bool SvxHatchListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxHatchListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. // Please ask CD if you want to change this. sal_Int64 aValue = sal_Int64( (ULONG)pHatchList ); rVal = uno::makeAny( aValue ); - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxHatchListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxHatchListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. @@ -293,10 +294,10 @@ sal_Bool SvxHatchListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE if ( rVal >>= aValue ) { pHatchList = (XHatchList *)(ULONG)aValue; - return sal_True; + return true; } - return sal_False; + return false; } //================================================================== @@ -356,19 +357,19 @@ SfxPoolItem* SvxBitmapListItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -sal_Bool SvxBitmapListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxBitmapListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. // Please ask CD if you want to change this. sal_Int64 aValue = sal_Int64( (ULONG)pBitmapList ); rVal = uno::makeAny( aValue ); - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxBitmapListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxBitmapListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. @@ -377,10 +378,10 @@ sal_Bool SvxBitmapListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE if ( rVal >>= aValue ) { pBitmapList = (XBitmapList *)(ULONG)aValue; - return sal_True; + return true; } - return sal_False; + return false; } @@ -442,18 +443,18 @@ SfxPoolItem* SvxDashListItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -sal_Bool SvxDashListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxDashListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. sal_Int64 aValue = sal_Int64( (ULONG)pDashList ); rVal = uno::makeAny( aValue ); - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxDashListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxDashListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. @@ -461,10 +462,10 @@ sal_Bool SvxDashListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE / if ( rVal >>= aValue ) { pDashList = (XDashList *)(ULONG)aValue; - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -531,18 +532,18 @@ SfxPoolItem* SvxLineEndListItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -sal_Bool SvxLineEndListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxLineEndListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. sal_Int64 aValue = sal_Int64( (ULONG)pLineEndList ); rVal = uno::makeAny( aValue ); - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxLineEndListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxLineEndListItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) { // This is only a quick helper to have UI support for these list items. Don't use // this method to query for a valid UNO representation. @@ -550,8 +551,10 @@ sal_Bool SvxLineEndListItem::PutValue( const com::sun::star::uno::Any& rVal, BYT if ( rVal >>= aValue ) { pLineEndList = (XLineEndList *)(ULONG)aValue; - return sal_True; + return true; } - return sal_False; + return false; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/e3ditem.cxx b/svx/source/items/e3ditem.cxx index 067c3c2774..64b6219402 100644 --- a/svx/source/items/e3ditem.cxx +++ b/svx/source/items/e3ditem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -133,7 +134,7 @@ SvStream& SvxB3DVectorItem::Store(SvStream &rStream, USHORT /*nItemVersion*/) co // ----------------------------------------------------------------------- -sal_Bool SvxB3DVectorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxB3DVectorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const { drawing::Direction3D aDirection; @@ -143,21 +144,21 @@ sal_Bool SvxB3DVectorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) cons aDirection.DirectionZ = aVal.getZ(); rVal <<= aDirection; - return( sal_True ); + return true; } // ----------------------------------------------------------------------- -sal_Bool SvxB3DVectorItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxB3DVectorItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) { drawing::Direction3D aDirection; if(!(rVal >>= aDirection)) - return sal_False; + return false; aVal.setX(aDirection.DirectionX); aVal.setY(aDirection.DirectionY); aVal.setZ(aDirection.DirectionZ); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -168,3 +169,5 @@ USHORT SvxB3DVectorItem::GetVersion (USHORT nFileFormatVersion) const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/grfitem.cxx b/svx/source/items/grfitem.cxx index 0d055de333..3ac7188349 100644 --- a/svx/source/items/grfitem.cxx +++ b/svx/source/items/grfitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -117,7 +118,7 @@ SvStream& SvxGrfCrop::Store( SvStream& rStrm, USHORT nVersion ) const -BOOL SvxGrfCrop::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxGrfCrop::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -137,17 +138,17 @@ BOOL SvxGrfCrop::QueryValue( uno::Any& rVal, BYTE nMemberId ) const rVal <<= aRet; - return sal_True; + return true; } -BOOL SvxGrfCrop::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxGrfCrop::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; text::GraphicCrop aVal; if(!(rVal >>= aVal)) - return sal_False; + return false; if( bConvert ) { aVal.Right = MM100_TO_TWIP(aVal.Right ); @@ -160,7 +161,7 @@ BOOL SvxGrfCrop::PutValue( const uno::Any& rVal, BYTE nMemberId ) nRight = aVal.Right ; nTop = aVal.Top ; nBottom = aVal.Bottom; - return sal_True; + return true; } SfxItemPresentation SvxGrfCrop::GetPresentation( @@ -195,3 +196,4 @@ SfxItemPresentation SvxGrfCrop::GetPresentation( +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx index 8fbb46a2a0..f046145859 100644 --- a/svx/source/items/hlnkitem.cxx +++ b/svx/source/items/hlnkitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,18 +32,10 @@ // include --------------------------------------------------------------- #define _SVX_HLNKITEM_CXX -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include <tools/stream.hxx> - -#ifndef _MEMBERID_HRC -#include <svx/memberid.hrc> -#endif - -#ifndef __SBX_SBXVARIABLE_HXX +#include <svl/memberid.hrc> #include <basic/sbxvar.hxx> -#endif #include "svx/hlnkitem.hxx" @@ -52,10 +45,6 @@ TYPEINIT1_FACTORY(SvxHyperlinkItem, SfxPoolItem, new SvxHyperlinkItem(0)); // class SvxHyperlinkItem ------------------------------------------------ -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - #define HYPERLINKFF_MARKER 0x599401FE SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) const @@ -137,10 +126,6 @@ SvStream& SvxHyperlinkItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ return rStrm; } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVersion*/ ) const { SvxHyperlinkItem* pNew = new SvxHyperlinkItem( Which() ); @@ -215,10 +200,6 @@ SfxPoolItem* SvxHyperlinkItem::Create( SvStream &rStrm, sal_uInt16 /*nItemVer return pNew; } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - SvxHyperlinkItem::SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem ): SfxPoolItem(rHyperlinkItem) { @@ -236,10 +217,6 @@ SvxHyperlinkItem::SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem ): }; -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - SvxHyperlinkItem::SvxHyperlinkItem( sal_uInt16 _nWhich, String& rName, String& rURL, String& rTarget, String& rIntName, SvxLinkInsertMode eTyp, sal_uInt16 nEvents, SvxMacroTableDtor *pMacroTbl ): @@ -257,19 +234,11 @@ SvxHyperlinkItem::SvxHyperlinkItem( sal_uInt16 _nWhich, String& rName, String& r pMacroTable=NULL; } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - SfxPoolItem* SvxHyperlinkItem::Clone( SfxItemPool* ) const { return new SvxHyperlinkItem( *this ); } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - int SvxHyperlinkItem::operator==( const SfxPoolItem& rAttr ) const { DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" ); @@ -312,11 +281,6 @@ int SvxHyperlinkItem::operator==( const SfxPoolItem& rAttr ) const return sal_True; } - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - void SvxHyperlinkItem::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro ) { if( nEvent < EVENT_SFX_START ) @@ -348,10 +312,6 @@ void SvxHyperlinkItem::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro ) pMacroTable->Insert( nEvent, new SvxMacro( rMacro ) ); } -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - void SvxHyperlinkItem::SetMacroTable( const SvxMacroTableDtor& rTbl ) { if ( pMacroTable ) @@ -360,7 +320,7 @@ void SvxHyperlinkItem::SetMacroTable( const SvxMacroTableDtor& rTbl ) pMacroTable = new SvxMacroTableDtor ( rTbl ); } -BOOL SvxHyperlinkItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool SvxHyperlinkItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -382,13 +342,13 @@ BOOL SvxHyperlinkItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberI rVal <<= (sal_Int32) eType; break; default: - return FALSE; + return false; } - return TRUE; + return true; } -BOOL SvxHyperlinkItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool SvxHyperlinkItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -422,9 +382,10 @@ BOOL SvxHyperlinkItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMem eType = (SvxLinkInsertMode) (sal_uInt16) nVal; break; default: - return FALSE; + return false; } - return TRUE; + return true; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index cd1926f34c..b1b5c5298e 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -372,14 +373,14 @@ void SvxNumberFormatShell::MakeFormat( String& rFormat, if(aCurrencyFormatList.Count()>nCurrencyPos) { xub_StrLen rErrPos=0; - sal_uInt16 rCatLbSelPos=0; - short rFmtSelPos=0; SvStrings aFmtEList; sal_uInt32 nFound = pFormatter->TestNewString( *aCurrencyFormatList[nCurrencyPos], eCurLanguage ); if ( nFound == NUMBERFORMAT_ENTRY_NOT_FOUND ) { + sal_uInt16 rCatLbSelPos=0; + short rFmtSelPos=0; AddFormat( *aCurrencyFormatList[nCurrencyPos],rErrPos,rCatLbSelPos, rFmtSelPos,aFmtEList); } @@ -1604,9 +1605,6 @@ void SvxNumberFormatShell::GetCurrencySymbols( SvStringsDtor& rList, sal_Bool bF aStr += ApplyLreOrRleEmbedding( pLanguageTable->GetString( rCurrencyTable[i]->GetLanguage())); pStr = new XubString(aStr); -#if 0 - fprintf( stderr, "currency entry: %s\n", ByteString( *pStr, RTL_TEXTENCODING_UTF8).GetBuffer()); -#endif for(j=nStart;j<rList.Count();j++) { const StringPtr pTestStr=rList[j]; @@ -1731,10 +1729,9 @@ sal_uInt16 SvxNumberFormatShell::FindCurrencyFormat( const String& rFmtString ) sal_uInt16 nPos=FindCurrencyTableEntry(rFmtString, bTestBanking); - sal_uInt16 nStart=0; - if(nPos!=(sal_uInt16)-1) { + sal_uInt16 nStart=0; if(bTestBanking && aCurCurrencyList.Count()>nPos) { nStart=nCount; @@ -1867,3 +1864,4 @@ sal_Bool SvxNumberFormatShell::IsInTable(sal_uInt16 nPos,sal_Bool bTmpBanking,co return bFlag; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/numinf.cxx b/svx/source/items/numinf.cxx index 7b1161389c..ca769b2802 100644 --- a/svx/source/items/numinf.cxx +++ b/svx/source/items/numinf.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -248,3 +249,4 @@ void SvxNumberInfoItem::SetDelFormatArray( const sal_uInt32* pData, } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/ofaitem.cxx b/svx/source/items/ofaitem.cxx index 2d3e7ccfb1..1c28b8b699 100644 --- a/svx/source/items/ofaitem.cxx +++ b/svx/source/items/ofaitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,5 @@ sal_Bool DashListPtrItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE n return sal_False; } */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx index 2a4846d093..d57303465f 100644 --- a/svx/source/items/pageitem.cxx +++ b/svx/source/items/pageitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -164,7 +165,7 @@ SfxItemPresentation SvxPageItem::GetPresentation } //------------------------------------------------------------------------ -sal_Bool SvxPageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const +bool SvxPageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -198,10 +199,10 @@ sal_Bool SvxPageItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const break; } - return sal_True; + return true; } //------------------------------------------------------------------------ -sal_Bool SvxPageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) +bool SvxPageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { switch( nMemberId ) { @@ -209,7 +210,7 @@ sal_Bool SvxPageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; eNumType = (SvxNumType)nValue; } @@ -239,7 +240,7 @@ sal_Bool SvxPageItem::PutValue( const uno::Any& rVal, BYTE nMemberId ) } break; } - return sal_True; + return true; } //------------------------------------------------------------------------ @@ -336,3 +337,4 @@ SvStream& SvxSetItem::Store(SvStream &rStrm, USHORT nItemVersion) const } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/postattr.cxx b/svx/source/items/postattr.cxx index c85e30e72c..21b27d7fb3 100644 --- a/svx/source/items/postattr.cxx +++ b/svx/source/items/postattr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -86,7 +87,7 @@ SfxItemPresentation SvxPostItAuthorItem::GetPresentation // ----------------------------------------------------------------------- -SfxPoolItem* __EXPORT SvxPostItAuthorItem::Clone( SfxItemPool * ) const +SfxPoolItem* SvxPostItAuthorItem::Clone( SfxItemPool * ) const { return new SvxPostItAuthorItem( *this ); } @@ -135,7 +136,7 @@ SfxItemPresentation SvxPostItDateItem::GetPresentation // ----------------------------------------------------------------------- -SfxPoolItem* __EXPORT SvxPostItDateItem::Clone( SfxItemPool * ) const +SfxPoolItem* SvxPostItDateItem::Clone( SfxItemPool * ) const { return new SvxPostItDateItem( *this ); } @@ -184,9 +185,10 @@ SfxItemPresentation SvxPostItTextItem::GetPresentation // ----------------------------------------------------------------------- -SfxPoolItem* __EXPORT SvxPostItTextItem::Clone( SfxItemPool * ) const +SfxPoolItem* SvxPostItTextItem::Clone( SfxItemPool * ) const { return new SvxPostItTextItem( *this ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx index 7cde5e3f4d..4dda59ba1c 100644 --- a/svx/source/items/rotmodit.cxx +++ b/svx/source/items/rotmodit.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,14 +30,13 @@ #include "precompiled_svx.hxx" #include <tools/stream.hxx> #include <com/sun/star/table/BorderLine.hpp> -#include <com/sun/star/table/CellVertJustify.hpp> +#include <com/sun/star/table/CellVertJustify2.hpp> #include <com/sun/star/table/ShadowLocation.hpp> #include <com/sun/star/table/TableBorder.hpp> #include <com/sun/star/table/ShadowFormat.hpp> #include <com/sun/star/table/CellRangeAddress.hpp> #include <com/sun/star/table/CellContentType.hpp> #include <com/sun/star/table/TableOrientation.hpp> -#include <com/sun/star/table/CellHoriJustify.hpp> #include <com/sun/star/util/SortField.hpp> #include <com/sun/star/util/SortFieldType.hpp> #include <com/sun/star/table/CellOrientation.hpp> @@ -66,18 +66,18 @@ SvxRotateModeItem::SvxRotateModeItem( const SvxRotateModeItem& rItem ) { } -__EXPORT SvxRotateModeItem::~SvxRotateModeItem() +SvxRotateModeItem::~SvxRotateModeItem() { } -SfxPoolItem* __EXPORT SvxRotateModeItem::Create( SvStream& rStream, USHORT ) const +SfxPoolItem* SvxRotateModeItem::Create( SvStream& rStream, USHORT ) const { USHORT nVal; rStream >> nVal; return new SvxRotateModeItem( (SvxRotateMode) nVal,Which() ); } -SfxItemPresentation __EXPORT SvxRotateModeItem::GetPresentation( +SfxItemPresentation SvxRotateModeItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/, SfxMapUnit /*ePresUnit*/, String& rText, const IntlWrapper * ) const @@ -100,7 +100,7 @@ SfxItemPresentation __EXPORT SvxRotateModeItem::GetPresentation( return ePres; } -String __EXPORT SvxRotateModeItem::GetValueText( USHORT nVal ) const +String SvxRotateModeItem::GetValueText( USHORT nVal ) const { String aText; @@ -119,60 +119,56 @@ String __EXPORT SvxRotateModeItem::GetValueText( USHORT nVal ) const return aText; } -USHORT __EXPORT SvxRotateModeItem::GetValueCount() const +USHORT SvxRotateModeItem::GetValueCount() const { return 4; // STANDARD, TOP, CENTER, BOTTOM } -SfxPoolItem* __EXPORT SvxRotateModeItem::Clone( SfxItemPool* ) const +SfxPoolItem* SvxRotateModeItem::Clone( SfxItemPool* ) const { return new SvxRotateModeItem( *this ); } -USHORT __EXPORT SvxRotateModeItem::GetVersion( USHORT /*nFileVersion*/ ) const +USHORT SvxRotateModeItem::GetVersion( USHORT /*nFileVersion*/ ) const { return 0; } -// QueryValue/PutValue: Der ::com::sun::star::table::CellVertJustify enum wird mitbenutzt... - -sal_Bool SvxRotateModeItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const +bool SvxRotateModeItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const { - table::CellVertJustify eUno = table::CellVertJustify_STANDARD; + sal_Int32 nUno = table::CellVertJustify2::STANDARD; switch ( (SvxRotateMode)GetValue() ) { - case SVX_ROTATE_MODE_STANDARD: eUno = table::CellVertJustify_STANDARD; break; - case SVX_ROTATE_MODE_TOP: eUno = table::CellVertJustify_TOP; break; - case SVX_ROTATE_MODE_CENTER: eUno = table::CellVertJustify_CENTER; break; - case SVX_ROTATE_MODE_BOTTOM: eUno = table::CellVertJustify_BOTTOM; break; + case SVX_ROTATE_MODE_STANDARD: nUno = table::CellVertJustify2::STANDARD; break; + case SVX_ROTATE_MODE_TOP: nUno = table::CellVertJustify2::TOP; break; + case SVX_ROTATE_MODE_CENTER: nUno = table::CellVertJustify2::CENTER; break; + case SVX_ROTATE_MODE_BOTTOM: nUno = table::CellVertJustify2::BOTTOM; break; } - rVal <<= eUno; - return sal_True; + rVal <<= nUno; + return true; } -sal_Bool SvxRotateModeItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) +bool SvxRotateModeItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) { - table::CellVertJustify eUno; - if(!(rVal >>= eUno)) + sal_Int32 nUno(0); + if(!(rVal >>= nUno)) { - sal_Int32 nValue = 0; - if(!(rVal >>= nValue)) - return sal_False; - eUno = (table::CellVertJustify)nValue; + nUno = table::CellVertJustify2::STANDARD; } SvxRotateMode eSvx = SVX_ROTATE_MODE_STANDARD; - switch (eUno) + switch (nUno) { - case table::CellVertJustify_STANDARD: eSvx = SVX_ROTATE_MODE_STANDARD; break; - case table::CellVertJustify_TOP: eSvx = SVX_ROTATE_MODE_TOP; break; - case table::CellVertJustify_CENTER: eSvx = SVX_ROTATE_MODE_CENTER; break; - case table::CellVertJustify_BOTTOM: eSvx = SVX_ROTATE_MODE_BOTTOM; break; + case table::CellVertJustify2::STANDARD: eSvx = SVX_ROTATE_MODE_STANDARD; break; + case table::CellVertJustify2::TOP: eSvx = SVX_ROTATE_MODE_TOP; break; + case table::CellVertJustify2::CENTER: eSvx = SVX_ROTATE_MODE_CENTER; break; + case table::CellVertJustify2::BOTTOM: eSvx = SVX_ROTATE_MODE_BOTTOM; break; default: ;//prevent warning } SetValue( (USHORT)eSvx ); - return sal_True; + return true; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/svxempty.cxx b/svx/source/items/svxempty.cxx index f6d743e1da..8a574d2e8e 100644 --- a/svx/source/items/svxempty.cxx +++ b/svx/source/items/svxempty.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,3 +39,4 @@ static String aImplSVXEmptySStr; String& rImplEmptySStr = aImplSVXEmptySStr; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/svxerr.cxx b/svx/source/items/svxerr.cxx index c89ac12a5a..37b02b906d 100644 --- a/svx/source/items/svxerr.cxx +++ b/svx/source/items/svxerr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,3 +53,4 @@ void SvxErrorHandler::Get() new SvxErrorHandler; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/viewlayoutitem.cxx b/svx/source/items/viewlayoutitem.cxx index df95820581..42b1143c49 100644 --- a/svx/source/items/viewlayoutitem.cxx +++ b/svx/source/items/viewlayoutitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,7 +112,7 @@ int SvxViewLayoutItem::operator==( const SfxPoolItem& rAttr ) const mbBookMode == rItem.IsBookMode() ); } -sal_Bool SvxViewLayoutItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool SvxViewLayoutItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { nMemberId &= ~CONVERT_TWIPS; switch ( nMemberId ) @@ -131,13 +132,13 @@ sal_Bool SvxViewLayoutItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMe case MID_VIEWLAYOUT_BOOKMODE: rVal <<= (sal_Bool) mbBookMode; break; default: DBG_ERROR("svx::SvxViewLayoutItem::QueryValue(), Wrong MemberId!"); - return sal_False; + return false; } - return sal_True; + return true; } -sal_Bool SvxViewLayoutItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool SvxViewLayoutItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -170,11 +171,11 @@ sal_Bool SvxViewLayoutItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE { SetValue( (UINT16)nColumns ); mbBookMode = bBookMode; - return sal_True; + return true; } } - return sal_False; + return false; } case MID_VIEWLAYOUT_COLUMNS: @@ -183,10 +184,10 @@ sal_Bool SvxViewLayoutItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE if ( rVal >>= nVal ) { SetValue( (UINT16)nVal ); - return sal_True; + return true; } else - return sal_False; + return false; } case MID_VIEWLAYOUT_BOOKMODE: @@ -194,18 +195,19 @@ sal_Bool SvxViewLayoutItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE sal_Bool bBookMode = sal_False; if ( rVal >>= bBookMode ) { - mbBookMode = bBookMode; - return sal_True; + mbBookMode = bBookMode; + return true; } else - return sal_False; + return false; } default: DBG_ERROR("svx::SvxViewLayoutItem::PutValue(), Wrong MemberId!"); - return sal_False; + return false; } - return sal_True; + return true; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/zoomitem.cxx b/svx/source/items/zoomitem.cxx index 309ffd91de..4ebf2df20f 100644 --- a/svx/source/items/zoomitem.cxx +++ b/svx/source/items/zoomitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include <tools/stream.hxx> -#ifndef __SBX_SBXVARIABLE_HXX #include <basic/sbxvar.hxx> -#endif #include <svx/zoomitem.hxx> #include <com/sun/star/uno/Sequence.hxx> @@ -117,7 +116,7 @@ int SvxZoomItem::operator==( const SfxPoolItem& rAttr ) const eType == rItem.GetType() ); } -sal_Bool SvxZoomItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool SvxZoomItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -141,13 +140,13 @@ sal_Bool SvxZoomItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId case MID_TYPE: rVal <<= (sal_Int16) eType; break; default: DBG_ERROR("svx::SvxZoomItem::QueryValue(), Wrong MemberId!"); - return sal_False; + return false; } - return sal_True; + return true; } -sal_Bool SvxZoomItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool SvxZoomItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -187,11 +186,11 @@ sal_Bool SvxZoomItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemb SetValue( (UINT16)nValueTmp ); nValueSet = nValueSetTmp; eType = SvxZoomType( nTypeTmp ); - return sal_True; + return true; } } - return sal_False; + return false; } case MID_VALUE: @@ -200,10 +199,10 @@ sal_Bool SvxZoomItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemb if ( rVal >>= nVal ) { SetValue( (UINT16)nVal ); - return sal_True; + return true; } else - return sal_False; + return false; } case MID_VALUESET: @@ -216,16 +215,18 @@ sal_Bool SvxZoomItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemb nValueSet = (sal_Int16) nVal; else if ( nMemberId == MID_TYPE ) eType = SvxZoomType( (sal_Int16) nVal ); - return sal_True; + return true; } else - return sal_False; + return false; } default: DBG_ERROR("svx::SvxZoomItem::PutValue(), Wrong MemberId!"); - return sal_False; + return false; } - return sal_True; + return true; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/items/zoomslideritem.cxx b/svx/source/items/zoomslideritem.cxx index 73ed5a76ca..79fa3c79ce 100644 --- a/svx/source/items/zoomslideritem.cxx +++ b/svx/source/items/zoomslideritem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -108,7 +109,7 @@ int SvxZoomSliderItem::operator==( const SfxPoolItem& rAttr ) const mnMinZoom == rItem.mnMinZoom && mnMaxZoom == rItem.mnMaxZoom ); } -sal_Bool SvxZoomSliderItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool SvxZoomSliderItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { nMemberId &= ~CONVERT_TWIPS; switch ( nMemberId ) @@ -128,7 +129,7 @@ sal_Bool SvxZoomSliderItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMe } break; - case MID_ZOOMSLIDER_CURRENTZOOM : + case MID_ZOOMSLIDER_CURRENTZOOM : { rVal <<= (sal_Int32) GetValue(); } @@ -150,13 +151,13 @@ sal_Bool SvxZoomSliderItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMe break; default: DBG_ERROR("svx::SvxZoomSliderItem::QueryValue(), Wrong MemberId!"); - return sal_False; + return false; } - return sal_True; + return true; } -sal_Bool SvxZoomSliderItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool SvxZoomSliderItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -197,7 +198,7 @@ sal_Bool SvxZoomSliderItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE ++nConvertedCount; } } - + if ( bAllConverted && nConvertedCount == ZOOMSLIDER_PARAMS ) { SetValue( (UINT16)nCurrentZoom ); @@ -205,11 +206,11 @@ sal_Bool SvxZoomSliderItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE mnMinZoom = sal::static_int_cast< USHORT >( nMinZoom ); mnMaxZoom = sal::static_int_cast< USHORT >( nMaxZoom ); - return sal_True; + return true; } } - return sal_False; + return false; } case MID_ZOOMSLIDER_CURRENTZOOM: @@ -218,10 +219,10 @@ sal_Bool SvxZoomSliderItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE if ( rVal >>= nVal ) { SetValue( (UINT16)nVal ); - return sal_True; + return true; } else - return sal_False; + return false; } case MID_ZOOMSLIDER_SNAPPINGPOINTS: @@ -230,10 +231,10 @@ sal_Bool SvxZoomSliderItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE if ( rVal >>= aValues ) { maValues = aValues; - return sal_True; + return true; } else - return sal_False; + return false; } case MID_ZOOMSLIDER_MINZOOM: { @@ -241,10 +242,10 @@ sal_Bool SvxZoomSliderItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE if( rVal >>= nVal ) { mnMinZoom = (UINT16)nVal; - return sal_True; + return true; } else - return sal_False; + return false; } case MID_ZOOMSLIDER_MAXZOOM: { @@ -252,17 +253,17 @@ sal_Bool SvxZoomSliderItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE if( rVal >>= nVal ) { mnMaxZoom = (UINT16)nVal; - return sal_True; + return true; } else - return sal_False; + return false; } default: DBG_ERROR("svx::SvxZoomSliderItem::PutValue(), Wrong MemberId!"); - return sal_False; + return false; } - return sal_True; + return true; } void SvxZoomSliderItem::AddSnappingPoint( sal_Int32 nNew ) @@ -278,3 +279,4 @@ const com::sun::star::uno::Sequence < sal_Int32 >& SvxZoomSliderItem::GetSnappin return maValues; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/mnuctrls/SmartTagCtl.cxx b/svx/source/mnuctrls/SmartTagCtl.cxx index 0ce2059cde..f98541b98d 100644 --- a/svx/source/mnuctrls/SmartTagCtl.cxx +++ b/svx/source/mnuctrls/SmartTagCtl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,23 +31,17 @@ #include <svx/SmartTagCtl.hxx> #include <com/sun/star/smarttags/XSmartTagAction.hpp> -#ifndef _COM_SUN_STAR_SMARTTAGS_XSTRINGKEYMAP_HPP_ #include <com/sun/star/container/XStringKeyMap.hpp> -#endif #include <svtools/stdmenu.hxx> #include <svl/eitem.hxx> #include <sfx2/dispatch.hxx> -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include <svx/SmartTagItem.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -#define C2U(cChar) rtl::OUString::createFromAscii(cChar) - // STATIC DATA ----------------------------------------------------------- SFX_IMPL_MENU_CONTROL(SvxSmartTagsControl, SvxSmartTagItem); @@ -121,7 +116,7 @@ void SvxSmartTagsControl::FillMenu() pSbMenu->SetSelectHdl( LINK( this, SvxSmartTagsControl, MenuSelect ) ); // sub-menu starts with smart tag caption and separator - const rtl::OUString aSmartTagCaption2 = aSmartTagCaption + C2U(": ") + aRangeText; + const rtl::OUString aSmartTagCaption2 = aSmartTagCaption + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + aRangeText; nSubMenuPos = 0; pSbMenu->InsertItem( nMenuId++, aSmartTagCaption2, MIB_NOSELECT, nSubMenuPos++ ); pSbMenu->InsertSeparator( nSubMenuPos++ ); @@ -223,3 +218,4 @@ PopupMenu* SvxSmartTagsControl::GetPopup() const } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx index 9f7ab3b62c..e766e8d4be 100644 --- a/svx/source/mnuctrls/clipboardctl.cxx +++ b/svx/source/mnuctrls/clipboardctl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -161,3 +162,4 @@ void SvxClipBoardControl::DelPopup() ///////////////////////////////////////////////////////////////// +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/mnuctrls/fntctl.cxx b/svx/source/mnuctrls/fntctl.cxx index c155d6868c..3427006682 100644 --- a/svx/source/mnuctrls/fntctl.cxx +++ b/svx/source/mnuctrls/fntctl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -180,3 +181,4 @@ PopupMenu* SvxFontMenuControl::GetPopup() const +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/mnuctrls/fntszctl.cxx b/svx/source/mnuctrls/fntszctl.cxx index cd8c8e1ef8..d76533f607 100644 --- a/svx/source/mnuctrls/fntszctl.cxx +++ b/svx/source/mnuctrls/fntszctl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -209,3 +210,4 @@ PopupMenu* SvxFontSizeMenuControl::GetPopup() const } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/animation/animationstate.cxx b/svx/source/sdr/animation/animationstate.cxx index f02e103175..343d8d895d 100644 --- a/svx/source/sdr/animation/animationstate.cxx +++ b/svx/source/sdr/animation/animationstate.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -146,3 +147,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/animation/objectanimator.cxx b/svx/source/sdr/animation/objectanimator.cxx index d7d0cfeedc..2c66eb2a00 100644 --- a/svx/source/sdr/animation/objectanimator.cxx +++ b/svx/source/sdr/animation/objectanimator.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,3 +51,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/animation/scheduler.cxx b/svx/source/sdr/animation/scheduler.cxx index fa2d4c01d6..1b299a24be 100644 --- a/svx/source/sdr/animation/scheduler.cxx +++ b/svx/source/sdr/animation/scheduler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -313,3 +314,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx index 7cf7b58789..077455b8e8 100644 --- a/svx/source/sdr/attribute/sdrformtextattribute.cxx +++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -421,3 +422,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx b/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx index be33783023..efbe383503 100644 --- a/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx +++ b/svx/source/sdr/attribute/sdrformtextoutlineattribute.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,6 +99,27 @@ namespace drawinglayer : mpSdrFormTextOutlineAttribute(new ImpSdrFormTextOutlineAttribute( rLineAttribute, rStrokeAttribute, nTransparence)) { + return mpSdrFormTextOutlineAttribute == ImpSdrFormTextOutlineAttribute::get_global_default(); + } + + SdrFormTextOutlineAttribute& SdrFormTextOutlineAttribute::operator=(const SdrFormTextOutlineAttribute& rCandidate) + { + if(rCandidate.mpSdrFormTextOutlineAttribute != mpSdrFormTextOutlineAttribute) + { + if(mpSdrFormTextOutlineAttribute->mnRefCount) + { + mpSdrFormTextOutlineAttribute->mnRefCount--; + } + else + { + delete mpSdrFormTextOutlineAttribute; + } + + mpSdrFormTextOutlineAttribute = rCandidate.mpSdrFormTextOutlineAttribute; + mpSdrFormTextOutlineAttribute->mnRefCount++; + } + + return *this; } SdrFormTextOutlineAttribute::SdrFormTextOutlineAttribute() @@ -183,3 +205,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx index c231f2aed4..3897e26263 100644 --- a/svx/source/sdr/attribute/sdrtextattribute.cxx +++ b/svx/source/sdr/attribute/sdrtextattribute.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -272,6 +273,7 @@ namespace drawinglayer SdrTextVertAdjust aSdrTextVertAdjust, bool bContour, bool bFitToSize, + bool bAutoFit, bool bHideContour, bool bBlink, bool bScroll, @@ -459,3 +461,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/displayinfo.cxx b/svx/source/sdr/contact/displayinfo.cxx index eccddc5b97..7853da15d9 100644 --- a/svx/source/sdr/contact/displayinfo.cxx +++ b/svx/source/sdr/contact/displayinfo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -108,3 +109,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/objectcontact.cxx b/svx/source/sdr/contact/objectcontact.cxx index 024538b11a..3e30021c3b 100644 --- a/svx/source/sdr/contact/objectcontact.cxx +++ b/svx/source/sdr/contact/objectcontact.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -320,3 +321,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx index 82082012f0..0b331bf4ca 100644 --- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx +++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -224,3 +225,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index bbdc7e2eff..94da0ae0d1 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -483,3 +484,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/objectcontacttools.cxx b/svx/source/sdr/contact/objectcontacttools.cxx index bdecc06400..aa79df2dac 100644 --- a/svx/source/sdr/contact/objectcontacttools.cxx +++ b/svx/source/sdr/contact/objectcontacttools.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -102,3 +103,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/sdrmediawindow.cxx b/svx/source/sdr/contact/sdrmediawindow.cxx index dedae0fc0c..ff969c5110 100644 --- a/svx/source/sdr/contact/sdrmediawindow.cxx +++ b/svx/source/sdr/contact/sdrmediawindow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -191,3 +192,5 @@ void SdrMediaWindow::StartDrag( sal_Int8 nAction, const Point& rPosPixel ) } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/sdrmediawindow.hxx b/svx/source/sdr/contact/sdrmediawindow.hxx index e7b1249858..35b12177a7 100644 --- a/svx/source/sdr/contact/sdrmediawindow.hxx +++ b/svx/source/sdr/contact/sdrmediawindow.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,3 +68,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontact.cxx b/svx/source/sdr/contact/viewcontact.cxx index afc2513e8d..295249ff72 100644 --- a/svx/source/sdr/contact/viewcontact.cxx +++ b/svx/source/sdr/contact/viewcontact.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -327,3 +328,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofe3d.cxx b/svx/source/sdr/contact/viewcontactofe3d.cxx index ff9cd5059f..032e3cad76 100644 --- a/svx/source/sdr/contact/viewcontactofe3d.cxx +++ b/svx/source/sdr/contact/viewcontactofe3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -225,3 +226,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofe3dcube.cxx b/svx/source/sdr/contact/viewcontactofe3dcube.cxx index b7497995c4..22be314198 100644 --- a/svx/source/sdr/contact/viewcontactofe3dcube.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dcube.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx index f0dd9197ff..20906efa07 100644 --- a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx index 495a1f6df9..ca97545e50 100644 --- a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -113,3 +114,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx index b8e8c352e5..33c6711c01 100644 --- a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -184,3 +185,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofe3dscene.cxx b/svx/source/sdr/contact/viewcontactofe3dscene.cxx index 36231a3ac7..47999b4772 100644 --- a/svx/source/sdr/contact/viewcontactofe3dscene.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dscene.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -476,3 +477,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofe3dsphere.cxx b/svx/source/sdr/contact/viewcontactofe3dsphere.cxx index 9a3d673ca3..f08462bcd7 100644 --- a/svx/source/sdr/contact/viewcontactofe3dsphere.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dsphere.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -96,3 +97,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 683602cc9e..c53ea6cf10 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -461,3 +462,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofgroup.cxx b/svx/source/sdr/contact/viewcontactofgroup.cxx index 3595c1a8f6..b6a2cb846c 100644 --- a/svx/source/sdr/contact/viewcontactofgroup.cxx +++ b/svx/source/sdr/contact/viewcontactofgroup.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -101,3 +102,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx index 15a22cdaae..f26393811a 100644 --- a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx +++ b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -124,3 +125,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofpageobj.cxx b/svx/source/sdr/contact/viewcontactofpageobj.cxx index 0bca7de140..21d4d2a76a 100644 --- a/svx/source/sdr/contact/viewcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewcontactofpageobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx index f13d30c8db..fb1676c083 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -177,3 +178,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx index 10a0d3f733..78151a98a3 100644 --- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -115,3 +116,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx b/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx index 6fdd107669..059a5d94ef 100644 --- a/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdredgeobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -77,3 +78,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx index 2ee955d980..61d6f1354a 100644 --- a/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -141,3 +142,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx index 5a38d50543..20f7d410d4 100644 --- a/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrmediaobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -182,3 +183,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofsdrobj.cxx b/svx/source/sdr/contact/viewcontactofsdrobj.cxx index c4407a8f58..cba1eac035 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -192,3 +193,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index fa09a765d8..d0532060d4 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -239,3 +240,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx index b802b2e363..10a6cb6686 100644 --- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -68,8 +69,7 @@ namespace sdr { } - drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithParameters( - bool bHighContrast) const + drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithParameters() const { // take unrotated snap rect (direct model data) for position and size const Rectangle& rRectangle = GetOle2Obj().GetGeoRect(); @@ -120,11 +120,12 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createViewIndependentPrimitive2DSequence() const { - // do as if no HC and call standard creator - return createPrimitive2DSequenceWithParameters(false); + return createPrimitive2DSequenceWithParameters(); } } // end of namespace contact } // end of namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx index 885bc46442..83f014c028 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -360,10 +361,10 @@ namespace sdr aLeft.append(basegfx::B2DPoint(aPageBorderRange.getMinX(), aPageBorderRange.getMinY())); aLeft.append(basegfx::B2DPoint(aPageBorderRange.getMinX(), aPageBorderRange.getMaxY())); - + aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMinY())); aRight.append(basegfx::B2DPoint(aPageBorderRange.getMaxX(), aPageBorderRange.getMaxY())); - + xRetval.realloc(2); xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aLeft, aRGBBorderColor)); xRetval[1] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aRight, aRGBBorderColor)); @@ -407,7 +408,7 @@ namespace sdr { const SdrPage& rPage = getPage(); const basegfx::B2DRange aPageBorderRange( - (double)rPage.GetLftBorder(), (double)rPage.GetUppBorder(), + (double)rPage.GetLftBorder(), (double)rPage.GetUppBorder(), (double)(rPage.GetWdt() - rPage.GetRgtBorder()), (double)(rPage.GetHgt() - rPage.GetLwrBorder())); const basegfx::B2DPolygon aPageBorderPolygon(basegfx::tools::createPolygonFromRect(aPageBorderRange)); @@ -468,7 +469,7 @@ namespace sdr { const ViewContact& rCandidate(GetViewContact(a)); const drawinglayer::primitive2d::Primitive2DSequence aCandSeq(rCandidate.getViewIndependentPrimitive2DSequence()); - + drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, aCandSeq); } @@ -604,9 +605,9 @@ namespace sdr // Access to possible sub-hierarchy sal_uInt32 ViewContactOfSdrPage::GetObjectCount() const { - // Fixed count of content. It contains PageBackground (Wiese), PageShadow, PageFill, + // Fixed count of content. It contains PageBackground (Wiese), PageShadow, PageFill, // then - depending on if the page has a MasterPage - either MasterPage Hierarchy - // or MPBGO. Also OuterPageBorder, InnerPageBorder and two pairs of Grid and Helplines + // or MPBGO. Also OuterPageBorder, InnerPageBorder and two pairs of Grid and Helplines // (for front and back) which internally are visible or not depending on the current // front/back setting for those. return 11; @@ -619,7 +620,7 @@ namespace sdr case 0: return (ViewContact&)maViewContactOfPageBackground; case 1: return (ViewContact&)maViewContactOfPageShadow; case 2: return (ViewContact&)maViewContactOfPageFill; - case 3: + case 3: { const SdrPage& rPage = GetSdrPage(); @@ -653,7 +654,7 @@ namespace sdr maViewContactOfPageBackground.ActionChanged(); maViewContactOfPageShadow.ActionChanged(); maViewContactOfPageFill.ActionChanged(); - + const SdrPage& rPage = GetSdrPage(); if(rPage.TRG_HasMasterPage()) @@ -664,7 +665,7 @@ namespace sdr { maViewContactOfMasterPage.ActionChanged(); } - + maViewContactOfOuterPageBorder.ActionChanged(); maViewContactOfInnerPageBorder.ActionChanged(); maViewContactOfGridBack.ActionChanged(); @@ -687,26 +688,26 @@ namespace sdr drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageBackground.getViewIndependentPrimitive2DSequence()); drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageShadow.getViewIndependentPrimitive2DSequence()); drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageFill.getViewIndependentPrimitive2DSequence()); - + const SdrPage& rPage = GetSdrPage(); if(rPage.TRG_HasMasterPage()) { - drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, + drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, rPage.TRG_GetMasterPageDescriptorViewContact().getViewIndependentPrimitive2DSequence()); } else if(rPage.IsMasterPage()) { - drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, + drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfMasterPage.getViewIndependentPrimitive2DSequence()); } - + drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfOuterPageBorder.getViewIndependentPrimitive2DSequence()); drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfInnerPageBorder.getViewIndependentPrimitive2DSequence()); drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, maViewContactOfPageHierarchy.getViewIndependentPrimitive2DSequence()); // Only add front versions of grid and helplines since no visibility test is done, - // so adding the back incarnations is not necessary. This makes the Front + // so adding the back incarnations is not necessary. This makes the Front // visualisation the default when no visibility tests are done. // // Since we have no view here, no grid and helpline definitions are available currently. The used @@ -724,3 +725,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx index 78f90a54d9..7e70f0b46a 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -143,3 +144,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx index cf2cf35033..ea5448a51a 100644 --- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -102,3 +103,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactoftextobj.cxx b/svx/source/sdr/contact/viewcontactoftextobj.cxx index 39f32d4b4f..b36f7e2cd9 100644 --- a/svx/source/sdr/contact/viewcontactoftextobj.cxx +++ b/svx/source/sdr/contact/viewcontactoftextobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,3 +50,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx index 7522bd73e1..6404472290 100644 --- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -179,3 +180,5 @@ namespace sdr { namespace contact { //........................................................................ } } // namespace sdr::contact //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewcontactofvirtobj.cxx b/svx/source/sdr/contact/viewcontactofvirtobj.cxx index a6ccb2b45f..31d1a2d9a9 100644 --- a/svx/source/sdr/contact/viewcontactofvirtobj.cxx +++ b/svx/source/sdr/contact/viewcontactofvirtobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -114,3 +115,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index 0e1a5bd149..dc562ba2b4 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -436,3 +437,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactofe3d.cxx b/svx/source/sdr/contact/viewobjectcontactofe3d.cxx index 0873ef1806..40c16bea60 100644 --- a/svx/source/sdr/contact/viewobjectcontactofe3d.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofe3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -99,3 +100,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx b/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx index 01c666b56c..40868bc979 100644 --- a/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -146,3 +147,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx index 6e80ea6ac5..f686333174 100644 --- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -331,3 +332,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx index 3174dfff38..6df1f2db07 100644 --- a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -113,3 +114,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx index 85c4068d4f..16e58f80dd 100644 --- a/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofmasterpagedescriptor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -151,3 +152,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx index 4c3329cfd5..f92863ceca 100644 --- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -350,3 +351,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx index ec92742a2b..e92136f987 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -174,3 +175,5 @@ void ViewObjectContactOfSdrMediaObj::executeMediaItem( const ::avmedia::MediaIte ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx index 6e658af973..b469841f9a 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -150,3 +151,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx index 182f790fe1..4ad437cfab 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,7 +77,7 @@ namespace sdr const bool bIsInplaceActive((nState == embed::EmbedStates::INPLACE_ACTIVE) || (nState == embed::EmbedStates::UI_ACTIVE)); const bool bIsChart(rSdrOle2.IsChart()); bool bDone(false); - + if(!bDone && bIsInplaceActive) { if( !GetObjectContact().isOutputToPrinter() && !GetObjectContact().isOutputToRecordingMetaFile() ) @@ -118,7 +119,7 @@ namespace sdr // determine if embedding and PrettyPrinting shall be done at all uno::Reference< frame::XModel > xChartModel; bool bDoChartPrettyPrinting(true); - + // the original ChartPrettyPainter does not do it for Window if(bDoChartPrettyPrinting && GetObjectContact().isOutputToWindow()) { @@ -194,7 +195,7 @@ namespace sdr // create OLE primitive stuff directly at VC with HC as parameter const ViewContactOfSdrOle2Obj& rVC = static_cast< const ViewContactOfSdrOle2Obj& >(GetViewContact()); - xRetval = rVC.createPrimitive2DSequenceWithParameters(GetObjectContact().isDrawModeHighContrast()); + xRetval = rVC.createPrimitive2DSequenceWithParameters(); } if(bIsOutplaceActive) @@ -215,8 +216,8 @@ namespace sdr false); // no filling const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolyPolygonHatchPrimitive2D( - basegfx::B2DPolyPolygon(aObjectOutline), - Color(COL_BLACK).getBColor(), + basegfx::B2DPolyPolygon(aObjectOutline), + Color(COL_BLACK).getBColor(), aFillHatch)); drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xReference); @@ -224,7 +225,7 @@ namespace sdr } } - + return xRetval; } @@ -241,3 +242,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx index 7b84753999..aae0fa90e9 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -727,3 +728,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index d7457be620..6f792a98c9 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60,7 +61,7 @@ #include <toolkit/helper/formpdfexport.hxx> #include <vcl/pdfextoutdevdata.hxx> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/scopeguard.hxx> #include <cppuhelper/implbase4.hxx> @@ -1430,7 +1431,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void SAL_CALL ViewObjectContactOfUnoControl_Impl::disposing( const EventObject& Source ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // some code below - in particular our disposal - might trigger actions which require the // SolarMutex. In particular, in our disposal, we remove ourself as listener from the control, // which alone needs the SolarMutex. Of course this - a removeFooListener needed the SolarMutex - @@ -1483,7 +1484,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void SAL_CALL ViewObjectContactOfUnoControl_Impl::propertyChange( const PropertyChangeEvent& /*_rEvent*/ ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // (re)painting might require VCL operations, which need the SolarMutex OSL_PRECOND( !impl_isDisposed_nofail(), "ViewObjectContactOfUnoControl_Impl::propertyChange: already disposed()" ); @@ -1507,10 +1508,10 @@ namespace sdr { namespace contact { { VOCGuard aGuard( *this ); - DBG_ASSERT( _rSource.NewMode.equalsAscii( "design" ) || _rSource.NewMode.equalsAscii( "alive" ), + DBG_ASSERT( _rSource.NewMode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "design" ) ) || _rSource.NewMode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "alive" ) ), "ViewObjectContactOfUnoControl_Impl::modeChanged: unexpected mode!" ); - m_eControlDesignMode = _rSource.NewMode.equalsAscii( "design" ) ? eDesign : eAlive; + m_eControlDesignMode = _rSource.NewMode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "design" ) ) ? eDesign : eAlive; impl_switchDesignModeListening_nothrow( impl_isControlDesignMode_nothrow() ); @@ -1535,7 +1536,7 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- void SAL_CALL ViewObjectContactOfUnoControl_Impl::elementRemoved( const ContainerEvent& Event ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // some code below - in particular our disposal - might trigger actions which require the // SolarMutex. In particular, in our disposal, we remove ourself as listener from the control, // which alone needs the SolarMutex. Of course this - a removeFooListener needed the SolarMutex - @@ -1923,3 +1924,4 @@ namespace sdr { namespace contact { } } // namespace sdr::contact //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/contact/viewobjectcontactredirector.cxx b/svx/source/sdr/contact/viewobjectcontactredirector.cxx index d83ed1245a..1c26d9e2e0 100644 --- a/svx/source/sdr/contact/viewobjectcontactredirector.cxx +++ b/svx/source/sdr/contact/viewobjectcontactredirector.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,3 +59,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/event/eventhandler.cxx b/svx/source/sdr/event/eventhandler.cxx index d522043abd..6edef73bcb 100644 --- a/svx/source/sdr/event/eventhandler.cxx +++ b/svx/source/sdr/event/eventhandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -160,3 +161,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx b/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx index e404b2e7b7..4d6c3fe09d 100644 --- a/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx +++ b/svx/source/sdr/overlay/overlayanimatedbitmapex.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -215,3 +216,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlaybitmapex.cxx b/svx/source/sdr/overlay/overlaybitmapex.cxx index 693c880dfb..813d778d37 100644 --- a/svx/source/sdr/overlay/overlaybitmapex.cxx +++ b/svx/source/sdr/overlay/overlaybitmapex.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,3 +112,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlaycrosshair.cxx b/svx/source/sdr/overlay/overlaycrosshair.cxx index 6a9eec0170..a903996c9a 100644 --- a/svx/source/sdr/overlay/overlaycrosshair.cxx +++ b/svx/source/sdr/overlay/overlaycrosshair.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlayhatchrect.cxx b/svx/source/sdr/overlay/overlayhatchrect.cxx index 7eb431cb37..b459004e92 100644 --- a/svx/source/sdr/overlay/overlayhatchrect.cxx +++ b/svx/source/sdr/overlay/overlayhatchrect.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -92,3 +93,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlayhelpline.cxx b/svx/source/sdr/overlay/overlayhelpline.cxx index 2a675d7922..9517438405 100644 --- a/svx/source/sdr/overlay/overlayhelpline.cxx +++ b/svx/source/sdr/overlay/overlayhelpline.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -91,3 +92,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlayline.cxx b/svx/source/sdr/overlay/overlayline.cxx index ae2bf3b801..19dbdd0846 100644 --- a/svx/source/sdr/overlay/overlayline.cxx +++ b/svx/source/sdr/overlay/overlayline.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,3 +106,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index 9a60f4c488..00c7b20308 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -391,3 +392,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index e265eb66a6..db5060789d 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -536,3 +537,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlayobject.cxx b/svx/source/sdr/overlay/overlayobject.cxx index dc6a29dddf..32584c2648 100644 --- a/svx/source/sdr/overlay/overlayobject.cxx +++ b/svx/source/sdr/overlay/overlayobject.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -214,3 +215,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlayobjectcell.cxx b/svx/source/sdr/overlay/overlayobjectcell.cxx index e7a8a3eae1..79eabbcf0a 100644 --- a/svx/source/sdr/overlay/overlayobjectcell.cxx +++ b/svx/source/sdr/overlay/overlayobjectcell.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -109,3 +110,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlayobjectlist.cxx b/svx/source/sdr/overlay/overlayobjectlist.cxx index 22764b50d0..f683472655 100644 --- a/svx/source/sdr/overlay/overlayobjectlist.cxx +++ b/svx/source/sdr/overlay/overlayobjectlist.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -182,3 +183,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlaypolypolygon.cxx b/svx/source/sdr/overlay/overlaypolypolygon.cxx index 311b136636..8de6b9f1c6 100644 --- a/svx/source/sdr/overlay/overlaypolypolygon.cxx +++ b/svx/source/sdr/overlay/overlaypolypolygon.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,3 +98,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx b/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx index 1157aa61ea..b81e46a0a6 100644 --- a/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx +++ b/svx/source/sdr/overlay/overlayprimitive2dsequenceobject.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,3 +60,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlayrollingrectangle.cxx b/svx/source/sdr/overlay/overlayrollingrectangle.cxx index 443607a495..d13171d5d8 100644 --- a/svx/source/sdr/overlay/overlayrollingrectangle.cxx +++ b/svx/source/sdr/overlay/overlayrollingrectangle.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -148,3 +149,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index bcf80b7c1d..45ff1d0960 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -235,3 +236,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx index eb2e2bd536..fdd28cd173 100644 --- a/svx/source/sdr/overlay/overlaytools.cxx +++ b/svx/source/sdr/overlay/overlaytools.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -491,3 +492,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/overlay/overlaytriangle.cxx b/svx/source/sdr/overlay/overlaytriangle.cxx index 344fe45526..d4b1e4d1a7 100644 --- a/svx/source/sdr/overlay/overlaytriangle.cxx +++ b/svx/source/sdr/overlay/overlaytriangle.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -104,3 +105,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/primitivefactory2d.cxx b/svx/source/sdr/primitive2d/primitivefactory2d.cxx index 6b7d6de787..d1eed0201e 100644 --- a/svx/source/sdr/primitive2d/primitivefactory2d.cxx +++ b/svx/source/sdr/primitive2d/primitivefactory2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -130,3 +131,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index d18345dd0b..1c788312b4 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -526,7 +527,6 @@ namespace drawinglayer } } - const SdrFitToSizeType eFit(rTextObj.GetFitToSize()); const SdrTextAniKind eAniKind(rTextObj.GetTextAniKind()); // #i107346# @@ -544,7 +544,8 @@ namespace drawinglayer rTextObj.GetTextHorizontalAdjust(rSet), rTextObj.GetTextVerticalAdjust(rSet), ((const SdrTextContourFrameItem&)rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(), - (SDRTEXTFIT_PROPORTIONAL == eFit || SDRTEXTFIT_ALLLINES == eFit), + rTextObj.IsFitToSize(), + rTextObj.IsAutoFit(), ((const XFormTextHideFormItem&)rSet.Get(XATTR_FORMTXTHIDEFORM)).GetValue(), SDRTEXTANI_BLINK == eAniKind, SDRTEXTANI_SCROLL == eAniKind || SDRTEXTANI_ALTERNATE == eAniKind || SDRTEXTANI_SLIDE == eAniKind, @@ -1026,3 +1027,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx index b3ee43b883..10a78cda73 100644 --- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -175,3 +176,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx index 2d0148744b..a87473f7ce 100644 --- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -122,3 +123,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index d3aab33c98..25e48eb361 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -128,3 +129,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index bccf3afc99..4825422655 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -281,6 +282,11 @@ namespace drawinglayer aAnchorTransform, rText.isFixedCellHeight()); } + else if(rText.isAutoFit()) + { + // isotrophically scaled text in range + pNew = new SdrAutoFitTextPrimitive2D(&rText.getSdrText(), rText.getOutlinerParaObject(), aAnchorTransform, bWordWrap); + } else // text in range { // build new primitive @@ -484,3 +490,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx index 8c78c51ea5..cce345bc31 100644 --- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -276,3 +277,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx index e7428ede50..c611b4c7c9 100644 --- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -175,3 +176,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 5f7e3a047d..0ba9a65cb3 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -508,3 +509,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx index 9bef2207f5..14c23fdcdb 100644 --- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -188,3 +189,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx index 12569813c5..60e0471aea 100644 --- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,9 +53,7 @@ namespace drawinglayer if(pSource) { - Graphic* pOLEGraphic = (getHighContrast()) - ? pSource->getEmbeddedObjectRef().GetHCGraphic() - : pSource->GetGraphic(); + Graphic* pOLEGraphic = pSource->GetGraphic(); if(pOLEGraphic) { @@ -76,7 +75,7 @@ namespace drawinglayer const GraphicObject aGraphicObject(aGraphic); const GraphicAttr aGraphicAttr; drawinglayer::primitive2d::Primitive2DSequence xOLEContent; - + if(bScaleContent) { // get transformation atoms @@ -109,8 +108,8 @@ namespace drawinglayer const drawinglayer::primitive2d::Primitive2DReference aGraphicPrimitive( new drawinglayer::primitive2d::GraphicPrimitive2D( - aInnerObjectMatrix, - aGraphicObject, + aInnerObjectMatrix, + aGraphicObject, aGraphicAttr)); drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aGraphicPrimitive); } @@ -120,8 +119,8 @@ namespace drawinglayer // create graphic primitive for content const drawinglayer::primitive2d::Primitive2DReference aGraphicPrimitive( new drawinglayer::primitive2d::GraphicPrimitive2D( - getObjectTransform(), - aGraphicObject, + getObjectTransform(), + aGraphicObject, aGraphicAttr)); drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aGraphicPrimitive); } @@ -150,34 +149,32 @@ namespace drawinglayer SdrOleContentPrimitive2D::SdrOleContentPrimitive2D( const SdrOle2Obj& rSdrOle2Obj, - const basegfx::B2DHomMatrix& rObjectTransform, - sal_uInt32 nGraphicVersion, - bool bHighContrast) + const basegfx::B2DHomMatrix& rObjectTransform, + sal_uInt32 nGraphicVersion + ) : BufferedDecompositionPrimitive2D(), mpSdrOle2Obj(const_cast< SdrOle2Obj* >(&rSdrOle2Obj)), maObjectTransform(rObjectTransform), - mnGraphicVersion(nGraphicVersion), - mbHighContrast(bHighContrast) + mnGraphicVersion(nGraphicVersion) { } bool SdrOleContentPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const { - if(BufferedDecompositionPrimitive2D::operator==(rPrimitive)) + if( BufferedDecompositionPrimitive2D::operator==(rPrimitive) ) { const SdrOleContentPrimitive2D& rCompare = (SdrOleContentPrimitive2D&)rPrimitive; const bool bBothNot(!mpSdrOle2Obj.is() && !rCompare.mpSdrOle2Obj.is()); - const bool bBothAndEqual(mpSdrOle2Obj.is() && rCompare.mpSdrOle2Obj.is() + const bool bBothAndEqual(mpSdrOle2Obj.is() && rCompare.mpSdrOle2Obj.is() && mpSdrOle2Obj.get() == rCompare.mpSdrOle2Obj.get()); - + return ((bBothNot || bBothAndEqual) && getObjectTransform() == rCompare.getObjectTransform() // #i104867# to find out if the Graphic content of the // OLE has changed, use GraphicVersion number && getGraphicVersion() == rCompare.getGraphicVersion() - - && getHighContrast() == rCompare.getHighContrast()); + ); } return false; @@ -187,7 +184,7 @@ namespace drawinglayer { basegfx::B2DRange aRange(0.0, 0.0, 1.0, 1.0); aRange.transform(getObjectTransform()); - + return aRange; } @@ -199,3 +196,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx index 2cd0dc02e2..a839d978ed 100644 --- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -145,3 +146,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx index fbe23b9450..5cc4a4a278 100644 --- a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx +++ b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -174,3 +175,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx index cb628a19ce..c6af6de417 100644 --- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -160,3 +161,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 112fecf109..d493c1969c 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,7 +59,7 @@ namespace { try { - const uno::Any aNumber(xSet->getPropertyValue(::rtl::OUString::createFromAscii("Number"))); + const uno::Any aNumber(xSet->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Number")))); aNumber >>= nRetval; } catch(const uno::Exception&) @@ -446,6 +447,55 @@ namespace drawinglayer { namespace primitive2d { + Primitive2DSequence SdrAutoFitTextPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const + { + Primitive2DSequence aRetval; + getSdrText()->GetObject().impDecomposeAutoFitTextPrimitive(aRetval, *this, aViewInformation); + + return encapsulateWithTextHierarchyBlockPrimitive2D(aRetval); + } + + SdrAutoFitTextPrimitive2D::SdrAutoFitTextPrimitive2D( + const SdrText* pSdrText, + const OutlinerParaObject& rParaObj, + const ::basegfx::B2DHomMatrix& rTextRangeTransform, + bool bWordWrap) + : SdrTextPrimitive2D(pSdrText, rParaObj), + maTextRangeTransform(rTextRangeTransform), + mbWordWrap(bWordWrap) + { + } + + bool SdrAutoFitTextPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const + { + if(SdrTextPrimitive2D::operator==(rPrimitive)) + { + const SdrBlockTextPrimitive2D& rCompare = (SdrBlockTextPrimitive2D&)rPrimitive; + + return (getTextRangeTransform() == rCompare.getTextRangeTransform() + && getWordWrap() == rCompare.getWordWrap()); + } + + return false; + } + + SdrTextPrimitive2D* SdrAutoFitTextPrimitive2D::createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const + { + return new SdrAutoFitTextPrimitive2D(getSdrText(), getOutlinerParaObject(), rTransform * getTextRangeTransform(), getWordWrap()); + } + + // provide unique ID + ImplPrimitrive2DIDBlock(SdrAutoFitTextPrimitive2D, PRIMITIVE2D_ID_SDRAUTOFITTEXTPRIMITIVE2D) + + } // end of namespace primitive2d + } // end of namespace drawinglayer + + ////////////////////////////////////////////////////////////////////////////// + + namespace drawinglayer + { + namespace primitive2d + { Primitive2DSequence SdrStretchTextPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; @@ -495,3 +545,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx b/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx index 83fed6ca42..f8f28dc936 100644 --- a/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx +++ b/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -156,3 +157,5 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 1661c4d562..81ef0063a1 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -626,3 +627,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/captionproperties.cxx b/svx/source/sdr/properties/captionproperties.cxx index 58d1c26e21..15c480d536 100644 --- a/svx/source/sdr/properties/captionproperties.cxx +++ b/svx/source/sdr/properties/captionproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -118,3 +119,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/circleproperties.cxx b/svx/source/sdr/properties/circleproperties.cxx index fe1e0668df..4cc3e7fcf2 100644 --- a/svx/source/sdr/properties/circleproperties.cxx +++ b/svx/source/sdr/properties/circleproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -155,3 +156,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/connectorproperties.cxx b/svx/source/sdr/properties/connectorproperties.cxx index 2433224cbb..f0a9f83e29 100644 --- a/svx/source/sdr/properties/connectorproperties.cxx +++ b/svx/source/sdr/properties/connectorproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,3 +106,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx index 6592977bc5..3abce475f1 100644 --- a/svx/source/sdr/properties/customshapeproperties.cxx +++ b/svx/source/sdr/properties/customshapeproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -237,3 +238,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx index ae91180a71..2d1e99f14b 100644 --- a/svx/source/sdr/properties/defaultproperties.cxx +++ b/svx/source/sdr/properties/defaultproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -184,7 +185,7 @@ namespace sdr while(aIter != aEnd) { PostItemChange(*aIter); - aIter++; + ++aIter; } ItemSetChanged(aSet); @@ -235,3 +236,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/e3dcompoundproperties.cxx b/svx/source/sdr/properties/e3dcompoundproperties.cxx index 883fcf4675..39a6fe42c6 100644 --- a/svx/source/sdr/properties/e3dcompoundproperties.cxx +++ b/svx/source/sdr/properties/e3dcompoundproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -163,3 +164,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/e3dextrudeproperties.cxx b/svx/source/sdr/properties/e3dextrudeproperties.cxx index c2a07c37b8..a86addb11e 100644 --- a/svx/source/sdr/properties/e3dextrudeproperties.cxx +++ b/svx/source/sdr/properties/e3dextrudeproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,3 +89,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/e3dlatheproperties.cxx b/svx/source/sdr/properties/e3dlatheproperties.cxx index 60598b41f2..662070fad5 100644 --- a/svx/source/sdr/properties/e3dlatheproperties.cxx +++ b/svx/source/sdr/properties/e3dlatheproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/e3dproperties.cxx b/svx/source/sdr/properties/e3dproperties.cxx index beddca4d27..85fe364ca3 100644 --- a/svx/source/sdr/properties/e3dproperties.cxx +++ b/svx/source/sdr/properties/e3dproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -104,3 +105,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx index e83f154e9b..8e1f8c48fa 100644 --- a/svx/source/sdr/properties/e3dsceneproperties.cxx +++ b/svx/source/sdr/properties/e3dsceneproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -332,3 +333,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/e3dsphereproperties.cxx b/svx/source/sdr/properties/e3dsphereproperties.cxx index 61a987c0f4..de636eac0b 100644 --- a/svx/source/sdr/properties/e3dsphereproperties.cxx +++ b/svx/source/sdr/properties/e3dsphereproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -83,3 +84,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/emptyproperties.cxx b/svx/source/sdr/properties/emptyproperties.cxx index fda8d248fd..cd247b5b1c 100644 --- a/svx/source/sdr/properties/emptyproperties.cxx +++ b/svx/source/sdr/properties/emptyproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -151,3 +152,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/graphicproperties.cxx b/svx/source/sdr/properties/graphicproperties.cxx index 92682bc89a..e2c478831a 100644 --- a/svx/source/sdr/properties/graphicproperties.cxx +++ b/svx/source/sdr/properties/graphicproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -141,3 +142,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx index d9c8af02d7..3bffbff838 100644 --- a/svx/source/sdr/properties/groupproperties.cxx +++ b/svx/source/sdr/properties/groupproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -296,3 +297,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/itemsettools.cxx b/svx/source/sdr/properties/itemsettools.cxx index 5da126f436..e19fa7a116 100644 --- a/svx/source/sdr/properties/itemsettools.cxx +++ b/svx/source/sdr/properties/itemsettools.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -144,3 +145,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/measureproperties.cxx b/svx/source/sdr/properties/measureproperties.cxx index e25ca83fef..971b4de127 100644 --- a/svx/source/sdr/properties/measureproperties.cxx +++ b/svx/source/sdr/properties/measureproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -139,3 +140,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/oleproperties.cxx b/svx/source/sdr/properties/oleproperties.cxx index 5c6fae24da..23ce9e26e3 100644 --- a/svx/source/sdr/properties/oleproperties.cxx +++ b/svx/source/sdr/properties/oleproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. diff --git a/svx/source/sdr/properties/pageproperties.cxx b/svx/source/sdr/properties/pageproperties.cxx index 3e5fd0886a..75b66a8072 100644 --- a/svx/source/sdr/properties/pageproperties.cxx +++ b/svx/source/sdr/properties/pageproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -99,3 +100,5 @@ namespace sdr //////////////////////////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx index 8b53fef186..0046765553 100644 --- a/svx/source/sdr/properties/properties.cxx +++ b/svx/source/sdr/properties/properties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -187,3 +188,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/rectangleproperties.cxx b/svx/source/sdr/properties/rectangleproperties.cxx index 6069a0116c..e686601466 100644 --- a/svx/source/sdr/properties/rectangleproperties.cxx +++ b/svx/source/sdr/properties/rectangleproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx index 7a040297c6..99eca41001 100644 --- a/svx/source/sdr/properties/textproperties.cxx +++ b/svx/source/sdr/properties/textproperties.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -636,3 +637,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx index 9f3f247eac..8b309a0d39 100644 --- a/svx/source/smarttags/SmartTagMgr.cxx +++ b/svx/source/smarttags/SmartTagMgr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +32,7 @@ #include "precompiled_svx.hxx" #include <svx/SmartTagMgr.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <com/sun/star/smarttags/XSmartTagRecognizer.hpp> #include <com/sun/star/smarttags/XSmartTagAction.hpp> @@ -261,7 +262,7 @@ void SmartTagMgr::WriteConfiguration( const bool* pIsLabelTextWithSmartTags, // ::com::sun::star::util::XModifyListener void SmartTagMgr::modified( const lang::EventObject& ) throw( RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; maRecognizerList.clear(); maActionList.clear(); @@ -273,7 +274,7 @@ void SmartTagMgr::modified( const lang::EventObject& ) throw( RuntimeException ) // ::com::sun::star::lang::XEventListener void SmartTagMgr::disposing( const lang::EventObject& rEvent ) throw( RuntimeException ) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; uno::Reference< frame::XModel > xModel( rEvent.Source, uno::UNO_QUERY ); uno::Reference< util::XModifyBroadcaster > xMB(xModel, uno::UNO_QUERY); @@ -300,7 +301,7 @@ void SmartTagMgr::disposing( const lang::EventObject& rEvent ) throw( RuntimeExc // ::com::sun::star::util::XChangesListener void SmartTagMgr::changesOccurred( const util::ChangesEvent& rEvent ) throw( RuntimeException) { - vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; const util::ElementChange* pElementChanges = rEvent.Changes.getConstArray(); const sal_Int32 nNumberOfChanges = rEvent.Changes.getLength(); @@ -550,3 +551,4 @@ void SmartTagMgr::AssociateActionsWithRecognizers() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/src/app.hrc b/svx/source/src/app.hrc index 1cdc416c74..a961cf5073 100644 --- a/svx/source/src/app.hrc +++ b/svx/source/src/app.hrc @@ -201,6 +201,8 @@ #define RID_OFA_TP_INTERNATIONAL_IMPR (RID_OFA_START + 254) // 4 impress #define RID_SW_TP_OPTCOMPATIBILITY_PAGE (RID_OFA_START + 255) #define RID_SW_TP_OPTCAPTION_PAGE (RID_OFA_START + 256) +#define SID_SC_TP_FORMULA (RID_OFA_START + 257) +#define SID_SC_TP_COMPATIBILITY (RID_OFA_START + 258) // Strings ------------------------------------------ @@ -246,10 +248,9 @@ #define RID_BMP_DB_RELATIONS_S (RID_OFA_START + 172) #define RID_BMP_DB_RELATIONS_L (RID_OFA_START + 173) #define RID_IMGLIST_TREEOPT (RID_OFA_START + 174) -#define RID_IMGLIST_TREEOPT_HC (RID_OFA_START + 175) - // 12 und 13 nicht benutzen!!! -// ..._BEGIN kann nochmal benutzt werden, nur zum Iterieren +// don't use 12 and 13 !!! +// ..._BEGIN can be used again. Just for iteration here #define RID_STR_PRIO_BEGIN (RID_OFA_START + 17) #define RID_STR_PRIO_HIGHEST (RID_OFA_START + 18) #define RID_STR_PRIO_HIGH (RID_OFA_START + 19) diff --git a/svx/source/src/app.src b/svx/source/src/app.src index f0a7891465..056ad2a3a4 100644 --- a/svx/source/src/app.src +++ b/svx/source/src/app.src @@ -63,20 +63,6 @@ ImageList RID_DEFAULTIMAGELIST_LC IMAGE_ID_LIST }; -ImageList RID_DEFAULTIMAGELIST_SCH -{ - Prefix = "sch"; - MASKCOLOR - IMAGE_ID_LIST -}; - -ImageList RID_DEFAULTIMAGELIST_LCH -{ - Prefix = "lch"; - MASKCOLOR - IMAGE_ID_LIST -}; - // Strings --------------------------------------------------------------- String RID_DESKTOP diff --git a/svx/source/stbctrls/insctrl.cxx b/svx/source/stbctrls/insctrl.cxx index 324c54517f..4859e276cf 100644 --- a/svx/source/stbctrls/insctrl.cxx +++ b/svx/source/stbctrls/insctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,6 @@ // include --------------------------------------------------------------- #include <tools/shl.hxx> -#ifndef _STATUS_HXX //autogen #include <vcl/status.hxx> #endif #include <svl/eitem.hxx> @@ -129,3 +129,4 @@ ULONG SvxInsertStatusBarControl::GetDefItemWidth(const StatusBar& rStb) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index 3453ac92ab..b520503ef9 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,29 +31,49 @@ // include --------------------------------------------------------------- -#ifndef _STATUS_HXX //autogen +#include "modctrl.hxx" + #include <vcl/status.hxx> #endif #include <svl/eitem.hxx> #include <sfx2/app.hxx> -#define _SVX_MODCTRL_CXX - #include <svx/dialogs.hrc> #include "svx/modctrl.hxx" #include <svx/dialmgr.hxx> +#include <com/sun/star/beans/PropertyValue.hpp> + +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::beans::PropertyValue; +using ::rtl::OUString; + SFX_IMPL_STATUSBAR_CONTROL(SvxModifyControl, SfxBoolItem); // class SvxModifyControl ------------------------------------------------ +struct SvxModifyControl::ImplData +{ + Image maModifiedButton; + Image maNonModifiedButton; + + bool mbModified; + + ImplData() : + maModifiedButton( SVX_RES(RID_SVXBMP_DOC_MODIFIED_YES) ), + maNonModifiedButton( SVX_RES(RID_SVXBMP_DOC_MODIFIED_NO) ), + mbModified(false) + { + } +}; + SvxModifyControl::SvxModifyControl( USHORT _nSlotId, USHORT _nId, StatusBar& rStb ) : SfxStatusBarControl( _nSlotId, _nId, rStb ), - bState( TRUE ) + mpImpl(new ImplData) { } @@ -62,32 +83,71 @@ void SvxModifyControl::StateChanged( USHORT, SfxItemState eState, const SfxPoolItem* pState ) { if ( SFX_ITEM_AVAILABLE != eState ) - GetStatusBar().SetItemText( GetId(), String() ); - else - { - DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" ); - SfxBoolItem* pItem = (SfxBoolItem*)pState; - bState = pItem->GetValue(); - DrawItemText_Impl(); - } + return; + + DBG_ASSERT( pState->ISA( SfxBoolItem ), "invalid item type" ); + SfxBoolItem* pItem = (SfxBoolItem*)pState; + mpImpl->mbModified = pItem->GetValue(); + + if ( GetStatusBar().AreItemsVisible() ) + GetStatusBar().SetItemData( GetId(), 0 ); // force repaint + + int nResId = mpImpl->mbModified ? RID_SVXSTR_DOC_MODIFIED_YES : RID_SVXSTR_DOC_MODIFIED_NO; + GetStatusBar().SetQuickHelpText(GetId(), SVX_RESSTR(nResId)); } // ----------------------------------------------------------------------- -void SvxModifyControl::Paint( const UserDrawEvent& ) +namespace { + +/** + * Given a bounding rectangle and an image, determine the top-left position + * of the image so that the image would look centered both horizontally and + * vertically. + * + * @param rBoundingRect bounding rectangle + * @param rImg image + * + * @return Point top-left corner of the centered image position + */ +Point centerImage(const Rectangle& rBoundingRect, const Image& rImg) { - DrawItemText_Impl(); + Size aImgSize = rImg.GetSizePixel(); + Size aRectSize = rBoundingRect.GetSize(); + long nXOffset = (aRectSize.getWidth() - aImgSize.getWidth())/2; + long nYOffset = (aRectSize.getHeight() - aImgSize.getHeight())/2; + Point aPt = rBoundingRect.TopLeft(); + aPt += Point(nXOffset, nYOffset); + return aPt; } -// ----------------------------------------------------------------------- +} +void SvxModifyControl::Paint( const UserDrawEvent& rUsrEvt ) +{ + const Rectangle aControlRect = getControlRect(); + OutputDevice* pDev = rUsrEvt.GetDevice(); + Rectangle aRect = rUsrEvt.GetRect(); + + if (mpImpl->mbModified) + { + Point aPt = centerImage(aRect, mpImpl->maModifiedButton); + pDev->DrawImage(aPt, mpImpl->maModifiedButton); + } + else + { + Point aPt = centerImage(aRect, mpImpl->maNonModifiedButton); + pDev->DrawImage(aPt, mpImpl->maNonModifiedButton); + } +} -void SvxModifyControl::DrawItemText_Impl() +void SvxModifyControl::DoubleClick() { - String sMode; + if (!mpImpl->mbModified) + // document not modified. nothing to do here. + return; - if ( bState ) - sMode = '*'; - GetStatusBar().SetItemText( GetId(), sMode ); + Sequence<PropertyValue> aArgs; + execute(OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Save")), aArgs); } ULONG SvxModifyControl::GetDefItemWidth(const StatusBar& rStb) @@ -96,3 +156,4 @@ ULONG SvxModifyControl::GetDefItemWidth(const StatusBar& rStb) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index ee85387298..d810f2d6c8 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -57,9 +58,7 @@ #include <svx/dialogs.hrc> #include <unotools/localedatawrapper.hxx> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif // ----------------------------------------------------------------------- @@ -445,3 +444,4 @@ ULONG SvxPosSizeStatusBarControl::GetDefItemWidth(const StatusBar& rStb) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx index 3def82ce1e..80a24a60d9 100644 --- a/svx/source/stbctrls/selctrl.cxx +++ b/svx/source/stbctrls/selctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,6 @@ // include --------------------------------------------------------------- #include <tools/shl.hxx> -#ifndef _STATUS_HXX //autogen #include <vcl/status.hxx> #endif #include <svl/intitem.hxx> @@ -152,3 +152,4 @@ ULONG SvxSelectionModeControl::GetDefItemWidth(const StatusBar& rStb) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/stbctrls/stbctrls.h b/svx/source/stbctrls/stbctrls.h index 59be68f2fd..23eb8b0e3a 100644 --- a/svx/source/stbctrls/stbctrls.h +++ b/svx/source/stbctrls/stbctrls.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,4 @@ #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/stbctrls/stbctrls.src b/svx/source/stbctrls/stbctrls.src index 7520e4f637..c3c83dd74b 100644 --- a/svx/source/stbctrls/stbctrls.src +++ b/svx/source/stbctrls/stbctrls.src @@ -89,6 +89,16 @@ String RID_SVXSTR_XMLSEC_SIG_CERT_OK_PARTIAL_SIG Text [ en-US ] = "Digital Signature: The document signature and the certificate are OK, but not all parts of the document are signed."; }; +String RID_SVXSTR_DOC_MODIFIED_YES +{ + Text [ en-US ] = "The document has been modified. Double-click to save the document."; +}; + +String RID_SVXSTR_DOC_MODIFIED_NO +{ + Text [ en-US ] = "The document has not been modified since the last save."; +}; + // PopupMenu ------------------------------------------------------------- Menu RID_SVXMNU_ZOOM { @@ -250,30 +260,6 @@ Image RID_SVXBMP_SIGNET_NOTVALIDATED }; MaskColor = STD_MASKCOLOR; }; -Image RID_SVXBMP_SIGNET_H -{ - ImageBitmap = Bitmap - { - File = "signet_11x16_h.png" ; - }; - MaskColor = STD_MASKCOLOR; -}; -Image RID_SVXBMP_SIGNET_BROKEN_H -{ - ImageBitmap = Bitmap - { - File = "caution_11x16_h.png" ; - }; - MaskColor = STD_MASKCOLOR; -}; -Image RID_SVXBMP_SIGNET_NOTVALIDATED_H -{ - ImageBitmap = Bitmap - { - File = "notcertificate_16_h.png" ; - }; - MaskColor = STD_MASKCOLOR; -}; Image RID_SVXBMP_SLIDERBUTTON @@ -300,28 +286,19 @@ Image RID_SVXBMP_SLIDERINCREASE }; MaskColor = STD_MASKCOLOR; }; -Image RID_SVXBMP_SLIDERBUTTON_HC +Image RID_SVXBMP_DOC_MODIFIED_YES { ImageBitmap = Bitmap { - File = "navigationball_10_h.png" ; + File = "doc_modified_yes_14.png" ; }; MaskColor = STD_MASKCOLOR; }; -Image RID_SVXBMP_SLIDERDECREASE_HC +Image RID_SVXBMP_DOC_MODIFIED_NO { ImageBitmap = Bitmap { - File = "slidezoomout_11_h.png" ; + File = "doc_modified_no_14.png" ; }; MaskColor = STD_MASKCOLOR; }; -Image RID_SVXBMP_SLIDERINCREASE_HC -{ - ImageBitmap = Bitmap - { - File = "slidezoomin_11_h.png" ; - }; - MaskColor = STD_MASKCOLOR; -}; - diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index 1e3bfa8eef..2010ce76c9 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,14 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -// include --------------------------------------------------------------- #include <tools/shl.hxx> -#ifndef _STATUS_HXX //autogen #include <vcl/status.hxx> -#endif -#ifndef _MENU_HXX //autogen #include <vcl/menu.hxx> -#endif #include <vcl/image.hxx> //#ifndef _SFXITEMPOOL_HXX //#include <svl/itempool.hxx> @@ -89,17 +85,13 @@ struct XmlSecStatusBarControl::XmlSecStatusBarControl_Impl XmlSecStatusBarControl::XmlSecStatusBarControl( USHORT _nSlotId, USHORT _nId, StatusBar& _rStb ) :SfxStatusBarControl( _nSlotId, _nId, _rStb ) - ,mpImpl( new XmlSecStatusBarControl_Impl ) { mpImpl->mnState = (UINT16)SIGNATURESTATE_UNKNOWN; - sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode(); - mpImpl->maImage = Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_H : RID_SVXBMP_SIGNET ) ); - mpImpl->maImageBroken = - Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_BROKEN_H : RID_SVXBMP_SIGNET_BROKEN ) ); - mpImpl->maImageNotValidated = - Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_NOTVALIDATED_H : RID_SVXBMP_SIGNET_NOTVALIDATED ) ); + mpImpl->maImage = Image( SVX_RES( RID_SVXBMP_SIGNET ) ); + mpImpl->maImageBroken = Image( SVX_RES( RID_SVXBMP_SIGNET_BROKEN ) ); + mpImpl->maImageNotValidated = Image( SVX_RES( RID_SVXBMP_SIGNET_NOTVALIDATED ) ); } XmlSecStatusBarControl::~XmlSecStatusBarControl() @@ -115,7 +107,6 @@ void XmlSecStatusBarControl::StateChanged( USHORT, SfxItemState eState, const Sf } else if( pState->ISA( SfxUInt16Item ) ) { -// mpImpl->mbSigned = ( ( SfxUInt16Item* ) pState )->GetValue() == 1 /* SIGNED*/ ; mpImpl->mnState = ( ( SfxUInt16Item* ) pState )->GetValue(); } else @@ -188,7 +179,7 @@ void XmlSecStatusBarControl::Paint( const UserDrawEvent& rUsrEvt ) ++aRect.Top(); pDev->DrawImage( aRect.TopLeft(), mpImpl->maImageBroken ); } - else if( mpImpl->mnState == SIGNATURESTATE_SIGNATURES_NOTVALIDATED + else if( mpImpl->mnState == SIGNATURESTATE_SIGNATURES_NOTVALIDATED || mpImpl->mnState == SIGNATURESTATE_SIGNATURES_PARTIAL_OK) { ++aRect.Top(); @@ -206,3 +197,4 @@ long XmlSecStatusBarControl::GetDefItemWidth( StatusBar& ) return 16; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index 59db093eaf..be2f2ca809 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,12 +29,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include <tools/shl.hxx> -#ifndef _STATUS_HXX //autogen #include <vcl/status.hxx> -#endif -#ifndef _MENU_HXX //autogen #include <vcl/menu.hxx> -#endif #include <sfx2/dispatch.hxx> #include <tools/urlobj.hxx> @@ -83,7 +80,7 @@ ZoomPopup_Impl::ZoomPopup_Impl( USHORT nZ, USHORT nValueSet ) SVX_ZOOM_ENABLE_PAGEWIDTH, ZOOM_PAGE_WIDTH }; - for ( USHORT nPos = 0; nPos < sizeof(aTable) / sizeof(USHORT); nPos += 2 ) + for ( USHORT nPos = 0; nPos < SAL_N_ELEMENTS(aTable); nPos += 2 ) if ( ( aTable[nPos] != ( aTable[nPos] & nValueSet ) ) ) EnableItem( aTable[nPos+1], FALSE ); } @@ -221,3 +218,4 @@ ULONG SvxZoomStatusBarControl::GetDefItemWidth(const StatusBar& rStb) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index c6502b8bc3..6c60fadc83 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,12 +31,8 @@ // include --------------------------------------------------------------- #include <svx/zoomsliderctrl.hxx> -#ifndef _STATUS_HXX //autogen #include <vcl/status.hxx> -#endif -#ifndef _MENU_HXX //autogen #include <vcl/menu.hxx> -#endif #include <vcl/image.hxx> #include <svx/zoomslideritem.hxx> #include <svx/dialmgr.hxx> @@ -185,10 +182,9 @@ SvxZoomSliderControl::SvxZoomSliderControl( USHORT _nSlotId, USHORT _nId, Statu SfxStatusBarControl( _nSlotId, _nId, _rStb ), mpImpl( new SvxZoomSliderControl_Impl ) { - const sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode(); - mpImpl->maSliderButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) ); - mpImpl->maIncreaseButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) ); - mpImpl->maDecreaseButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) ); + mpImpl->maSliderButton = Image( SVX_RES( RID_SVXBMP_SLIDERBUTTON ) ); + mpImpl->maIncreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERINCREASE ) ); + mpImpl->maDecreaseButton = Image( SVX_RES( RID_SVXBMP_SLIDERDECREASE ) ); } // ----------------------------------------------------------------------- @@ -446,3 +442,5 @@ BOOL SvxZoomSliderControl::MouseMove( const MouseEvent & rEvt ) return TRUE; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/ActionDescriptionProvider.cxx b/svx/source/svdraw/ActionDescriptionProvider.cxx index fa3e5a22d5..95a5018695 100644 --- a/svx/source/svdraw/ActionDescriptionProvider.cxx +++ b/svx/source/svdraw/ActionDescriptionProvider.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -80,3 +81,5 @@ aStr.SearchAndReplaceAscii("%1", aName); return rtl::OUString(aStr); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/clonelist.cxx b/svx/source/svdraw/clonelist.cxx index 042a116da7..9a323630a1 100644 --- a/svx/source/svdraw/clonelist.cxx +++ b/svx/source/svdraw/clonelist.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -132,3 +133,5 @@ void CloneList::CopyConnections() const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx index 23f61b7028..6b33979da3 100644 --- a/svx/source/svdraw/gradtrns.cxx +++ b/svx/source/svdraw/gradtrns.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -536,3 +537,5 @@ void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, Grad } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/gradtrns.hxx b/svx/source/svdraw/gradtrns.hxx index 7a29933c0b..ce0f6ee236 100644 --- a/svx/source/svdraw/gradtrns.hxx +++ b/svx/source/svdraw/gradtrns.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -62,3 +63,4 @@ public: #endif // _GRADTRANS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/impgrfll.cxx b/svx/source/svdraw/impgrfll.cxx index a49abc21ae..f8332089c4 100644 --- a/svx/source/svdraw/impgrfll.cxx +++ b/svx/source/svdraw/impgrfll.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -253,3 +254,5 @@ void ImpCalcBmpFillSizes( Size& rStartOffset, ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/polypolygoneditor.cxx b/svx/source/svdraw/polypolygoneditor.cxx index 39a5e0ad03..64774e59b3 100644 --- a/svx/source/svdraw/polypolygoneditor.cxx +++ b/svx/source/svdraw/polypolygoneditor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,7 +47,7 @@ bool PolyPolygonEditor::DeletePoints( const std::set< sal_uInt16 >& rAbsPoints ) bool bPolyPolyChanged = false; std::set< sal_uInt16 >::const_reverse_iterator aIter;( rAbsPoints.rbegin() ); - for( aIter = rAbsPoints.rbegin(); aIter != rAbsPoints.rend(); aIter++ ) + for( aIter = rAbsPoints.rbegin(); aIter != rAbsPoints.rend(); ++aIter ) { sal_uInt32 nPoly, nPnt; if( GetRelativePolyPoint(maPolyPolygon,(*aIter), nPoly, nPnt) ) @@ -77,7 +78,7 @@ bool PolyPolygonEditor::SetSegmentsKind(SdrPathSegmentKind eKind, const std::set bool bPolyPolyChanged = false; std::set< sal_uInt16 >::const_reverse_iterator aIter;( rAbsPoints.rbegin() ); - for( aIter = rAbsPoints.rbegin(); aIter != rAbsPoints.rend(); aIter++ ) + for( aIter = rAbsPoints.rbegin(); aIter != rAbsPoints.rend(); ++aIter ) { sal_uInt32 nPolyNum, nPntNum; @@ -136,7 +137,7 @@ bool PolyPolygonEditor::SetPointsSmooth( basegfx::B2VectorContinuity eFlags, con bool bPolyPolygonChanged(false); std::set< sal_uInt16 >::const_reverse_iterator aIter;( rAbsPoints.rbegin() ); - for( aIter = rAbsPoints.rbegin(); aIter != rAbsPoints.rend(); aIter++ ) + for( aIter = rAbsPoints.rbegin(); aIter != rAbsPoints.rend(); ++aIter ) { sal_uInt32 nPolyNum, nPntNum; @@ -188,3 +189,5 @@ bool PolyPolygonEditor::GetRelativePolyPoint( const basegfx::B2DPolyPolygon& rPo } } // end of namespace sdr + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/sdrcomment.cxx b/svx/source/svdraw/sdrcomment.cxx index fb2f1e1922..ae6011d6b0 100644 --- a/svx/source/svdraw/sdrcomment.cxx +++ b/svx/source/svdraw/sdrcomment.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -96,3 +97,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/sdrhittesthelper.cxx b/svx/source/svdraw/sdrhittesthelper.cxx index c4a7ec0c25..5b51232cbd 100644 --- a/svx/source/svdraw/sdrhittesthelper.cxx +++ b/svx/source/svdraw/sdrhittesthelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -171,3 +172,5 @@ bool ViewObjectContactPrimitiveHit( //////////////////////////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/sdrmasterpagedescriptor.cxx b/svx/source/svdraw/sdrmasterpagedescriptor.cxx index e3f5f34845..5f55e4d1d2 100644 --- a/svx/source/svdraw/sdrmasterpagedescriptor.cxx +++ b/svx/source/svdraw/sdrmasterpagedescriptor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -140,3 +141,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index d11a77187c..cbac92782c 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,7 +43,7 @@ #include <svx/sdrpaintwindow.hxx> #include <svx/sdr/contact/objectcontactofpageview.hxx> #include <svx/sdr/contact/displayinfo.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <svx/fmview.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> @@ -104,8 +105,8 @@ using namespace ::com::sun::star; uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); if( xFactory.is() ) { - const_cast< SdrPageWindow* >( this )->mxControlContainer = uno::Reference< awt::XControlContainer >(xFactory->createInstance(rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlContainer")), uno::UNO_QUERY); - uno::Reference< awt::XControlModel > xModel(xFactory->createInstance(rtl::OUString::createFromAscii("com.sun.star.awt.UnoControlContainerModel")), uno::UNO_QUERY); + const_cast< SdrPageWindow* >( this )->mxControlContainer = uno::Reference< awt::XControlContainer >(xFactory->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlContainer"))), uno::UNO_QUERY); + uno::Reference< awt::XControlModel > xModel(xFactory->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlContainerModel"))), uno::UNO_QUERY); uno::Reference< awt::XControl > xControl(mxControlContainer, uno::UNO_QUERY); if (xControl.is()) xControl->setModel(xModel); @@ -288,8 +289,6 @@ namespace Color aColor(rand()%255, rand()%255, rand()%255); impPaintStrokePolygon(aResult.getB2DPolygon(a), rOutDev, aColor); } - - bool bBla = true; } } } @@ -466,3 +465,5 @@ void SdrPageWindow::SetDesignMode( bool _bDesignMode ) const //////////////////////////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index 9bffe5c49a..17ccfde01d 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -310,3 +311,5 @@ void SdrPaintWindow::SetRedrawRegion(const Region& rNew) //////////////////////////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/selectioncontroller.cxx b/svx/source/svdraw/selectioncontroller.cxx index 29b4772803..375f9bfcb9 100644 --- a/svx/source/svdraw/selectioncontroller.cxx +++ b/svx/source/svdraw/selectioncontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -112,3 +113,5 @@ bool SelectionController::ApplyFormatPaintBrush( SfxItemSet& /*rFormatSet*/, boo } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 3071a70c80..d4ddb308a6 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -344,7 +345,7 @@ SdrItemPool::SdrItemPool(const SdrItemPool& rPool) |* \************************************************************************/ -SfxItemPool* __EXPORT SdrItemPool::Clone() const +SfxItemPool* SdrItemPool::Clone() const { return new SdrItemPool(*this); } @@ -378,7 +379,7 @@ SdrItemPool::~SdrItemPool() SetSecondaryPool(NULL); } -SfxItemPresentation __EXPORT SdrItemPool::GetPresentation( +SfxItemPresentation SdrItemPool::GetPresentation( const SfxPoolItem& rItem, SfxItemPresentation ePresentation, SfxMapUnit ePresentationMetric, XubString& rText, const IntlWrapper * pIntlWrapper) const @@ -641,13 +642,13 @@ SdrFractionItem::SdrFractionItem(USHORT nId, SvStream& rIn): nValue=Fraction(nMul,nDiv); } -int __EXPORT SdrFractionItem::operator==(const SfxPoolItem& rCmp) const +int SdrFractionItem::operator==(const SfxPoolItem& rCmp) const { return SfxPoolItem::operator==(rCmp) && ((SdrFractionItem&)rCmp).GetValue()==nValue; } -SfxItemPresentation __EXPORT SdrFractionItem::GetPresentation( +SfxItemPresentation SdrFractionItem::GetPresentation( SfxItemPresentation ePresentation, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresentationMetric*/, XubString &rText, const IntlWrapper *) const { @@ -680,25 +681,25 @@ SfxItemPresentation __EXPORT SdrFractionItem::GetPresentation( return ePresentation; } -SfxPoolItem* __EXPORT SdrFractionItem::Create(SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrFractionItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrFractionItem(Which(),rIn); } -SvStream& __EXPORT SdrFractionItem::Store(SvStream& rOut, USHORT /*nItemVers*/) const +SvStream& SdrFractionItem::Store(SvStream& rOut, USHORT /*nItemVers*/) const { rOut<<INT32(nValue.GetNumerator()); rOut<<INT32(nValue.GetDenominator()); return rOut; } -SfxPoolItem* __EXPORT SdrFractionItem::Clone(SfxItemPool * /*pPool*/) const +SfxPoolItem* SdrFractionItem::Clone(SfxItemPool * /*pPool*/) const { return new SdrFractionItem(Which(),GetValue()); } #ifdef SDR_ISPOOLABLE -int __EXPORT SdrFractionItem::IsPoolable() const +int SdrFractionItem::IsPoolable() const { USHORT nId=Which(); return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST; @@ -711,7 +712,7 @@ int __EXPORT SdrFractionItem::IsPoolable() const TYPEINIT1_AUTOFACTORY(SdrScaleItem,SdrFractionItem); -SfxItemPresentation __EXPORT SdrScaleItem::GetPresentation( +SfxItemPresentation SdrScaleItem::GetPresentation( SfxItemPresentation ePresentation, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresentationMetric*/, XubString &rText, const IntlWrapper *) const { @@ -741,12 +742,12 @@ SfxItemPresentation __EXPORT SdrScaleItem::GetPresentation( return ePresentation; } -SfxPoolItem* __EXPORT SdrScaleItem::Create(SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrScaleItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrScaleItem(Which(),rIn); } -SfxPoolItem* __EXPORT SdrScaleItem::Clone(SfxItemPool * /*pPool*/) const +SfxPoolItem* SdrScaleItem::Clone(SfxItemPool * /*pPool*/) const { return new SdrScaleItem(Which(),GetValue()); } @@ -757,23 +758,23 @@ SfxPoolItem* __EXPORT SdrScaleItem::Clone(SfxItemPool * /*pPool*/) const TYPEINIT1_AUTOFACTORY(SdrOnOffItem,SfxBoolItem); -SfxPoolItem* __EXPORT SdrOnOffItem::Clone(SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrOnOffItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrOnOffItem(Which(),GetValue()); } -SfxPoolItem* __EXPORT SdrOnOffItem::Create(SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrOnOffItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrOnOffItem(Which(),rIn); } -XubString __EXPORT SdrOnOffItem::GetValueTextByVal(BOOL bVal) const +XubString SdrOnOffItem::GetValueTextByVal(BOOL bVal) const { if (bVal) return ImpGetResStr(STR_ItemValON); else return ImpGetResStr(STR_ItemValOFF); } -SfxItemPresentation __EXPORT SdrOnOffItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrOnOffItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByVal(GetValue()); @@ -788,7 +789,7 @@ SfxItemPresentation __EXPORT SdrOnOffItem::GetPresentation(SfxItemPresentation e } #ifdef SDR_ISPOOLABLE -int __EXPORT SdrOnOffItem::IsPoolable() const +int SdrOnOffItem::IsPoolable() const { USHORT nId=Which(); return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST; @@ -797,23 +798,23 @@ int __EXPORT SdrOnOffItem::IsPoolable() const TYPEINIT1_AUTOFACTORY(SdrYesNoItem,SfxBoolItem); -SfxPoolItem* __EXPORT SdrYesNoItem::Clone(SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrYesNoItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrYesNoItem(Which(),GetValue()); } -SfxPoolItem* __EXPORT SdrYesNoItem::Create(SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrYesNoItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrYesNoItem(Which(),rIn); } -XubString __EXPORT SdrYesNoItem::GetValueTextByVal(BOOL bVal) const +XubString SdrYesNoItem::GetValueTextByVal(BOOL bVal) const { if (bVal) return ImpGetResStr(STR_ItemValYES); else return ImpGetResStr(STR_ItemValNO); } -SfxItemPresentation __EXPORT SdrYesNoItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrYesNoItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByVal(GetValue()); @@ -828,7 +829,7 @@ SfxItemPresentation __EXPORT SdrYesNoItem::GetPresentation(SfxItemPresentation e } #ifdef SDR_ISPOOLABLE -int __EXPORT SdrYesNoItem::IsPoolable() const +int SdrYesNoItem::IsPoolable() const { USHORT nId=Which(); return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST; @@ -841,17 +842,17 @@ int __EXPORT SdrYesNoItem::IsPoolable() const TYPEINIT1_AUTOFACTORY(SdrPercentItem,SfxUInt16Item); -SfxPoolItem* __EXPORT SdrPercentItem::Clone(SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrPercentItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrPercentItem(Which(),GetValue()); } -SfxPoolItem* __EXPORT SdrPercentItem::Create(SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrPercentItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrPercentItem(Which(),rIn); } -SfxItemPresentation __EXPORT SdrPercentItem::GetPresentation( +SfxItemPresentation SdrPercentItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { @@ -871,7 +872,7 @@ SfxItemPresentation __EXPORT SdrPercentItem::GetPresentation( } #ifdef SDR_ISPOOLABLE -int __EXPORT SdrPercentItem::IsPoolable() const +int SdrPercentItem::IsPoolable() const { USHORT nId=Which(); return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST; @@ -884,17 +885,17 @@ int __EXPORT SdrPercentItem::IsPoolable() const TYPEINIT1_AUTOFACTORY(SdrAngleItem,SfxInt32Item); -SfxPoolItem* __EXPORT SdrAngleItem::Clone(SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrAngleItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrAngleItem(Which(),GetValue()); } -SfxPoolItem* __EXPORT SdrAngleItem::Create(SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrAngleItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrAngleItem(Which(),rIn); } -SfxItemPresentation __EXPORT SdrAngleItem::GetPresentation( +SfxItemPresentation SdrAngleItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper * pIntlWrapper) const { @@ -968,7 +969,7 @@ SfxItemPresentation __EXPORT SdrAngleItem::GetPresentation( } #ifdef SDR_ISPOOLABLE -int __EXPORT SdrAngleItem::IsPoolable() const +int SdrAngleItem::IsPoolable() const { USHORT nId=Which(); return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST; @@ -981,22 +982,22 @@ int __EXPORT SdrAngleItem::IsPoolable() const TYPEINIT1_AUTOFACTORY(SdrMetricItem,SfxInt32Item); -SfxPoolItem* __EXPORT SdrMetricItem::Clone(SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrMetricItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMetricItem(Which(),GetValue()); } -SfxPoolItem* __EXPORT SdrMetricItem::Create(SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrMetricItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrMetricItem(Which(),rIn); } -FASTBOOL __EXPORT SdrMetricItem::HasMetrics() const +bool SdrMetricItem::HasMetrics() const { return TRUE; } -FASTBOOL __EXPORT SdrMetricItem::ScaleMetrics(long nMul, long nDiv) +bool SdrMetricItem::ScaleMetrics(long nMul, long nDiv) { if (GetValue()!=0) { BigInt aVal(GetValue()); @@ -1008,7 +1009,7 @@ FASTBOOL __EXPORT SdrMetricItem::ScaleMetrics(long nMul, long nDiv) return TRUE; } -SfxItemPresentation __EXPORT SdrMetricItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrMetricItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const IntlWrapper *) const { long nValue=GetValue(); @@ -1028,7 +1029,7 @@ SfxItemPresentation __EXPORT SdrMetricItem::GetPresentation(SfxItemPresentation } #ifdef SDR_ISPOOLABLE -int __EXPORT SdrMetricItem::IsPoolable() const +int SdrMetricItem::IsPoolable() const { USHORT nId=Which(); return nId<SDRATTR_NOTPERSIST_FIRST || nId>SDRATTR_NOTPERSIST_LAST; @@ -1041,18 +1042,18 @@ int __EXPORT SdrMetricItem::IsPoolable() const TYPEINIT1_AUTOFACTORY(SdrCaptionTypeItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrCaptionTypeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrCaptionTypeItem(*this); } +SfxPoolItem* SdrCaptionTypeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrCaptionTypeItem(*this); } -SfxPoolItem* __EXPORT SdrCaptionTypeItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrCaptionTypeItem(rIn); } +SfxPoolItem* SdrCaptionTypeItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrCaptionTypeItem(rIn); } -USHORT __EXPORT SdrCaptionTypeItem::GetValueCount() const { return 4; } +USHORT SdrCaptionTypeItem::GetValueCount() const { return 4; } -XubString __EXPORT SdrCaptionTypeItem::GetValueTextByPos(USHORT nPos) const +XubString SdrCaptionTypeItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValCAPTIONTYPE1+nPos); } -SfxItemPresentation __EXPORT SdrCaptionTypeItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrCaptionTypeItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -1068,18 +1069,18 @@ SfxItemPresentation __EXPORT SdrCaptionTypeItem::GetPresentation(SfxItemPresenta TYPEINIT1_AUTOFACTORY(SdrCaptionEscDirItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrCaptionEscDirItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrCaptionEscDirItem(*this); } +SfxPoolItem* SdrCaptionEscDirItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrCaptionEscDirItem(*this); } -SfxPoolItem* __EXPORT SdrCaptionEscDirItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrCaptionEscDirItem(rIn); } +SfxPoolItem* SdrCaptionEscDirItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrCaptionEscDirItem(rIn); } -USHORT __EXPORT SdrCaptionEscDirItem::GetValueCount() const { return 3; } +USHORT SdrCaptionEscDirItem::GetValueCount() const { return 3; } -XubString __EXPORT SdrCaptionEscDirItem::GetValueTextByPos(USHORT nPos) const +XubString SdrCaptionEscDirItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValCAPTIONESCHORI+nPos); } -SfxItemPresentation __EXPORT SdrCaptionEscDirItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrCaptionEscDirItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -1100,18 +1101,18 @@ SfxItemPresentation __EXPORT SdrCaptionEscDirItem::GetPresentation(SfxItemPresen // FitToSize TYPEINIT1_AUTOFACTORY(SdrTextFitToSizeTypeItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextFitToSizeTypeItem(*this); } +SfxPoolItem* SdrTextFitToSizeTypeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextFitToSizeTypeItem(*this); } -SfxPoolItem* __EXPORT SdrTextFitToSizeTypeItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextFitToSizeTypeItem(rIn); } +SfxPoolItem* SdrTextFitToSizeTypeItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextFitToSizeTypeItem(rIn); } -USHORT __EXPORT SdrTextFitToSizeTypeItem::GetValueCount() const { return 4; } +USHORT SdrTextFitToSizeTypeItem::GetValueCount() const { return 4; } -XubString __EXPORT SdrTextFitToSizeTypeItem::GetValueTextByPos(USHORT nPos) const +XubString SdrTextFitToSizeTypeItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValFITTOSIZENONE+nPos); } -SfxItemPresentation __EXPORT SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -1125,51 +1126,51 @@ SfxItemPresentation __EXPORT SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPr return ePres; } -int __EXPORT SdrTextFitToSizeTypeItem::HasBoolValue() const { return TRUE; } +int SdrTextFitToSizeTypeItem::HasBoolValue() const { return TRUE; } -BOOL __EXPORT SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SDRTEXTFIT_NONE; } +BOOL SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SDRTEXTFIT_NONE; } -void __EXPORT SdrTextFitToSizeTypeItem::SetBoolValue(BOOL bVal) { SetValue(sal::static_int_cast< USHORT >(bVal ? SDRTEXTFIT_PROPORTIONAL : SDRTEXTFIT_NONE)); } +void SdrTextFitToSizeTypeItem::SetBoolValue(BOOL bVal) { SetValue(sal::static_int_cast< USHORT >(bVal ? SDRTEXTFIT_PROPORTIONAL : SDRTEXTFIT_NONE)); } -sal_Bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { drawing::TextFitToSizeType eFS = (drawing::TextFitToSizeType)GetValue(); rVal <<= eFS; - return sal_True; + return true; } -sal_Bool SdrTextFitToSizeTypeItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrTextFitToSizeTypeItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::TextFitToSizeType eFS; if(!(rVal >>= eFS)) { sal_Int32 nEnum = 0; if(!(rVal >>= nEnum)) - return sal_False; + return false; eFS = (drawing::TextFitToSizeType) nEnum; } SetValue( sal::static_int_cast< USHORT >( (SdrFitToSizeType)eFS ) ); - return sal_True; + return true; } TYPEINIT1_AUTOFACTORY(SdrTextVertAdjustItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrTextVertAdjustItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextVertAdjustItem(*this); } +SfxPoolItem* SdrTextVertAdjustItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextVertAdjustItem(*this); } -SfxPoolItem* __EXPORT SdrTextVertAdjustItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextVertAdjustItem(rIn); } +SfxPoolItem* SdrTextVertAdjustItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextVertAdjustItem(rIn); } -USHORT __EXPORT SdrTextVertAdjustItem::GetValueCount() const { return 5; } +USHORT SdrTextVertAdjustItem::GetValueCount() const { return 5; } -XubString __EXPORT SdrTextVertAdjustItem::GetValueTextByPos(USHORT nPos) const +XubString SdrTextVertAdjustItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValTEXTVADJTOP+nPos); } -SfxItemPresentation __EXPORT SdrTextVertAdjustItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrTextVertAdjustItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -1183,43 +1184,43 @@ SfxItemPresentation __EXPORT SdrTextVertAdjustItem::GetPresentation(SfxItemPrese return ePres; } -sal_Bool SdrTextVertAdjustItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrTextVertAdjustItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::TextVerticalAdjust)GetValue(); - return sal_True; + return true; } -sal_Bool SdrTextVertAdjustItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrTextVertAdjustItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::TextVerticalAdjust eAdj; if(!(rVal >>= eAdj)) { sal_Int32 nEnum = 0; if(!(rVal >>= nEnum)) - return sal_False; + return false; eAdj = (drawing::TextVerticalAdjust)nEnum; } SetValue( sal::static_int_cast< USHORT >( (SdrTextVertAdjust)eAdj ) ); - return sal_True; + return true; } TYPEINIT1_AUTOFACTORY(SdrTextHorzAdjustItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrTextHorzAdjustItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextHorzAdjustItem(*this); } +SfxPoolItem* SdrTextHorzAdjustItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextHorzAdjustItem(*this); } -SfxPoolItem* __EXPORT SdrTextHorzAdjustItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextHorzAdjustItem(rIn); } +SfxPoolItem* SdrTextHorzAdjustItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextHorzAdjustItem(rIn); } -USHORT __EXPORT SdrTextHorzAdjustItem::GetValueCount() const { return 5; } +USHORT SdrTextHorzAdjustItem::GetValueCount() const { return 5; } -XubString __EXPORT SdrTextHorzAdjustItem::GetValueTextByPos(USHORT nPos) const +XubString SdrTextHorzAdjustItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValTEXTHADJLEFT+nPos); } -SfxItemPresentation __EXPORT SdrTextHorzAdjustItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrTextHorzAdjustItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -1233,43 +1234,43 @@ SfxItemPresentation __EXPORT SdrTextHorzAdjustItem::GetPresentation(SfxItemPrese return ePres; } -sal_Bool SdrTextHorzAdjustItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrTextHorzAdjustItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::TextHorizontalAdjust)GetValue(); - return sal_True; + return true; } -sal_Bool SdrTextHorzAdjustItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrTextHorzAdjustItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::TextHorizontalAdjust eAdj; if(!(rVal >>= eAdj)) { sal_Int32 nEnum = 0; if(!(rVal >>= nEnum)) - return sal_False; + return false; eAdj = (drawing::TextHorizontalAdjust)nEnum; } SetValue( sal::static_int_cast< USHORT >( (SdrTextHorzAdjust)eAdj ) ); - return sal_True; + return true; } TYPEINIT1_AUTOFACTORY(SdrTextAniKindItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrTextAniKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniKindItem(*this); } +SfxPoolItem* SdrTextAniKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniKindItem(*this); } -SfxPoolItem* __EXPORT SdrTextAniKindItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextAniKindItem(rIn); } +SfxPoolItem* SdrTextAniKindItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextAniKindItem(rIn); } -USHORT __EXPORT SdrTextAniKindItem::GetValueCount() const { return 5; } +USHORT SdrTextAniKindItem::GetValueCount() const { return 5; } -XubString __EXPORT SdrTextAniKindItem::GetValueTextByPos(USHORT nPos) const +XubString SdrTextAniKindItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValTEXTANI_NONE+nPos); } -SfxItemPresentation __EXPORT SdrTextAniKindItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrTextAniKindItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -1283,42 +1284,42 @@ SfxItemPresentation __EXPORT SdrTextAniKindItem::GetPresentation(SfxItemPresenta return ePres; } -sal_Bool SdrTextAniKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrTextAniKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::TextAnimationKind)GetValue(); - return sal_True; + return true; } -sal_Bool SdrTextAniKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrTextAniKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::TextAnimationKind eKind; if(!(rVal >>= eKind)) { sal_Int32 nEnum = 0; if(!(rVal >>= nEnum)) - return sal_False; + return false; eKind = (drawing::TextAnimationKind)nEnum; } SetValue( sal::static_int_cast< USHORT >( (SdrTextAniKind)eKind ) ); - return sal_True; + return true; } TYPEINIT1_AUTOFACTORY(SdrTextAniDirectionItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrTextAniDirectionItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniDirectionItem(*this); } +SfxPoolItem* SdrTextAniDirectionItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniDirectionItem(*this); } -SfxPoolItem* __EXPORT SdrTextAniDirectionItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextAniDirectionItem(rIn); } +SfxPoolItem* SdrTextAniDirectionItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextAniDirectionItem(rIn); } -USHORT __EXPORT SdrTextAniDirectionItem::GetValueCount() const { return 4; } +USHORT SdrTextAniDirectionItem::GetValueCount() const { return 4; } -XubString __EXPORT SdrTextAniDirectionItem::GetValueTextByPos(USHORT nPos) const +XubString SdrTextAniDirectionItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValTEXTANI_LEFT+nPos); } -SfxItemPresentation __EXPORT SdrTextAniDirectionItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrTextAniDirectionItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -1332,36 +1333,36 @@ SfxItemPresentation __EXPORT SdrTextAniDirectionItem::GetPresentation(SfxItemPre return ePres; } -sal_Bool SdrTextAniDirectionItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrTextAniDirectionItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::TextAnimationDirection)GetValue(); - return sal_True; + return true; } -sal_Bool SdrTextAniDirectionItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrTextAniDirectionItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::TextAnimationDirection eDir; if(!(rVal >>= eDir)) { sal_Int32 nEnum = 0; if(!(rVal >>= nEnum)) - return sal_False; + return false; eDir = (drawing::TextAnimationDirection)nEnum; } SetValue( sal::static_int_cast< USHORT >( (SdrTextAniDirection)eDir ) ); - return sal_True; + return true; } TYPEINIT1_AUTOFACTORY(SdrTextAniDelayItem,SfxUInt16Item); -SfxPoolItem* __EXPORT SdrTextAniDelayItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniDelayItem(*this); } +SfxPoolItem* SdrTextAniDelayItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniDelayItem(*this); } -SfxPoolItem* __EXPORT SdrTextAniDelayItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextAniDelayItem(rIn); } +SfxPoolItem* SdrTextAniDelayItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextAniDelayItem(rIn); } -SfxItemPresentation __EXPORT SdrTextAniDelayItem::GetPresentation( +SfxItemPresentation SdrTextAniDelayItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { @@ -1383,16 +1384,16 @@ SfxItemPresentation __EXPORT SdrTextAniDelayItem::GetPresentation( TYPEINIT1_AUTOFACTORY(SdrTextAniAmountItem,SfxInt16Item); -SfxPoolItem* __EXPORT SdrTextAniAmountItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniAmountItem(*this); } +SfxPoolItem* SdrTextAniAmountItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrTextAniAmountItem(*this); } -SfxPoolItem* __EXPORT SdrTextAniAmountItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextAniAmountItem(rIn); } +SfxPoolItem* SdrTextAniAmountItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrTextAniAmountItem(rIn); } -FASTBOOL __EXPORT SdrTextAniAmountItem::HasMetrics() const +bool SdrTextAniAmountItem::HasMetrics() const { return GetValue()>0; } -FASTBOOL __EXPORT SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv) +bool SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv) { if (GetValue()>0) { BigInt aVal(GetValue()); @@ -1404,7 +1405,7 @@ FASTBOOL __EXPORT SdrTextAniAmountItem::ScaleMetrics(long nMul, long nDiv) } else return FALSE; } -SfxItemPresentation __EXPORT SdrTextAniAmountItem::GetPresentation( +SfxItemPresentation SdrTextAniAmountItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, XubString& rText, const IntlWrapper *) const { @@ -1415,10 +1416,8 @@ SfxItemPresentation __EXPORT SdrTextAniAmountItem::GetPresentation( if(nValue < 0) { - sal_Char aText[] = "pixel"; - rText = UniString::CreateFromInt32(-nValue); - rText += UniString(aText, sizeof(aText-1)); + rText += UniString(RTL_CONSTASCII_USTRINGPARAM("pixel")); } else { @@ -1457,7 +1456,7 @@ SdrTextFixedCellHeightItem::SdrTextFixedCellHeightItem( SvStream & rStream, sal_ SetValue( bValue ); } } -SfxItemPresentation __EXPORT SdrTextFixedCellHeightItem::GetPresentation( SfxItemPresentation ePres, +SfxItemPresentation SdrTextFixedCellHeightItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresentationMetric*/, String &rText, const IntlWrapper * ) const { @@ -1471,11 +1470,11 @@ SfxItemPresentation __EXPORT SdrTextFixedCellHeightItem::GetPresentation( SfxIte } return ePres; } -SfxPoolItem* __EXPORT SdrTextFixedCellHeightItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const +SfxPoolItem* SdrTextFixedCellHeightItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const { return new SdrTextFixedCellHeightItem( rIn, nItemVersion ); } -SvStream& __EXPORT SdrTextFixedCellHeightItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const +SvStream& SdrTextFixedCellHeightItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const { if ( nItemVersion ) { @@ -1484,7 +1483,7 @@ SvStream& __EXPORT SdrTextFixedCellHeightItem::Store( SvStream& rOut, sal_uInt16 } return rOut; } -SfxPoolItem* __EXPORT SdrTextFixedCellHeightItem::Clone( SfxItemPool * /*pPool*/) const +SfxPoolItem* SdrTextFixedCellHeightItem::Clone( SfxItemPool * /*pPool*/) const { return new SdrTextFixedCellHeightItem( GetValue() ); } @@ -1492,22 +1491,22 @@ sal_uInt16 SdrTextFixedCellHeightItem::GetVersion( sal_uInt16 /*nFileFormatVersi { return 1; } -sal_Bool SdrTextFixedCellHeightItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrTextFixedCellHeightItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { sal_Bool bValue = (sal_Bool)GetValue(); rVal <<= bValue; - return sal_True; + return true; } -sal_Bool SdrTextFixedCellHeightItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrTextFixedCellHeightItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Bool bValue = sal_Bool(); if( !( rVal >>= bValue ) ) - return sal_False; + return false; SetValue( bValue ); - return sal_True; + return true; } #ifdef SDR_ISPOOLABLE -int __EXPORT SdrTextFixedCellHeightItem::IsPoolable() const +int SdrTextFixedCellHeightItem::IsPoolable() const { USHORT nId=Which(); return nId < SDRATTR_NOTPERSIST_FIRST || nId > SDRATTR_NOTPERSIST_LAST; @@ -1543,7 +1542,7 @@ SdrCustomShapeAdjustmentItem::~SdrCustomShapeAdjustmentItem() delete (SdrCustomShapeAdjustmentValue*)pPtr; } -int __EXPORT SdrCustomShapeAdjustmentItem::operator==( const SfxPoolItem& rCmp ) const +int SdrCustomShapeAdjustmentItem::operator==( const SfxPoolItem& rCmp ) const { int bRet = SfxPoolItem::operator==( rCmp ); if ( bRet ) @@ -1565,7 +1564,7 @@ int __EXPORT SdrCustomShapeAdjustmentItem::operator==( const SfxPoolItem& rCmp ) return bRet; } -SfxItemPresentation __EXPORT SdrCustomShapeAdjustmentItem::GetPresentation( +SfxItemPresentation SdrCustomShapeAdjustmentItem::GetPresentation( SfxItemPresentation ePresentation, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresentationMetric*/, XubString &rText, const IntlWrapper *) const { @@ -1587,12 +1586,12 @@ SfxItemPresentation __EXPORT SdrCustomShapeAdjustmentItem::GetPresentation( return ePresentation; } -SfxPoolItem* __EXPORT SdrCustomShapeAdjustmentItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const +SfxPoolItem* SdrCustomShapeAdjustmentItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const { return new SdrCustomShapeAdjustmentItem( rIn, nItemVersion ); } -SvStream& __EXPORT SdrCustomShapeAdjustmentItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const +SvStream& SdrCustomShapeAdjustmentItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const { if ( nItemVersion ) { @@ -1604,7 +1603,7 @@ SvStream& __EXPORT SdrCustomShapeAdjustmentItem::Store( SvStream& rOut, sal_uInt return rOut; } -SfxPoolItem* __EXPORT SdrCustomShapeAdjustmentItem::Clone( SfxItemPool * /*pPool*/) const +SfxPoolItem* SdrCustomShapeAdjustmentItem::Clone( SfxItemPool * /*pPool*/) const { sal_uInt32 i; SdrCustomShapeAdjustmentItem* pItem = new SdrCustomShapeAdjustmentItem; @@ -1617,7 +1616,7 @@ SfxPoolItem* __EXPORT SdrCustomShapeAdjustmentItem::Clone( SfxItemPool * /*pPool } #ifdef SDR_ISPOOLABLE -int __EXPORT SdrCustomShapeAdjustmentItem::IsPoolable() const +int SdrCustomShapeAdjustmentItem::IsPoolable() const { USHORT nId=Which(); return nId < SDRATTR_NOTPERSIST_FIRST || nId > SDRATTR_NOTPERSIST_LAST; @@ -1650,7 +1649,7 @@ sal_uInt16 SdrCustomShapeAdjustmentItem::GetVersion( sal_uInt16 /*nFileFormatVer return 1; } -sal_Bool SdrCustomShapeAdjustmentItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrCustomShapeAdjustmentItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { sal_uInt32 i, nCount = GetCount(); uno::Sequence< sal_Int32 > aSequence( nCount ); @@ -1661,14 +1660,14 @@ sal_Bool SdrCustomShapeAdjustmentItem::QueryValue( uno::Any& rVal, BYTE /*nMembe *pPtr++ = GetValue( i ).nValue; } rVal <<= aSequence; - return sal_True; + return true; } -sal_Bool SdrCustomShapeAdjustmentItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrCustomShapeAdjustmentItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { uno::Sequence< sal_Int32 > aSequence; if( !( rVal >>= aSequence ) ) - return sal_False; + return false; void* pPtr; for ( pPtr = aAdjustmentValueList.First(); pPtr; pPtr = aAdjustmentValueList.Next() ) @@ -1685,7 +1684,7 @@ sal_Bool SdrCustomShapeAdjustmentItem::PutValue( const uno::Any& rVal, BYTE /*nM aAdjustmentValueList.Insert( pItem, LIST_APPEND ); } } - return sal_True; + return true; } @@ -1696,18 +1695,18 @@ sal_Bool SdrCustomShapeAdjustmentItem::PutValue( const uno::Any& rVal, BYTE /*nM // EdgeKind TYPEINIT1_AUTOFACTORY(SdrEdgeKindItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrEdgeKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrEdgeKindItem(*this); } +SfxPoolItem* SdrEdgeKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrEdgeKindItem(*this); } -SfxPoolItem* __EXPORT SdrEdgeKindItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrEdgeKindItem(rIn); } +SfxPoolItem* SdrEdgeKindItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrEdgeKindItem(rIn); } -USHORT __EXPORT SdrEdgeKindItem::GetValueCount() const { return 4; } +USHORT SdrEdgeKindItem::GetValueCount() const { return 4; } -XubString __EXPORT SdrEdgeKindItem::GetValueTextByPos(USHORT nPos) const +XubString SdrEdgeKindItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValEDGE_ORTHOLINES+nPos); } -SfxItemPresentation __EXPORT SdrEdgeKindItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrEdgeKindItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -1721,7 +1720,7 @@ SfxItemPresentation __EXPORT SdrEdgeKindItem::GetPresentation(SfxItemPresentatio return ePres; } -sal_Bool SdrEdgeKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrEdgeKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { drawing::ConnectorType eCT = drawing::ConnectorType_STANDARD; @@ -1738,17 +1737,17 @@ sal_Bool SdrEdgeKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const rVal <<= eCT; - return sal_True; + return true; } -sal_Bool SdrEdgeKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrEdgeKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::ConnectorType eCT; if(!(rVal >>= eCT)) { sal_Int32 nEnum = 0; if(!(rVal >>= nEnum)) - return sal_False; + return false; eCT = (drawing::ConnectorType)nEnum; } @@ -1765,119 +1764,119 @@ sal_Bool SdrEdgeKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) } SetValue( sal::static_int_cast< USHORT >( eEK ) ); - return sal_True; + return true; } -sal_Bool SdrEdgeNode1HorzDistItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrEdgeNode1HorzDistItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } -sal_Bool SdrEdgeNode1HorzDistItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrEdgeNode1HorzDistItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; SetValue( nValue ); - return sal_True; + return true; } -BOOL SdrEdgeNode1VertDistItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrEdgeNode1VertDistItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } -BOOL SdrEdgeNode1VertDistItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrEdgeNode1VertDistItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; SetValue( nValue ); - return sal_True; + return true; } -BOOL SdrEdgeNode2HorzDistItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrEdgeNode2HorzDistItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } -BOOL SdrEdgeNode2HorzDistItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrEdgeNode2HorzDistItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; SetValue( nValue ); - return sal_True; + return true; } -BOOL SdrEdgeNode2VertDistItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrEdgeNode2VertDistItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } -BOOL SdrEdgeNode2VertDistItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrEdgeNode2VertDistItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; SetValue( nValue ); - return sal_True; + return true; } -BOOL SdrEdgeLine1DeltaItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrEdgeLine1DeltaItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } -BOOL SdrEdgeLine1DeltaItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrEdgeLine1DeltaItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; SetValue( nValue ); - return sal_True; + return true; } -BOOL SdrEdgeLine2DeltaItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrEdgeLine2DeltaItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } -BOOL SdrEdgeLine2DeltaItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrEdgeLine2DeltaItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; SetValue( nValue ); - return sal_True; + return true; } -BOOL SdrEdgeLine3DeltaItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrEdgeLine3DeltaItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } -BOOL SdrEdgeLine3DeltaItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrEdgeLine3DeltaItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; SetValue( nValue ); - return sal_True; + return true; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -1887,18 +1886,18 @@ BOOL SdrEdgeLine3DeltaItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) // MeasureKind TYPEINIT1_AUTOFACTORY(SdrMeasureKindItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrMeasureKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureKindItem(*this); } +SfxPoolItem* SdrMeasureKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureKindItem(*this); } -SfxPoolItem* __EXPORT SdrMeasureKindItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrMeasureKindItem(rIn); } +SfxPoolItem* SdrMeasureKindItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrMeasureKindItem(rIn); } -USHORT __EXPORT SdrMeasureKindItem::GetValueCount() const { return 2; } +USHORT SdrMeasureKindItem::GetValueCount() const { return 2; } -XubString __EXPORT SdrMeasureKindItem::GetValueTextByPos(USHORT nPos) const +XubString SdrMeasureKindItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValMEASURE_STD+nPos); } -SfxItemPresentation __EXPORT SdrMeasureKindItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrMeasureKindItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -1912,42 +1911,42 @@ SfxItemPresentation __EXPORT SdrMeasureKindItem::GetPresentation(SfxItemPresenta return ePres; } -sal_Bool SdrMeasureKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrMeasureKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::MeasureKind)GetValue(); - return sal_True; + return true; } -sal_Bool SdrMeasureKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrMeasureKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::MeasureKind eKind; if(!(rVal >>= eKind)) { sal_Int32 nEnum = 0; if(!(rVal >>= nEnum)) - return sal_False; + return false; eKind = (drawing::MeasureKind)nEnum; } SetValue( sal::static_int_cast< USHORT >( (SdrMeasureKind)eKind ) ); - return sal_True; + return true; } TYPEINIT1_AUTOFACTORY(SdrMeasureTextHPosItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrMeasureTextHPosItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureTextHPosItem(*this); } +SfxPoolItem* SdrMeasureTextHPosItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureTextHPosItem(*this); } -SfxPoolItem* __EXPORT SdrMeasureTextHPosItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrMeasureTextHPosItem(rIn); } +SfxPoolItem* SdrMeasureTextHPosItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrMeasureTextHPosItem(rIn); } -USHORT __EXPORT SdrMeasureTextHPosItem::GetValueCount() const { return 4; } +USHORT SdrMeasureTextHPosItem::GetValueCount() const { return 4; } -XubString __EXPORT SdrMeasureTextHPosItem::GetValueTextByPos(USHORT nPos) const +XubString SdrMeasureTextHPosItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValMEASURE_TEXTHAUTO+nPos); } -SfxItemPresentation __EXPORT SdrMeasureTextHPosItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrMeasureTextHPosItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -1961,42 +1960,42 @@ SfxItemPresentation __EXPORT SdrMeasureTextHPosItem::GetPresentation(SfxItemPres return ePres; } -sal_Bool SdrMeasureTextHPosItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrMeasureTextHPosItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::MeasureTextHorzPos)GetValue(); - return sal_True; + return true; } -sal_Bool SdrMeasureTextHPosItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrMeasureTextHPosItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::MeasureTextHorzPos ePos; if(!(rVal >>= ePos)) { sal_Int32 nEnum = 0; if(!(rVal >>= nEnum)) - return sal_False; + return false; ePos = (drawing::MeasureTextHorzPos)nEnum; } SetValue( sal::static_int_cast< USHORT >( (SdrMeasureTextHPos)ePos ) ); - return sal_True; + return true; } TYPEINIT1_AUTOFACTORY(SdrMeasureTextVPosItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrMeasureTextVPosItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureTextVPosItem(*this); } +SfxPoolItem* SdrMeasureTextVPosItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureTextVPosItem(*this); } -SfxPoolItem* __EXPORT SdrMeasureTextVPosItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrMeasureTextVPosItem(rIn); } +SfxPoolItem* SdrMeasureTextVPosItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrMeasureTextVPosItem(rIn); } -USHORT __EXPORT SdrMeasureTextVPosItem::GetValueCount() const { return 5; } +USHORT SdrMeasureTextVPosItem::GetValueCount() const { return 5; } -XubString __EXPORT SdrMeasureTextVPosItem::GetValueTextByPos(USHORT nPos) const +XubString SdrMeasureTextVPosItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValMEASURE_TEXTVAUTO+nPos); } -SfxItemPresentation __EXPORT SdrMeasureTextVPosItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrMeasureTextVPosItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -2010,54 +2009,49 @@ SfxItemPresentation __EXPORT SdrMeasureTextVPosItem::GetPresentation(SfxItemPres return ePres; } -sal_Bool SdrMeasureTextVPosItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrMeasureTextVPosItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::MeasureTextVertPos)GetValue(); - return sal_True; + return true; } -sal_Bool SdrMeasureTextVPosItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrMeasureTextVPosItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::MeasureTextVertPos ePos; if(!(rVal >>= ePos)) { sal_Int32 nEnum = 0; if(!(rVal >>= nEnum)) - return sal_False; + return false; ePos = (drawing::MeasureTextVertPos)nEnum; } SetValue( sal::static_int_cast< USHORT >( (SdrMeasureTextHPos)ePos ) ); - return sal_True; + return true; } TYPEINIT1_AUTOFACTORY(SdrMeasureUnitItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrMeasureUnitItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureUnitItem(*this); } +SfxPoolItem* SdrMeasureUnitItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrMeasureUnitItem(*this); } -SfxPoolItem* __EXPORT SdrMeasureUnitItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrMeasureUnitItem(rIn); } +SfxPoolItem* SdrMeasureUnitItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrMeasureUnitItem(rIn); } -USHORT __EXPORT SdrMeasureUnitItem::GetValueCount() const { return 14; } +USHORT SdrMeasureUnitItem::GetValueCount() const { return 14; } -XubString __EXPORT SdrMeasureUnitItem::GetValueTextByPos(USHORT nPos) const +XubString SdrMeasureUnitItem::GetValueTextByPos(USHORT nPos) const { XubString aRetval; if((FieldUnit)nPos == FUNIT_NONE) - { - sal_Char aText[] = "default"; - aRetval += UniString(aText, sizeof(aText-1)); - } + aRetval += UniString(RTL_CONSTASCII_USTRINGPARAM("default")); else - { SdrFormatter::TakeUnitStr((FieldUnit)nPos, aRetval); - } return aRetval; } -SfxItemPresentation __EXPORT SdrMeasureUnitItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrMeasureUnitItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -2071,20 +2065,20 @@ SfxItemPresentation __EXPORT SdrMeasureUnitItem::GetPresentation(SfxItemPresenta return ePres; } -sal_Bool SdrMeasureUnitItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrMeasureUnitItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } -sal_Bool SdrMeasureUnitItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrMeasureUnitItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nMeasure = 0; if(!(rVal >>= nMeasure)) - return sal_False; + return false; SetValue( sal::static_int_cast< USHORT >( (FieldUnit)nMeasure ) ); - return sal_True; + return true; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -2094,18 +2088,18 @@ sal_Bool SdrMeasureUnitItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) // CircKind TYPEINIT1_AUTOFACTORY(SdrCircKindItem,SfxEnumItem); -SfxPoolItem* __EXPORT SdrCircKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrCircKindItem(*this); } +SfxPoolItem* SdrCircKindItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrCircKindItem(*this); } -SfxPoolItem* __EXPORT SdrCircKindItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrCircKindItem(rIn); } +SfxPoolItem* SdrCircKindItem::Create(SvStream& rIn, USHORT /*nVer*/) const { return new SdrCircKindItem(rIn); } -USHORT __EXPORT SdrCircKindItem::GetValueCount() const { return 4; } +USHORT SdrCircKindItem::GetValueCount() const { return 4; } -XubString __EXPORT SdrCircKindItem::GetValueTextByPos(USHORT nPos) const +XubString SdrCircKindItem::GetValueTextByPos(USHORT nPos) const { return ImpGetResStr(STR_ItemValCIRC_FULL+nPos); } -SfxItemPresentation __EXPORT SdrCircKindItem::GetPresentation(SfxItemPresentation ePres, +SfxItemPresentation SdrCircKindItem::GetPresentation(SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { rText=GetValueTextByPos(sal::static_int_cast< USHORT >(GetValue())); @@ -2119,26 +2113,26 @@ SfxItemPresentation __EXPORT SdrCircKindItem::GetPresentation(SfxItemPresentatio return ePres; } -sal_Bool SdrCircKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrCircKindItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (drawing::CircleKind)GetValue(); - return sal_True; + return true; } -sal_Bool SdrCircKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrCircKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { drawing::CircleKind eKind; if(!(rVal >>= eKind)) { sal_Int32 nEnum = 0; if(!(rVal >>= nEnum)) - return sal_False; + return false; eKind = (drawing::CircleKind)nEnum; } SetValue( sal::static_int_cast< USHORT >( (SdrCircKind)eKind ) ); - return sal_True; + return true; } //------------------------------------------------------------ @@ -2148,17 +2142,17 @@ sal_Bool SdrCircKindItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) TYPEINIT1_AUTOFACTORY( SdrSignedPercentItem, SfxInt16Item ); -SfxPoolItem* __EXPORT SdrSignedPercentItem::Clone(SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrSignedPercentItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrSignedPercentItem( Which(), GetValue() ); } -SfxPoolItem* __EXPORT SdrSignedPercentItem::Create( SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrSignedPercentItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new SdrSignedPercentItem( Which(), rIn ); } -SfxItemPresentation __EXPORT SdrSignedPercentItem::GetPresentation( +SfxItemPresentation SdrSignedPercentItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { @@ -2179,7 +2173,7 @@ SfxItemPresentation __EXPORT SdrSignedPercentItem::GetPresentation( #ifdef SDR_ISPOOLABLE -int __EXPORT SdrSignedPercentItem::IsPoolable() const +int SdrSignedPercentItem::IsPoolable() const { USHORT nId=Which(); return nId < SDRATTR_NOTPERSIST_FIRST || nId > SDRATTR_NOTPERSIST_LAST; @@ -2192,12 +2186,12 @@ int __EXPORT SdrSignedPercentItem::IsPoolable() const TYPEINIT1( SdrGrafRedItem, SdrSignedPercentItem ); -SfxPoolItem* __EXPORT SdrGrafRedItem::Clone( SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrGrafRedItem::Clone( SfxItemPool* /*pPool*/) const { return new SdrGrafRedItem( *this ); } -SfxPoolItem* __EXPORT SdrGrafRedItem::Create( SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrGrafRedItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new SdrGrafRedItem( rIn ); } @@ -2208,12 +2202,12 @@ SfxPoolItem* __EXPORT SdrGrafRedItem::Create( SvStream& rIn, USHORT /*nVer*/) co TYPEINIT1( SdrGrafGreenItem, SdrSignedPercentItem ); -SfxPoolItem* __EXPORT SdrGrafGreenItem::Clone( SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrGrafGreenItem::Clone( SfxItemPool* /*pPool*/) const { return new SdrGrafGreenItem( *this ); } -SfxPoolItem* __EXPORT SdrGrafGreenItem::Create( SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrGrafGreenItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new SdrGrafGreenItem( rIn ); } @@ -2224,12 +2218,12 @@ SfxPoolItem* __EXPORT SdrGrafGreenItem::Create( SvStream& rIn, USHORT /*nVer*/) TYPEINIT1( SdrGrafBlueItem, SdrSignedPercentItem ); -SfxPoolItem* __EXPORT SdrGrafBlueItem::Clone( SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrGrafBlueItem::Clone( SfxItemPool* /*pPool*/) const { return new SdrGrafBlueItem( *this ); } -SfxPoolItem* __EXPORT SdrGrafBlueItem::Create( SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrGrafBlueItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new SdrGrafBlueItem( rIn ); } @@ -2240,12 +2234,12 @@ SfxPoolItem* __EXPORT SdrGrafBlueItem::Create( SvStream& rIn, USHORT /*nVer*/) c TYPEINIT1( SdrGrafLuminanceItem, SdrSignedPercentItem ); -SfxPoolItem* __EXPORT SdrGrafLuminanceItem::Clone( SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrGrafLuminanceItem::Clone( SfxItemPool* /*pPool*/) const { return new SdrGrafLuminanceItem( *this ); } -SfxPoolItem* __EXPORT SdrGrafLuminanceItem::Create( SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrGrafLuminanceItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new SdrGrafLuminanceItem( rIn ); } @@ -2256,12 +2250,12 @@ SfxPoolItem* __EXPORT SdrGrafLuminanceItem::Create( SvStream& rIn, USHORT /*nVer TYPEINIT1( SdrGrafContrastItem, SdrSignedPercentItem ); -SfxPoolItem* __EXPORT SdrGrafContrastItem::Clone( SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrGrafContrastItem::Clone( SfxItemPool* /*pPool*/) const { return new SdrGrafContrastItem( *this ); } -SfxPoolItem* __EXPORT SdrGrafContrastItem::Create( SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrGrafContrastItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new SdrGrafContrastItem( rIn ); } @@ -2272,30 +2266,30 @@ SfxPoolItem* __EXPORT SdrGrafContrastItem::Create( SvStream& rIn, USHORT /*nVer* TYPEINIT1( SdrGrafGamma100Item, SfxUInt32Item ); -SfxPoolItem* __EXPORT SdrGrafGamma100Item::Clone( SfxItemPool* /*pPool */) const +SfxPoolItem* SdrGrafGamma100Item::Clone( SfxItemPool* /*pPool */) const { return new SdrGrafGamma100Item( *this ); } -SfxPoolItem* __EXPORT SdrGrafGamma100Item::Create( SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrGrafGamma100Item::Create( SvStream& rIn, USHORT /*nVer*/) const { return new SdrGrafGamma100Item( rIn ); } -sal_Bool SdrGrafGamma100Item::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool SdrGrafGamma100Item::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= ((double)GetValue()) / 100.0; - return sal_True; + return true; } -sal_Bool SdrGrafGamma100Item::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool SdrGrafGamma100Item::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { double nGamma = 0; if(!(rVal >>= nGamma)) - return sal_False; + return false; SetValue( (UINT32)(nGamma * 100.0 ) ); - return sal_True; + return true; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -2304,12 +2298,12 @@ sal_Bool SdrGrafGamma100Item::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ TYPEINIT1( SdrGrafInvertItem, SdrOnOffItem ); -SfxPoolItem* __EXPORT SdrGrafInvertItem::Clone( SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrGrafInvertItem::Clone( SfxItemPool* /*pPool*/) const { return new SdrGrafInvertItem( *this ); } -SfxPoolItem* __EXPORT SdrGrafInvertItem::Create( SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrGrafInvertItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new SdrGrafInvertItem( rIn ); } @@ -2320,12 +2314,12 @@ SfxPoolItem* __EXPORT SdrGrafInvertItem::Create( SvStream& rIn, USHORT /*nVer*/) TYPEINIT1( SdrGrafTransparenceItem, SdrPercentItem ); -SfxPoolItem* __EXPORT SdrGrafTransparenceItem::Clone( SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrGrafTransparenceItem::Clone( SfxItemPool* /*pPool*/) const { return new SdrGrafTransparenceItem( *this ); } -SfxPoolItem* __EXPORT SdrGrafTransparenceItem::Create( SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrGrafTransparenceItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new SdrGrafTransparenceItem( rIn ); } @@ -2336,22 +2330,22 @@ SfxPoolItem* __EXPORT SdrGrafTransparenceItem::Create( SvStream& rIn, USHORT /*n TYPEINIT1( SdrGrafModeItem, SfxEnumItem ); -SfxPoolItem* __EXPORT SdrGrafModeItem::Clone(SfxItemPool* /*pPool*/) const +SfxPoolItem* SdrGrafModeItem::Clone(SfxItemPool* /*pPool*/) const { return new SdrGrafModeItem( *this ); } -SfxPoolItem* __EXPORT SdrGrafModeItem::Create( SvStream& rIn, USHORT /*nVer*/) const +SfxPoolItem* SdrGrafModeItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new SdrGrafModeItem( rIn ); } -USHORT __EXPORT SdrGrafModeItem::GetValueCount() const +USHORT SdrGrafModeItem::GetValueCount() const { return 4; } -XubString __EXPORT SdrGrafModeItem::GetValueTextByPos(UINT16 nPos) const +XubString SdrGrafModeItem::GetValueTextByPos(UINT16 nPos) const { XubString aStr; @@ -2359,26 +2353,22 @@ XubString __EXPORT SdrGrafModeItem::GetValueTextByPos(UINT16 nPos) const { case 1: { - sal_Char aTextGreys[] = "Greys"; - aStr += UniString(aTextGreys, sizeof(aTextGreys-1)); + aStr += UniString(RTL_CONSTASCII_USTRINGPARAM("Greys")); break; } case 2: { - sal_Char aTextBlackWhite[] = "Black/White"; - aStr += UniString(aTextBlackWhite, sizeof(aTextBlackWhite-1)); + aStr += UniString(RTL_CONSTASCII_USTRINGPARAM("Black/White")); break; } case 3: { - sal_Char aTextWatermark[] = "Watermark"; - aStr += UniString(aTextWatermark, sizeof(aTextWatermark-1)); + aStr += UniString(RTL_CONSTASCII_USTRINGPARAM("Watermark")); break; } default: { - sal_Char aTextStandard[] = "Standard"; - aStr += UniString(aTextStandard, sizeof(aTextStandard-1)); + aStr += UniString(RTL_CONSTASCII_USTRINGPARAM("Standard")); break; } } @@ -2386,7 +2376,7 @@ XubString __EXPORT SdrGrafModeItem::GetValueTextByPos(UINT16 nPos) const return aStr; } -SfxItemPresentation __EXPORT SdrGrafModeItem::GetPresentation( SfxItemPresentation ePres, +SfxItemPresentation SdrGrafModeItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, XubString& rText, const IntlWrapper *) const { @@ -2427,3 +2417,5 @@ USHORT SdrGrafCropItem::GetVersion( USHORT /*nFileVersion*/) const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx index e68d699027..9ed6a352b8 100644 --- a/svx/source/svdraw/svdcrtv.cxx +++ b/svx/source/svdraw/svdcrtv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -962,3 +963,4 @@ BOOL SdrCreateView::SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHa } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svddrag.cxx b/svx/source/svdraw/svddrag.cxx index b915019dcf..c64891bdf5 100644 --- a/svx/source/svdraw/svddrag.cxx +++ b/svx/source/svdraw/svddrag.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,7 @@ #include <svx/svdview.hxx> #include <svx/svddrag.hxx> -void SdrDragStat::Clear(FASTBOOL bLeaveOne) +void SdrDragStat::Clear(bool bLeaveOne) { void* pP=aPnts.First(); while (pP!=NULL) { @@ -84,7 +85,7 @@ void SdrDragStat::NextMove(const Point& rPnt) Now()=aBla; } -void SdrDragStat::NextPoint(FASTBOOL bSaveReal) +void SdrDragStat::NextPoint(bool bSaveReal) { Point aPnt(GetNow()); if (bSaveReal) aPnt=aRealNow; @@ -108,7 +109,7 @@ Point SdrDragStat::KorregPos(const Point& rNow, const Point& /*rPrev*/) const return aRet; } -FASTBOOL SdrDragStat::CheckMinMoved(const Point& rPnt) +bool SdrDragStat::CheckMinMoved(const Point& rPnt) { if (!bMinMoved) { long dx=rPnt.X()-GetPrev().X(); if (dx<0) dx=-dx; @@ -151,3 +152,4 @@ void SdrDragStat::TakeCreateRect(Rectangle& rRect) const } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svddrgm1.hxx b/svx/source/svdraw/svddrgm1.hxx index 2fb7d82dfb..f0d2ea7790 100644 --- a/svx/source/svdraw/svddrgm1.hxx +++ b/svx/source/svdraw/svddrgm1.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -275,3 +276,5 @@ public: #endif //_SVDDRGM1_HXX // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 1539ed3d89..b30bd8f37e 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -3660,3 +3661,5 @@ Pointer SdrDragCrop::GetSdrDragPointer() const //////////////////////////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index 03d49bb97c..c640941f08 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1004,3 +1005,5 @@ bool SdrDragView::IsSolidDragging() const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 39454e1487..1359512b7b 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1044,3 +1045,4 @@ bool SdrEditView::IsUndoEnabled() const return pMod->IsUndoEnabled(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index fe00380253..f2a23d057e 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1369,7 +1370,6 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) nRotateY = nOldRotateY = aRotateAxe.Y(); } - long nNewShearAngle=0; long nShearAngle=0; long nShearX=0; long nShearY=0; @@ -1377,7 +1377,6 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) BOOL bChgPos=FALSE; BOOL bChgSiz=FALSE; - BOOL bChgHgt=FALSE; BOOL bRotate=FALSE; BOOL bShear =FALSE; @@ -1403,7 +1402,6 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,TRUE,&pPoolItem)) { nSizY=((const SfxUInt32Item*)pPoolItem)->GetValue(); bChgSiz=TRUE; - bChgHgt=TRUE; } if (bChgSiz) { eSizePoint=(RECT_POINT)((const SfxAllEnumItem&)rAttr.Get(SID_ATTR_TRANSFORM_SIZE_POINT)).GetValue(); @@ -1425,7 +1423,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) // Shear if (SFX_ITEM_SET==rAttr.GetItemState(SID_ATTR_TRANSFORM_SHEAR,TRUE,&pPoolItem)) { - nNewShearAngle=((const SfxInt32Item*)pPoolItem)->GetValue(); + long nNewShearAngle=((const SfxInt32Item*)pPoolItem)->GetValue(); if (nNewShearAngle>SDRMAXSHEAR) nNewShearAngle=SDRMAXSHEAR; if (nNewShearAngle<-SDRMAXSHEAR) nNewShearAngle=-SDRMAXSHEAR; if (nNewShearAngle!=nOldShearAngle) { @@ -1536,20 +1534,6 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) // linear combination will not decompose to the same start values again, but to a // new combination. Thus it makes no sense to check if the wanted shear is reached // or not. Taking out. -#if 0 - long nTempAngle=GetMarkedObjShear(); - if (nTempAngle!=0 && nTempAngle!=nNewShearAngle && !bShearVert) { - // noch eine 2. Iteration zur Kompensation der Rundungsfehler - double nOld=tan((double)nTempAngle*nPi180); - double nNew=tan((double)nNewShearAngle*nPi180); - nNew-=nOld; - nNew=atan(nNew)/nPi180; - nTempAngle=Round(nNew); - if (nTempAngle!=0) { - ShearMarkedObj(aRef,nTempAngle,bShearVert); - } - } -#endif } // Position aendern @@ -1782,3 +1766,4 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert, BOOL EndUndo(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 2a370c60d6..7481eac9b5 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,13 +51,16 @@ #include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> -#include <svx/svxdlg.hxx> //CHINA001 -#include <svx/dialogs.hrc> //CHINA001 +#include <svx/svxdlg.hxx> +#include <svx/dialogs.hrc> // #i37011# #include <svx/svdoashp.hxx> #include <basegfx/polygon/b2dpolypolygoncutter.hxx> +#include <vector> +using ::std::vector; + //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -183,7 +187,7 @@ void SdrEditView::MovMarkedToTop() void SdrEditView::MovMarkedToBtm() { ULONG nAnz=GetMarkedObjectCount(); - if (nAnz!=0) + if (nAnz!=0) { const bool bUndo = IsUndoEnabled(); @@ -628,24 +632,24 @@ sal_Bool SdrEditView::ImpCanConvertForCombine(const SdrObject* pObj) const { SdrObjList* pOL = pObj->GetSubList(); - if(pOL && !pObj->Is3DObj()) + if(pOL && !pObj->Is3DObj()) { SdrObjListIter aIter(*pOL, IM_DEEPNOGROUPS); - while(aIter.IsMore()) + while(aIter.IsMore()) { SdrObject* pObj1 = aIter.Next(); // Es muessen alle Member einer Gruppe konvertierbar sein - if(!ImpCanConvertForCombine1(pObj1)) + if(!ImpCanConvertForCombine1(pObj1)) { return sal_False; } } - } - else + } + else { - if(!ImpCanConvertForCombine1(pObj)) + if(!ImpCanConvertForCombine1(pObj)) { return sal_False; } @@ -659,38 +663,38 @@ basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon1(const SdrObject* pObj, s basegfx::B2DPolyPolygon aRetval; SdrPathObj* pPath = PTR_CAST(SdrPathObj, pObj); - if(bCombine && pPath && !pObj->GetOutlinerParaObject()) + if(bCombine && pPath && !pObj->GetOutlinerParaObject()) { aRetval = pPath->GetPathPoly(); - } - else + } + else { SdrObject* pConvObj = pObj->ConvertToPolyObj(bCombine, sal_False); - if(pConvObj) + if(pConvObj) { SdrObjList* pOL = pConvObj->GetSubList(); - - if(pOL) + + if(pOL) { SdrObjListIter aIter(*pOL, IM_DEEPNOGROUPS); - while(aIter.IsMore()) + while(aIter.IsMore()) { SdrObject* pObj1 = aIter.Next(); pPath = PTR_CAST(SdrPathObj, pObj1); - if(pPath) + if(pPath) { aRetval.append(pPath->GetPathPoly()); } } - } - else + } + else { pPath = PTR_CAST(SdrPathObj, pConvObj); - if(pPath) + if(pPath) { aRetval = pPath->GetPathPoly(); } @@ -707,20 +711,20 @@ basegfx::B2DPolyPolygon SdrEditView::ImpGetPolyPolygon(const SdrObject* pObj, sa { SdrObjList* pOL = pObj->GetSubList(); - if(pOL && !pObj->Is3DObj()) + if(pOL && !pObj->Is3DObj()) { basegfx::B2DPolyPolygon aRetval; SdrObjListIter aIter(*pOL, IM_DEEPNOGROUPS); - while(aIter.IsMore()) + while(aIter.IsMore()) { SdrObject* pObj1 = aIter.Next(); aRetval.append(ImpGetPolyPolygon1(pObj1, bCombine)); } return aRetval; - } - else + } + else { return ImpGetPolyPolygon1(pObj, bCombine); } @@ -754,12 +758,12 @@ basegfx::B2DPolygon SdrEditView::ImpCombineToSinglePolygon(const basegfx::B2DPol const basegfx::B2DPoint aCB(aCandidate.getB2DPoint(aCandidate.count() - 1L)); const basegfx::B2DPoint aRA(aRetval.getB2DPoint(0L)); const basegfx::B2DPoint aRB(aRetval.getB2DPoint(aRetval.count() - 1L)); - + const double fRACA(basegfx::B2DVector(aCA - aRA).getLength()); const double fRACB(basegfx::B2DVector(aCB - aRA).getLength()); const double fRBCA(basegfx::B2DVector(aCA - aRB).getLength()); const double fRBCB(basegfx::B2DVector(aCB - aRB).getLength()); - + const double fSmallestRA(fRACA < fRACB ? fRACA : fRACB); const double fSmallestRB(fRBCA < fRBCB ? fRBCA : fRBCB); @@ -800,16 +804,16 @@ struct ImpDistributeEntry INT32 mnLength; }; -DECLARE_LIST(ImpDistributeEntryList, ImpDistributeEntry*) +typedef vector< ImpDistributeEntry*> ImpDistributeEntryList; void SdrEditView::DistributeMarkedObjects() { - UINT32 nMark(GetMarkedObjectCount()); + sal_uInt32 nMark(GetMarkedObjectCount()); if(nMark > 2) { SfxItemSet aNewAttr(pMod->GetItemPool()); - //CHINA001 SvxDistributeDialog* pDlg = new SvxDistributeDialog(NULL, aNewAttr); + SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { @@ -823,7 +827,8 @@ void SdrEditView::DistributeMarkedObjects() SvxDistributeHorizontal eHor = pDlg->GetDistributeHor(); SvxDistributeVertical eVer = pDlg->GetDistributeVer(); ImpDistributeEntryList aEntryList; - UINT32 a, nInsPos, nFullLength; + ImpDistributeEntryList::iterator itEntryList; + UINT32 nFullLength; const bool bUndo = IsUndoEnabled(); if( bUndo ) @@ -834,13 +839,12 @@ void SdrEditView::DistributeMarkedObjects() // build sorted entry list nFullLength = 0L; - for(a=0;a<nMark;a++) + for( sal_uInt32 a = 0; a < nMark; a++ ) { SdrMark* pMark = GetSdrMarkByIndex(a); ImpDistributeEntry* pNew = new ImpDistributeEntry; pNew->mpObj = pMark->GetMarkedSdrObj(); - nInsPos = 0; switch(eHor) { @@ -869,25 +873,28 @@ void SdrEditView::DistributeMarkedObjects() default: break; } - while(nInsPos < aEntryList.Count() && aEntryList.GetObject(nInsPos)->mnPos < pNew->mnPos) - nInsPos++; - - aEntryList.Insert(pNew, nInsPos); + for ( itEntryList = aEntryList.begin(); + itEntryList < aEntryList.end() && (*itEntryList)->mnPos < pNew->mnPos; + ++itEntryList ); + if ( itEntryList < aEntryList.end() ) + aEntryList.insert( itEntryList, pNew ); + else + aEntryList.push_back( pNew ); } if(eHor == SvxDistributeHorizontalDistance) { // calc room in-between INT32 nWidth = GetAllMarkedBoundRect().GetWidth() + 1; - double fStepWidth = ((double)nWidth - (double)nFullLength) / (double)(aEntryList.Count() - 1); - double fStepStart = (double)aEntryList.GetObject(0)->mnPos; - fStepStart += fStepWidth + (double)((aEntryList.GetObject(0)->mnLength + aEntryList.GetObject(1)->mnLength) / 2); + double fStepWidth = ((double)nWidth - (double)nFullLength) / (double)(aEntryList.size() - 1); + double fStepStart = (double)aEntryList[ 0 ]->mnPos; + fStepStart += fStepWidth + (double)((aEntryList[ 0 ]->mnLength + aEntryList[ 1 ]->mnLength) / 2); // move entries 1..n-1 - for(a=1;a<aEntryList.Count()-1;a++) + for( size_t i = 1, n = aEntryList.size()-1; i < n; ++i ) { - ImpDistributeEntry* pCurr = aEntryList.GetObject(a); - ImpDistributeEntry* pNext = aEntryList.GetObject(a+1); + ImpDistributeEntry* pCurr = aEntryList[ i ]; + ImpDistributeEntry* pNext = aEntryList[ i + 1]; INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos; if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj)); @@ -898,15 +905,15 @@ void SdrEditView::DistributeMarkedObjects() else { // calc distances - INT32 nWidth = aEntryList.GetObject(aEntryList.Count() - 1)->mnPos - aEntryList.GetObject(0)->mnPos; - double fStepWidth = (double)nWidth / (double)(aEntryList.Count() - 1); - double fStepStart = (double)aEntryList.GetObject(0)->mnPos; + INT32 nWidth = aEntryList[ aEntryList.size() - 1 ]->mnPos - aEntryList[ 0 ]->mnPos; + double fStepWidth = (double)nWidth / (double)(aEntryList.size() - 1); + double fStepStart = (double)aEntryList[ 0 ]->mnPos; fStepStart += fStepWidth; // move entries 1..n-1 - for(a=1;a<aEntryList.Count()-1;a++) + for( size_t i = 1 ; i < aEntryList.size()-1 ; ++i ) { - ImpDistributeEntry* pCurr = aEntryList.GetObject(a); + ImpDistributeEntry* pCurr = aEntryList[ i ]; INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos; if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj)); @@ -916,8 +923,9 @@ void SdrEditView::DistributeMarkedObjects() } // clear list - while(aEntryList.Count()) - delete aEntryList.Remove((ULONG)0L); + for ( size_t i = 0, n = aEntryList.size(); i < n; ++i ) + delete aEntryList[ i ]; + aEntryList.clear(); } if(eVer != SvxDistributeVerticalNone) @@ -925,13 +933,12 @@ void SdrEditView::DistributeMarkedObjects() // build sorted entry list nFullLength = 0L; - for(a=0;a<nMark;a++) + for( sal_uInt32 a = 0; a < nMark; a++ ) { SdrMark* pMark = GetSdrMarkByIndex(a); ImpDistributeEntry* pNew = new ImpDistributeEntry; pNew->mpObj = pMark->GetMarkedSdrObj(); - nInsPos = 0; switch(eVer) { @@ -960,25 +967,28 @@ void SdrEditView::DistributeMarkedObjects() default: break; } - while(nInsPos < aEntryList.Count() && aEntryList.GetObject(nInsPos)->mnPos < pNew->mnPos) - nInsPos++; - - aEntryList.Insert(pNew, nInsPos); + for ( itEntryList = aEntryList.begin(); + itEntryList < aEntryList.end() && (*itEntryList)->mnPos < pNew->mnPos; + ++itEntryList ); + if ( itEntryList < aEntryList.end() ) + aEntryList.insert( itEntryList, pNew ); + else + aEntryList.push_back( pNew ); } if(eVer == SvxDistributeVerticalDistance) { // calc room in-between INT32 nHeight = GetAllMarkedBoundRect().GetHeight() + 1; - double fStepWidth = ((double)nHeight - (double)nFullLength) / (double)(aEntryList.Count() - 1); - double fStepStart = (double)aEntryList.GetObject(0)->mnPos; - fStepStart += fStepWidth + (double)((aEntryList.GetObject(0)->mnLength + aEntryList.GetObject(1)->mnLength) / 2); + double fStepWidth = ((double)nHeight - (double)nFullLength) / (double)(aEntryList.size() - 1); + double fStepStart = (double)aEntryList[ 0 ]->mnPos; + fStepStart += fStepWidth + (double)((aEntryList[ 0 ]->mnLength + aEntryList[ 1 ]->mnLength) / 2); // move entries 1..n-1 - for(a=1;a<aEntryList.Count()-1;a++) + for( size_t i = 1, n = aEntryList.size()-1; i < n; ++i) { - ImpDistributeEntry* pCurr = aEntryList.GetObject(a); - ImpDistributeEntry* pNext = aEntryList.GetObject(a+1); + ImpDistributeEntry* pCurr = aEntryList[ i ]; + ImpDistributeEntry* pNext = aEntryList[ i + 1 ]; INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos; if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj)); @@ -989,15 +999,15 @@ void SdrEditView::DistributeMarkedObjects() else { // calc distances - INT32 nHeight = aEntryList.GetObject(aEntryList.Count() - 1)->mnPos - aEntryList.GetObject(0)->mnPos; - double fStepWidth = (double)nHeight / (double)(aEntryList.Count() - 1); - double fStepStart = (double)aEntryList.GetObject(0)->mnPos; + INT32 nHeight = aEntryList[ aEntryList.size() - 1 ]->mnPos - aEntryList[ 0 ]->mnPos; + double fStepWidth = (double)nHeight / (double)(aEntryList.size() - 1); + double fStepStart = (double)aEntryList[ 0 ]->mnPos; fStepStart += fStepWidth; // move entries 1..n-1 - for(a=1;a<aEntryList.Count()-1;a++) + for(size_t i = 1, n = aEntryList.size()-1; i < n; ++i) { - ImpDistributeEntry* pCurr = aEntryList.GetObject(a); + ImpDistributeEntry* pCurr = aEntryList[ i ]; INT32 nDelta = (INT32)(fStepStart + 0.5) - pCurr->mnPos; if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pCurr->mpObj)); @@ -1007,8 +1017,9 @@ void SdrEditView::DistributeMarkedObjects() } // clear list - while(aEntryList.Count()) - delete aEntryList.Remove((ULONG)0L); + for ( size_t i = 0, n = aEntryList.size(); i < n; ++i ) + delete aEntryList[ i ]; + aEntryList.clear(); } // UNDO-Comment and end of UNDO @@ -1253,19 +1264,19 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly) const sal_uInt32 nAnz(GetMarkedObjectCount()); const SdrObject* pAttrObj = 0L; - for(sal_uInt32 a(nAnz); a > 0L; ) + for(sal_uInt32 a(nAnz); a > 0L; ) { a--; SdrMark* pM = GetSdrMarkByIndex(a); SdrObject* pObj = pM->GetMarkedSdrObj(); SdrObjList* pThisOL = pObj->GetObjList(); - if(pAktOL != pThisOL) + if(pAktOL != pThisOL) { pAktOL = pThisOL; } - if(ImpCanConvertForCombine(pObj)) + if(ImpCanConvertForCombine(pObj)) { // Obj merken fuer Attribute kopieren pAttrObj = pObj; @@ -1276,7 +1287,7 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly) basegfx::B2DPolyPolygon aTmpPoly(basegfx::tools::simplifyCurveSegments(ImpGetPolyPolygon(pObj, sal_True))); aPolyPolygon.insert(0L, aTmpPoly); - if(!pInsOL) + if(!pInsOL) { nInsPos = pObj->GetOrdNum() + 1L; pInsPV = pM->GetPageView(); @@ -1287,7 +1298,7 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly) } } - if(bNoPolyPoly) + if(bNoPolyPoly) { basegfx::B2DPolygon aCombinedPolygon(ImpCombineToSinglePolygon(aPolyPolygon)); aPolyPolygon.clear(); @@ -1296,25 +1307,25 @@ void SdrEditView::CombineMarkedObjects(sal_Bool bNoPolyPoly) const sal_uInt32 nPolyCount(aPolyPolygon.count()); - if(nPolyCount) + if(nPolyCount) { SdrObjKind eKind = OBJ_PATHFILL; - if(nPolyCount > 1L) + if(nPolyCount > 1L) { aPolyPolygon.setClosed(true); - } - else - { + } + else + { // auf Polyline Checken const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(0L)); const sal_uInt32 nPointCount(aPolygon.count()); - - if(nPointCount <= 2L) + + if(nPointCount <= 2L) { eKind = OBJ_PATHLINE; } - else + else { if(!aPolygon.isClosed()) { @@ -1395,17 +1406,17 @@ sal_Bool SdrEditView::ImpCanDismantle(const basegfx::B2DPolyPolygon& rPpolyPolyg sal_Bool bCan(sal_False); const sal_uInt32 nPolygonCount(rPpolyPolygon.count()); - if(nPolygonCount >= 2L) + if(nPolygonCount >= 2L) { // #i69172# dismantle makes sense with 2 or more polygons in a polyPolygon bCan = sal_True; } - else if(bMakeLines && 1L == nPolygonCount) - { + else if(bMakeLines && 1L == nPolygonCount) + { // #i69172# ..or with at least 2 edges (curves or lines) const basegfx::B2DPolygon aPolygon(rPpolyPolygon.getB2DPolygon(0L)); const sal_uInt32 nPointCount(aPolygon.count()); - + if(nPointCount > 2L) { bCan = sal_True; @@ -1421,20 +1432,20 @@ sal_Bool SdrEditView::ImpCanDismantle(const SdrObject* pObj, sal_Bool bMakeLines sal_Bool bMin1PolyPoly(sal_False); // TRUE=mind. 1 PolyPolygon mit mehr als ein Polygon vorhanden SdrObjList* pOL = pObj->GetSubList(); - if(pOL) + if(pOL) { // Aha, Gruppenobjekt. Also alle Member ansehen. // Alle muessen PathObjs sein ! SdrObjListIter aIter(*pOL, IM_DEEPNOGROUPS); - while(aIter.IsMore() && !bOtherObjs) + while(aIter.IsMore() && !bOtherObjs) { const SdrObject* pObj1 = aIter.Next(); const SdrPathObj* pPath = PTR_CAST(SdrPathObj, pObj1); - if(pPath) + if(pPath) { - if(ImpCanDismantle(pPath->GetPathPoly(), bMakeLines)) + if(ImpCanDismantle(pPath->GetPathPoly(), bMakeLines)) { bMin1PolyPoly = sal_True; } @@ -1442,13 +1453,13 @@ sal_Bool SdrEditView::ImpCanDismantle(const SdrObject* pObj, sal_Bool bMakeLines SdrObjTransformInfoRec aInfo; pObj1->TakeObjInfo(aInfo); - if(!aInfo.bCanConvToPath) + if(!aInfo.bCanConvToPath) { // Passiert z.B. im Falle Fontwork (Joe, 28-11-95) - bOtherObjs = sal_True; + bOtherObjs = sal_True; } - } - else + } + else { bOtherObjs = sal_True; } @@ -1462,7 +1473,7 @@ sal_Bool SdrEditView::ImpCanDismantle(const SdrObject* pObj, sal_Bool bMakeLines // #i37011# if(pPath) { - if(ImpCanDismantle(pPath->GetPathPoly(),bMakeLines)) + if(ImpCanDismantle(pPath->GetPathPoly(),bMakeLines)) { bMin1PolyPoly = sal_True; } @@ -1471,12 +1482,12 @@ sal_Bool SdrEditView::ImpCanDismantle(const SdrObject* pObj, sal_Bool bMakeLines pObj->TakeObjInfo(aInfo); // #69711 : new condition IsLine() to be able to break simple Lines - if(!(aInfo.bCanConvToPath || aInfo.bCanConvToPoly) && !pPath->IsLine()) + if(!(aInfo.bCanConvToPath || aInfo.bCanConvToPoly) && !pPath->IsLine()) { // Passiert z.B. im Falle Fontwork (Joe, 28-11-95) - bOtherObjs = sal_True; + bOtherObjs = sal_True; } - } + } else if(pCustomShape) { if(bMakeLines) @@ -1507,7 +1518,7 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL, const basegfx::B2DPolyPolygon& rPolyPolygon(pSrcPath->GetPathPoly()); const sal_uInt32 nPolyCount(rPolyPolygon.count()); - for(sal_uInt32 a(0); a < nPolyCount; a++) + for(sal_uInt32 a(0); a < nPolyCount; a++) { const basegfx::B2DPolygon& rCandidate(rPolyPolygon.getB2DPolygon(a)); const sal_uInt32 nPointCount(rCandidate.count()); @@ -2137,3 +2148,4 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index cbd24082d4..660650de37 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -155,7 +156,7 @@ void SdrObjEditView::TakeActionRect(Rectangle& rRect) const } } -void __EXPORT SdrObjEditView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) +void SdrObjEditView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) { SdrGlueEditView::Notify(rBC,rHint); // Printerwechsel waerend des Editierens @@ -316,7 +317,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectang { const SdrTextObj* pText = PTR_CAST(SdrTextObj,GetTextEditObject()); bool bTextFrame(pText && pText->IsTextFrame()); - bool bFitToSize(0 != (pTextEditOutliner->GetControlWord() & EE_CNTRL_STRETCHING)); + bool bFitToSize(pText && pText->IsFitToSize()); bool bModifyMerk(pTextEditOutliner->IsModified()); // #43095# Rectangle aBlankRect(rOutlView.GetOutputArea()); aBlankRect.Union(aMinTextEditArea); @@ -385,7 +386,7 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const { const SdrTextObj* pText = PTR_CAST(SdrTextObj,GetTextEditObject()); bool bTextFrame(pText && pText->IsTextFrame()); - bool bFitToSize(0 != (pTextEditOutliner->GetControlWord() & EE_CNTRL_STRETCHING)); + bool bFitToSize(pText && pText->IsFitToSize()); if(bTextFrame && !bFitToSize) { @@ -632,7 +633,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit( // alten Cursor merken if (pTextEditOutliner->GetViewCount()!=0) { - OutlinerView* pTmpOLV=pTextEditOutliner->RemoveView(ULONG(0)); + OutlinerView* pTmpOLV=pTextEditOutliner->RemoveView(static_cast<size_t>(0)); if(pTmpOLV!=NULL && pTmpOLV!=pGivenOutlinerView) delete pTmpOLV; } @@ -650,8 +651,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit( if ( !pTextObj->IsContourTextFrame() ) { // FitToSize erstmal nicht mit ContourFrame - SdrFitToSizeType eFit = pTextObj->GetFitToSize(); - if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES) + if (pTextObj->IsFitToSize()) aTextRect = aAnchorRect; } @@ -719,8 +719,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit( // #71519# if(!bExtraInvalidate) { - SdrFitToSizeType eFit = pTextObj->GetFitToSize(); - if(eFit == SDRTEXTFIT_PROPORTIONAL || eFit == SDRTEXTFIT_ALLLINES) + if(pTextObj->IsFitToSize()) bExtraInvalidate = sal_True; } @@ -1162,7 +1161,7 @@ BOOL SdrObjEditView::KeyInput(const KeyEvent& rKEvt, Window* pWin) ShowItemBrowser(); } #endif - if (pTextEditOutlinerView->PostKeyEvent(rKEvt)) + if (pTextEditOutlinerView->PostKeyEvent(rKEvt, pWin)) { if( pMod /* && !pMod->IsChanged() */ ) { @@ -2144,3 +2143,5 @@ void SdrObjEditView::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoChar } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index d0eeccf43c..5446c2650b 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -321,7 +322,7 @@ void UShortCont::Sort() class ImpClipMerk { Region aClip; - FASTBOOL bClip; + bool bClip; public: ImpClipMerk(const OutputDevice& rOut): aClip(rOut.GetClipRegion()),bClip(rOut.IsClipRegion()) {} void Restore(OutputDevice& rOut) @@ -385,7 +386,7 @@ public: const Color& GetLineColor() const { return aLineColor; } }; -ImpSdrHdcMerk::ImpSdrHdcMerk(const OutputDevice& rOut, USHORT nNewMode, FASTBOOL bAutoMerk): +ImpSdrHdcMerk::ImpSdrHdcMerk(const OutputDevice& rOut, USHORT nNewMode, bool bAutoMerk): pFarbMerk(NULL), pClipMerk(NULL), pLineColorMerk(NULL), @@ -498,17 +499,17 @@ void SdrLinkList::RemoveLink(const Link& rLink) //////////////////////////////////////////////////////////////////////////////////////////////////// // #98988# Re-implement GetDraftFillColor(...) -FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) +bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) { XFillStyle eFill=((XFillStyleItem&)rSet.Get(XATTR_FILLSTYLE)).GetValue(); - FASTBOOL bRetval(FALSE); + bool bRetval = false; switch(eFill) { case XFILL_SOLID: { rCol = ((XFillColorItem&)rSet.Get(XATTR_FILLCOLOR)).GetColorValue(); - bRetval = TRUE; + bRetval = true; break; } @@ -526,7 +527,7 @@ FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) const basegfx::BColor aAverageColor(basegfx::average(aCol1.getBColor(), aCol2.getBColor())); rCol = Color(aAverageColor); - bRetval = TRUE; + bRetval = true; break; } @@ -536,7 +537,7 @@ FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) Color aCol2(rGrad.GetEndColor()); const basegfx::BColor aAverageColor(basegfx::average(aCol1.getBColor(), aCol2.getBColor())); rCol = Color(aAverageColor); - bRetval = TRUE; + bRetval = true; break; } @@ -580,7 +581,7 @@ FASTBOOL GetDraftFillColor(const SfxItemSet& rSet, Color& rCol) rCol = Color(UINT8(nRt), UINT8(nGn), UINT8(nBl)); - bRetval = TRUE; + bRetval = true; } if(pAccess) @@ -1116,3 +1117,5 @@ Color GetTextEditBackgroundColor(const SdrObjEditView& rView) //////////////////////////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index e174ee0d3d..6f9ff6b6ae 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -268,12 +269,12 @@ ULONG ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf, return aTmpList.GetObjCount(); } -void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, FASTBOOL bForceTextAttr) +void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr) { bNoLine = FALSE; bNoFill = FALSE; - FASTBOOL bLine=TRUE && !bForceTextAttr; - FASTBOOL bFill=pObj==NULL || pObj->IsClosedObj() && !bForceTextAttr; - FASTBOOL bText=bForceTextAttr || (pObj!=NULL && pObj->GetOutlinerParaObject()!=NULL); + bool bLine = !bForceTextAttr; + bool bFill = (pObj==NULL) || (pObj->IsClosedObj() && !bForceTextAttr); + bool bText = bForceTextAttr || (pObj!=NULL && pObj->GetOutlinerParaObject()!=NULL); if ( bLine ) { @@ -444,12 +445,11 @@ void ImpSdrGDIMetaFileImport::InsertObj( SdrObject* pObj, sal_Bool bScale ) } /**************************************************************************************************/ - -void ImpSdrGDIMetaFileImport::DoAction(MetaPixelAction& /*rAct*/) +void ImpSdrGDIMetaFileImport::DoAction(MetaPixelAction& /*rAct*/) const { } -void ImpSdrGDIMetaFileImport::DoAction(MetaPointAction& /*rAct*/) +void ImpSdrGDIMetaFileImport::DoAction(MetaPointAction& /*rAct*/) const { } @@ -1026,3 +1026,5 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx index a4f1a28163..aa14791284 100644 --- a/svx/source/svdraw/svdfmtf.hxx +++ b/svx/source/svdraw/svdfmtf.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,8 +106,8 @@ protected: sal_Bool bLastObjWasLine; protected: - void DoAction(MetaPixelAction & rAct); - void DoAction(MetaPointAction & rAct); + void DoAction(MetaPixelAction & rAct) const; + void DoAction(MetaPointAction & rAct) const; void DoAction(MetaLineAction & rAct); void DoAction(MetaRectAction & rAct); void DoAction(MetaRoundRectAction & rAct); @@ -142,7 +143,7 @@ protected: void DoAction(MetaCommentAction& rAct, GDIMetaFile* pMtf); void ImportText( const Point& rPos, const XubString& rStr, const MetaAction& rAct ); - void SetAttributes(SdrObject* pObj, FASTBOOL bForceTextAttr=FALSE); + void SetAttributes(SdrObject* pObj, bool bForceTextAttr = false); void InsertObj( SdrObject* pObj, sal_Bool bScale = sal_True ); void MapScaling(); @@ -164,3 +165,5 @@ public: #endif //_SVDFMTF_HXX // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx index 4024739119..33da2f1e3f 100644 --- a/svx/source/svdraw/svdglev.cxx +++ b/svx/source/svdraw/svdglev.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -420,3 +421,4 @@ void SdrGlueEditView::RotateMarkedGluePoints(const Point& rRef, long nWink, bool AdjustMarkHdl(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx index da9c8c2d54..e43faf9d0c 100644 --- a/svx/source/svdraw/svdglue.cxx +++ b/svx/source/svdraw/svdglue.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,7 +36,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// -void SdrGluePoint::SetReallyAbsolute(FASTBOOL bOn, const SdrObject& rObj) +void SdrGluePoint::SetReallyAbsolute(bool bOn, const SdrObject& rObj) { if ( bReallyAbsolute != bOn ) { @@ -245,7 +246,7 @@ void SdrGluePoint::Mirror(const Point& rRef1, const Point& rRef2, long nWink, co if (pObj!=NULL) SetAbsolutePos(aPt,*pObj); else SetPos(aPt); } -void SdrGluePoint::Shear(const Point& rRef, long /*nWink*/, double tn, FASTBOOL bVShear, const SdrObject* pObj) +void SdrGluePoint::Shear(const Point& rRef, long /*nWink*/, double tn, bool bVShear, const SdrObject* pObj) { Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos()); ShearPoint(aPt,rRef,tn,bVShear); @@ -305,7 +306,7 @@ void SdrGluePoint::Invalidate(Window& rWin, const SdrObject* pObj) const rWin.EnableMapMode(bMapMerk); } -FASTBOOL SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const +bool SdrGluePoint::IsHit(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj) const { Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos()); Size aSiz=rOut.PixelToLogic(Size(3,3)); @@ -344,22 +345,22 @@ USHORT SdrGluePointList::Insert(const SdrGluePoint& rGP) USHORT nInsPos=nAnz; USHORT nLastId=nAnz!=0 ? GetObject(nAnz-1)->GetId() : 0; DBG_ASSERT(nLastId>=nAnz,"SdrGluePointList::Insert(): nLastId<nAnz"); - FASTBOOL bHole=nLastId>nAnz; + bool bHole = nLastId>nAnz; if (nId<=nLastId) { if (!bHole || nId==0) { nId=nLastId+1; } else { - FASTBOOL bBrk=FALSE; + bool bBrk = false; for (USHORT nNum=0; nNum<nAnz && !bBrk; nNum++) { const SdrGluePoint* pGP2=GetObject(nNum); USHORT nTmpId=pGP2->GetId(); if (nTmpId==nId) { nId=nLastId+1; // bereits vorhanden - bBrk=TRUE; + bBrk = true; } if (nTmpId>nId) { nInsPos=nNum; // Hier einfuegen (einsortieren) - bBrk=TRUE; + bBrk = true; } } } @@ -390,7 +391,7 @@ USHORT SdrGluePointList::FindGluePoint(USHORT nId) const return nRet; } -USHORT SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj, FASTBOOL bBack, FASTBOOL bNext, USHORT nId0) const +USHORT SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, const SdrObject* pObj, bool bBack, bool bNext, USHORT nId0) const { USHORT nAnz=GetCount(); USHORT nRet=SDRGLUEPOINT_NOTFOUND; @@ -408,7 +409,7 @@ USHORT SdrGluePointList::HitTest(const Point& rPnt, const OutputDevice& rOut, co return nRet; } -void SdrGluePointList::SetReallyAbsolute(FASTBOOL bOn, const SdrObject& rObj) +void SdrGluePointList::SetReallyAbsolute(bool bOn, const SdrObject& rObj) { USHORT nAnz=GetCount(); for (USHORT nNum=0; nNum<nAnz; nNum++) { @@ -439,7 +440,7 @@ void SdrGluePointList::Mirror(const Point& rRef1, const Point& rRef2, long nWink } } -void SdrGluePointList::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear, const SdrObject* pObj) +void SdrGluePointList::Shear(const Point& rRef, long nWink, double tn, bool bVShear, const SdrObject* pObj) { USHORT nAnz=GetCount(); for (USHORT nNum=0; nNum<nAnz; nNum++) { @@ -448,3 +449,5 @@ void SdrGluePointList::Shear(const Point& rRef, long nWink, double tn, FASTBOOL } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index e77ccbef03..4d11dc1f18 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -139,129 +140,129 @@ const BitmapEx& SdrHdlBitmapSet::GetBitmapEx(BitmapMarkerKind eKindOfMarker, UIN switch(eKindOfMarker) { - default: + default: { - DBG_ERROR( "unknown kind of marker" ); + DBG_ERROR( "unknown kind of marker" ); // no break here, return Rect_7x7 as default } - case Rect_7x7: + case Rect_7x7: { return impGetOrCreateTargetBitmap((0 * INDEX_COUNT) + nInd, Rectangle(Point(0, nYPos), Size(7, 7))); } - case Rect_9x9: + case Rect_9x9: { return impGetOrCreateTargetBitmap((1 * INDEX_COUNT) + nInd, Rectangle(Point(7, nYPos), Size(9, 9))); } - case Rect_11x11: + case Rect_11x11: { return impGetOrCreateTargetBitmap((2 * INDEX_COUNT) + nInd, Rectangle(Point(16, nYPos), Size(11, 11))); } - case Rect_13x13: + case Rect_13x13: { const sal_uInt16 nIndex((3 * INDEX_COUNT) + nInd); switch(nInd) { - case 0: + case 0: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 66), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 66), Size(13, 13))); } - case 1: + case 1: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 66), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 66), Size(13, 13))); } - case 2: + case 2: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 78), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(72, 78), Size(13, 13))); } - case 3: + case 3: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 78), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(85, 78), Size(13, 13))); } - case 4: + case 4: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 78), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 78), Size(13, 13))); } - default: // case 5: + default: // case 5: { - return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 66), Size(13, 13))); + return impGetOrCreateTargetBitmap(nIndex, Rectangle(Point(98, 66), Size(13, 13))); } } } - case Circ_7x7: + case Circ_7x7: { return impGetOrCreateTargetBitmap((4 * INDEX_COUNT) + nInd, Rectangle(Point(27, nYPos), Size(7, 7))); } - case Circ_9x9: + case Circ_9x9: case Customshape1: { return impGetOrCreateTargetBitmap((5 * INDEX_COUNT) + nInd, Rectangle(Point(34, nYPos), Size(9, 9))); } - case Circ_11x11: + case Circ_11x11: { return impGetOrCreateTargetBitmap((6 * INDEX_COUNT) + nInd, Rectangle(Point(43, nYPos), Size(11, 11))); } - case Elli_7x9: + case Elli_7x9: { return impGetOrCreateTargetBitmap((7 * INDEX_COUNT) + nInd, Rectangle(Point(54, nYPos), Size(7, 9))); } - case Elli_9x11: + case Elli_9x11: { return impGetOrCreateTargetBitmap((8 * INDEX_COUNT) + nInd, Rectangle(Point(61, nYPos), Size(9, 11))); } - case Elli_9x7: + case Elli_9x7: { return impGetOrCreateTargetBitmap((9 * INDEX_COUNT) + nInd, Rectangle(Point(70, nYPos), Size(9, 7))); } - case Elli_11x9: + case Elli_11x9: { return impGetOrCreateTargetBitmap((10 * INDEX_COUNT) + nInd, Rectangle(Point(79, nYPos), Size(11, 9))); } - case RectPlus_7x7: + case RectPlus_7x7: { return impGetOrCreateTargetBitmap((11 * INDEX_COUNT) + nInd, Rectangle(Point(90, nYPos), Size(7, 7))); } - case RectPlus_9x9: + case RectPlus_9x9: { return impGetOrCreateTargetBitmap((12 * INDEX_COUNT) + nInd, Rectangle(Point(97, nYPos), Size(9, 9))); } - case RectPlus_11x11: + case RectPlus_11x11: { return impGetOrCreateTargetBitmap((13 * INDEX_COUNT) + nInd, Rectangle(Point(106, nYPos), Size(11, 11))); } - case Crosshair: + case Crosshair: { return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 0, Rectangle(Point(0, 68), Size(15, 15))); } - case Glue: + case Glue: { return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 1, Rectangle(Point(15, 74), Size(9, 9))); } case Anchor: // #101688# AnchorTR for SW - case AnchorTR: + case AnchorTR: { return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 2, Rectangle(Point(24, 68), Size(24, 23))); } // #98388# add AnchorPressed to be able to aninate anchor control - case AnchorPressed: - case AnchorPressedTR: + case AnchorPressed: + case AnchorPressedTR: { return impGetOrCreateTargetBitmap((KIND_COUNT * INDEX_COUNT) + 3, Rectangle(Point(48, 68), Size(24, 23))); } @@ -335,33 +336,33 @@ SdrHdl::~SdrHdl() GetRidOfIAObject(); } -void SdrHdl::Set1PixMore(BOOL bJa) -{ +void SdrHdl::Set1PixMore(BOOL bJa) +{ if(b1PixMore != bJa) { - b1PixMore = bJa; + b1PixMore = bJa; // create new display Touch(); } } -void SdrHdl::SetMoveOutside( bool bMoveOutside ) -{ +void SdrHdl::SetMoveOutside( bool bMoveOutside ) +{ if(mbMoveOutside != bMoveOutside) { - mbMoveOutside = bMoveOutside; + mbMoveOutside = bMoveOutside; // create new display Touch(); } } -void SdrHdl::SetDrehWink(long n) -{ +void SdrHdl::SetDrehWink(long n) +{ if(nDrehWink != n) { - nDrehWink = n; + nDrehWink = n; // create new display Touch(); @@ -380,37 +381,37 @@ void SdrHdl::SetPos(const Point& rPnt) } } -void SdrHdl::SetSelected(BOOL bJa) -{ +void SdrHdl::SetSelected(BOOL bJa) +{ if(bSelect != bJa) { // remember new value - bSelect = bJa; + bSelect = bJa; // create new display Touch(); } } -void SdrHdl::SetHdlList(SdrHdlList* pList) +void SdrHdl::SetHdlList(SdrHdlList* pList) { if(pHdlList != pList) { // rememver list pHdlList = pList; - + // now its possible to create graphic representation Touch(); } } -void SdrHdl::SetObj(SdrObject* pNewObj) -{ +void SdrHdl::SetObj(SdrObject* pNewObj) +{ if(pObj != pNewObj) { // remember new object - pObj = pNewObj; - + pObj = pNewObj; + // graphic representation may have changed Touch(); } @@ -441,12 +442,12 @@ void SdrHdl::CreateB2dIAObject() BitmapMarkerKind eKindOfMarker = Rect_7x7; BOOL bRot = pHdlList->IsRotateShear(); - if(pObj) + if(pObj) eColIndex = (bSelect) ? Cyan : LightCyan; - if(bRot) - { + if(bRot) + { // Drehhandles in Rot - if(pObj && bSelect) + if(pObj && bSelect) eColIndex = Red; else eColIndex = LightRed; @@ -576,20 +577,20 @@ void SdrHdl::CreateB2dIAObject() if(rPageWindow.GetPaintWindow().OutputToWindow()) { Point aMoveOutsideOffset(0, 0); - + // add offset if necessary if(pHdlList->IsMoveOutside() || mbMoveOutside) { OutputDevice& rOutDev = rPageWindow.GetPaintWindow().GetOutputDevice(); Size aOffset = rOutDev.PixelToLogic(Size(4, 4)); - if(eKind == HDL_UPLFT || eKind == HDL_UPPER || eKind == HDL_UPRGT) + if(eKind == HDL_UPLFT || eKind == HDL_UPPER || eKind == HDL_UPRGT) aMoveOutsideOffset.Y() -= aOffset.Width(); - if(eKind == HDL_LWLFT || eKind == HDL_LOWER || eKind == HDL_LWRGT) + if(eKind == HDL_LWLFT || eKind == HDL_LOWER || eKind == HDL_LWRGT) aMoveOutsideOffset.Y() += aOffset.Height(); - if(eKind == HDL_UPLFT || eKind == HDL_LEFT || eKind == HDL_LWLFT) + if(eKind == HDL_UPLFT || eKind == HDL_LEFT || eKind == HDL_LWLFT) aMoveOutsideOffset.X() -= aOffset.Width(); - if(eKind == HDL_UPRGT || eKind == HDL_RIGHT || eKind == HDL_LWRGT) + if(eKind == HDL_UPRGT || eKind == HDL_RIGHT || eKind == HDL_LWRGT) aMoveOutsideOffset.X() += aOffset.Height(); } @@ -624,24 +625,16 @@ BitmapMarkerKind SdrHdl::GetNextBigger(BitmapMarkerKind eKnd) const case Rect_7x7: eRetval = Rect_9x9; break; case Rect_9x9: eRetval = Rect_11x11; break; case Rect_11x11: eRetval = Rect_13x13; break; - //case Rect_13x13: eRetval = ; break; case Circ_7x7: eRetval = Circ_9x9; break; case Circ_9x9: eRetval = Circ_11x11; break; - //case Circ_11x11: eRetval = ; break; - + case Elli_7x9: eRetval = Elli_9x11; break; - //case Elli_9x11: eRetval = ; break; - + case Elli_9x7: eRetval = Elli_11x9; break; - //case Elli_11x9: eRetval = ; break; - + case RectPlus_7x7: eRetval = RectPlus_9x9; break; case RectPlus_9x9: eRetval = RectPlus_11x11; break; - //case RectPlus_11x11: eRetval = ; break; - - //case Crosshair: eRetval = ; break; - //case Glue: eRetval = ; break; // #98388# let anchor blink with it's pressed state case Anchor: eRetval = AnchorPressed; break; @@ -656,33 +649,24 @@ BitmapMarkerKind SdrHdl::GetNextBigger(BitmapMarkerKind eKnd) const } // #101928# -BitmapEx SdrHdl::ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd, sal_Bool bFine, sal_Bool bIsHighContrast) +BitmapEx SdrHdl::ImpGetBitmapEx( BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd, sal_Bool bFine ) { - if(bIsHighContrast) + if(bFine) { - return getHighContrastSet().GetBitmapEx(eKindOfMarker, nInd); + return getModernSet().GetBitmapEx(eKindOfMarker, nInd); } else { - if(bFine) - { - return getModernSet().GetBitmapEx(eKindOfMarker, nInd); - } - else - { - return getSimpleSet().GetBitmapEx(eKindOfMarker, nInd); - } + return getSimpleSet().GetBitmapEx(eKindOfMarker, nInd); } } ::sdr::overlay::OverlayObject* SdrHdl::CreateOverlayObject( - const basegfx::B2DPoint& rPos, + const basegfx::B2DPoint& rPos, BitmapColorIndex eColIndex, BitmapMarkerKind eKindOfMarker, Point aMoveOutsideOffset) { ::sdr::overlay::OverlayObject* pRetval = 0L; sal_Bool bIsFineHdl(pHdlList->IsFineHdl()); - const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - sal_Bool bIsHighContrast(rStyleSettings.GetHighContrastMode()); // support bigger sizes sal_Bool bForceBiggerSize(sal_False); @@ -691,17 +675,6 @@ BitmapEx SdrHdl::ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd, { bForceBiggerSize = sal_True; } - - // #101928# ...for high contrast, too. - if(!bForceBiggerSize && bIsHighContrast) - { - // #107925# - // ...but not for anchors, else they will not blink when activated - if(Anchor != eKindOfMarker && AnchorTR != eKindOfMarker) - { - bForceBiggerSize = sal_True; - } - } if(bForceBiggerSize) { @@ -740,11 +713,12 @@ BitmapEx SdrHdl::ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd, // create animated hdl // #101928# use ImpGetBitmapEx(...) now - BitmapEx aBmpEx1 = ImpGetBitmapEx(eKindOfMarker, (sal_uInt16)eColIndex, bIsFineHdl, bIsHighContrast); - BitmapEx aBmpEx2 = ImpGetBitmapEx(eNextBigger, (sal_uInt16)eColIndex, bIsFineHdl, bIsHighContrast); + BitmapEx aBmpEx1 = ImpGetBitmapEx( eKindOfMarker, (sal_uInt16)eColIndex, bIsFineHdl ); + BitmapEx aBmpEx2 = ImpGetBitmapEx( eNextBigger, (sal_uInt16)eColIndex, bIsFineHdl ); // #i53216# Use system cursor blink time. Use the unsigned value. - const sal_uInt32 nBlinkTime((sal_uInt32)Application::GetSettings().GetStyleSettings().GetCursorBlinkTime()); + const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + const sal_uInt32 nBlinkTime((sal_uInt32)rStyleSettings.GetCursorBlinkTime()); if(eKindOfMarker == Anchor || eKindOfMarker == AnchorPressed) { @@ -762,9 +736,9 @@ BitmapEx SdrHdl::ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd, { // create centered handle as default pRetval = new ::sdr::overlay::OverlayAnimatedBitmapEx(rPos, aBmpEx1, aBmpEx2, nBlinkTime, - (UINT16)(aBmpEx1.GetSizePixel().Width() - 1) >> 1, + (UINT16)(aBmpEx1.GetSizePixel().Width() - 1) >> 1, (UINT16)(aBmpEx1.GetSizePixel().Height() - 1) >> 1, - (UINT16)(aBmpEx2.GetSizePixel().Width() - 1) >> 1, + (UINT16)(aBmpEx2.GetSizePixel().Width() - 1) >> 1, (UINT16)(aBmpEx2.GetSizePixel().Height() - 1) >> 1); } } @@ -772,7 +746,7 @@ BitmapEx SdrHdl::ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd, { // create normal handle // #101928# use ImpGetBitmapEx(...) now - BitmapEx aBmpEx = ImpGetBitmapEx(eKindOfMarker, (sal_uInt16)eColIndex, bIsFineHdl, bIsHighContrast); + BitmapEx aBmpEx = ImpGetBitmapEx(eKindOfMarker, (sal_uInt16)eColIndex, bIsFineHdl ); if(eKindOfMarker == Anchor || eKindOfMarker == AnchorPressed) { @@ -782,7 +756,7 @@ BitmapEx SdrHdl::ImpGetBitmapEx(BitmapMarkerKind eKindOfMarker, sal_uInt16 nInd, else if(eKindOfMarker == AnchorTR || eKindOfMarker == AnchorPressedTR) { // #101688# AnchorTR for SW, take top right as (0,0) - pRetval = new ::sdr::overlay::OverlayBitmapEx(rPos, aBmpEx, + pRetval = new ::sdr::overlay::OverlayBitmapEx(rPos, aBmpEx, (UINT16)(aBmpEx.GetSizePixel().Width() - 1), 0); } else @@ -928,7 +902,7 @@ BOOL SdrHdl::IsFocusHdl() const //case HDL_ANCHOR: // anchor symbol (SD, SW) // #101688# same for AnchorTR //case HDL_ANCHOR_TR: // anchor symbol (SD, SW) - + //case HDL_TRNS: // interactive transparence //case HDL_GRAD: // interactive gradient //case HDL_COLR: // interactive color @@ -984,7 +958,7 @@ void SdrHdlColor::CreateB2dIAObject() { // first throw away old one GetRidOfIAObject(); - + if(pHdlList) { SdrMarkView* pView = pHdlList->GetView(); @@ -1006,11 +980,11 @@ void SdrHdlColor::CreateB2dIAObject() { Bitmap aBmpCol(CreateColorDropper(aMarkerColor)); basegfx::B2DPoint aPosition(aPos.X(), aPos.Y()); - ::sdr::overlay::OverlayObject* pNewOverlayObject = new + ::sdr::overlay::OverlayObject* pNewOverlayObject = new ::sdr::overlay::OverlayBitmapEx( - aPosition, - BitmapEx(aBmpCol), - (UINT16)(aBmpCol.GetSizePixel().Width() - 1) >> 1, + aPosition, + BitmapEx(aBmpCol), + (UINT16)(aBmpCol.GetSizePixel().Width() - 1) >> 1, (UINT16)(aBmpCol.GetSizePixel().Height() - 1) >> 1 ); DBG_ASSERT(pNewOverlayObject, "Got NO new IAO!"); @@ -1152,7 +1126,7 @@ void SdrHdlGradient::CreateB2dIAObject() { // first throw away old one GetRidOfIAObject(); - + if(pHdlList) { SdrMarkView* pView = pHdlList->GetView(); @@ -1181,34 +1155,34 @@ void SdrHdlGradient::CreateB2dIAObject() INT32 nMidX = (INT32)(aPos.X() + aVec.getX() * fLongPercentArrow); INT32 nMidY = (INT32)(aPos.Y() + aVec.getY() * fLongPercentArrow); Point aMidPoint(nMidX, nMidY); - + basegfx::B2DPoint aPosition(aPos.X(), aPos.Y()); basegfx::B2DPoint aMidPos(aMidPoint.X(), aMidPoint.Y()); - ::sdr::overlay::OverlayObject* pNewOverlayObject = new + ::sdr::overlay::OverlayObject* pNewOverlayObject = new ::sdr::overlay::OverlayLineStriped( aPosition, aMidPos ); DBG_ASSERT(pNewOverlayObject, "Got NO new IAO!"); - + pNewOverlayObject->setBaseColor(IsGradient() ? Color(COL_BLACK) : Color(COL_BLUE)); rPageWindow.GetOverlayManager()->add(*pNewOverlayObject); maOverlayGroup.append(*pNewOverlayObject); // arrowhead - Point aLeft(aMidPoint.X() + (INT32)(aPerpend.getX() * fHalfArrowWidth), + Point aLeft(aMidPoint.X() + (INT32)(aPerpend.getX() * fHalfArrowWidth), aMidPoint.Y() + (INT32)(aPerpend.getY() * fHalfArrowWidth)); - Point aRight(aMidPoint.X() - (INT32)(aPerpend.getX() * fHalfArrowWidth), + Point aRight(aMidPoint.X() - (INT32)(aPerpend.getX() * fHalfArrowWidth), aMidPoint.Y() - (INT32)(aPerpend.getY() * fHalfArrowWidth)); basegfx::B2DPoint aPositionLeft(aLeft.X(), aLeft.Y()); basegfx::B2DPoint aPositionRight(aRight.X(), aRight.Y()); basegfx::B2DPoint aPosition2(a2ndPos.X(), a2ndPos.Y()); - pNewOverlayObject = new + pNewOverlayObject = new ::sdr::overlay::OverlayTriangle( - aPositionLeft, - aPosition2, + aPositionLeft, + aPosition2, aPositionRight, IsGradient() ? Color(COL_BLACK) : Color(COL_BLUE) ); @@ -1249,7 +1223,7 @@ void SdrHdlGradient::FromIAOToItem(SdrObject* _pObj, BOOL bSetItemOnObject, BOOL aGradTransVector.aCol1 = pColHdl1->GetColor(); if(pColHdl2) aGradTransVector.aCol2 = pColHdl2->GetColor(); - + if(IsGradient()) aOldGradTransGradient.aGradient = ((XFillGradientItem&)rSet.Get(XATTR_FILLGRADIENT)).GetGradientValue(); else @@ -1275,7 +1249,7 @@ void SdrHdlGradient::FromIAOToItem(SdrObject* _pObj, BOOL bSetItemOnObject, BOOL XFillFloatTransparenceItem aNewTransItem(aString, aGradTransGradient.aGradient); aNewSet.Put(aNewTransItem); } - + if(bUndo && pModel->IsUndoEnabled()) { pModel->BegUndo(SVX_RESSTR(IsGradient() ? SIP_XA_FILLGRADIENT : SIP_XA_FILLTRANSPARENCE)); @@ -1333,9 +1307,9 @@ void SdrHdlLine::CreateB2dIAObject() basegfx::B2DPoint aPosition1(pHdl1->GetPos().X(), pHdl1->GetPos().Y()); basegfx::B2DPoint aPosition2(pHdl2->GetPos().X(), pHdl2->GetPos().Y()); - ::sdr::overlay::OverlayObject* pNewOverlayObject = new + ::sdr::overlay::OverlayObject* pNewOverlayObject = new ::sdr::overlay::OverlayLineStriped( - aPosition1, + aPosition1, aPosition2 ); DBG_ASSERT(pNewOverlayObject, "Got NO new IAO!"); @@ -1395,9 +1369,9 @@ void SdrHdlBezWgt::CreateB2dIAObject() if(!aPosition1.equal(aPosition2)) { - ::sdr::overlay::OverlayObject* pNewOverlayObject = new + ::sdr::overlay::OverlayObject* pNewOverlayObject = new ::sdr::overlay::OverlayLineStriped( - aPosition1, + aPosition1, aPosition2 ); DBG_ASSERT(pNewOverlayObject, "Got NO new IAO!"); @@ -1451,7 +1425,7 @@ void E3dVolumeMarker::CreateB2dIAObject() { if(rPageWindow.GetOverlayManager() && aWireframePoly.count()) { - ::sdr::overlay::OverlayObject* pNewOverlayObject = new + ::sdr::overlay::OverlayObject* pNewOverlayObject = new ::sdr::overlay::OverlayPolyPolygonStriped(aWireframePoly); DBG_ASSERT(pNewOverlayObject, "Got NO new IAO!"); @@ -1459,7 +1433,7 @@ void E3dVolumeMarker::CreateB2dIAObject() if(pNewOverlayObject) { pNewOverlayObject->setBaseColor(Color(COL_BLACK)); - + rPageWindow.GetOverlayManager()->add(*pNewOverlayObject); maOverlayGroup.append(*pNewOverlayObject); } @@ -1479,7 +1453,7 @@ ImpEdgeHdl::~ImpEdgeHdl() void ImpEdgeHdl::CreateB2dIAObject() { - if(nObjHdlNum <= 1 && pObj) + if(nObjHdlNum <= 1 && pObj) { // first throw away old one GetRidOfIAObject(); @@ -1495,10 +1469,10 @@ void ImpEdgeHdl::CreateB2dIAObject() { const SdrEdgeObj* pEdge = (SdrEdgeObj*)pObj; - if(pEdge->GetConnectedNode(nObjHdlNum == 0) != NULL) + if(pEdge->GetConnectedNode(nObjHdlNum == 0) != NULL) eColIndex = LightRed; - if(nPPntNum < 2) + if(nPPntNum < 2) { // Handle with plus sign inside eKindOfMarker = Circ_7x7; @@ -1519,7 +1493,7 @@ void ImpEdgeHdl::CreateB2dIAObject() basegfx::B2DPoint aPosition(aPos.X(), aPos.Y()); ::sdr::overlay::OverlayObject* pNewOverlayObject = CreateOverlayObject( - aPosition, + aPosition, eColIndex, eKindOfMarker); @@ -1544,11 +1518,11 @@ void ImpEdgeHdl::CreateB2dIAObject() } void ImpEdgeHdl::SetLineCode(SdrEdgeLineCode eCode) -{ +{ if(eLineCode != eCode) { // remember new value - eLineCode = eCode; + eLineCode = eCode; // create new display Touch(); @@ -1558,35 +1532,35 @@ void ImpEdgeHdl::SetLineCode(SdrEdgeLineCode eCode) Pointer ImpEdgeHdl::GetPointer() const { SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pObj); - if (pEdge==NULL) + if (pEdge==NULL) return SdrHdl::GetPointer(); - if (nObjHdlNum<=1) + if (nObjHdlNum<=1) return Pointer(POINTER_MOVEPOINT); //Pointer(POINTER_DRAW_CONNECT); - if (IsHorzDrag()) + if (IsHorzDrag()) return Pointer(POINTER_ESIZE); - else + else return Pointer(POINTER_SSIZE); } BOOL ImpEdgeHdl::IsHorzDrag() const { SdrEdgeObj* pEdge=PTR_CAST(SdrEdgeObj,pObj); - if (pEdge==NULL) + if (pEdge==NULL) return FALSE; - if (nObjHdlNum<=1) + if (nObjHdlNum<=1) return FALSE; - + SdrEdgeKind eEdgeKind = ((SdrEdgeKindItem&)(pEdge->GetObjectItem(SDRATTR_EDGEKIND))).GetValue(); - + const SdrEdgeInfoRec& rInfo=pEdge->aEdgeInfo; - if (eEdgeKind==SDREDGE_ORTHOLINES || eEdgeKind==SDREDGE_BEZIER) + if (eEdgeKind==SDREDGE_ORTHOLINES || eEdgeKind==SDREDGE_BEZIER) { return !rInfo.ImpIsHorzLine(eLineCode,*pEdge->pEdgeTrack); - } - else if (eEdgeKind==SDREDGE_THREELINES) + } + else if (eEdgeKind==SDREDGE_THREELINES) { long nWink=nObjHdlNum==2 ? rInfo.nAngle1 : rInfo.nAngle2; - if (nWink==0 || nWink==18000) + if (nWink==0 || nWink==18000) return TRUE; else return FALSE; @@ -1619,7 +1593,7 @@ void ImpMeasureHdl::CreateB2dIAObject() eKindOfMarker = Rect_7x7; } - if(bSelect) + if(bSelect) { eColIndex = Cyan; } @@ -1639,7 +1613,7 @@ void ImpMeasureHdl::CreateB2dIAObject() basegfx::B2DPoint aPosition(aPos.X(), aPos.Y()); ::sdr::overlay::OverlayObject* pNewOverlayObject = CreateOverlayObject( - aPosition, + aPosition, eColIndex, eKindOfMarker); @@ -1659,7 +1633,7 @@ void ImpMeasureHdl::CreateB2dIAObject() Pointer ImpMeasureHdl::GetPointer() const { - switch (nObjHdlNum) + switch (nObjHdlNum) { case 0: case 1: return Pointer(POINTER_HAND); case 2: case 3: return Pointer(POINTER_MOVEPOINT); @@ -1670,7 +1644,7 @@ Pointer ImpMeasureHdl::GetPointer() const //////////////////////////////////////////////////////////////////////////////////////////////////// -ImpTextframeHdl::ImpTextframeHdl(const Rectangle& rRect) : +ImpTextframeHdl::ImpTextframeHdl(const Rectangle& rRect) : SdrHdl(rRect.TopLeft(),HDL_MOVE), maRect(rRect) { @@ -1743,7 +1717,7 @@ int ImpSdrHdlListSorter::Compare(const void* pElem1, const void* pElem2) const // Level 1: Erst normale Handles, dann Glue, dann User, dann Plushandles, dann Retpunkt-Handles unsigned n1=1; unsigned n2=1; - if (eKind1!=eKind2) + if (eKind1!=eKind2) { if (eKind1==HDL_REF1 || eKind1==HDL_REF2 || eKind1==HDL_MIRX) n1=5; else if (eKind1==HDL_GLUE) n1=2; @@ -1756,47 +1730,47 @@ int ImpSdrHdlListSorter::Compare(const void* pElem1, const void* pElem2) const } if (((SdrHdl*)pElem1)->IsPlusHdl()) n1=4; if (((SdrHdl*)pElem2)->IsPlusHdl()) n2=4; - if (n1==n2) + if (n1==n2) { // Level 2: PageView (Pointer) SdrPageView* pPV1=((SdrHdl*)pElem1)->GetPageView(); SdrPageView* pPV2=((SdrHdl*)pElem2)->GetPageView(); - if (pPV1==pPV2) + if (pPV1==pPV2) { // Level 3: Position (x+y) SdrObject* pObj1=((SdrHdl*)pElem1)->GetObj(); SdrObject* pObj2=((SdrHdl*)pElem2)->GetObj(); - if (pObj1==pObj2) + if (pObj1==pObj2) { sal_uInt32 nNum1=((SdrHdl*)pElem1)->GetObjHdlNum(); sal_uInt32 nNum2=((SdrHdl*)pElem2)->GetObjHdlNum(); - if (nNum1==nNum2) + if (nNum1==nNum2) { // #48763# if (eKind1==eKind2) return (long)pElem1<(long)pElem2 ? -1 : 1; // Notloesung, um immer die gleiche Sortierung zu haben return (USHORT)eKind1<(USHORT)eKind2 ? -1 : 1; - } - else + } + else return nNum1<nNum2 ? -1 : 1; - } - else + } + else { return (long)pObj1<(long)pObj2 ? -1 : 1; } - } - else + } + else { return (long)pPV1<(long)pPV2 ? -1 : 1; } - } - else + } + else { return n1<n2 ? -1 : 1; } } -SdrMarkView* SdrHdlList::GetView() const -{ +SdrMarkView* SdrHdlList::GetView() const +{ return pView; } @@ -1898,7 +1872,7 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward) const ULONG nOldHdlNum(mnFocusIndex); SdrHdl* pOld = GetHdl(nOldHdlNum); //SDOsal_Bool bRefresh(sal_False); - + if(pOld) { // switch off old handle @@ -2080,31 +2054,31 @@ void SdrHdlList::ResetFocusHdl() //////////////////////////////////////////////////////////////////////////////////////////////////// SdrHdlList::SdrHdlList(SdrMarkView* pV) -: mnFocusIndex(CONTAINER_ENTRY_NOTFOUND), +: mnFocusIndex(CONTAINER_ENTRY_NOTFOUND), pView(pV), aList(1024,32,32) -{ - nHdlSize = 3; - bRotateShear = FALSE; - bMoveOutside = FALSE; - bDistortShear = FALSE; +{ + nHdlSize = 3; + bRotateShear = FALSE; + bMoveOutside = FALSE; + bDistortShear = FALSE; bFineHandles = FALSE; } -SdrHdlList::~SdrHdlList() -{ - Clear(); +SdrHdlList::~SdrHdlList() +{ + Clear(); } void SdrHdlList::SetHdlSize(USHORT nSiz) -{ +{ if(nHdlSize != nSiz) { // remember new value - nHdlSize = nSiz; + nHdlSize = nSiz; // propagate change to IAOs - for(UINT32 i=0; i<GetHdlCount(); i++) + for(UINT32 i=0; i<GetHdlCount(); i++) { SdrHdl* pHdl = GetHdl(i); pHdl->Touch(); @@ -2112,15 +2086,15 @@ void SdrHdlList::SetHdlSize(USHORT nSiz) } } -void SdrHdlList::SetMoveOutside(BOOL bOn) -{ +void SdrHdlList::SetMoveOutside(BOOL bOn) +{ if(bMoveOutside != bOn) { // remember new value - bMoveOutside = bOn; + bMoveOutside = bOn; // propagate change to IAOs - for(UINT32 i=0; i<GetHdlCount(); i++) + for(UINT32 i=0; i<GetHdlCount(); i++) { SdrHdl* pHdl = GetHdl(i); pHdl->Touch(); @@ -2128,25 +2102,25 @@ void SdrHdlList::SetMoveOutside(BOOL bOn) } } -void SdrHdlList::SetRotateShear(BOOL bOn) -{ - bRotateShear = bOn; +void SdrHdlList::SetRotateShear(BOOL bOn) +{ + bRotateShear = bOn; } -void SdrHdlList::SetDistortShear(BOOL bOn) -{ - bDistortShear = bOn; +void SdrHdlList::SetDistortShear(BOOL bOn) +{ + bDistortShear = bOn; } -void SdrHdlList::SetFineHdl(BOOL bOn) -{ +void SdrHdlList::SetFineHdl(BOOL bOn) +{ if(bFineHandles != bOn) { // remember new state - bFineHandles = bOn; + bFineHandles = bOn; // propagate change to IAOs - for(UINT32 i=0; i<GetHdlCount(); i++) + for(UINT32 i=0; i<GetHdlCount(); i++) { SdrHdl* pHdl = GetHdl(i); pHdl->Touch(); @@ -2154,8 +2128,8 @@ void SdrHdlList::SetFineHdl(BOOL bOn) } } -SdrHdl* SdrHdlList::RemoveHdl(ULONG nNum) -{ +SdrHdl* SdrHdlList::RemoveHdl(ULONG nNum) +{ SdrHdl* pRetval = (SdrHdl*)aList.Remove(nNum); return pRetval; @@ -2163,7 +2137,7 @@ SdrHdl* SdrHdlList::RemoveHdl(ULONG nNum) void SdrHdlList::Clear() { - for (ULONG i=0; i<GetHdlCount(); i++) + for (ULONG i=0; i<GetHdlCount(); i++) { SdrHdl* pHdl=GetHdl(i); delete pHdl; @@ -2205,7 +2179,7 @@ void SdrHdlList::Sort() ULONG SdrHdlList::GetHdlNum(const SdrHdl* pHdl) const { - if (pHdl==NULL) + if (pHdl==NULL) return CONTAINER_ENTRY_NOTFOUND; ULONG nPos=aList.GetPos(pHdl); return nPos; @@ -2213,13 +2187,13 @@ ULONG SdrHdlList::GetHdlNum(const SdrHdl* pHdl) const void SdrHdlList::AddHdl(SdrHdl* pHdl, BOOL bAtBegin) { - if (pHdl!=NULL) + if (pHdl!=NULL) { - if (bAtBegin) + if (bAtBegin) { aList.Insert(pHdl,ULONG(0)); - } - else + } + else { aList.Insert(pHdl,CONTAINER_APPEND); } @@ -2232,22 +2206,22 @@ SdrHdl* SdrHdlList::IsHdlListHit(const Point& rPnt, BOOL bBack, BOOL bNext, SdrH SdrHdl* pRet=NULL; ULONG nAnz=GetHdlCount(); ULONG nNum=bBack ? 0 : nAnz; - while ((bBack ? nNum<nAnz : nNum>0) && pRet==NULL) + while ((bBack ? nNum<nAnz : nNum>0) && pRet==NULL) { - if (!bBack) + if (!bBack) nNum--; SdrHdl* pHdl=GetHdl(nNum); - if (bNext) + if (bNext) { - if (pHdl==pHdl0) + if (pHdl==pHdl0) bNext=FALSE; - } - else + } + else { - if (pHdl->IsHdlHit(rPnt)) + if (pHdl->IsHdlHit(rPnt)) pRet=pHdl; } - if (bBack) + if (bBack) nNum++; } return pRet; @@ -2256,10 +2230,10 @@ SdrHdl* SdrHdlList::IsHdlListHit(const Point& rPnt, BOOL bBack, BOOL bNext, SdrH SdrHdl* SdrHdlList::GetHdl(SdrHdlKind eKind1) const { SdrHdl* pRet=NULL; - for (ULONG i=0; i<GetHdlCount() && pRet==NULL; i++) + for (ULONG i=0; i<GetHdlCount() && pRet==NULL; i++) { SdrHdl* pHdl=GetHdl(i); - if (pHdl->GetKind()==eKind1) + if (pHdl->GetKind()==eKind1) pRet=pHdl; } return pRet; @@ -2276,16 +2250,9 @@ SdrCropHdl::SdrCropHdl(const Point& rPnt, SdrHdlKind eNewKind) // -------------------------------------------------------------------- -BitmapEx SdrCropHdl::GetHandlesBitmap( bool bIsFineHdl, bool bIsHighContrast ) +BitmapEx SdrCropHdl::GetHandlesBitmap( bool bIsFineHdl ) { - if( bIsHighContrast ) - { - static BitmapEx* pHighContrastBitmap = 0; - if( pHighContrastBitmap == 0 ) - pHighContrastBitmap = new BitmapEx(ResId(SIP_SA_ACCESSIBILITY_CROP_MARKERS, *ImpGetResMgr())); - return *pHighContrastBitmap; - } - else if( bIsFineHdl ) + if( bIsFineHdl ) { static BitmapEx* pModernBitmap = 0; if( pModernBitmap == 0 ) @@ -2340,7 +2307,7 @@ BitmapEx SdrCropHdl::GetBitmapForHandle( const BitmapEx& rBitmap, int nSize ) BitmapEx aRetval(rBitmap); aRetval.Crop(aSourceRect); - return aRetval; + return aRetval; } // -------------------------------------------------------------------- @@ -2357,12 +2324,9 @@ void SdrCropHdl::CreateB2dIAObject() { sal_Bool bIsFineHdl(pHdlList->IsFineHdl()); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - sal_Bool bIsHighContrast(rStyleSettings.GetHighContrastMode()); int nHdlSize = pHdlList->GetHdlSize(); - if( bIsHighContrast ) - nHdlSize = 4; - const BitmapEx aHandlesBitmap( GetHandlesBitmap( bIsFineHdl, bIsHighContrast ) ); + const BitmapEx aHandlesBitmap( GetHandlesBitmap( bIsFineHdl ) ); BitmapEx aBmpEx1( GetBitmapForHandle( aHandlesBitmap, nHdlSize ) ); for(sal_uInt32 b(0L); b < pPageView->PageWindowCount(); b++) @@ -2389,9 +2353,9 @@ void SdrCropHdl::CreateB2dIAObject() const sal_uInt32 nBlinkTime = sal::static_int_cast<sal_uInt32>(rStyleSettings.GetCursorBlinkTime()); pOverlayObject = new ::sdr::overlay::OverlayAnimatedBitmapEx(aPosition, aBmpEx1, aBmpEx2, nBlinkTime, - (UINT16)(aBmpEx1.GetSizePixel().Width() - 1) >> 1, + (UINT16)(aBmpEx1.GetSizePixel().Width() - 1) >> 1, (UINT16)(aBmpEx1.GetSizePixel().Height() - 1) >> 1, - (UINT16)(aBmpEx2.GetSizePixel().Width() - 1) >> 1, + (UINT16)(aBmpEx2.GetSizePixel().Width() - 1) >> 1, (UINT16)(aBmpEx2.GetSizePixel().Height() - 1) >> 1); } else @@ -2415,3 +2379,5 @@ void SdrCropHdl::CreateB2dIAObject() } // -------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx index c77c7e77c2..dc03845e52 100644 --- a/svx/source/svdraw/svdhlpln.cxx +++ b/svx/source/svdraw/svdhlpln.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -47,11 +48,11 @@ Pointer SdrHelpLine::GetPointer() const } // switch } -FASTBOOL SdrHelpLine::IsHit(const Point& rPnt, USHORT nTolLog, const OutputDevice& rOut) const +bool SdrHelpLine::IsHit(const Point& rPnt, USHORT nTolLog, const OutputDevice& rOut) const { Size a1Pix(rOut.PixelToLogic(Size(1,1))); - FASTBOOL bXHit=rPnt.X()>=aPos.X()-nTolLog && rPnt.X()<=aPos.X()+nTolLog+a1Pix.Width(); - FASTBOOL bYHit=rPnt.Y()>=aPos.Y()-nTolLog && rPnt.Y()<=aPos.Y()+nTolLog+a1Pix.Height(); + bool bXHit=rPnt.X()>=aPos.X()-nTolLog && rPnt.X()<=aPos.X()+nTolLog+a1Pix.Width(); + bool bYHit=rPnt.Y()>=aPos.Y()-nTolLog && rPnt.Y()<=aPos.Y()+nTolLog+a1Pix.Height(); switch (eKind) { case SDRHELPLINE_VERTICAL : return bXHit; case SDRHELPLINE_HORIZONTAL: return bYHit; @@ -123,13 +124,13 @@ void SdrHelpLineList::operator=(const SdrHelpLineList& rSrcList) bool SdrHelpLineList::operator==(const SdrHelpLineList& rSrcList) const { - FASTBOOL bEqual=FALSE; + bool bEqual = false; USHORT nAnz=GetCount(); if (nAnz==rSrcList.GetCount()) { - bEqual=TRUE; + bEqual = true; for (USHORT i=0; i<nAnz && bEqual; i++) { if (*GetObject(i)!=*rSrcList.GetObject(i)) { - bEqual=FALSE; + bEqual = false; } } } @@ -147,3 +148,5 @@ USHORT SdrHelpLineList::HitTest(const Point& rPnt, USHORT nTolLog, const OutputD } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 5d2f5937de..43a2eed61b 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -187,11 +188,11 @@ public: virtual void KeyInput(const KeyEvent& rEvt); }; -__EXPORT ImpItemEdit::~ImpItemEdit() +ImpItemEdit::~ImpItemEdit() { } -void __EXPORT ImpItemEdit::KeyInput(const KeyEvent& rKEvt) +void ImpItemEdit::KeyInput(const KeyEvent& rKEvt) { _SdrItemBrowserControl* pBrowseMerk = pBrowse; @@ -228,7 +229,7 @@ _SdrItemBrowserControl::_SdrItemBrowserControl(Window* pParent, WinBits nBits): ImpCtor(); } -__EXPORT _SdrItemBrowserControl::~_SdrItemBrowserControl() +_SdrItemBrowserControl::~_SdrItemBrowserControl() { if(pEditControl) delete pEditControl; @@ -302,12 +303,12 @@ void _SdrItemBrowserControl::Clear() BrowseBox::Clear(); } -long __EXPORT _SdrItemBrowserControl::GetRowCount() const +long _SdrItemBrowserControl::GetRowCount() const { return aList.Count(); } -BOOL __EXPORT _SdrItemBrowserControl::SeekRow(long nRow) +BOOL _SdrItemBrowserControl::SeekRow(long nRow) { nAktPaintRow=nRow; return TRUE; @@ -356,7 +357,7 @@ String _SdrItemBrowserControl::GetCellText(long _nRow, USHORT _nColId) const return sRet; } -void __EXPORT _SdrItemBrowserControl::PaintField(OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId) const +void _SdrItemBrowserControl::PaintField(OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId) const { if (nAktPaintRow<0 || (ULONG)nAktPaintRow>=aList.Count()) { return; @@ -404,7 +405,7 @@ USHORT _SdrItemBrowserControl::GetCurrentWhich() const return nRet; } -void __EXPORT _SdrItemBrowserControl::DoubleClick(const BrowserMouseEvent&) +void _SdrItemBrowserControl::DoubleClick(const BrowserMouseEvent&) { ULONG nPos=GetCurrentPos(); if (nPos!=CONTAINER_ENTRY_NOTFOUND) { @@ -412,14 +413,14 @@ void __EXPORT _SdrItemBrowserControl::DoubleClick(const BrowserMouseEvent&) } } -void __EXPORT _SdrItemBrowserControl::KeyInput(const KeyEvent& rKEvt) +void _SdrItemBrowserControl::KeyInput(const KeyEvent& rKEvt) { USHORT nKeyCode=rKEvt.GetKeyCode().GetCode()+rKEvt.GetKeyCode().GetModifier(); - FASTBOOL bAusgewertet=FALSE; + bool bAusgewertet = false; ULONG nPos=GetCurrentPos(); if (nPos!=CONTAINER_ENTRY_NOTFOUND) { if (nKeyCode==KEY_RETURN) { - if (BegChangeEntry(nPos)) bAusgewertet=TRUE; + if (BegChangeEntry(nPos)) bAusgewertet = true; } else if (nKeyCode==KEY_ESCAPE) { // ... } else if (rKEvt.GetKeyCode().GetModifier()==KEY_SHIFT+KEY_MOD1+KEY_MOD2) { // Strg @@ -457,7 +458,7 @@ sal_Int32 _SdrItemBrowserControl::GetFieldIndexAtPoint(sal_Int32 /*_nRow*/,sal_I return -1; } -void __EXPORT _SdrItemBrowserControl::Select() +void _SdrItemBrowserControl::Select() { EndChangeEntry(); BrowseBox::Select(); @@ -483,18 +484,14 @@ void _SdrItemBrowserControl::ImpSaveWhich() void _SdrItemBrowserControl::ImpRestoreWhich() { if (nLastWhich!=0) { - FASTBOOL bFnd=FALSE; - USHORT nBestMinWh=0,nBestMaxWh=0xFFFF; // not implemented yet - ULONG nBestMinPos=0,nBestMaxPos=0xFFFFFFFF; // not implemented yet + bool bFnd = false; ULONG nAnz=aList.Count(); ULONG nNum; for (nNum=0; nNum<nAnz && !bFnd; nNum++) { ImpItemListRow* pEntry=ImpGetEntry(nNum); if (!pEntry->bComment) { USHORT nWh=pEntry->nWhichId; - if (nWh==nLastWhich) bFnd=TRUE; - else if (nWh<nLastWhich && nWh>nBestMinWh) nBestMinPos=nNum; - else if (nWh>nLastWhich && nWh<nBestMaxWh) nBestMaxPos=nNum; + if (nWh==nLastWhich) bFnd = true; } } if (bFnd) { @@ -508,10 +505,10 @@ void _SdrItemBrowserControl::ImpRestoreWhich() } } -FASTBOOL _SdrItemBrowserControl::BegChangeEntry(ULONG nPos) +bool _SdrItemBrowserControl::BegChangeEntry(ULONG nPos) { BrkChangeEntry(); - FASTBOOL bRet=FALSE; + bool bRet = false; ImpItemListRow* pEntry=ImpGetEntry(nPos); if (pEntry!=NULL && !pEntry->bComment) { SetMode(MYBROWSEMODE & ~BROWSER_KEEPHIGHLIGHT); @@ -542,14 +539,14 @@ FASTBOOL _SdrItemBrowserControl::BegChangeEntry(ULONG nPos) aNeuNam.AppendAscii(" - Type 'del' to reset to default."); pParent->SetText(aNeuNam); pAktChangeEntry=new ImpItemListRow(*pEntry); - bRet=TRUE; + bRet = true; } return bRet; } -FASTBOOL _SdrItemBrowserControl::EndChangeEntry() +bool _SdrItemBrowserControl::EndChangeEntry() { - FASTBOOL bRet=FALSE; + bool bRet = false; if (pEditControl!=NULL) { aEntryChangedHdl.Call(this); delete pEditControl; @@ -559,7 +556,7 @@ FASTBOOL _SdrItemBrowserControl::EndChangeEntry() Window* pParent=GetParent(); pParent->SetText(aWNamMerk); SetMode(MYBROWSEMODE); - bRet=TRUE; + bRet = true; } return bRet; } @@ -584,15 +581,15 @@ void _SdrItemBrowserControl::ImpSetEntry(const ImpItemListRow& rEntry, ULONG nEn aList.Insert(new ImpItemListRow(rEntry),CONTAINER_APPEND); RowInserted(nEntryNum); } else if (*pAktEntry!=rEntry) { - FASTBOOL bStateDiff=rEntry.eState!=pAktEntry->eState; - FASTBOOL bValueDiff=!rEntry.aValue.Equals(pAktEntry->aValue); - FASTBOOL bAllDiff=TRUE; + bool bStateDiff=rEntry.eState!=pAktEntry->eState; + bool bValueDiff=!rEntry.aValue.Equals(pAktEntry->aValue); + bool bAllDiff = true; if (bStateDiff || bValueDiff) { // Checken, ob nur State und/oder Value geaendert ImpItemListRow aTest(rEntry); aTest.eState=pAktEntry->eState; aTest.aValue=pAktEntry->aValue; - if (aTest==*pAktEntry) bAllDiff=FALSE; + if (aTest==*pAktEntry) bAllDiff = false; } *pAktEntry=rEntry; if (bAllDiff) { @@ -604,7 +601,7 @@ void _SdrItemBrowserControl::ImpSetEntry(const ImpItemListRow& rEntry, ULONG nEn } } -FASTBOOL ImpGetItem(const SfxItemSet& rSet, USHORT nWhich, const SfxPoolItem*& rpItem) +bool ImpGetItem(const SfxItemSet& rSet, USHORT nWhich, const SfxPoolItem*& rpItem) { SfxItemState eState=rSet.GetItemState(nWhich,TRUE,&rpItem); if (eState==SFX_ITEM_DEFAULT) { @@ -613,12 +610,12 @@ FASTBOOL ImpGetItem(const SfxItemSet& rSet, USHORT nWhich, const SfxPoolItem*& r return (eState==SFX_ITEM_DEFAULT || eState==SFX_ITEM_SET) && rpItem!=NULL; } -FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rIndent) +bool IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rIndent) { rIndent=0; if (pSet==NULL) return FALSE; const SfxPoolItem* pItem=NULL; - FASTBOOL bRet=FALSE; + bool bRet = false; switch (nWhich) { case XATTR_LINEDASH : case XATTR_LINEWIDTH : @@ -687,17 +684,15 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden if (nWhich==XATTR_FILLBITMAP || nWhich==XATTR_FILLBMP_TILE) { return FALSE; // immer anwaehlbar } - FASTBOOL bTileTRUE=FALSE; - FASTBOOL bTileFALSE=FALSE; - FASTBOOL bStretchTRUE=FALSE; - FASTBOOL bStretchFALSE=FALSE; + bool bTileTRUE = false; + bool bTileFALSE = false; + bool bStretchTRUE = false; if (ImpGetItem(*pSet,XATTR_FILLBMP_TILE,pItem)) { bTileTRUE=((const XFillBmpTileItem*)pItem)->GetValue(); bTileFALSE=!bTileTRUE; } if (ImpGetItem(*pSet,XATTR_FILLBMP_STRETCH,pItem)) { bStretchTRUE=((const XFillBmpStretchItem*)pItem)->GetValue(); - bStretchFALSE=!bStretchTRUE; } // Stretch nicht anwaehlbar, wenn Tile=TRUE if (nWhich==XATTR_FILLBMP_STRETCH) return bTileTRUE; @@ -717,14 +712,14 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden if (nWhich==XATTR_FILLBMP_TILEOFFSETX || nWhich==XATTR_FILLBMP_TILEOFFSETY) { if (bTileFALSE) return TRUE; USHORT nX=0,nY=0; - FASTBOOL bX=FALSE,bY=FALSE; + bool bX = false,bY = false; if (ImpGetItem(*pSet,XATTR_FILLBMP_TILEOFFSETX,pItem)) { nX=((const XFillBmpTileOffsetXItem*)pItem)->GetValue(); - bX=TRUE; + bX = true; } if (ImpGetItem(*pSet,XATTR_FILLBMP_TILEOFFSETY,pItem)) { nY=((const XFillBmpTileOffsetYItem*)pItem)->GetValue(); - bY=TRUE; + bY = true; } if (nWhich==XATTR_FILLBMP_TILEOFFSETX) { if (nX!=0 || !bX) return FALSE; @@ -777,7 +772,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_SHADOWPERSP : { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_SHADOW,pItem)) { - FASTBOOL bShadow=((const SdrShadowItem*)pItem)->GetValue(); + bool bShadow=((const SdrShadowItem*)pItem)->GetValue(); if (!bShadow) return TRUE; } } break; @@ -785,7 +780,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_CAPTIONANGLE: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_CAPTIONFIXEDANGLE,pItem)) { - FASTBOOL bFixed=((const SdrCaptionFixedAngleItem*)pItem)->GetValue(); + bool bFixed=((const SdrCaptionFixedAngleItem*)pItem)->GetValue(); if (!bFixed) return TRUE; } } break; @@ -793,7 +788,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_CAPTIONESCABS: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_CAPTIONESCISREL,pItem)) { - FASTBOOL bRel=((const SdrCaptionEscIsRelItem*)pItem)->GetValue(); + bool bRel=((const SdrCaptionEscIsRelItem*)pItem)->GetValue(); if (bRel && nWhich==SDRATTR_CAPTIONESCABS) return TRUE; if (!bRel && nWhich==SDRATTR_CAPTIONESCREL) return TRUE; } @@ -801,7 +796,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_CAPTIONLINELEN: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_CAPTIONFITLINELEN,pItem)) { - FASTBOOL bFit=((const SdrCaptionFitLineLenItem*)pItem)->GetValue(); + bool bFit=((const SdrCaptionFitLineLenItem*)pItem)->GetValue(); if (bFit) return TRUE; } } break; @@ -810,7 +805,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_TEXT_MAXFRAMEHEIGHT: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_TEXT_AUTOGROWHEIGHT,pItem)) { - FASTBOOL bAutoGrow=((const SdrTextAutoGrowHeightItem*)pItem)->GetValue(); + bool bAutoGrow=((const SdrTextAutoGrowHeightItem*)pItem)->GetValue(); if (!bAutoGrow) return TRUE; } } break; @@ -818,7 +813,7 @@ FASTBOOL IsItemIneffective(USHORT nWhich, const SfxItemSet* pSet, USHORT& rInden case SDRATTR_TEXT_MAXFRAMEWIDTH: { rIndent=1; if (ImpGetItem(*pSet,SDRATTR_TEXT_AUTOGROWWIDTH,pItem)) { - FASTBOOL bAutoGrow=((const SdrTextAutoGrowWidthItem*)pItem)->GetValue(); + bool bAutoGrow=((const SdrTextAutoGrowWidthItem*)pItem)->GetValue(); if (!bAutoGrow) return TRUE; } } break; @@ -975,7 +970,7 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem if(aCommentStr.Len()) { ImpItemListRow aEntry; - aEntry.bComment=TRUE; + aEntry.bComment = true; aEntry.aName=aCommentStr; ImpSetEntry(aEntry,nEntryNum); nEntryNum++; @@ -1018,20 +1013,20 @@ void _SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItem else if (HAS_BASE(SvxCharScaleWidthItem,&rItem)) aEntry.eItemType=ITEM_FONTWIDTH; else if (HAS_BASE(SvxFieldItem ,&rItem)) aEntry.eItemType=ITEM_FIELD; switch (aEntry.eItemType) { - case ITEM_BYTE : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxByteItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=255; break; - case ITEM_INT16 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxInt16Item &)rItem).GetValue(); aEntry.nMin=-32767; aEntry.nMax=32767; break; - case ITEM_UINT16 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxUInt16Item&)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=65535; break; - case ITEM_INT32 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxInt32Item &)rItem).GetValue(); break; - case ITEM_UINT32 : aEntry.bIsNum=TRUE; aEntry.nVal=((SfxUInt32Item&)rItem).GetValue(); aEntry.nMin=0; /*aEntry.nMax=0xFF...*/;break; - case ITEM_ENUM : aEntry.bCanNum=TRUE; aEntry.nVal=((SfxEnumItemInterface&)rItem).GetEnumValue(); aEntry.nMin=0; aEntry.nMax=((SfxEnumItemInterface&)rItem).GetValueCount()-1; break; - case ITEM_BOOL : aEntry.bCanNum=TRUE; aEntry.nVal=((SfxBoolItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=1; break; - case ITEM_FLAG : aEntry.bCanNum=TRUE; aEntry.nVal=((SfxFlagItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=0xFFFF; break; - case ITEM_FONTHEIGHT: aEntry.bCanNum=TRUE; aEntry.nVal=((SvxFontHeightItem&)rItem).GetHeight(); aEntry.nMin=0; break; - case ITEM_FONTWIDTH : aEntry.bCanNum=TRUE; aEntry.nVal=((SvxCharScaleWidthItem&)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=0xFFFF;break; + case ITEM_BYTE : aEntry.bIsNum = true; aEntry.nVal=((SfxByteItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=255; break; + case ITEM_INT16 : aEntry.bIsNum = true; aEntry.nVal=((SfxInt16Item &)rItem).GetValue(); aEntry.nMin=-32767; aEntry.nMax=32767; break; + case ITEM_UINT16 : aEntry.bIsNum = true; aEntry.nVal=((SfxUInt16Item&)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=65535; break; + case ITEM_INT32 : aEntry.bIsNum = true; aEntry.nVal=((SfxInt32Item &)rItem).GetValue(); break; + case ITEM_UINT32 : aEntry.bIsNum = true; aEntry.nVal=((SfxUInt32Item&)rItem).GetValue(); aEntry.nMin=0; /*aEntry.nMax=0xFF...*/;break; + case ITEM_ENUM : aEntry.bCanNum = true; aEntry.nVal=((SfxEnumItemInterface&)rItem).GetEnumValue(); aEntry.nMin=0; aEntry.nMax=((SfxEnumItemInterface&)rItem).GetValueCount()-1; break; + case ITEM_BOOL : aEntry.bCanNum = true; aEntry.nVal=((SfxBoolItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=1; break; + case ITEM_FLAG : aEntry.bCanNum = true; aEntry.nVal=((SfxFlagItem &)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=0xFFFF; break; + case ITEM_FONTHEIGHT: aEntry.bCanNum = true; aEntry.nVal=((SvxFontHeightItem&)rItem).GetHeight(); aEntry.nMin=0; break; + case ITEM_FONTWIDTH : aEntry.bCanNum = true; aEntry.nVal=((SvxCharScaleWidthItem&)rItem).GetValue(); aEntry.nMin=0; aEntry.nMax=0xFFFF;break; default: break; } // switch - if (aEntry.bIsNum) aEntry.bCanNum=TRUE; - FASTBOOL bGetPres=TRUE; + if (aEntry.bIsNum) aEntry.bCanNum = true; + bool bGetPres = true; if (bGetPres) { rItem.GetPresentation(SFX_ITEM_PRESENTATION_NAMELESS, pPool->GetMetric(nWhich), @@ -1083,16 +1078,16 @@ _SdrItemBrowserWindow::_SdrItemBrowserWindow(Window* pParent, WinBits nBits): aBrowse.Show(); } -__EXPORT _SdrItemBrowserWindow::~_SdrItemBrowserWindow() +_SdrItemBrowserWindow::~_SdrItemBrowserWindow() { } -void __EXPORT _SdrItemBrowserWindow::Resize() +void _SdrItemBrowserWindow::Resize() { aBrowse.SetSizePixel(GetOutputSizePixel()); } -void __EXPORT _SdrItemBrowserWindow::GetFocus() +void _SdrItemBrowserWindow::GetFocus() { aBrowse.GrabFocus(); } @@ -1136,7 +1131,7 @@ void SdrItemBrowser::ForceParent() void SdrItemBrowser::SetDirty() { if (!bDirty) { - bDirty=TRUE; + bDirty = true; aIdleTimer.SetTimeout(1); aIdleTimer.Start(); } @@ -1197,9 +1192,8 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse) if (nLongVal>pEntry->nMax) nLongVal=pEntry->nMax; if (nLongVal<pEntry->nMin) nLongVal=pEntry->nMin; } - FASTBOOL bPair=FALSE; - FASTBOOL bPairX=TRUE; - FASTBOOL bPairY=FALSE; + bool bPairX = true; + bool bPairY = false; USHORT nSepLen=1; long nLongX = aNewText.ToInt32(); long nLongY=0; @@ -1208,7 +1202,6 @@ IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse) if (nPos==STRING_NOTFOUND) nPos=aNewText.Search(sal_Unicode(' ')); if (nPos==STRING_NOTFOUND) { nPos=aNewText.SearchAscii(".."); if (nPos!=STRING_NOTFOUND) nSepLen=2; } if (nPos!=STRING_NOTFOUND) { - bPair=TRUE; bPairX=nPos>0; XubString s(aNewText); s.Erase(0,nPos+nSepLen); @@ -1297,3 +1290,4 @@ IMPL_LINK(SdrItemBrowser,SetDirtyHdl,_SdrItemBrowserControl*,EMPTYARG) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svditer.cxx b/svx/source/svdraw/svditer.cxx index f5c87aec44..99f9a673ad 100644 --- a/svx/source/svdraw/svditer.cxx +++ b/svx/source/svdraw/svditer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -108,3 +109,5 @@ void SdrObjListIter::ImpProcessObj(SdrObject* pObj, SdrIterMode eMode, BOOL bUse if( bIsGroup && (eMode != IM_FLAT) ) ImpProcessObjectList( *pObj->GetSubList(), eMode, bUseZOrder ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index 9ffaa9f2f1..357087ca34 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -196,7 +197,7 @@ void SetOfByte::QueryValue( com::sun::star::uno::Any & rAny ) const // SdrLayer //////////////////////////////////////////////////////////////////////////////////////////////////// -void SdrLayer::SetStandardLayer(FASTBOOL bStd) +void SdrLayer::SetStandardLayer(bool bStd) { nType=(UINT16)bStd; if (bStd) { @@ -242,8 +243,7 @@ SdrLayerAdmin::SdrLayerAdmin(SdrLayerAdmin* pNewParent): aLSets(1024,16,16), pModel(NULL) { - sal_Char aTextControls[] = "Controls"; - aControlLayerName = String(aTextControls, sizeof(aTextControls-1)); + aControlLayerName = String(RTL_CONSTASCII_USTRINGPARAM("Controls")); pParent=pNewParent; } @@ -253,8 +253,7 @@ SdrLayerAdmin::SdrLayerAdmin(const SdrLayerAdmin& rSrcLayerAdmin): pParent(NULL), pModel(NULL) { - sal_Char aTextControls[] = "Controls"; - aControlLayerName = String(aTextControls, sizeof(aTextControls-1)); + aControlLayerName = String(RTL_CONSTASCII_USTRINGPARAM("Controls")); *this = rSrcLayerAdmin; } @@ -291,7 +290,7 @@ bool SdrLayerAdmin::operator==(const SdrLayerAdmin& rCmpLayerAdmin) const if (pParent!=rCmpLayerAdmin.pParent || aLayer.Count()!=rCmpLayerAdmin.aLayer.Count() || aLSets.Count()!=rCmpLayerAdmin.aLSets.Count()) return FALSE; - FASTBOOL bOk=TRUE; + bool bOk = true; USHORT nAnz=GetLayerCount(); USHORT i=0; while (bOk && i<nAnz) { @@ -383,7 +382,7 @@ USHORT SdrLayerAdmin::GetLayerPos(SdrLayer* pLayer) const return USHORT(nRet); } -const SdrLayer* SdrLayerAdmin::GetLayer(const XubString& rName, FASTBOOL /*bInherited*/) const +const SdrLayer* SdrLayerAdmin::GetLayer(const XubString& rName, bool /*bInherited*/) const { UINT16 i(0); const SdrLayer* pLay = NULL; @@ -404,7 +403,7 @@ const SdrLayer* SdrLayerAdmin::GetLayer(const XubString& rName, FASTBOOL /*bInhe return pLay; } -SdrLayerID SdrLayerAdmin::GetLayerID(const XubString& rName, FASTBOOL bInherited) const +SdrLayerID SdrLayerAdmin::GetLayerID(const XubString& rName, bool bInherited) const { SdrLayerID nRet=SDRLAYER_NOTFOUND; const SdrLayer* pLay=GetLayer(rName,bInherited); @@ -456,3 +455,4 @@ SdrLayerID SdrLayerAdmin::GetUniqueLayerID() const return i; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index c98ebaceca..c7db1cb014 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1038,3 +1039,5 @@ namespace sdr //////////////////////////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 8cf363bff2..efe03bcf6b 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -116,8 +117,8 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe mpImpl = new SdrModelImpl; mpImpl->mpUndoManager=0; mpImpl->mpUndoFactory=0; - mpImpl->mbAllowShapePropertyChangeListener=false; - mbInDestruction=false; + mpImpl->mbAllowShapePropertyChangeListener = false; + mbInDestruction = false; aObjUnit=SdrEngineDefaults::GetMapFraction(); eObjUnit=SdrEngineDefaults::GetMapUnit(); eUIUnit=FUNIT_MM; @@ -174,7 +175,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe nStarDrawPreviewMasterPageNum = SDRPAGE_NOTFOUND; pModelStorage = NULL; mpForbiddenCharactersTable = NULL; - mbModelLocked = FALSE; + mbModelLocked = false; mpOutlinerCache = NULL; mbKernAsianPunctuation = sal_False; mbAddExtLeading = sal_False; @@ -234,7 +235,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal #endif DBG_CTOR(SdrModel,NULL); - ImpCtor(pPool,pPers,FALSE, (FASTBOOL)bLoadRefCounts); + ImpCtor(pPool,pPers,FALSE, (bool)bLoadRefCounts); } SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, sal_Bool bLoadRefCounts): @@ -247,10 +248,10 @@ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbed #endif DBG_CTOR(SdrModel,NULL); - ImpCtor(pPool,pPers,FALSE, (FASTBOOL)bLoadRefCounts); + ImpCtor(pPool,pPers,FALSE, (bool)bLoadRefCounts); } -SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FASTBOOL bUseExtColorTable, sal_Bool bLoadRefCounts): +SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, sal_Bool bLoadRefCounts): maMaPag(1024,32,32), maPages(1024,32,32) { @@ -259,10 +260,10 @@ SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FAS #endif DBG_CTOR(SdrModel,NULL); - ImpCtor(pPool,pPers,bUseExtColorTable, (FASTBOOL)bLoadRefCounts); + ImpCtor(pPool,pPers,bUseExtColorTable, (bool)bLoadRefCounts); } -SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, FASTBOOL bUseExtColorTable, sal_Bool bLoadRefCounts): +SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable, sal_Bool bLoadRefCounts): maMaPag(1024,32,32), maPages(1024,32,32), aTablePath(rPath) @@ -272,7 +273,7 @@ SdrModel::SdrModel(const String& rPath, SfxItemPool* pPool, ::comphelper::IEmbed #endif DBG_CTOR(SdrModel,NULL); - ImpCtor(pPool,pPers,bUseExtColorTable, (FASTBOOL)bLoadRefCounts); + ImpCtor(pPool,pPers,bUseExtColorTable, (bool)bLoadRefCounts); } SdrModel::SdrModel(const SdrModel& /*rSrcModel*/): @@ -398,23 +399,23 @@ void SdrModel::operator=(const SdrModel& /*rSrcModel*/) DBG_ERROR("SdrModel::operator=() ist noch nicht implementiert"); } -FASTBOOL SdrModel::operator==(const SdrModel& /*rCmpModel*/) const +bool SdrModel::operator==(const SdrModel& /*rCmpModel*/) const { DBG_ERROR("SdrModel::operator==() ist noch nicht implementiert"); return FALSE; } -void SdrModel::SetSwapGraphics( FASTBOOL bSwap ) +void SdrModel::SetSwapGraphics( bool bSwap ) { bSwapGraphics = bSwap; } -FASTBOOL SdrModel::IsReadOnly() const +bool SdrModel::IsReadOnly() const { return bReadOnly; } -void SdrModel::SetReadOnly(FASTBOOL bYes) +void SdrModel::SetReadOnly(bool bYes) { bReadOnly=bYes; } @@ -450,9 +451,9 @@ void SdrModel::ClearUndoBuffer() } } -FASTBOOL SdrModel::Undo() +bool SdrModel::Undo() { - FASTBOOL bRet=FALSE; + bool bRet = false; if( mpImpl->mpUndoManager ) { DBG_ERROR("svx::SdrModel::Undo(), method not supported with application undo manager!"); @@ -474,9 +475,9 @@ FASTBOOL SdrModel::Undo() return bRet; } -FASTBOOL SdrModel::Redo() +bool SdrModel::Redo() { - FASTBOOL bRet=FALSE; + bool bRet=FALSE; if( mpImpl->mpUndoManager ) { DBG_ERROR("svx::SdrModel::Redo(), method not supported with application undo manager!"); @@ -498,9 +499,9 @@ FASTBOOL SdrModel::Redo() return bRet; } -FASTBOOL SdrModel::Repeat(SfxRepeatTarget& rView) +bool SdrModel::Repeat(SfxRepeatTarget& rView) { - FASTBOOL bRet=FALSE; + bool bRet = false; if( mpImpl->mpUndoManager ) { DBG_ERROR("svx::SdrModel::Redo(), method not supported with application undo manager!"); @@ -513,7 +514,7 @@ FASTBOOL SdrModel::Repeat(SfxRepeatTarget& rView) if(pDo->CanRepeat(rView)) { pDo->Repeat(rView); - bRet=TRUE; + bRet = true; } } } @@ -808,7 +809,7 @@ SdrModel* SdrModel::AllocModel() const return pModel; } -SdrPage* SdrModel::AllocPage(FASTBOOL bMasterPage) +SdrPage* SdrModel::AllocPage(bool bMasterPage) { return new SdrPage(*this,bMasterPage); } @@ -1085,6 +1086,9 @@ void SdrModel::ImpSetUIUnit() // sonstiges case FUNIT_CUSTOM : break; case FUNIT_PERCENT: nUIUnitKomma+=2; break; + // TODO: Add code to handle the following if needed (added to removed warning) + case FUNIT_CHAR : break; + case FUNIT_LINE : break; } // switch // check if mapping is from metric to inch and adapt @@ -1221,20 +1225,17 @@ void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr) } case FUNIT_100TH_MM: { - sal_Char aText[] = "/100mm"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/100mm")); break; } case FUNIT_MM : { - sal_Char aText[] = "mm"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mm")); break; } case FUNIT_CM : { - sal_Char aText[] = "cm"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("cm")); break; } case FUNIT_M : @@ -1245,26 +1246,22 @@ void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr) } case FUNIT_KM : { - sal_Char aText[] = "km"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("km")); break; } case FUNIT_TWIP : { - sal_Char aText[] = "twip"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("twip")); break; } case FUNIT_POINT : { - sal_Char aText[] = "pt"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pt")); break; } case FUNIT_PICA : { - sal_Char aText[] = "pica"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pica")); break; } case FUNIT_INCH : @@ -1275,14 +1272,12 @@ void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr) } case FUNIT_FOOT : { - sal_Char aText[] = "ft"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("ft")); break; } case FUNIT_MILE : { - sal_Char aText[] = "mile(s)"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mile(s)")); break; } case FUNIT_PERCENT: @@ -1294,7 +1289,7 @@ void SdrModel::TakeUnitStr(FieldUnit eUnit, XubString& rStr) } } -void SdrModel::TakeMetricStr(long nVal, XubString& rStr, FASTBOOL bNoUnitChars, sal_Int32 nNumDigits) const +void SdrModel::TakeMetricStr(long nVal, XubString& rStr, bool bNoUnitChars, sal_Int32 nNumDigits) const { // #i22167# // change to double precision usage to not loose decimal places after comma @@ -1408,7 +1403,7 @@ void SdrModel::TakeMetricStr(long nVal, XubString& rStr, FASTBOOL bNoUnitChars, rStr += aUIUnitStr; } -void SdrModel::TakeWinkStr(long nWink, XubString& rStr, FASTBOOL bNoDegChar) const +void SdrModel::TakeWinkStr(long nWink, XubString& rStr, bool bNoDegChar) const { BOOL bNeg(nWink < 0); @@ -1436,7 +1431,7 @@ void SdrModel::TakeWinkStr(long nWink, XubString& rStr, FASTBOOL bNoDegChar) con rStr += DEGREE_CHAR; } -void SdrModel::TakePercentStr(const Fraction& rVal, XubString& rStr, FASTBOOL bNoPercentChar) const +void SdrModel::TakePercentStr(const Fraction& rVal, XubString& rStr, bool bNoPercentChar) const { INT32 nMul(rVal.GetNumerator()); INT32 nDiv(rVal.GetDenominator()); @@ -1469,7 +1464,7 @@ void SdrModel::SetChanged(sal_Bool bFlg) mbChanged = bFlg; } -void SdrModel::RecalcPageNums(FASTBOOL bMaster) +void SdrModel::RecalcPageNums(bool bMaster) { Container& rPL=*(bMaster ? &maMaPag : &maPages); USHORT nAnz=USHORT(rPL.Count()); @@ -1604,9 +1599,9 @@ void SdrModel::MoveMasterPage(USHORT nPgNum, USHORT nNewPos) //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrModel::CheckConsistence() const +bool SdrModel::CheckConsistence() const { - FASTBOOL bRet=TRUE; + bool bRet = true; #ifdef DBG_UTIL DBG_CHKTHIS(SdrModel,NULL); #endif @@ -1618,7 +1613,7 @@ FASTBOOL SdrModel::CheckConsistence() const // #48289# void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum, USHORT nDestPos, - FASTBOOL bUndo, FASTBOOL bMoveNoCopy) + bool bUndo, bool bMoveNoCopy) { if( bUndo && !IsUndoEnabled() ) bUndo = false; @@ -1635,7 +1630,7 @@ void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum, nFirstPageNum=nMaxPage; if (nLastPageNum>nMaxPage) nLastPageNum =nMaxPage; - FASTBOOL bReverse=nLastPageNum<nFirstPageNum; + bool bReverse=nLastPageNum<nFirstPageNum; if (nDestPos>nPageAnz) nDestPos=nPageAnz; @@ -1696,8 +1691,8 @@ void SdrModel::CopyPages(USHORT nFirstPageNum, USHORT nLastPageNum, void SdrModel::Merge(SdrModel& rSourceModel, USHORT nFirstPageNum, USHORT nLastPageNum, USHORT nDestPos, - FASTBOOL bMergeMasterPages, FASTBOOL bAllMasterPages, - FASTBOOL bUndo, FASTBOOL bTreadSourceAsConst) + bool bMergeMasterPages, bool bAllMasterPages, + bool bUndo, bool bTreadSourceAsConst) { if (&rSourceModel==this) { // #48289# @@ -1714,24 +1709,24 @@ void SdrModel::Merge(SdrModel& rSourceModel, USHORT nSrcPageAnz=rSourceModel.GetPageCount(); USHORT nSrcMasterPageAnz=rSourceModel.GetMasterPageCount(); USHORT nDstMasterPageAnz=GetMasterPageCount(); - FASTBOOL bInsPages=(nFirstPageNum<nSrcPageAnz || nLastPageNum<nSrcPageAnz); + bool bInsPages=(nFirstPageNum<nSrcPageAnz || nLastPageNum<nSrcPageAnz); USHORT nMaxSrcPage=nSrcPageAnz; if (nMaxSrcPage!=0) nMaxSrcPage--; if (nFirstPageNum>nMaxSrcPage) nFirstPageNum=nMaxSrcPage; if (nLastPageNum>nMaxSrcPage) nLastPageNum =nMaxSrcPage; - FASTBOOL bReverse=nLastPageNum<nFirstPageNum; + bool bReverse=nLastPageNum<nFirstPageNum; USHORT* pMasterMap=NULL; - FASTBOOL* pMasterNeed=NULL; + bool* pMasterNeed=NULL; USHORT nMasterNeed=0; if (bMergeMasterPages && nSrcMasterPageAnz!=0) { // Feststellen, welche MasterPages aus rSrcModel benoetigt werden pMasterMap=new USHORT[nSrcMasterPageAnz]; - pMasterNeed=new FASTBOOL[nSrcMasterPageAnz]; + pMasterNeed=new bool[nSrcMasterPageAnz]; memset(pMasterMap,0xFF,nSrcMasterPageAnz*sizeof(USHORT)); if (bAllMasterPages) { - memset(pMasterNeed,TRUE,nSrcMasterPageAnz*sizeof(FASTBOOL)); + memset(pMasterNeed, true, nSrcMasterPageAnz * sizeof(bool)); } else { - memset(pMasterNeed,FALSE,nSrcMasterPageAnz*sizeof(FASTBOOL)); + memset(pMasterNeed, false, nSrcMasterPageAnz * sizeof(bool)); USHORT nAnf= bReverse ? nLastPageNum : nFirstPageNum; USHORT nEnd= bReverse ? nFirstPageNum : nLastPageNum; for (USHORT i=nAnf; i<=nEnd; i++) { @@ -1743,7 +1738,7 @@ void SdrModel::Merge(SdrModel& rSourceModel, if(nMPgNum < nSrcMasterPageAnz) { - pMasterNeed[nMPgNum] = TRUE; + pMasterNeed[nMPgNum] = true; } } } @@ -1894,7 +1889,7 @@ uno::Reference< uno::XInterface > SdrModel::createUnoModel() return xInt; } -void SdrModel::setLock( BOOL bLock ) +void SdrModel::setLock( bool bLock ) { if( mbModelLocked != bLock ) { @@ -1970,12 +1965,12 @@ void SdrModel::MigrateItemSet( const SfxItemSet* pSourceSet, SfxItemSet* pDestSe //////////////////////////////////////////////////////////////////////////////////////////////////// -void SdrModel::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xForbiddenChars ) +void SdrModel::SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars ) { if( mpForbiddenCharactersTable ) mpForbiddenCharactersTable->release(); - mpForbiddenCharactersTable = xForbiddenChars.getBodyPtr(); + mpForbiddenCharactersTable = xForbiddenChars.get(); if( mpForbiddenCharactersTable ) mpForbiddenCharactersTable->acquire(); @@ -1984,7 +1979,7 @@ void SdrModel::SetForbiddenCharsTable( vos::ORef<SvxForbiddenCharactersTable> xF ImpSetOutlinerDefaults( pHitTestOutliner ); } -vos::ORef<SvxForbiddenCharactersTable> SdrModel::GetForbiddenCharsTable() const +rtl::Reference<SvxForbiddenCharactersTable> SdrModel::GetForbiddenCharsTable() const { return mpForbiddenCharactersTable; } @@ -2024,20 +2019,20 @@ void SdrModel::ReformatAllTextObjects() ImpReformatAllTextObjects(); } -FASTBOOL SdrModel::HasTransparentObjects( BOOL bCheckForAlphaChannel ) const +bool SdrModel::HasTransparentObjects( BOOL bCheckForAlphaChannel ) const { - FASTBOOL bRet = FALSE; + bool bRet = false; USHORT n, nCount; for( n = 0, nCount = GetMasterPageCount(); ( n < nCount ) && !bRet; n++ ) if( GetMasterPage( n )->HasTransparentObjects( bCheckForAlphaChannel ) ) - bRet = TRUE; + bRet = true; if( !bRet ) { for( n = 0, nCount = GetPageCount(); ( n < nCount ) && !bRet; n++ ) if( GetPage( n )->HasTransparentObjects( bCheckForAlphaChannel ) ) - bRet = TRUE; + bRet = true; } return bRet; @@ -2251,3 +2246,5 @@ const Rectangle& SdrHint::GetRect() const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 4c80ee2ba0..630432b4dc 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -193,7 +194,7 @@ SdrMarkView::~SdrMarkView() delete mpSdrViewSelection; } -void __EXPORT SdrMarkView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) +void SdrMarkView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) { SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint); if (pSdrHint!=NULL) @@ -2175,3 +2176,4 @@ void SdrMarkView::SetDesignMode( BOOL _bOn ) // In diesem Fall bekomme ich kein Notify und beim Aufruf des // PaintHandlers->CompleteRedraw() sind auch die SolidHandles sichtbar. +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx index 92b181b36e..9716288bc5 100644 --- a/svx/source/svdraw/svdmrkv1.cxx +++ b/svx/source/svdraw/svdmrkv1.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -722,3 +723,4 @@ const Rectangle& SdrMarkView::GetMarkedGluePointsRect() const return aMarkedGluePointsRect; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index bc7e2bc399..59009a81d5 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -108,7 +109,7 @@ static MSO_SPT ImpGetCustomShapeType( const SdrObjCustomShape& rCustoShape ) MSO_SPT eRetValue = mso_sptNil; rtl::OUString aEngine( ( (SdrCustomShapeEngineItem&)rCustoShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE ) ).GetValue() ); - if ( !aEngine.getLength() || aEngine.equalsAscii( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) ) + if ( !aEngine.getLength() || aEngine.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) ) ) { rtl::OUString sShapeType; const rtl::OUString sType( RTL_CONSTASCII_USTRINGPARAM ( "Type" ) ); @@ -358,7 +359,7 @@ Reference< XCustomShapeEngine > SdrObjCustomShape::GetCustomShapeEngine( const S { Sequence< Any > aArgument( 1 ); Sequence< PropertyValue > aPropValues( 1 ); - aPropValues[ 0 ].Name = rtl::OUString::createFromAscii( "CustomShape" ); + aPropValues[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CustomShape")); aPropValues[ 0 ].Value <<= aXShape; aArgument[ 0 ] <<= aPropValues; Reference< XInterface > xInterface( xFactory->createInstanceWithArguments( aEngine, aArgument ) ); @@ -507,7 +508,6 @@ sal_Bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const basegfx::B2DPolyPolygon SdrObjCustomShape::GetLineGeometry( const SdrObjCustomShape* pCustomShape, const sal_Bool bBezierAllowed ) { basegfx::B2DPolyPolygon aRetval; - sal_Bool bRet = sal_False; Reference< XCustomShapeEngine > xCustomShapeEngine( GetCustomShapeEngine( pCustomShape ) ); if ( xCustomShapeEngine.is() ) { @@ -519,7 +519,6 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::GetLineGeometry( const SdrObjCustomSh { aRetval = basegfx::tools::adaptiveSubdivideByAngle(aRetval); } - bRet = sal_True; } catch ( const com::sun::star::lang::IllegalArgumentException ) { @@ -1972,12 +1971,12 @@ void SdrObjCustomShape::NbcMirror( const Point& rRef1, const Point& rRef2 ) InvalidateRenderGeometry(); } -void SdrObjCustomShape::Shear( const Point& rRef, long nWink, double tn, FASTBOOL bVShear ) +void SdrObjCustomShape::Shear( const Point& rRef, long nWink, double tn, bool bVShear ) { SdrTextObj::Shear( rRef, nWink, tn, bVShear ); InvalidateRenderGeometry(); } -void SdrObjCustomShape::NbcShear( const Point& rRef, long nWink, double tn, FASTBOOL bVShear ) +void SdrObjCustomShape::NbcShear( const Point& rRef, long nWink, double tn, bool bVShear ) { long nDrehWink = aGeo.nDrehWink; if ( nDrehWink ) @@ -2467,12 +2466,12 @@ void SdrObjCustomShape::DragCreateObject( SdrDragStat& rStat ) bSnapRectDirty=TRUE; } -FASTBOOL SdrObjCustomShape::BegCreate( SdrDragStat& rDrag ) +bool SdrObjCustomShape::BegCreate( SdrDragStat& rDrag ) { return SdrTextObj::BegCreate( rDrag ); } -FASTBOOL SdrObjCustomShape::MovCreate(SdrDragStat& rStat) +bool SdrObjCustomShape::MovCreate(SdrDragStat& rStat) { SdrView* pView = rStat.GetView(); // #i37448# if( pView && pView->IsSolidDragging() ) @@ -2484,7 +2483,7 @@ FASTBOOL SdrObjCustomShape::MovCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrObjCustomShape::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd ) +bool SdrObjCustomShape::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd ) { DragCreateObject( rStat ); @@ -2522,18 +2521,18 @@ basegfx::B2DPolyPolygon SdrObjCustomShape::TakeCreatePoly(const SdrDragStat& /*r // in context with the SdrObjCustomShape the SdrTextAutoGrowHeightItem == true -> Resize Shape to fit text, // the SdrTextAutoGrowWidthItem == true -> Word wrap text in Shape -FASTBOOL SdrObjCustomShape::IsAutoGrowHeight() const +bool SdrObjCustomShape::IsAutoGrowHeight() const { const SfxItemSet& rSet = GetMergedItemSet(); - FASTBOOL bIsAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); + bool bIsAutoGrowHeight = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); if ( bIsAutoGrowHeight && IsVerticalWriting() ) bIsAutoGrowHeight = ((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue() == FALSE; return bIsAutoGrowHeight; } -FASTBOOL SdrObjCustomShape::IsAutoGrowWidth() const +bool SdrObjCustomShape::IsAutoGrowWidth() const { const SfxItemSet& rSet = GetMergedItemSet(); - FASTBOOL bIsAutoGrowWidth = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); + bool bIsAutoGrowWidth = ((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWHEIGHT))).GetValue(); if ( bIsAutoGrowWidth && !IsVerticalWriting() ) bIsAutoGrowWidth = ((SdrTextWordWrapItem&)(rSet.Get(SDRATTR_TEXT_WORDWRAP))).GetValue() == FALSE; return bIsAutoGrowWidth; @@ -2601,12 +2600,12 @@ void SdrObjCustomShape::SetVerticalWriting( sal_Bool bVertical ) } } } -FASTBOOL SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt, FASTBOOL bWdt) const +bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bWdt) const { if ( pModel && HasText() && !rR.IsEmpty() ) { - FASTBOOL bWdtGrow=bWdt && IsAutoGrowWidth(); - FASTBOOL bHgtGrow=bHgt && IsAutoGrowHeight(); + bool bWdtGrow=bWdt && IsAutoGrowWidth(); + bool bHgtGrow=bHgt && IsAutoGrowHeight(); if ( bWdtGrow || bHgtGrow ) { Rectangle aR0(rR); @@ -2745,7 +2744,7 @@ FASTBOOL SdrObjCustomShape::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOO return FALSE; } -Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const FASTBOOL bHgt, const FASTBOOL bWdt ) +Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const bool bHgt, const bool bWdt ) { Rectangle aReturnValue; @@ -2775,7 +2774,7 @@ Rectangle SdrObjCustomShape::ImpCalculateTextFrame( const FASTBOOL bHgt, const F return aReturnValue; } -FASTBOOL SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt) +bool SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { Rectangle aNewTextRect = ImpCalculateTextFrame( bHgt, bWdt ); sal_Bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != aRect ); @@ -2805,7 +2804,7 @@ FASTBOOL SdrObjCustomShape::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FAST } return bRet; } -FASTBOOL SdrObjCustomShape::AdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt) +bool SdrObjCustomShape::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { Rectangle aNewTextRect = ImpCalculateTextFrame( bHgt, bWdt ); sal_Bool bRet = !aNewTextRect.IsEmpty() && ( aNewTextRect != aRect ); @@ -2968,7 +2967,7 @@ void SdrObjCustomShape::TakeTextAnchorRect( Rectangle& rAnchorRect ) const else SdrTextObj::TakeTextAnchorRect( rAnchorRect ); } -void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, +void SdrObjCustomShape::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, BOOL /*bLineWidth*/) const { Rectangle aAnkRect; // Rect innerhalb dem geankert wird @@ -3502,3 +3501,5 @@ void SdrObjCustomShape::InvalidateRenderGeometry() } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx index fbb0e12473..a4d54f500d 100644 --- a/svx/source/svdraw/svdoattr.cxx +++ b/svx/source/svdraw/svdoattr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -137,7 +138,7 @@ void SdrAttrObj::SetModel(SdrModel* pNewModel) //////////////////////////////////////////////////////////////////////////////////////////////////// // syntactical sugar for ItemSet accesses -void __EXPORT SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) +void SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) { SfxSimpleHint *pSimple = PTR_CAST(SfxSimpleHint, &rHint); BOOL bDataChg(pSimple && SFX_HINT_DATACHANGED == pSimple->GetId()); @@ -178,3 +179,5 @@ BOOL SdrAttrObj::HasLine() const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index b111f9e538..f62045bd23 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -162,7 +163,7 @@ SdrObjUserData::~SdrObjUserData() { } -FASTBOOL SdrObjUserData::HasMacro(const SdrObject* /*pObj*/) const +bool SdrObjUserData::HasMacro(const SdrObject* /*pObj*/) const { return FALSE; } @@ -206,7 +207,7 @@ void SdrObjUserData::PaintMacro(OutputDevice& rOut, const Rectangle& /*rDirtyRec rOut.SetRasterOp(eRop); } -FASTBOOL SdrObjUserData::DoMacro(const SdrObjMacroHitRec& /*rRec*/, SdrObject* /*pObj*/) +bool SdrObjUserData::DoMacro(const SdrObjMacroHitRec& /*rRec*/, SdrObject* /*pObj*/) { return FALSE; } @@ -678,7 +679,7 @@ AutoTimer* SdrObject::ForceAutoTimer() return pPlusData->pAutoTimer; } -FASTBOOL SdrObject::HasRefPoint() const +bool SdrObject::HasRefPoint() const { return FALSE; } @@ -711,8 +712,7 @@ void SdrObject::SetName(const String& rStr) if(pPlusData && pPlusData->aObjName != rStr) { - // --> OD 2009-07-09 #i73249# - // Undo/Redo for setting object's name + // Undo/Redo for setting object's name (#i73249#) bool bUndo( false ); if ( GetModel() && GetModel()->IsUndoEnabled() ) { @@ -726,14 +726,12 @@ void SdrObject::SetName(const String& rStr) GetModel()->BegUndo( pUndoAction->GetComment() ); GetModel()->AddUndo( pUndoAction ); } - // <-- pPlusData->aObjName = rStr; - // --> OD 2009-07-09 #i73249# + // Undo/Redo for setting object's name (#i73249#) if ( bUndo ) { GetModel()->EndUndo(); } - // <-- SetChanged(); BroadcastObjectChange(); } @@ -758,8 +756,7 @@ void SdrObject::SetTitle(const String& rStr) if(pPlusData && pPlusData->aObjTitle != rStr) { - // --> OD 2009-07-13 #i73249# - // Undo/Redo for setting object's title + // Undo/Redo for setting object's title (#i73249#) bool bUndo( false ); if ( GetModel() && GetModel()->IsUndoEnabled() ) { @@ -773,14 +770,12 @@ void SdrObject::SetTitle(const String& rStr) GetModel()->BegUndo( pUndoAction->GetComment() ); GetModel()->AddUndo( pUndoAction ); } - // <-- pPlusData->aObjTitle = rStr; - // --> OD 2009-07-13 #i73249# + // Undo/Redo for setting object's title (#i73249#) if ( bUndo ) { GetModel()->EndUndo(); } - // <-- SetChanged(); BroadcastObjectChange(); } @@ -805,8 +800,7 @@ void SdrObject::SetDescription(const String& rStr) if(pPlusData && pPlusData->aObjDescription != rStr) { - // --> OD 2009-07-13 #i73249# - // Undo/Redo for setting object's description + // Undo/Redo for setting object's description (#i73249#) bool bUndo( false ); if ( GetModel() && GetModel()->IsUndoEnabled() ) { @@ -820,14 +814,12 @@ void SdrObject::SetDescription(const String& rStr) GetModel()->BegUndo( pUndoAction->GetComment() ); GetModel()->AddUndo( pUndoAction ); } - // <-- pPlusData->aObjDescription = rStr; - // --> OD 2009-07-13 #i73249# + // Undo/Redo for setting object's description (#i73249#) if ( bUndo ) { GetModel()->EndUndo(); } - // <-- SetChanged(); BroadcastObjectChange(); } @@ -1115,7 +1107,7 @@ void SdrObject::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, USHOR } } -XubString SdrObject::GetWinkStr(long nWink, FASTBOOL bNoDegChar) const +XubString SdrObject::GetWinkStr(long nWink, bool bNoDegChar) const { XubString aStr; if (pModel!=NULL) { @@ -1124,7 +1116,7 @@ XubString SdrObject::GetWinkStr(long nWink, FASTBOOL bNoDegChar) const return aStr; } -XubString SdrObject::GetMetrStr(long nVal, MapUnit /*eWantMap*/, FASTBOOL bNoUnitChars) const +XubString SdrObject::GetMetrStr(long nVal, MapUnit /*eWantMap*/, bool bNoUnitChars) const { XubString aStr; if (pModel!=NULL) { @@ -1279,14 +1271,14 @@ Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const Rectangle aRect(aTmpRect); const SdrHdl* pHdl=rDrag.GetHdl(); SdrHdlKind eHdl=pHdl==NULL ? HDL_MOVE : pHdl->GetKind(); - FASTBOOL bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT); - FASTBOOL bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); - FASTBOOL bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho(); + bool bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT); + bool bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); + bool bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho(); Point aPos(rDrag.GetNow()); - FASTBOOL bLft=(eHdl==HDL_UPLFT || eHdl==HDL_LEFT || eHdl==HDL_LWLFT); - FASTBOOL bRgt=(eHdl==HDL_UPRGT || eHdl==HDL_RIGHT || eHdl==HDL_LWRGT); - FASTBOOL bTop=(eHdl==HDL_UPRGT || eHdl==HDL_UPPER || eHdl==HDL_UPLFT); - FASTBOOL bBtm=(eHdl==HDL_LWRGT || eHdl==HDL_LOWER || eHdl==HDL_LWLFT); + bool bLft=(eHdl==HDL_UPLFT || eHdl==HDL_LEFT || eHdl==HDL_LWLFT); + bool bRgt=(eHdl==HDL_UPRGT || eHdl==HDL_RIGHT || eHdl==HDL_LWRGT); + bool bTop=(eHdl==HDL_UPRGT || eHdl==HDL_UPPER || eHdl==HDL_UPLFT); + bool bBtm=(eHdl==HDL_LWRGT || eHdl==HDL_LOWER || eHdl==HDL_LWLFT); if (bLft) aTmpRect.Left() =aPos.X(); if (bRgt) aTmpRect.Right() =aPos.X(); if (bTop) aTmpRect.Top() =aPos.Y(); @@ -1298,8 +1290,8 @@ Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const long nYMul=aTmpRect.Bottom()-aTmpRect.Top(); long nXDiv=nWdt0; long nYDiv=nHgt0; - FASTBOOL bXNeg=(nXMul<0)!=(nXDiv<0); - FASTBOOL bYNeg=(nYMul<0)!=(nYDiv<0); + bool bXNeg=(nXMul<0)!=(nXDiv<0); + bool bYNeg=(nYMul<0)!=(nYDiv<0); nXMul=Abs(nXMul); nYMul=Abs(nYMul); nXDiv=Abs(nXDiv); @@ -1311,7 +1303,7 @@ Rectangle SdrObject::ImpDragCalcRect(const SdrDragStat& rDrag) const nXDiv=aXFact.GetDenominator(); nYDiv=aYFact.GetDenominator(); if (bEcke) { // Eckpunkthandles - FASTBOOL bUseX=(aXFact<aYFact) != bBigOrtho; + bool bUseX=(aXFact<aYFact) != bBigOrtho; if (bUseX) { long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv)); if (bYNeg) nNeed=-nNeed; @@ -1401,7 +1393,7 @@ basegfx::B2DPolyPolygon SdrObject::getSpecialDragPoly(const SdrDragStat& /*rDrag //////////////////////////////////////////////////////////////////////////////////////////////////// // Create -FASTBOOL SdrObject::BegCreate(SdrDragStat& rStat) +bool SdrObject::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); @@ -1411,7 +1403,7 @@ FASTBOOL SdrObject::BegCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrObject::MovCreate(SdrDragStat& rStat) +bool SdrObject::MovCreate(SdrDragStat& rStat) { rStat.TakeCreateRect(aOutRect); rStat.SetActionRect(aOutRect); @@ -1428,7 +1420,7 @@ FASTBOOL SdrObject::MovCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { rStat.TakeCreateRect(aOutRect); aOutRect.Justify(); @@ -1444,7 +1436,7 @@ void SdrObject::BrkCreate(SdrDragStat& /*rStat*/) { } -FASTBOOL SdrObject::BckCreate(SdrDragStat& /*rStat*/) +bool SdrObject::BckCreate(SdrDragStat& /*rStat*/) { return FALSE; } @@ -1475,8 +1467,8 @@ void SdrObject::NbcMove(const Size& rSiz) void SdrObject::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); - FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); + bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); + bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { @@ -1553,7 +1545,7 @@ void SdrObject::NbcMirror(const Point& rRef1, const Point& rRef2) SetGlueReallyAbsolute(FALSE); } -void SdrObject::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrObject::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SetGlueReallyAbsolute(TRUE); NbcShearGluePoints(rRef,nWink,tn,bVShear); @@ -1606,7 +1598,7 @@ void SdrObject::Mirror(const Point& rRef1, const Point& rRef2) SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0); } -void SdrObject::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrObject::Shear(const Point& rRef, long nWink, double tn, bool bVShear) { if (nWink!=0) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); @@ -1720,7 +1712,7 @@ long SdrObject::GetRotateAngle() const return 0; } -long SdrObject::GetShearAngle(FASTBOOL /*bVertical*/) const +long SdrObject::GetShearAngle(bool /*bVertical*/) const { return 0; } @@ -1764,7 +1756,7 @@ void SdrObject::NbcSetPoint(const Point& /*rPnt*/, sal_uInt32 /*i*/) { } -FASTBOOL SdrObject::HasTextEdit() const +bool SdrObject::HasTextEdit() const { return FALSE; } @@ -1832,7 +1824,7 @@ SdrObjUserData* SdrObject::ImpGetMacroUserData() const return pData; } -FASTBOOL SdrObject::HasMacro() const +bool SdrObject::HasMacro() const { SdrObjUserData* pData=ImpGetMacroUserData(); return pData!=NULL ? pData->HasMacro(this) : FALSE; @@ -1891,7 +1883,7 @@ void SdrObject::PaintMacro(OutputDevice& rOut, const Rectangle& rDirtyRect, cons } } -FASTBOOL SdrObject::DoMacro(const SdrObjMacroHitRec& rRec) +bool SdrObject::DoMacro(const SdrObjMacroHitRec& rRec) { SdrObjUserData* pData=ImpGetMacroUserData(); if (pData!=NULL) { @@ -2211,13 +2203,13 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) } } -void lcl_SetItem(SfxItemSet& rAttr, FASTBOOL bMerge, const SfxPoolItem& rItem) +void lcl_SetItem(SfxItemSet& rAttr, bool bMerge, const SfxPoolItem& rItem) { if (bMerge) rAttr.MergeValue(rItem,TRUE); else rAttr.Put(rItem); } -void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, FASTBOOL bMerge) const +void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, bool bMerge) const { const Rectangle& rSnap=GetSnapRect(); const Rectangle& rLogic=GetLogicRect(); @@ -2291,9 +2283,9 @@ void SdrObject::NbcSetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRe // Das Broadcasting beim Setzen der Attribute wird vom AttrObj gemanagt //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrObject::IsNode() const +bool SdrObject::IsNode() const { - return TRUE; + return true; } SdrGluePoint SdrObject::GetVertexGluePoint(USHORT nPosNum) const @@ -2354,7 +2346,7 @@ SdrGluePointList* SdrObject::ForceGluePointList() return pPlusData->pGluePoints; } -void SdrObject::SetGlueReallyAbsolute(FASTBOOL bOn) +void SdrObject::SetGlueReallyAbsolute(bool bOn) { // erst Const-Aufruf um zu sehen, ob // ueberhaupt Klebepunkte da sind @@ -2387,7 +2379,7 @@ void SdrObject::NbcMirrorGluePoints(const Point& rRef1, const Point& rRef2) } } -void SdrObject::NbcShearGluePoints(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrObject::NbcShearGluePoints(const Point& rRef, long nWink, double tn, bool bVShear) { // erst Const-Aufruf um zu sehen, ob // ueberhaupt Klebepunkte da sind @@ -2398,20 +2390,20 @@ void SdrObject::NbcShearGluePoints(const Point& rRef, long nWink, double tn, FAS } } -FASTBOOL SdrObject::IsEdge() const +bool SdrObject::IsEdge() const { - return FALSE; + return false; } -void SdrObject::ConnectToNode(FASTBOOL /*bTail1*/, SdrObject* /*pObj*/) +void SdrObject::ConnectToNode(bool /*bTail1*/, SdrObject* /*pObj*/) { } -void SdrObject::DisconnectFromNode(FASTBOOL /*bTail1*/) +void SdrObject::DisconnectFromNode(bool /*bTail1*/) { } -SdrObject* SdrObject::GetConnectedNode(FASTBOOL /*bTail1*/) const +SdrObject* SdrObject::GetConnectedNode(bool /*bTail1*/) const { return NULL; } @@ -3308,3 +3300,5 @@ namespace svx } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 132d35ef8e..7cc2020e0d 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -77,9 +78,9 @@ public: long nEscAbs; long nLineLen; SdrCaptionEscDir eEscDir; - FASTBOOL bFitLineLen; - FASTBOOL bEscRel; - FASTBOOL bFixedAngle; + bool bFitLineLen; + bool bEscRel; + bool bFixedAngle; public: ImpCaptParams() @@ -115,7 +116,7 @@ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Poi nY+=rRect.Top(); Point aBestPt; EscDir eBestDir=LKS; - FASTBOOL bTryH=eEscDir==SDRCAPT_ESCBESTFIT; + bool bTryH=eEscDir==SDRCAPT_ESCBESTFIT; if (!bTryH) { if (eType!=SDRCAPT_TYPE1) { bTryH=eEscDir==SDRCAPT_ESCHORIZONTAL; @@ -123,7 +124,7 @@ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Poi bTryH=eEscDir==SDRCAPT_ESCVERTICAL; } } - FASTBOOL bTryV=eEscDir==SDRCAPT_ESCBESTFIT; + bool bTryV=eEscDir==SDRCAPT_ESCBESTFIT; if (!bTryV) { if (eType!=SDRCAPT_TYPE1) { bTryV=eEscDir==SDRCAPT_ESCVERTICAL; @@ -135,7 +136,7 @@ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Poi if (bTryH) { Point aLft(rRect.Left()-nGap,nY); Point aRgt(rRect.Right()+nGap,nY); - FASTBOOL bLft=(aTl.X()-aLft.X()<aRgt.X()-aTl.X()); + bool bLft=(aTl.X()-aLft.X()<aRgt.X()-aTl.X()); if (bLft) { eBestDir=LKS; aBestPt=aLft; @@ -147,7 +148,7 @@ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Poi if (bTryV) { Point aTop(nX,rRect.Top()-nGap); Point aBtm(nX,rRect.Bottom()+nGap); - FASTBOOL bTop=(aTl.Y()-aTop.Y()<aBtm.Y()-aTl.Y()); + bool bTop=(aTl.Y()-aTop.Y()<aBtm.Y()-aTl.Y()); Point aBest2; EscDir eBest2; if (bTop) { @@ -157,7 +158,7 @@ void ImpCaptParams::CalcEscPos(const Point& rTailPt, const Rectangle& rRect, Poi eBest2=UNT; aBest2=aBtm; } - FASTBOOL bTakeIt=eEscDir!=SDRCAPT_ESCBESTFIT; + bool bTakeIt=eEscDir!=SDRCAPT_ESCBESTFIT; if (!bTakeIt) { BigInt aHorX(aBestPt.X()-aTl.X()); aHorX*=aHorX; BigInt aHorY(aBestPt.Y()-aTl.Y()); aHorY*=aHorY; @@ -557,7 +558,7 @@ void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, Polygon& rPoly, Rect } } -FASTBOOL SdrCaptionObj::BegCreate(SdrDragStat& rStat) +bool SdrCaptionObj::BegCreate(SdrDragStat& rStat) { if (aRect.IsEmpty()) return FALSE; // Create z.Zt. nur mit vorgegebenen Rect @@ -570,7 +571,7 @@ FASTBOOL SdrCaptionObj::BegCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrCaptionObj::MovCreate(SdrDragStat& rStat) +bool SdrCaptionObj::MovCreate(SdrDragStat& rStat) { ImpCaptParams aPara; ImpGetCaptParams(aPara); @@ -582,7 +583,7 @@ FASTBOOL SdrCaptionObj::MovCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrCaptionObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrCaptionObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { ImpCaptParams aPara; ImpGetCaptParams(aPara); @@ -592,7 +593,7 @@ FASTBOOL SdrCaptionObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2); } -FASTBOOL SdrCaptionObj::BckCreate(SdrDragStat& /*rStat*/) +bool SdrCaptionObj::BckCreate(SdrDragStat& /*rStat*/) { return FALSE; } @@ -761,12 +762,12 @@ SdrObject* SdrCaptionObj::DoConvertToPolyObj(BOOL bBezier) const SdrObject* pTail = ImpConvertMakeObj(basegfx::B2DPolyPolygon(aTailPoly.getB2DPolygon()), sal_False, bBezier); SdrObject* pRet=(pTail!=NULL) ? pTail : pRect; if (pTail!=NULL && pRect!=NULL) { - FASTBOOL bInsRect=TRUE; - FASTBOOL bInsTail=TRUE; + bool bInsRect = true; + bool bInsTail = true; SdrObjList* pOL=pTail->GetSubList(); - if (pOL!=NULL) { pRet=pRect; bInsTail=FALSE; } + if (pOL!=NULL) { pRet=pRect; bInsTail = false; } if (pOL==NULL) pOL=pRect->GetSubList(); - if (pOL!=NULL) { pRet=pRect; bInsRect=FALSE; } + if (pOL!=NULL) { pRet=pRect; bInsRect = false; } if (pOL==NULL) { SdrObjGroup* pGrp=new SdrObjGroup; pOL=pGrp->GetSubList(); @@ -849,3 +850,5 @@ basegfx::B2DPolygon SdrCaptionObj::getTailPolygon() const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index df6beaba51..df2ecc86b9 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -152,7 +153,7 @@ SdrCircObj::~SdrCircObj() void SdrCircObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { - FASTBOOL bCanConv=!HasText() || ImpCanConvTextToCurve(); + bool bCanConv=!HasText() || ImpCanConvTextToCurve(); rInfo.bEdgeRadiusAllowed = FALSE; rInfo.bCanConvToPath=bCanConv; rInfo.bCanConvToPoly=bCanConv; @@ -164,7 +165,7 @@ UINT16 SdrCircObj::GetObjIdentifier() const return UINT16(meCircleKind); } -FASTBOOL SdrCircObj::PaintNeedsXPolyCirc() const +bool SdrCircObj::PaintNeedsXPolyCirc() const { // XPoly ist notwendig fuer alle gedrehten Ellipsenobjekte, // fuer alle Kreis- und Ellipsenabschnitte @@ -209,7 +210,7 @@ FASTBOOL SdrCircObj::PaintNeedsXPolyCirc() const } if(!bNeed && meCircleKind != OBJ_CIRC && nStartWink == nEndWink) - bNeed=TRUE; // Weil sonst Vollkreis gemalt wird + bNeed = true; // Weil sonst Vollkreis gemalt wird return bNeed; } @@ -375,7 +376,7 @@ struct ImpCircUser : public SdrDragStatUserData long nStart; long nEnd; long nWink; - FASTBOOL bRight; // noch nicht implementiert + bool bRight; // noch nicht implementiert public: ImpCircUser() @@ -384,6 +385,7 @@ public: nWdt(0), nStart(0), nEnd(0), + nWink(0), bRight(FALSE) {} void SetCreateParams(SdrDragStat& rStat); @@ -690,7 +692,7 @@ void SdrCircObj::ImpSetCreateParams(SdrDragStat& rStat) const pU->SetCreateParams(rStat); } -FASTBOOL SdrCircObj::BegCreate(SdrDragStat& rStat) +bool SdrCircObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); @@ -701,7 +703,7 @@ FASTBOOL SdrCircObj::BegCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrCircObj::MovCreate(SdrDragStat& rStat) +bool SdrCircObj::MovCreate(SdrDragStat& rStat) { ImpSetCreateParams(rStat); ImpCircUser* pU=(ImpCircUser*)rStat.GetUser(); @@ -724,11 +726,11 @@ FASTBOOL SdrCircObj::MovCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrCircObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrCircObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { ImpSetCreateParams(rStat); ImpCircUser* pU=(ImpCircUser*)rStat.GetUser(); - FASTBOOL bRet=FALSE; + bool bRet = false; if (eCmd==SDRCREATE_FORCEEND && rStat.GetPointAnz()<4) meCircleKind=OBJ_CIRC; if (meCircleKind==OBJ_CIRC) { bRet=rStat.GetPointAnz()>=2; @@ -765,7 +767,7 @@ void SdrCircObj::BrkCreate(SdrDragStat& rStat) rStat.SetUser(NULL); } -FASTBOOL SdrCircObj::BckCreate(SdrDragStat& rStat) +bool SdrCircObj::BckCreate(SdrDragStat& rStat) { rStat.SetNoSnap(rStat.GetPointAnz()>=3); rStat.SetOrtho4Possible(rStat.GetPointAnz()<3); @@ -823,12 +825,12 @@ void SdrCircObj::NbcMove(const Size& aSiz) void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { long nWink0=aGeo.nDrehWink; - FASTBOOL bNoShearRota=(aGeo.nDrehWink==0 && aGeo.nShearWink==0); + bool bNoShearRota=(aGeo.nDrehWink==0 && aGeo.nShearWink==0); SdrTextObj::NbcResize(rRef,xFact,yFact); bNoShearRota|=(aGeo.nDrehWink==0 && aGeo.nShearWink==0); if (meCircleKind!=OBJ_CIRC) { - FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); - FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); + bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); + bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { // bei bXMirr!=bYMirr muessten eigentlich noch die beiden // Linienende vertauscht werden. Das ist jedoch mal wieder @@ -872,7 +874,7 @@ void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract ImpSetCircInfoToAttr(); } -void SdrCircObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrCircObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SdrTextObj::NbcShear(rRef,nWink,tn,bVShear); SetXPolyDirty(); @@ -882,7 +884,7 @@ void SdrCircObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVS void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2) { //long nWink0=aGeo.nDrehWink; - FASTBOOL bFreeMirr=meCircleKind!=OBJ_CIRC; + bool bFreeMirr=meCircleKind!=OBJ_CIRC; Point aTmpPt1; Point aTmpPt2; if (bFreeMirr) { // bei freier Spiegelachse einige Vorbereitungen Treffen @@ -1071,7 +1073,7 @@ Point SdrCircObj::GetSnapPoint(sal_uInt32 i) const } } -void __EXPORT SdrCircObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) +void SdrCircObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) { SetXPolyDirty(); SdrRectObj::Notify(rBC,rHint); @@ -1167,3 +1169,5 @@ SdrObject* SdrCircObj::DoConvertToPolyObj(BOOL bBezier) const ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 3ee7083729..821b6b5767 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,23 +77,23 @@ void SdrObjConnection::ResetVars() bAutoCorner=FALSE; } -FASTBOOL SdrObjConnection::TakeGluePoint(SdrGluePoint& rGP, FASTBOOL bSetAbsPos) const +bool SdrObjConnection::TakeGluePoint(SdrGluePoint& rGP, bool bSetAbsPos) const { - FASTBOOL bRet=FALSE; + bool bRet = false; if (pObj!=NULL) { // Ein Obj muss schon angedockt sein! if (bAutoVertex) { rGP=pObj->GetVertexGluePoint(nConId); - bRet=TRUE; + bRet = true; } else if (bAutoCorner) { rGP=pObj->GetCornerGluePoint(nConId); - bRet=TRUE; + bRet = true; } else { const SdrGluePointList* pGPL=pObj->GetGluePointList(); if (pGPL!=NULL) { USHORT nNum=pGPL->FindGluePoint(nConId); if (nNum!=SDRGLUEPOINT_NOTFOUND) { rGP=(*pGPL)[nNum]; - bRet=TRUE; + bRet = true; } } } @@ -129,10 +130,10 @@ USHORT SdrEdgeInfoRec::ImpGetPolyIdx(SdrEdgeLineCode eLineCode, const XPolygon& return 0; } -FASTBOOL SdrEdgeInfoRec::ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const +bool SdrEdgeInfoRec::ImpIsHorzLine(SdrEdgeLineCode eLineCode, const XPolygon& rXP) const { USHORT nIdx=ImpGetPolyIdx(eLineCode,rXP); - FASTBOOL bHorz=nAngle1==0 || nAngle1==18000; + bool bHorz=nAngle1==0 || nAngle1==18000; if (eLineCode==OBJ2LINE2 || eLineCode==OBJ2LINE3) { nIdx=rXP.GetPointCount()-nIdx; // #36314# bHorz=nAngle2==0 || nAngle2==18000; // #52000# @@ -373,7 +374,7 @@ void SdrEdgeObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bGradientAllowed = FALSE; rInfo.bShearAllowed =FALSE; rInfo.bEdgeRadiusAllowed=FALSE; - FASTBOOL bCanConv=!HasText() || ImpCanConvTextToCurve(); + bool bCanConv=!HasText() || ImpCanConvTextToCurve(); rInfo.bCanConvToPath=bCanConv; rInfo.bCanConvToPoly=bCanConv; rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary()); @@ -414,9 +415,9 @@ void SdrEdgeObj::TakeUnrotatedSnapRect(Rectangle& rRect) const rRect=GetSnapRect(); } -FASTBOOL SdrEdgeObj::IsNode() const +bool SdrEdgeObj::IsNode() const { - return TRUE; + return true; } SdrGluePoint SdrEdgeObj::GetVertexGluePoint(USHORT nNum) const @@ -462,12 +463,12 @@ SdrGluePointList* SdrEdgeObj::ForceGluePointList() return NULL; // Keine benutzerdefinierten Klebepunkte fuer Verbinder #31671# } -FASTBOOL SdrEdgeObj::IsEdge() const +bool SdrEdgeObj::IsEdge() const { - return TRUE; + return true; } -void SdrEdgeObj::ConnectToNode(FASTBOOL bTail1, SdrObject* pObj) +void SdrEdgeObj::ConnectToNode(bool bTail1, SdrObject* pObj) { SdrObjConnection& rCon=GetConnection(bTail1); DisconnectFromNode(bTail1); @@ -478,7 +479,7 @@ void SdrEdgeObj::ConnectToNode(FASTBOOL bTail1, SdrObject* pObj) } } -void SdrEdgeObj::DisconnectFromNode(FASTBOOL bTail1) +void SdrEdgeObj::DisconnectFromNode(bool bTail1) { SdrObjConnection& rCon=GetConnection(bTail1); if (rCon.pObj!=NULL) { @@ -487,16 +488,16 @@ void SdrEdgeObj::DisconnectFromNode(FASTBOOL bTail1) } } -SdrObject* SdrEdgeObj::GetConnectedNode(FASTBOOL bTail1) const +SdrObject* SdrEdgeObj::GetConnectedNode(bool bTail1) const { SdrObject* pObj=GetConnection(bTail1).pObj; if (pObj!=NULL && (pObj->GetPage()!=pPage || !pObj->IsInserted())) pObj=NULL; return pObj; } -FASTBOOL SdrEdgeObj::CheckNodeConnection(FASTBOOL bTail1) const +bool SdrEdgeObj::CheckNodeConnection(bool bTail1) const { - FASTBOOL bRet=FALSE; + bool bRet = false; const SdrObjConnection& rCon=GetConnection(bTail1); USHORT nPtAnz=pEdgeTrack->GetPointCount(); if (rCon.pObj!=NULL && rCon.pObj->GetPage()==pPage && nPtAnz!=0) { @@ -519,7 +520,7 @@ FASTBOOL SdrEdgeObj::CheckNodeConnection(FASTBOOL bTail1) const return bRet; } -void SdrEdgeObj::ImpSetTailPoint(FASTBOOL bTail1, const Point& rPt) +void SdrEdgeObj::ImpSetTailPoint(bool bTail1, const Point& rPt) { USHORT nPtAnz=pEdgeTrack->GetPointCount(); if (nPtAnz==0) { @@ -605,11 +606,11 @@ USHORT SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt) const long dyo=rPt.Y()-aR.Top(); long dxr=aR.Right()-rPt.X(); long dyu=aR.Bottom()-rPt.Y(); - FASTBOOL bxMitt=Abs(dxl-dxr)<2; - FASTBOOL byMitt=Abs(dyo-dyu)<2; + bool bxMitt=Abs(dxl-dxr)<2; + bool byMitt=Abs(dyo-dyu)<2; long dx=Min(dxl,dxr); long dy=Min(dyo,dyu); - FASTBOOL bDiag=Abs(dx-dy)<2; + bool bDiag=Abs(dx-dy)<2; if (bxMitt && byMitt) return SDRESC_ALL; // In der Mitte if (bDiag) { // diagonal USHORT nRet=0; @@ -635,7 +636,7 @@ USHORT SdrEdgeObj::ImpCalcEscAngle(SdrObject* pObj, const Point& rPt) const } } -FASTBOOL SdrEdgeObj::ImpStripPolyPoints(XPolygon& /*rXP*/) const +bool SdrEdgeObj::ImpStripPolyPoints(XPolygon& /*rXP*/) const { // fehlende Implementation !!! return FALSE; @@ -645,10 +646,10 @@ XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, cons { XPolygon aXP; aXP.Insert(XPOLY_APPEND,rStPt,XPOLY_NORMAL); - FASTBOOL bRts=nEscAngle==0; - FASTBOOL bObn=nEscAngle==9000; - FASTBOOL bLks=nEscAngle==18000; - FASTBOOL bUnt=nEscAngle==27000; + bool bRts=nEscAngle==0; + bool bObn=nEscAngle==9000; + bool bLks=nEscAngle==18000; + bool bUnt=nEscAngle==27000; Point aP1(rStPt); // erstmal den Pflichtabstand if (bLks) aP1.X()=rRect.Left(); @@ -656,43 +657,40 @@ XPolygon SdrEdgeObj::ImpCalcObjToCenter(const Point& rStPt, long nEscAngle, cons if (bObn) aP1.Y()=rRect.Top(); if (bUnt) aP1.Y()=rRect.Bottom(); - FASTBOOL bFinish=FALSE; - if (!bFinish) { - Point aP2(aP1); // Und nun den Pflichtabstand ggf. bis auf Meetinghoehe erweitern - if (bLks && rMeeting.X()<=aP2.X()) aP2.X()=rMeeting.X(); - if (bRts && rMeeting.X()>=aP2.X()) aP2.X()=rMeeting.X(); - if (bObn && rMeeting.Y()<=aP2.Y()) aP2.Y()=rMeeting.Y(); - if (bUnt && rMeeting.Y()>=aP2.Y()) aP2.Y()=rMeeting.Y(); - aXP.Insert(XPOLY_APPEND,aP2,XPOLY_NORMAL); - - Point aP3(aP2); - if ((bLks && rMeeting.X()>aP2.X()) || (bRts && rMeeting.X()<aP2.X())) { // Aussenrum - if (rMeeting.Y()<aP2.Y()) { - aP3.Y()=rRect.Top(); - if (rMeeting.Y()<aP3.Y()) aP3.Y()=rMeeting.Y(); - } else { - aP3.Y()=rRect.Bottom(); - if (rMeeting.Y()>aP3.Y()) aP3.Y()=rMeeting.Y(); - } + Point aP2(aP1); // Und nun den Pflichtabstand ggf. bis auf Meetinghoehe erweitern + if (bLks && rMeeting.X()<=aP2.X()) aP2.X()=rMeeting.X(); + if (bRts && rMeeting.X()>=aP2.X()) aP2.X()=rMeeting.X(); + if (bObn && rMeeting.Y()<=aP2.Y()) aP2.Y()=rMeeting.Y(); + if (bUnt && rMeeting.Y()>=aP2.Y()) aP2.Y()=rMeeting.Y(); + aXP.Insert(XPOLY_APPEND,aP2,XPOLY_NORMAL); + + Point aP3(aP2); + if ((bLks && rMeeting.X()>aP2.X()) || (bRts && rMeeting.X()<aP2.X())) { // Aussenrum + if (rMeeting.Y()<aP2.Y()) { + aP3.Y()=rRect.Top(); + if (rMeeting.Y()<aP3.Y()) aP3.Y()=rMeeting.Y(); + } else { + aP3.Y()=rRect.Bottom(); + if (rMeeting.Y()>aP3.Y()) aP3.Y()=rMeeting.Y(); + } + aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); + if (aP3.Y()!=rMeeting.Y()) { + aP3.X()=rMeeting.X(); aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); - if (aP3.Y()!=rMeeting.Y()) { - aP3.X()=rMeeting.X(); - aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); - } } - if ((bObn && rMeeting.Y()>aP2.Y()) || (bUnt && rMeeting.Y()<aP2.Y())) { // Aussenrum - if (rMeeting.X()<aP2.X()) { - aP3.X()=rRect.Left(); - if (rMeeting.X()<aP3.X()) aP3.X()=rMeeting.X(); - } else { - aP3.X()=rRect.Right(); - if (rMeeting.X()>aP3.X()) aP3.X()=rMeeting.X(); - } + } + if ((bObn && rMeeting.Y()>aP2.Y()) || (bUnt && rMeeting.Y()<aP2.Y())) { // Aussenrum + if (rMeeting.X()<aP2.X()) { + aP3.X()=rRect.Left(); + if (rMeeting.X()<aP3.X()) aP3.X()=rMeeting.X(); + } else { + aP3.X()=rRect.Right(); + if (rMeeting.X()>aP3.X()) aP3.X()=rMeeting.X(); + } + aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); + if (aP3.X()!=rMeeting.X()) { + aP3.Y()=rMeeting.Y(); aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); - if (aP3.X()!=rMeeting.X()) { - aP3.Y()=rMeeting.Y(); - aXP.Insert(XPOLY_APPEND,aP3,XPOLY_NORMAL); - } } } #ifdef DBG_UTIL @@ -724,8 +722,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& aPt2=aOutRect.BottomRight(); } } - FASTBOOL bCon1=rCon1.pObj!=NULL && rCon1.pObj->GetPage()==pPage && rCon1.pObj->IsInserted(); - FASTBOOL bCon2=rCon2.pObj!=NULL && rCon2.pObj->GetPage()==pPage && rCon2.pObj->IsInserted(); + bool bCon1=rCon1.pObj!=NULL && rCon1.pObj->GetPage()==pPage && rCon1.pObj->IsInserted(); + bool bCon2=rCon2.pObj!=NULL && rCon2.pObj->GetPage()==pPage && rCon2.pObj->IsInserted(); const SfxItemSet& rSet = GetObjectItemSet(); if (bCon1) { @@ -779,8 +777,8 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const XPolygon& rTrack0, SdrObjConnection& XPolygon aBestXP; ULONG nBestQual=0xFFFFFFFF; SdrEdgeInfoRec aBestInfo; - FASTBOOL bAuto1=bCon1 && rCon1.bBestVertex; - FASTBOOL bAuto2=bCon2 && rCon2.bBestVertex; + bool bAuto1=bCon1 && rCon1.bBestVertex; + bool bAuto2=bCon2 && rCon2.bBestVertex; if (bAuto1) rCon1.bAutoVertex=TRUE; if (bAuto2) rCon2.bAutoVertex=TRUE; USHORT nBestAuto1=0; @@ -833,19 +831,19 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec ULONG* pnQuality, SdrEdgeInfoRec* pInfo) const { SdrEdgeKind eKind=((SdrEdgeKindItem&)(GetObjectItem(SDRATTR_EDGEKIND))).GetValue(); - FASTBOOL bRts1=nAngle1==0; - FASTBOOL bObn1=nAngle1==9000; - FASTBOOL bLks1=nAngle1==18000; - FASTBOOL bUnt1=nAngle1==27000; - FASTBOOL bHor1=bLks1 || bRts1; - FASTBOOL bVer1=bObn1 || bUnt1; - FASTBOOL bRts2=nAngle2==0; - FASTBOOL bObn2=nAngle2==9000; - FASTBOOL bLks2=nAngle2==18000; - FASTBOOL bUnt2=nAngle2==27000; - FASTBOOL bHor2=bLks2 || bRts2; - FASTBOOL bVer2=bObn2 || bUnt2; - FASTBOOL bInfo=pInfo!=NULL; + bool bRts1=nAngle1==0; + bool bObn1=nAngle1==9000; + bool bLks1=nAngle1==18000; + bool bUnt1=nAngle1==27000; + bool bHor1=bLks1 || bRts1; + bool bVer1=bObn1 || bUnt1; + bool bRts2=nAngle2==0; + bool bObn2=nAngle2==9000; + bool bLks2=nAngle2==18000; + bool bUnt2=nAngle2==27000; + bool bHor2=bLks2 || bRts2; + bool bVer2=bObn2 || bUnt2; + bool bInfo=pInfo!=NULL; if (bInfo) { pInfo->cOrthoForm=0; pInfo->nAngle1=nAngle1; @@ -861,8 +859,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec Rectangle aBewareRect1(rBewareRect1); Rectangle aBewareRect2(rBewareRect2); Point aMeeting((aPt1.X()+aPt2.X()+1)/2,(aPt1.Y()+aPt2.Y()+1)/2); - FASTBOOL bMeetingXMid=TRUE; - FASTBOOL bMeetingYMid=TRUE; if (eKind==SDREDGE_ONELINE) { XPolygon aXP(2); aXP[0]=rPt1; @@ -908,7 +904,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec return aXP; } USHORT nIntersections=0; - FASTBOOL bForceMeeting=FALSE; // Muss die Linie durch den MeetingPoint laufen? { Point aC1(aBewareRect1.Center()); Point aC2(aBewareRect2.Center()); @@ -946,10 +941,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec long nXMax=Max(aBewareRect1.Right(),aBewareRect2.Right()); long nYMin=Min(aBewareRect1.Top(),aBewareRect2.Top()); long nYMax=Max(aBewareRect1.Bottom(),aBewareRect2.Bottom()); - //FASTBOOL bBoundOverlap=aBoundRect1.Right()>aBoundRect2.Left() && aBoundRect1.Left()<aBoundRect2.Right() && - aBoundRect1.Bottom()>aBoundRect2.Top() && aBoundRect1.Top()<aBoundRect2.Bottom(); - FASTBOOL bBewareOverlap=aBewareRect1.Right()>aBewareRect2.Left() && aBewareRect1.Left()<aBewareRect2.Right() && - aBewareRect1.Bottom()>aBewareRect2.Top() && aBewareRect1.Top()<aBewareRect2.Bottom(); + //bool bBoundOverlap=aBoundRect1.Right()>aBoundRect2.Left() && aBoundRect1.Left()<aBoundRect2.Right() && + // aBoundRect1.Bottom()>aBoundRect2.Top() && aBoundRect1.Top()<aBoundRect2.Bottom(); + bool bBewareOverlap=aBewareRect1.Right()>aBewareRect2.Left() && aBewareRect1.Left()<aBewareRect2.Right() && + aBewareRect1.Bottom()>aBewareRect2.Top() && aBewareRect1.Top()<aBewareRect2.Bottom(); unsigned nMainCase=3; if (nAngle1==nAngle2) nMainCase=1; else if ((bHor1 && bHor2) || (bVer1 && bVer2)) nMainCase=2; @@ -957,29 +952,24 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (bVer1) aMeeting.X()=(aPt1.X()+aPt2.X()+1)/2; // ist hier besser, als der if (bHor1) aMeeting.Y()=(aPt1.Y()+aPt2.Y()+1)/2; // Mittelpunkt des Freiraums // bX1Ok bedeutet, dass die Vertikale, die aus Obj1 austritt, keinen Konflikt mit Obj2 bildet, ... - FASTBOOL bX1Ok=aPt1.X()<=aBewareRect2.Left() || aPt1.X()>=aBewareRect2.Right(); - FASTBOOL bX2Ok=aPt2.X()<=aBewareRect1.Left() || aPt2.X()>=aBewareRect1.Right(); - FASTBOOL bY1Ok=aPt1.Y()<=aBewareRect2.Top() || aPt1.Y()>=aBewareRect2.Bottom(); - FASTBOOL bY2Ok=aPt2.Y()<=aBewareRect1.Top() || aPt2.Y()>=aBewareRect1.Bottom(); + bool bX1Ok=aPt1.X()<=aBewareRect2.Left() || aPt1.X()>=aBewareRect2.Right(); + bool bX2Ok=aPt2.X()<=aBewareRect1.Left() || aPt2.X()>=aBewareRect1.Right(); + bool bY1Ok=aPt1.Y()<=aBewareRect2.Top() || aPt1.Y()>=aBewareRect2.Bottom(); + bool bY2Ok=aPt2.Y()<=aBewareRect1.Top() || aPt2.Y()>=aBewareRect1.Bottom(); if (bLks1 && (bY1Ok || aBewareRect1.Left()<aBewareRect2.Right()) && (bY2Ok || aBewareRect2.Left()<aBewareRect1.Right())) { aMeeting.X()=nXMin; - bMeetingXMid=FALSE; } if (bRts1 && (bY1Ok || aBewareRect1.Right()>aBewareRect2.Left()) && (bY2Ok || aBewareRect2.Right()>aBewareRect1.Left())) { aMeeting.X()=nXMax; - bMeetingXMid=FALSE; } if (bObn1 && (bX1Ok || aBewareRect1.Top()<aBewareRect2.Bottom()) && (bX2Ok || aBewareRect2.Top()<aBewareRect1.Bottom())) { aMeeting.Y()=nYMin; - bMeetingYMid=FALSE; } if (bUnt1 && (bX1Ok || aBewareRect1.Bottom()>aBewareRect2.Top()) && (bX2Ok || aBewareRect2.Bottom()>aBewareRect1.Top())) { aMeeting.Y()=nYMax; - bMeetingYMid=FALSE; } } else if (nMainCase==2) { // Fall 2: - bForceMeeting=TRUE; if (bHor1) { // beide waagerecht /* 9 Moeglichkeiten: ù ù ù */ /* 2.1 Gegenueber, Ueberschneidung à ´ ù */ @@ -1019,22 +1009,21 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec // Ueberschneidung der BewareRects ohne Ueberschneidung der // Boundrects wenn die Linienaustritte sonst das BewareRect // des jeweils anderen Objekts verletzen wuerden. - FASTBOOL bCase29Direct=FALSE; - FASTBOOL bCase29=aBewR1.Right()>aBewR2.Left(); + bool bCase29Direct = false; + bool bCase29=aBewR1.Right()>aBewR2.Left(); if (aBndR1.Right()<=aBndR2.Left()) { // Fall 2.9 und keine Boundrectueberschneidung if ((aPt1.Y()>aBewareRect2.Top() && aPt1.Y()<aBewareRect2.Bottom()) || (aPt2.Y()>aBewareRect1.Top() && aPt2.Y()<aBewareRect1.Bottom())) { - bCase29Direct=TRUE; + bCase29Direct = true; } } if (!bCase29Direct) { - FASTBOOL bObenLang=Abs(nYMin-aMeeting.Y())<=Abs(nYMax-aMeeting.Y()); + bool bObenLang=Abs(nYMin-aMeeting.Y())<=Abs(nYMax-aMeeting.Y()); if (bObenLang) { aMeeting.Y()=nYMin; } else { aMeeting.Y()=nYMax; } - bMeetingYMid=FALSE; if (bCase29) { // und nun noch dafuer sorgen, dass das // umzingelte Obj nicht durchquert wird @@ -1043,7 +1032,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } else { aMeeting.X()=aBewR1.Left(); } - bMeetingXMid=FALSE; } } else { // Direkte Verbindung (3-Linien Z-Verbindung), da @@ -1079,22 +1067,21 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec // Ueberschneidung der BewareRects ohne Ueberschneidung der // Boundrects wenn die Linienaustritte sonst das BewareRect // des jeweils anderen Objekts verletzen wuerden. - FASTBOOL bCase29Direct=FALSE; - FASTBOOL bCase29=aBewR1.Bottom()>aBewR2.Top(); + bool bCase29Direct = false; + bool bCase29=aBewR1.Bottom()>aBewR2.Top(); if (aBndR1.Bottom()<=aBndR2.Top()) { // Fall 2.9 und keine Boundrectueberschneidung if ((aPt1.X()>aBewareRect2.Left() && aPt1.X()<aBewareRect2.Right()) || (aPt2.X()>aBewareRect1.Left() && aPt2.X()<aBewareRect1.Right())) { - bCase29Direct=TRUE; + bCase29Direct = true; } } if (!bCase29Direct) { - FASTBOOL bLinksLang=Abs(nXMin-aMeeting.X())<=Abs(nXMax-aMeeting.X()); + bool bLinksLang=Abs(nXMin-aMeeting.X())<=Abs(nXMax-aMeeting.X()); if (bLinksLang) { aMeeting.X()=nXMin; } else { aMeeting.X()=nXMax; } - bMeetingXMid=FALSE; if (bCase29) { // und nun noch dafuer sorgen, dass das // umzingelte Obj nicht durchquert wird @@ -1103,7 +1090,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } else { aMeeting.Y()=aBewR1.Top(); } - bMeetingYMid=FALSE; } } else { // Direkte Verbindung (3-Linien Z-Verbindung), da @@ -1174,9 +1160,6 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec (((bRts2 && aTmpR2.Right ()<=aPt1.X()) || (bLks2 && aTmpR2.Left()>=aPt1.X())) && ((bUnt1 && aTmpR1.Bottom()<=aPt2.Y()) || (bObn1 && aTmpR1.Top ()>=aPt2.Y())))) { // Fall 3.2 trifft zu: Verbindung mit lediglich 2 Linien - bForceMeeting=TRUE; - bMeetingXMid=FALSE; - bMeetingYMid=FALSE; if (bHor1) { aMeeting.X()=aPt2.X(); aMeeting.Y()=aPt1.Y(); @@ -1196,11 +1179,10 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec ((bUnt1 && aBewareRect1.Bottom()>aBewareRect2.Top ()) || (bObn1 && aBewareRect1.Top ()<aBewareRect2.Bottom())))) { // Fall 3.3 - bForceMeeting=TRUE; - if (bRts1 || bRts2) { aMeeting.X()=nXMax; bMeetingXMid=FALSE; } - if (bLks1 || bLks2) { aMeeting.X()=nXMin; bMeetingXMid=FALSE; } - if (bUnt1 || bUnt2) { aMeeting.Y()=nYMax; bMeetingYMid=FALSE; } - if (bObn1 || bObn2) { aMeeting.Y()=nYMin; bMeetingYMid=FALSE; } + if (bRts1 || bRts2) { aMeeting.X()=nXMax; } + if (bLks1 || bLks2) { aMeeting.X()=nXMin; } + if (bUnt1 || bUnt2) { aMeeting.Y()=nYMax; } + if (bObn1 || bObn2) { aMeeting.Y()=nYMin; } } } } @@ -1215,15 +1197,13 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec } Point aEP1(aXP1[nXP1Anz-1]); Point aEP2(aXP2[nXP2Anz-1]); - FASTBOOL bInsMeetingPoint=aEP1.X()!=aEP2.X() && aEP1.Y()!=aEP2.Y(); - FASTBOOL bHorzE1=aEP1.Y()==aXP1[nXP1Anz-2].Y(); // letzte Linie von XP1 horizontal? - FASTBOOL bHorzE2=aEP2.Y()==aXP2[nXP2Anz-2].Y(); // letzte Linie von XP2 horizontal? - if (aEP1==aEP2 && (bHorzE1 && bHorzE2 && aEP1.Y()==aEP2.Y()) || (!bHorzE1 && !bHorzE2 && aEP1.X()==aEP2.X())) { + bool bInsMeetingPoint=aEP1.X()!=aEP2.X() && aEP1.Y()!=aEP2.Y(); + bool bHorzE1=aEP1.Y()==aXP1[nXP1Anz-2].Y(); // letzte Linie von XP1 horizontal? + bool bHorzE2=aEP2.Y()==aXP2[nXP2Anz-2].Y(); // letzte Linie von XP2 horizontal? + if (aEP1==aEP2 && ((bHorzE1 && bHorzE2 && aEP1.Y()==aEP2.Y()) || (!bHorzE1 && !bHorzE2 && aEP1.X()==aEP2.X()))) { // Sonderbehandlung fuer 'I'-Verbinder nXP1Anz--; aXP1.Remove(nXP1Anz,1); nXP2Anz--; aXP2.Remove(nXP2Anz,1); - bMeetingXMid=FALSE; - bMeetingYMid=FALSE; } if (bInsMeetingPoint) { aXP1.Insert(XPOLY_APPEND,aMeeting,XPOLY_NORMAL); @@ -1303,12 +1283,12 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (pnQuality!=NULL) { ULONG nQual=0; ULONG nQual0=nQual; // Ueberlaeufe vorbeugen - FASTBOOL bOverflow=FALSE; + bool bOverflow = false; Point aPt0(aXP1[0]); for (USHORT nPntNum=1; nPntNum<nPntAnz; nPntNum++) { Point aPt1b(aXP1[nPntNum]); nQual+=Abs(aPt1b.X()-aPt0.X())+Abs(aPt1b.Y()-aPt0.Y()); - if (nQual<nQual0) bOverflow=TRUE; + if (nQual<nQual0) bOverflow = true; nQual0=nQual; aPt0=aPt1b; } @@ -1332,7 +1312,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (nTmp>=3) { nQual0=nQual; nQual+=(ULONG)nTmp*0x01000000; - if (nQual<nQual0 || nTmp>15) bOverflow=TRUE; + if (nQual<nQual0 || nTmp>15) bOverflow = true; } if (nPntAnz>=2) { // Austrittswinkel nochmal pruefen Point aP1(aXP1[1]); aP1-=aXP1[0]; @@ -1353,9 +1333,9 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec for (USHORT i=0; i<nPntAnz; i++) { Point aPt1b(aXP1[i]); - FASTBOOL b1=aPt1b.X()>aBewareRect1.Left() && aPt1b.X()<aBewareRect1.Right() && + bool b1=aPt1b.X()>aBewareRect1.Left() && aPt1b.X()<aBewareRect1.Right() && aPt1b.Y()>aBewareRect1.Top() && aPt1b.Y()<aBewareRect1.Bottom(); - FASTBOOL b2=aPt1b.X()>aBewareRect2.Left() && aPt1b.X()<aBewareRect2.Right() && + bool b2=aPt1b.X()>aBewareRect2.Left() && aPt1b.X()<aBewareRect2.Right() && aPt1b.Y()>aBewareRect2.Top() && aPt1b.Y()<aBewareRect2.Bottom(); USHORT nInt0=nIntersections; if (i==0 || i==nPntAnz-1) { @@ -1387,7 +1367,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec if (nPntAnz<=1) nIntersections++; nQual0=nQual; nQual+=(ULONG)nIntersections*0x10000000; - if (nQual<nQual0 || nIntersections>15) bOverflow=TRUE; + if (nQual<nQual0 || nIntersections>15) bOverflow = true; if (bOverflow || nQual==0xFFFFFFFF) nQual=0xFFFFFFFE; *pnQuality=nQual; @@ -1549,14 +1529,14 @@ je Objekt variiert von 0-3: 'C': n 0-3 0-3 = 1+U+1 */ -void __EXPORT SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) +void SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint) { SfxSimpleHint* pSimple=PTR_CAST(SfxSimpleHint,&rHint); ULONG nId=pSimple==0 ? 0 : pSimple->GetId(); - FASTBOOL bDataChg=nId==SFX_HINT_DATACHANGED; - FASTBOOL bDying=nId==SFX_HINT_DYING; - FASTBOOL bObj1=aCon1.pObj!=NULL && aCon1.pObj->GetBroadcaster()==&rBC; - FASTBOOL bObj2=aCon2.pObj!=NULL && aCon2.pObj->GetBroadcaster()==&rBC; + bool bDataChg=nId==SFX_HINT_DATACHANGED; + bool bDying=nId==SFX_HINT_DYING; + bool bObj1=aCon1.pObj!=NULL && aCon1.pObj->GetBroadcaster()==&rBC; + bool bObj2=aCon2.pObj!=NULL && aCon2.pObj->GetBroadcaster()==&rBC; if (bDying && (bObj1 || bObj2)) { // #35605# Dying vorher abfangen, damit AttrObj nicht // wg. vermeintlicher Vorlagenaenderung rumbroadcastet @@ -2004,7 +1984,7 @@ basegfx::B2DPolygon SdrEdgeObj::ImplAddConnectorOverlay(SdrDragMethod& rDragMeth return aResult; } -FASTBOOL SdrEdgeObj::BegCreate(SdrDragStat& rDragStat) +bool SdrEdgeObj::BegCreate(SdrDragStat& rDragStat) { rDragStat.SetNoSnap(TRUE); pEdgeTrack->SetPointCount(2); @@ -2018,7 +1998,7 @@ FASTBOOL SdrEdgeObj::BegCreate(SdrDragStat& rDragStat) return TRUE; } -FASTBOOL SdrEdgeObj::MovCreate(SdrDragStat& rDragStat) +bool SdrEdgeObj::MovCreate(SdrDragStat& rDragStat) { USHORT nMax=pEdgeTrack->GetPointCount(); (*pEdgeTrack)[nMax-1]=rDragStat.GetNow(); @@ -2034,9 +2014,9 @@ FASTBOOL SdrEdgeObj::MovCreate(SdrDragStat& rDragStat) return TRUE; } -FASTBOOL SdrEdgeObj::EndCreate(SdrDragStat& rDragStat, SdrCreateCmd eCmd) +bool SdrEdgeObj::EndCreate(SdrDragStat& rDragStat, SdrCreateCmd eCmd) { - FASTBOOL bOk=(eCmd==SDRCREATE_FORCEEND || rDragStat.GetPointAnz()>=2); + bool bOk=(eCmd==SDRCREATE_FORCEEND || rDragStat.GetPointAnz()>=2); if (bOk) { ConnectToNode(TRUE,aCon1.pObj); ConnectToNode(FALSE,aCon2.pObj); @@ -2049,7 +2029,7 @@ FASTBOOL SdrEdgeObj::EndCreate(SdrDragStat& rDragStat, SdrCreateCmd eCmd) return bOk; } -FASTBOOL SdrEdgeObj::BckCreate(SdrDragStat& rDragStat) +bool SdrEdgeObj::BckCreate(SdrDragStat& rDragStat) { if (rDragStat.GetView()!=NULL) { rDragStat.GetView()->HideConnectMarker(); @@ -2076,7 +2056,7 @@ Pointer SdrEdgeObj::GetCreatePointer() const return Pointer(POINTER_DRAW_CONNECT); } -FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut) +bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, SdrObjConnection& rCon, const SdrEdgeObj* pThis, OutputDevice* pOut) { rCon.ResetVars(); if (pOut==NULL) pOut=rPV.GetView().GetFirstOutputDevice(); // GetWin(0); @@ -2095,11 +2075,9 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, aMouseRect.Bottom()+=aHalfConSiz.Height(); USHORT nBoundHitTol=(USHORT)aHalfConSiz.Width()/2; if (nBoundHitTol==0) nBoundHitTol=1; ULONG no=pOL->GetObjCount(); - FASTBOOL bFnd=FALSE; + bool bFnd = false; SdrObjConnection aTestCon; SdrObjConnection aBestCon; - FASTBOOL bTestBoundHit=FALSE; - //FASTBOOL bBestBoundHit=FALSE; while (no>0 && !bFnd) { // Problem: Gruppenobjekt mit verschiedenen Layern liefert LayerID 0 !!!! @@ -2112,43 +2090,42 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, Rectangle aObjBound(pObj->GetCurrentBoundRect()); if (aObjBound.IsOver(aMouseRect)) { aTestCon.ResetVars(); - bTestBoundHit=FALSE; - FASTBOOL bEdge=HAS_BASE(SdrEdgeObj,pObj); // kein BestCon fuer Edge + bool bEdge=HAS_BASE(SdrEdgeObj,pObj); // kein BestCon fuer Edge // Die Userdefined Konnektoren haben absolute Prioritaet. // Danach kommt Vertex, Corner und Mitte(Best) gleich priorisiert. // Zum Schluss kommt noch ein HitTest aufs Obj. const SdrGluePointList* pGPL=pObj->GetGluePointList(); USHORT nConAnz=pGPL==NULL ? 0 : pGPL->GetCount(); USHORT nGesAnz=nConAnz+9; - FASTBOOL bUserFnd=FALSE; + bool bUserFnd = false; ULONG nBestDist=0xFFFFFFFF; - for (USHORT i=0; i<nGesAnz; i++) + for (USHORT i=0; i<nGesAnz; i++) { - FASTBOOL bUser=i<nConAnz; - FASTBOOL bVertex=i>=nConAnz+0 && i<nConAnz+4; - FASTBOOL bCorner=i>=nConAnz+4 && i<nConAnz+8; - FASTBOOL bCenter=i==nConAnz+8; - FASTBOOL bOk=FALSE; + bool bUser=i<nConAnz; + bool bVertex=i>=nConAnz+0 && i<nConAnz+4; + bool bCorner=i>=nConAnz+4 && i<nConAnz+8; + bool bCenter=i==nConAnz+8; + bool bOk = false; Point aConPos; USHORT nConNum=i; if (bUser) { const SdrGluePoint& rGP=(*pGPL)[nConNum]; aConPos=rGP.GetAbsolutePos(*pObj); nConNum=rGP.GetId(); - bOk=TRUE; + bOk = true; } else if (bVertex && !bUserFnd) { nConNum=nConNum-nConAnz; if (rPV.GetView().IsAutoVertexConnectors()) { SdrGluePoint aPt(pObj->GetVertexGluePoint(nConNum)); aConPos=aPt.GetAbsolutePos(*pObj); - bOk=TRUE; + bOk = true; } else i+=3; } else if (bCorner && !bUserFnd) { nConNum-=nConAnz+4; if (rPV.GetView().IsAutoCornerConnectors()) { SdrGluePoint aPt(pObj->GetCornerGluePoint(nConNum)); aConPos=aPt.GetAbsolutePos(*pObj); - bOk=TRUE; + bOk = true; } else i+=3; } else if (bCenter && !bUserFnd && !bEdge) @@ -2160,12 +2137,12 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, // Edges nicht! nConNum=0; aConPos=aObjBound.Center(); - bOk=TRUE; + bOk = true; } } if (bOk && aMouseRect.IsInside(aConPos)) { - if (bUser) bUserFnd=TRUE; - bFnd=TRUE; + if (bUser) bUserFnd = true; + bFnd = true; ULONG nDist=(ULONG)Abs(aConPos.X()-rPt.X())+(ULONG)Abs(aConPos.Y()-rPt.Y()); if (nDist<nBestDist) { nBestDist=nDist; @@ -2180,15 +2157,15 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, } // Falls kein Konnektor getroffen wird nochmal // HitTest versucht fuer BestConnector (=bCenter) - if(!bFnd && - !bEdge && + if(!bFnd && + !bEdge && SdrObjectPrimitiveHit(*pObj, rPt, nBoundHitTol, rPV, &rVisLayer, false)) { // #109007# // Suppress default connect at object inside bound if(!pThis || !pThis->GetSuppressDefaultConnect()) { - bFnd=TRUE; + bFnd = true; aTestCon.pObj=pObj; aTestCon.bBestConn=TRUE; } @@ -2199,7 +2176,7 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, aMouseRect.Top() -=nBoundHitTol; aMouseRect.Right() +=nBoundHitTol; aMouseRect.Bottom()+=nBoundHitTol; - bTestBoundHit=aObjBound.IsOver(aMouseRect2); + aObjBound.IsOver(aMouseRect2); } } @@ -2495,3 +2472,5 @@ void SdrEdgeObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index cf99dd2fdf..d38309c0c2 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -472,9 +473,9 @@ Graphic SdrGrafObj::GetTransformedGraphic( ULONG nTransformFlags ) const if( bMirror ) { - USHORT nMirrorCase = ( aGeo.nDrehWink == 18000 ) ? ( bMirrored ? 3 : 4 ) : ( bMirrored ? 2 : 1 ); - FASTBOOL bHMirr = nMirrorCase == 2 || nMirrorCase == 4; - FASTBOOL bVMirr = nMirrorCase == 3 || nMirrorCase == 4; + USHORT nMirrorCase = ( aGeo.nDrehWink == 18000 ) ? ( bMirrored ? 3 : 4 ) : ( bMirrored ? 2 : 1 ); + bool bHMirr = nMirrorCase == 2 || nMirrorCase == 4; + bool bVMirr = nMirrorCase == 3 || nMirrorCase == 4; aActAttr.SetMirrorFlags( ( bHMirr ? BMP_MIRROR_HORZ : 0 ) | ( bVMirr ? BMP_MIRROR_VERT : 0 ) ); } @@ -657,8 +658,8 @@ void SdrGrafObj::ReleaseGraphicLink() void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { - FASTBOOL bAnim = pGraphic->IsAnimated(); - FASTBOOL bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj; + bool bAnim = pGraphic->IsAnimated(); + bool bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj; rInfo.bResizeFreeAllowed = aGeo.nDrehWink % 9000 == 0 || aGeo.nDrehWink % 18000 == 0 || @@ -884,8 +885,8 @@ void SdrGrafObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract { SdrRectObj::NbcResize( rRef, xFact, yFact ); - FASTBOOL bMirrX = xFact.GetNumerator() < 0; - FASTBOOL bMirrY = yFact.GetNumerator() < 0; + bool bMirrX = xFact.GetNumerator() < 0; + bool bMirrY = yFact.GetNumerator() < 0; if( bMirrX != bMirrY ) bMirrored = !bMirrored; @@ -908,7 +909,7 @@ void SdrGrafObj::NbcMirror(const Point& rRef1, const Point& rRef2) // ----------------------------------------------------------------------------- -void SdrGrafObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrGrafObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SdrRectObj::NbcRotate( rRef, nWink, tn, bVShear ); } @@ -924,7 +925,7 @@ void SdrGrafObj::NbcSetSnapRect(const Rectangle& rRect) void SdrGrafObj::NbcSetLogicRect( const Rectangle& rRect) { - //FASTBOOL bChg=rRect.GetSize()!=aRect.GetSize(); + //bool bChg=rRect.GetSize()!=aRect.GetSize(); SdrRectObj::NbcSetLogicRect(rRect); } @@ -950,7 +951,7 @@ void SdrGrafObj::RestGeoData(const SdrObjGeoData& rGeo) { //long nDrehMerk = aGeo.nDrehWink; //long nShearMerk = aGeo.nShearWink; - //FASTBOOL bMirrMerk = bMirrored; + //bool bMirrMerk = bMirrored; Size aSizMerk( aRect.GetSize() ); SdrRectObj::RestGeoData(rGeo); @@ -962,8 +963,8 @@ void SdrGrafObj::RestGeoData(const SdrObjGeoData& rGeo) void SdrGrafObj::SetPage( SdrPage* pNewPage ) { - FASTBOOL bRemove = pNewPage == NULL && pPage != NULL; - FASTBOOL bInsert = pNewPage != NULL && pPage == NULL; + bool bRemove = pNewPage == NULL && pPage != NULL; + bool bInsert = pNewPage != NULL && pPage == NULL; if( bRemove ) { @@ -985,7 +986,7 @@ void SdrGrafObj::SetPage( SdrPage* pNewPage ) void SdrGrafObj::SetModel( SdrModel* pNewModel ) { - FASTBOOL bChg = pNewModel != pModel; + bool bChg = pNewModel != pModel; if( bChg ) { @@ -1026,7 +1027,7 @@ void SdrGrafObj::StopAnimation(OutputDevice* /*pOutDev*/, long /*nExtraData*/) // ----------------------------------------------------------------------------- -FASTBOOL SdrGrafObj::HasGDIMetaFile() const +bool SdrGrafObj::HasGDIMetaFile() const { return( pGraphic->GetType() == GRAPHIC_GDIMETAFILE ); } @@ -1424,3 +1425,5 @@ Reference< XInputStream > SdrGrafObj::getInputStream() } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 7c5ed1637d..6d1e36e50e 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -177,13 +178,13 @@ UINT16 SdrObjGroup::GetObjIdentifier() const SdrLayerID SdrObjGroup::GetLayer() const { - FASTBOOL b1st=TRUE; + bool b1st = true; SdrLayerID nLay=SdrLayerID(SdrObject::GetLayer()); SdrObjList* pOL=pSub; ULONG nObjAnz=pOL->GetObjCount(); for (ULONG i=0; i<nObjAnz; i++) { SdrLayerID nLay1=pOL->GetObj(i)->GetLayer(); - if (b1st) { nLay=nLay1; b1st=FALSE; } + if (b1st) { nLay=nLay1; b1st = false; } else if (nLay1!=nLay) return 0; } return nLay; @@ -245,7 +246,7 @@ void SdrObjGroup::SetModel(SdrModel* pNewModel) } -FASTBOOL SdrObjGroup::HasRefPoint() const +bool SdrObjGroup::HasRefPoint() const { return bRefPoint; } @@ -271,22 +272,19 @@ SdrObjList* SdrObjGroup::GetSubList() const const Rectangle& SdrObjGroup::GetCurrentBoundRect() const { - // --> OD 2007-02-01 #144962# - // <aOutRect> has to contain the bounding rectangle + // <aOutRect> has to contain the bounding rectangle (#144962#) if ( pSub->GetObjCount()!=0 ) { const_cast<SdrObjGroup*>(this)->aOutRect = pSub->GetAllObjBoundRect(); } return aOutRect; - // <-- } const Rectangle& SdrObjGroup::GetSnapRect() const { - // --> OD 2007-02-01 #144962# - // <aOutRect> has to contain the bounding rectangle + // <aOutRect> has to contain the bounding rectangle (#144962#) if ( pSub->GetObjCount()!=0 ) { return pSub->GetAllObjSnapRect(); @@ -295,7 +293,6 @@ const Rectangle& SdrObjGroup::GetSnapRect() const { return aOutRect; } - // <-- } void SdrObjGroup::operator=(const SdrObject& rObj) @@ -385,7 +382,7 @@ bool SdrObjGroup::beginSpecialDrag(SdrDragStat& /*rDrag*/) const } -FASTBOOL SdrObjGroup::BegCreate(SdrDragStat& /*rStat*/) +bool SdrObjGroup::BegCreate(SdrDragStat& /*rStat*/) { return FALSE; } @@ -397,7 +394,7 @@ long SdrObjGroup::GetRotateAngle() const } -long SdrObjGroup::GetShearAngle(FASTBOOL /*bVertical*/) const +long SdrObjGroup::GetShearAngle(bool /*bVertical*/) const { return nShearWink; } @@ -448,8 +445,8 @@ void SdrObjGroup::NbcMove(const Size& rSiz) void SdrObjGroup::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); - FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); + bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); + bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { @@ -509,7 +506,7 @@ void SdrObjGroup::NbcMirror(const Point& rRef1, const Point& rRef2) } -void SdrObjGroup::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrObjGroup::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SetGlueReallyAbsolute(TRUE); nShearWink+=nWink; @@ -604,8 +601,8 @@ void SdrObjGroup::Move(const Size& rSiz) void SdrObjGroup::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { if (xFact.GetNumerator()!=xFact.GetDenominator() || yFact.GetNumerator()!=yFact.GetDenominator()) { - FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); - FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); + bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); + bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { @@ -700,7 +697,7 @@ void SdrObjGroup::Mirror(const Point& rRef1, const Point& rRef2) } -void SdrObjGroup::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrObjGroup::Shear(const Point& rRef, long nWink, double tn, bool bVShear) { if (nWink!=0) { SetGlueReallyAbsolute(TRUE); @@ -731,7 +728,7 @@ void SdrObjGroup::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShe void SdrObjGroup::SetAnchorPos(const Point& rPnt) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); - FASTBOOL bChg=aAnchor!=rPnt; + bool bChg=aAnchor!=rPnt; aAnchor=rPnt; Size aSiz(rPnt.X()-aAnchor.X(),rPnt.Y()-aAnchor.Y()); MovePoint(aRefPoint,aSiz); @@ -799,3 +796,5 @@ SdrObject* SdrObjGroup::DoConvertToPolyObj(BOOL bBezier) const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index a5953bf170..24f4b276f3 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -275,17 +276,17 @@ struct ImpMeasureRec : public SdrDragStatUserData long nHelplineDist; long nHelpline1Len; long nHelpline2Len; - FASTBOOL bBelowRefEdge; - FASTBOOL bTextRota90; - FASTBOOL bTextUpsideDown; + bool bBelowRefEdge; + bool bTextRota90; + bool bTextUpsideDown; long nMeasureOverhang; FieldUnit eMeasureUnit; Fraction aMeasureScale; - FASTBOOL bShowUnit; + bool bShowUnit; String aFormatString; - FASTBOOL bTextAutoAngle; + bool bTextAutoAngle; long nTextAutoAngleView; - FASTBOOL bTextIsFixedAngle; + bool bTextIsFixedAngle; long nTextFixedAngle; }; @@ -321,11 +322,11 @@ struct ImpMeasurePoly long nArrow1Wdt; // Breite des 1. Pfeils long nArrow2Wdt; // Breite des 2. Pfeils long nShortLineLen; // Linienlaenge, wenn PfeileAussen - FASTBOOL bArrow1Center; // Pfeil 1 zentriert? - FASTBOOL bArrow2Center; // Pfeil 2 zentriert? - FASTBOOL bAutoUpsideDown; // UpsideDown durch Automatik - FASTBOOL bPfeileAussen; - FASTBOOL bBreakedLine; + bool bArrow1Center; // Pfeil 1 zentriert? + bool bArrow2Center; // Pfeil 2 zentriert? + bool bAutoUpsideDown; // UpsideDown durch Automatik + bool bPfeileAussen; + bool bBreakedLine; }; void SdrMeasureObj::ImpTakeAttr(ImpMeasureRec& rRec) const @@ -389,7 +390,7 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& rPol.nArrow2Wdt=0; long nArrowNeed=0; long nShortLen=0; - FASTBOOL bPfeileAussen=FALSE; + bool bPfeileAussen = false; const SfxItemSet& rSet = GetObjectItemSet(); sal_Int32 nLineWdt = ((XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue(); // Strichstaerke @@ -413,13 +414,13 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& // nArrowLen ist bei bCenter bereits halbiert // Bei 2 Pfeilen a 4mm ist unter 10mm Schluss. nArrowNeed=nArrow1Len+nArrow2Len+(nArrow1Wdt+nArrow2Wdt)/2; - if (rPol.nLineLen<nArrowNeed) bPfeileAussen=TRUE; + if (rPol.nLineLen<nArrowNeed) bPfeileAussen = true; nShortLen=(nArrow1Len+nArrow1Wdt + nArrow2Len+nArrow2Wdt) /2; rPol.eUsedTextHPos=rRec.eWantTextHPos; rPol.eUsedTextVPos=rRec.eWantTextVPos; if (rPol.eUsedTextVPos==SDRMEASURE_TEXTVAUTO) rPol.eUsedTextVPos=SDRMEASURE_ABOVE; - FASTBOOL bBrkLine=rPol.eUsedTextVPos==SDRMEASURETEXT_BREAKEDLINE; + bool bBrkLine=rPol.eUsedTextVPos==SDRMEASURETEXT_BREAKEDLINE; if (rPol.eUsedTextVPos==SDRMEASURETEXT_VERTICALCENTERED) { OutlinerParaObject* pOutlinerParaObject = SdrTextObj::GetOutlinerParaObject(); @@ -430,18 +431,18 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& } rPol.bBreakedLine=bBrkLine; if (rPol.eUsedTextHPos==SDRMEASURE_TEXTHAUTO) { // bei zu breitem Text diesen eventuell nach aussen schieben - FASTBOOL bOutside=FALSE; + bool bOutside = false; long nNeedSiz=!rRec.bTextRota90 ? rPol.aTextSize.Width() : rPol.aTextSize.Height(); - if (nNeedSiz>rPol.nLineLen) bOutside=TRUE; // Text passt nicht in die Mitte + if (nNeedSiz>rPol.nLineLen) bOutside = true; // Text passt nicht in die Mitte if (bBrkLine) { - if (nNeedSiz+nArrowNeed>rPol.nLineLen) bPfeileAussen=TRUE; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen + if (nNeedSiz+nArrowNeed>rPol.nLineLen) bPfeileAussen = true; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen } else { long nSmallNeed=nArrow1Len+nArrow2Len+(nArrow1Wdt+nArrow2Wdt)/2/4; - if (nNeedSiz+nSmallNeed>rPol.nLineLen) bPfeileAussen=TRUE; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen + if (nNeedSiz+nSmallNeed>rPol.nLineLen) bPfeileAussen = true; // Text passt in die Mitte, wenn die Pfeile nach aussen kommen } rPol.eUsedTextHPos=bOutside ? SDRMEASURE_TEXTLEFTOUTSIDE : SDRMEASURE_TEXTINSIDE; } - if (rPol.eUsedTextHPos!=SDRMEASURE_TEXTINSIDE) bPfeileAussen=TRUE; + if (rPol.eUsedTextHPos!=SDRMEASURE_TEXTINSIDE) bPfeileAussen = true; rPol.nArrow1Wdt=nArrow1Wdt; rPol.nArrow2Wdt=nArrow2Wdt; rPol.nShortLineLen=nShortLen; @@ -581,8 +582,8 @@ basegfx::B2DPolyPolygon SdrMeasureObj::ImpCalcXPoly(const ImpMeasurePoly& rPol) return aRetval; } -FASTBOOL SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos, - FASTBOOL bEdit, +bool SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos, + bool bEdit, Color*& rpTxtColor, Color*& rpFldColor, XubString& rRet) const { const SvxFieldData* pField=rField.GetField(); @@ -667,9 +668,9 @@ void SdrMeasureObj::TakeUnrotatedSnapRect(Rectangle& rRect) const } Point aTextPos; - FASTBOOL bRota90=aRec.bTextRota90; - FASTBOOL bUpsideDown=aRec.bTextUpsideDown!=aMPol.bAutoUpsideDown; - FASTBOOL bBelowRefEdge=aRec.bBelowRefEdge; + bool bRota90=aRec.bTextRota90; + bool bUpsideDown=aRec.bTextUpsideDown!=aMPol.bAutoUpsideDown; + bool bBelowRefEdge=aRec.bBelowRefEdge; SdrMeasureTextHPos eMH=aMPol.eUsedTextHPos; SdrMeasureTextVPos eMV=aMPol.eUsedTextVPos; if (!bRota90) { @@ -910,9 +911,9 @@ void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) c const SdrHdl* pHdl=rDrag.GetHdl(); sal_uInt32 nHdlNum(pHdl->GetObjHdlNum()); - FASTBOOL bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); - FASTBOOL bBigOrtho=bOrtho && rDrag.GetView()->IsBigOrtho(); - FASTBOOL bBelow=rRec.bBelowRefEdge; + bool bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); + bool bBigOrtho=bOrtho && rDrag.GetView()->IsBigOrtho(); + bool bBelow=rRec.bBelowRefEdge; Point aPt(rDrag.GetNow()); switch (nHdlNum) { @@ -929,22 +930,22 @@ void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) c if (bOrtho) rRec.nHelpline1Len=rRec.nHelpline2Len; } break; case 2: case 3: { - FASTBOOL bAnf=nHdlNum==2; + bool bAnf=nHdlNum==2; Point& rMov=bAnf ? rRec.aPt1 : rRec.aPt2; Point aMov(rMov); Point aFix(bAnf ? rRec.aPt2 : rRec.aPt1); if (bOrtho) { long ndx0=aMov.X()-aFix.X(); long ndy0=aMov.Y()-aFix.Y(); - FASTBOOL bHLin=ndy0==0; - FASTBOOL bVLin=ndx0==0; + bool bHLin=ndy0==0; + bool bVLin=ndx0==0; if (!bHLin || !bVLin) { // sonst ist aPt1==aPt2 long ndx=aPt.X()-aFix.X(); long ndy=aPt.Y()-aFix.Y(); double nXFact=0; if (!bVLin) nXFact=(double)ndx/(double)ndx0; double nYFact=0; if (!bHLin) nYFact=(double)ndy/(double)ndy0; - FASTBOOL bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); - FASTBOOL bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); + bool bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); + bool bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); if (bHor) ndy=long(ndy0*nXFact); if (bVer) ndx=long(ndx0*nYFact); aPt=aFix; @@ -971,7 +972,7 @@ void SdrMeasureObj::ImpEvalDrag(ImpMeasureRec& rRec, const SdrDragStat& rDrag) c //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrMeasureObj::BegCreate(SdrDragStat& rStat) +bool SdrMeasureObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho8Possible(); aPt1=rStat.GetStart(); @@ -980,7 +981,7 @@ FASTBOOL SdrMeasureObj::BegCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrMeasureObj::MovCreate(SdrDragStat& rStat) +bool SdrMeasureObj::MovCreate(SdrDragStat& rStat) { SdrView* pView=rStat.GetView(); aPt1=rStat.GetStart(); @@ -995,16 +996,16 @@ FASTBOOL SdrMeasureObj::MovCreate(SdrDragStat& rStat) return TRUE; } -FASTBOOL SdrMeasureObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrMeasureObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { SetTextDirty(); SetRectsDirty(); return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2); } -FASTBOOL SdrMeasureObj::BckCreate(SdrDragStat& /*rStat*/) +bool SdrMeasureObj::BckCreate(SdrDragStat& /*rStat*/) { - return FALSE; + return false; } void SdrMeasureObj::BrkCreate(SdrDragStat& /*rStat*/) @@ -1073,7 +1074,7 @@ void SdrMeasureObj::NbcMirror(const Point& rRef1, const Point& rRef2) SetRectsDirty(); } -void SdrMeasureObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrMeasureObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SdrTextObj::NbcShear(rRef,nWink,tn,bVShear); ShearPoint(aPt1,rRef,tn,bVShear); @@ -1298,7 +1299,7 @@ void SdrMeasureObj::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject) SetTextDirty(); // Text neu berechnen! } -void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, +void SdrMeasureObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, BOOL bLineWidth ) const { if (bTextDirty) UndirtyText(); @@ -1329,9 +1330,9 @@ USHORT SdrMeasureObj::GetOutlinerViewAnchorMode() const SdrTextVertAdjust eTV=GetTextVerticalAdjust(); SdrMeasureTextHPos eMH=aMPol.eUsedTextHPos; SdrMeasureTextVPos eMV=aMPol.eUsedTextVPos; - FASTBOOL bTextRota90=aRec.bTextRota90; - //FASTBOOL bTextUpsideDown=aRec.bTextUpsideDown; - FASTBOOL bBelowRefEdge=aRec.bBelowRefEdge; + bool bTextRota90=aRec.bTextRota90; + //bool bTextUpsideDown=aRec.bTextUpsideDown; + bool bBelowRefEdge=aRec.bBelowRefEdge; // bTextUpsideDown muss hier noch ausgewertet werden!!!! if (!bTextRota90) { @@ -1492,3 +1493,5 @@ void SdrMeasureObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, cons ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index a642f6049c..18e45af4b5 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,9 +64,9 @@ SdrMediaObj::~SdrMediaObj() // ------------------------------------------------------------------------------ -FASTBOOL SdrMediaObj::HasTextEdit() const +bool SdrMediaObj::HasTextEdit() const { - return FALSE; + return false; } // ------------------------------------------------------------------------------ @@ -283,3 +284,5 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper if( AVMEDIA_SETMASK_ZOOM & nMaskSet ) maMediaProperties.setZoom( rNewProperties.getZoom() ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 49dd0d112a..c13018b6ef 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -182,10 +183,6 @@ SdrLightEmbeddedClient_Impl::SdrLightEmbeddedClient_Impl( SdrOle2Obj* pObj ) } Rectangle SdrLightEmbeddedClient_Impl::impl_getScaledRect_nothrow() const { - MapUnit aContainerMapUnit( MAP_100TH_MM ); - uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY ); - if ( xParentVis.is() ) - aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) ); Rectangle aLogicRect( mpObj->GetLogicRect() ); // apply scaling to object area and convert to pixels aLogicRect.SetSize( Size( Fraction( aLogicRect.GetWidth() ) * m_aScaleWidth, @@ -201,7 +198,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changingState( const ::com::sun::star void SdrLightEmbeddedClient_Impl::Release() { { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; mpObj = NULL; } @@ -211,7 +208,7 @@ void SdrLightEmbeddedClient_Impl::Release() //-------------------------------------------------------------------- void SAL_CALL SdrLightEmbeddedClient_Impl::stateChanged( const ::com::sun::star::lang::EventObject& /*aEvent*/, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( mpObj && nOldState == embed::EmbedStates::LOADED && nNewState == embed::EmbedStates::RUNNING ) { @@ -227,7 +224,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::stateChanged( const ::com::sun::star: //-------------------------------------------------------------------- void SAL_CALL SdrLightEmbeddedClient_Impl::disposing( const ::com::sun::star::lang::EventObject& /*aEvent*/ ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; GetSdrGlobalData().GetOLEObjCache().RemoveObj(mpObj); } @@ -237,10 +234,10 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj { // TODO/LATER: when writer uses this implementation the code could be shared with SfxInPlaceClient_Impl - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // the code currently makes sence only in case there is no other client - if ( mpObj && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON && aEvent.EventName.equalsAscii("OnVisAreaChanged") + if ( mpObj && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON && aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OnVisAreaChanged")) && mpObj->GetObjRef().is() && mpObj->GetObjRef()->getClientSite() == uno::Reference< embed::XEmbeddedClient >( this ) ) { try @@ -309,7 +306,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::saveObject() uno::Reference< util::XModifiable > xModifiable; { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !mpObj ) throw embed::ObjectSaveVetoException(); @@ -352,7 +349,7 @@ uno::Reference< util::XCloseable > SAL_CALL SdrLightEmbeddedClient_Impl::getComp { uno::Reference< util::XCloseable > xResult; - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( mpObj ) xResult = uno::Reference< util::XCloseable >( mpObj->GetParentXModel(), uno::UNO_QUERY ); @@ -364,7 +361,7 @@ sal_Bool SAL_CALL SdrLightEmbeddedClient_Impl::canInplaceActivate() throw ( uno::RuntimeException ) { sal_Bool bRet = sal_False; - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( mpObj ) { uno::Reference< embed::XEmbeddedObject > xObject = mpObj->GetObjRef(); @@ -388,7 +385,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::activatingUI() throw ( embed::WrongStateException, uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference < beans::XPropertySet > xFrame( lcl_getFrame_throw(mpObj)); uno::Reference < frame::XFrame > xOwnFrame( xFrame,uno::UNO_QUERY); @@ -442,7 +439,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::deactivatedUI() throw ( embed::WrongStateException, uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager(getLayoutManager()); if ( xLayoutManager.is() ) { @@ -458,11 +455,11 @@ uno::Reference< ::com::sun::star::frame::XLayoutManager > SAL_CALL SdrLightEmbed uno::RuntimeException ) { uno::Reference< ::com::sun::star::frame::XLayoutManager > xMan; - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference < beans::XPropertySet > xFrame( lcl_getFrame_throw(mpObj)); try { - xMan.set(xFrame->getPropertyValue( ::rtl::OUString::createFromAscii("LayoutManager") ),uno::UNO_QUERY); + xMan.set(xFrame->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")) ),uno::UNO_QUERY); } catch ( uno::Exception& ) { @@ -477,7 +474,7 @@ uno::Reference< frame::XDispatchProvider > SAL_CALL SdrLightEmbeddedClient_Impl: throw ( embed::WrongStateException, uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return uno::Reference < frame::XDispatchProvider >( lcl_getFrame_throw(mpObj), uno::UNO_QUERY_THROW ); } @@ -486,7 +483,7 @@ awt::Rectangle SAL_CALL SdrLightEmbeddedClient_Impl::getPlacement() throw ( embed::WrongStateException, uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !mpObj ) throw uno::RuntimeException(); @@ -528,7 +525,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl uno::Exception, uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !mpObj ) throw uno::RuntimeException(); @@ -588,7 +585,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl uno::Reference< awt::XWindow > SAL_CALL SdrLightEmbeddedClient_Impl::getWindow() throw ( uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; uno::Reference< awt::XWindow > xCurrent = m_xWindow; if ( !xCurrent.is() ) { @@ -699,6 +696,7 @@ public: SdrOle2ObjImpl() : pGraphicObject( NULL ) + , pLightClient ( NULL ) // #107645# // init to start situation, loading did not fail , mbLoadingOLEObjectFailed( sal_False ) @@ -752,7 +750,7 @@ sdr::contact::ViewContact* SdrOle2Obj::CreateObjectSpecificViewContact() TYPEINIT1(SdrOle2Obj,SdrRectObj); DBG_NAME(SdrOle2Obj) -SdrOle2Obj::SdrOle2Obj(FASTBOOL bFrame_) : m_bTypeAsked(false) +SdrOle2Obj::SdrOle2Obj(bool bFrame_) : m_bTypeAsked(false) ,m_bChart(false) { DBG_CTOR( SdrOle2Obj,NULL); @@ -762,7 +760,7 @@ SdrOle2Obj::SdrOle2Obj(FASTBOOL bFrame_) : m_bTypeAsked(false) } // ----------------------------------------------------------------------------- -SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, FASTBOOL bFrame_) +SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, bool bFrame_) : xObjRef( rNewObjRef ) , m_bTypeAsked(false) , m_bChart(false) @@ -783,7 +781,7 @@ SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, FASTBOOL bFram // ----------------------------------------------------------------------------- -SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubString& rNewObjName, FASTBOOL bFrame_) +SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubString& rNewObjName, bool bFrame_) : xObjRef( rNewObjRef ) , m_bTypeAsked(false) , m_bChart(false) @@ -805,7 +803,7 @@ SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubStrin // ----------------------------------------------------------------------------- -SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubString& rNewObjName, const Rectangle& rNewRect, FASTBOOL bFrame_) +SdrOle2Obj::SdrOle2Obj( const svt::EmbeddedObjectRef& rNewObjRef, const XubString& rNewObjName, const Rectangle& rNewRect, bool bFrame_) : SdrRectObj(rNewRect) , xObjRef( rNewObjRef ) , m_bTypeAsked(false) @@ -911,7 +909,7 @@ void SdrOle2Obj::SetGraphic(const Graphic* pGrf) // ----------------------------------------------------------------------------- -FASTBOOL SdrOle2Obj::IsEmpty() const +bool SdrOle2Obj::IsEmpty() const { return !(xObjRef.is()); } @@ -1419,8 +1417,8 @@ void SdrOle2Obj::SetModel(SdrModel* pNewModel) void SdrOle2Obj::SetPage(SdrPage* pNewPage) { - FASTBOOL bRemove=pNewPage==NULL && pPage!=NULL; - FASTBOOL bInsert=pNewPage!=NULL && pPage==NULL; + bool bRemove=pNewPage==NULL && pPage!=NULL; + bool bInsert=pNewPage!=NULL && pPage==NULL; if (bRemove && mpImpl->mbConnected ) Disconnect(); @@ -1490,16 +1488,11 @@ SdrObject* SdrOle2Obj::getFullDragClone() const // create a graphic object with it Graphic* pOLEGraphic = GetGraphic(); SdrObject* pClone = 0; - - if(Application::GetSettings().GetStyleSettings().GetHighContrastMode()) - { - pOLEGraphic = getEmbeddedObjectRef().GetHCGraphic(); - } if(pOLEGraphic) { pClone = new SdrGrafObj(*pOLEGraphic, GetSnapRect()); - + // this would be the place where to copy all attributes // when OLE will support fill and line style // pClone->SetMergedItem(pOleObject->GetMergedItemSet()); @@ -1681,7 +1674,7 @@ void SdrOle2Obj::operator=(const SdrObject& rObj) catch( uno::Exception& e ) { (void)e; - DBG_ERROR( "SdrOle2Obj::operator=(), unexcpected exception caught!" ); + DBG_ERROR( "SdrOle2Obj::operator=(), unexpected exception caught!" ); } } */ } @@ -2240,3 +2233,5 @@ void SdrOle2Obj::SetWindow(const com::sun::star::uno::Reference < com::sun::star ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx index a1e0ddbace..ce9ddb478a 100644 --- a/svx/source/svdraw/svdopage.cxx +++ b/svx/source/svdraw/svdopage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -193,3 +194,5 @@ void SdrPageObj::TakeObjNamePlural(XubString& rName) const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 6ac8bba0e9..370030148c 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -80,7 +81,7 @@ inline double ImplMMToTwips(double fVal) { return (fVal * (72.0 / 127.0)); } using namespace sdr; -inline USHORT GetPrevPnt(USHORT nPnt, USHORT nPntMax, FASTBOOL bClosed) +inline USHORT GetPrevPnt(USHORT nPnt, USHORT nPntMax, bool bClosed) { if (nPnt>0) { nPnt--; @@ -91,7 +92,7 @@ inline USHORT GetPrevPnt(USHORT nPnt, USHORT nPntMax, FASTBOOL bClosed) return nPnt; } -inline USHORT GetNextPnt(USHORT nPnt, USHORT nPntMax, FASTBOOL bClosed) +inline USHORT GetNextPnt(USHORT nPnt, USHORT nPntMax, bool bClosed) { nPnt++; if (nPnt>nPntMax || (bClosed && nPnt>=nPntMax)) nPnt=0; @@ -101,31 +102,31 @@ inline USHORT GetNextPnt(USHORT nPnt, USHORT nPntMax, FASTBOOL bClosed) struct ImpSdrPathDragData : public SdrDragStatUserData { XPolygon aXP; // Ausschnitt aud dem Originalpolygon - FASTBOOL bValid; // FALSE = zu wenig Punkte - FASTBOOL bClosed; // geschlossenes Objekt? + bool bValid; // FALSE = zu wenig Punkte + bool bClosed; // geschlossenes Objekt? USHORT nPoly; // Nummer des Polygons im PolyPolygon USHORT nPnt; // Punktnummer innerhalb des obigen Polygons USHORT nPntAnz; // Punktanzahl des Polygons USHORT nPntMax; // Maximaler Index - FASTBOOL bBegPnt; // Gedraggter Punkt ist der Anfangspunkt einer Polyline - FASTBOOL bEndPnt; // Gedraggter Punkt ist der Endpunkt einer Polyline + bool bBegPnt; // Gedraggter Punkt ist der Anfangspunkt einer Polyline + bool bEndPnt; // Gedraggter Punkt ist der Endpunkt einer Polyline USHORT nPrevPnt; // Index des vorherigen Punkts USHORT nNextPnt; // Index des naechsten Punkts - FASTBOOL bPrevIsBegPnt; // Vorheriger Punkt ist Anfangspunkt einer Polyline - FASTBOOL bNextIsEndPnt; // Folgepunkt ist Endpunkt einer Polyline + bool bPrevIsBegPnt; // Vorheriger Punkt ist Anfangspunkt einer Polyline + bool bNextIsEndPnt; // Folgepunkt ist Endpunkt einer Polyline USHORT nPrevPrevPnt; // Index des vorvorherigen Punkts USHORT nNextNextPnt; // Index des uebernaechsten Punkts - FASTBOOL bControl; // Punkt ist ein Kontrollpunkt - FASTBOOL bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt - FASTBOOL bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt - FASTBOOL bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt - FASTBOOL bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt + bool bControl; // Punkt ist ein Kontrollpunkt + bool bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt + bool bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt + bool bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt + bool bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt USHORT nPrevPrevPnt0; USHORT nPrevPnt0; USHORT nPnt0; USHORT nNextPnt0; USHORT nNextNextPnt0; - FASTBOOL bEliminate; // Punkt loeschen? (wird von MovDrag gesetzt) + bool bEliminate; // Punkt loeschen? (wird von MovDrag gesetzt) // ## BOOL mbMultiPointDrag; @@ -249,15 +250,15 @@ struct ImpPathCreateUser : public SdrDragStatUserData long nCircRadius; long nCircStWink; long nCircRelWink; - FASTBOOL bBezier; - FASTBOOL bBezHasCtrl0; - FASTBOOL bCurve; - FASTBOOL bCircle; - FASTBOOL bAngleSnap; - FASTBOOL bLine; - FASTBOOL bLine90; - FASTBOOL bRect; - FASTBOOL bMixedCreate; + bool bBezier; + bool bBezHasCtrl0; + bool bCurve; + bool bCircle; + bool bAngleSnap; + bool bLine; + bool bLine90; + bool bRect; + bool bMixedCreate; USHORT nBezierStartPoint; SdrObjKind eStartKind; SdrObjKind eAktKind; @@ -268,18 +269,18 @@ public: bMixedCreate(FALSE),nBezierStartPoint(0),eStartKind(OBJ_NONE),eAktKind(OBJ_NONE) { } void ResetFormFlags() { bBezier=FALSE; bCurve=FALSE; bCircle=FALSE; bLine=FALSE; bRect=FALSE; } - FASTBOOL IsFormFlag() const { return bBezier || bCurve || bCircle || bLine || bRect; } + bool IsFormFlag() const { return bBezier || bCurve || bCircle || bLine || bRect; } XPolygon GetFormPoly() const; - FASTBOOL CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, FASTBOOL bMouseDown); + bool CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, bool bMouseDown); XPolygon GetBezierPoly() const; - //FASTBOOL CalcCurve(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) { return FALSE; } + //bool CalcCurve(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) { return FALSE; } XPolygon GetCurvePoly() const { return XPolygon(); } - FASTBOOL CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); + bool CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); XPolygon GetCirclePoly() const; - FASTBOOL CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); + bool CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); Point CalcLine(const Point& rCsr, long nDirX, long nDirY, SdrView* pView) const; XPolygon GetLinePoly() const; - FASTBOOL CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); + bool CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView); XPolygon GetRectPoly() const; }; @@ -293,9 +294,9 @@ XPolygon ImpPathCreateUser::GetFormPoly() const return XPolygon(); } -FASTBOOL ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, FASTBOOL bMouseDown) +bool ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Point& rDir, bool bMouseDown) { - FASTBOOL bRet=TRUE; + bool bRet = true; aBezStart=rP1; aBezCtrl1=rP1+rDir; aBezCtrl2=rP2; @@ -318,7 +319,7 @@ XPolygon ImpPathCreateUser::GetBezierPoly() const return aXP; } -FASTBOOL ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) +bool ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) { long nTangAngle=GetAngle(rDir); aCircStart=rP1; @@ -329,7 +330,7 @@ FASTBOOL ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const long dAngle=GetAngle(Point(dx,dy))-nTangAngle; dAngle=NormAngle360(dAngle); long nTmpAngle=NormAngle360(9000-dAngle); - FASTBOOL bRet=nTmpAngle!=9000 && nTmpAngle!=27000; + bool bRet=nTmpAngle!=9000 && nTmpAngle!=27000; long nRad=0; if (bRet) { double cs=cos(nTmpAngle*nPi180); @@ -351,7 +352,7 @@ FASTBOOL ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const if (bAngleSnap) { long nSA=pView->GetSnapAngle(); if (nSA!=0) { // Winkelfang - FASTBOOL bNeg=nCircRelWink<0; + bool bNeg=nCircRelWink<0; if (bNeg) nCircRelWink=-nCircRelWink; nCircRelWink+=nSA/2; nCircRelWink/=nSA; @@ -395,8 +396,8 @@ Point ImpPathCreateUser::CalcLine(const Point& aCsr, long nDirX, long nDirY, Sdr { long x=aCsr.X(),x1=x,x2=x; long y=aCsr.Y(),y1=y,y2=y; - FASTBOOL bHLin=nDirY==0; - FASTBOOL bVLin=nDirX==0; + bool bHLin=nDirY==0; + bool bVLin=nDirX==0; if (bHLin) y=0; else if (bVLin) x=0; else { @@ -413,7 +414,7 @@ Point ImpPathCreateUser::CalcLine(const Point& aCsr, long nDirX, long nDirY, Sdr return Point(x,y); } -FASTBOOL ImpPathCreateUser::CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) +bool ImpPathCreateUser::CalcLine(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) { aLineStart=rP1; aLineEnd=rP2; @@ -443,7 +444,7 @@ XPolygon ImpPathCreateUser::GetLinePoly() const return aXP; } -FASTBOOL ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) +bool ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const Point& rDir, SdrView* pView) { aRectP1=rP1; aRectP2=rP1; @@ -454,8 +455,8 @@ FASTBOOL ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const P long nDirY=rDir.Y(); long x=aTmpPt.X(); long y=aTmpPt.Y(); - FASTBOOL bHLin=nDirY==0; - FASTBOOL bVLin=nDirX==0; + bool bHLin=nDirY==0; + bool bVLin=nDirX==0; if (bHLin) y=0; else if (bVLin) x=0; else { @@ -477,7 +478,7 @@ FASTBOOL ImpPathCreateUser::CalcRect(const Point& rP1, const Point& rP2, const P long dy1=aRectP2.Y()-aRectP1.Y(); long dy1a=Abs(dy1); long dx2=aRectP3.X()-aRectP2.X(); long dx2a=Abs(dx2); long dy2=aRectP3.Y()-aRectP2.Y(); long dy2a=Abs(dy2); - FASTBOOL b1MoreThan2=dx1a+dy1a>dx2a+dy2a; + bool b1MoreThan2=dx1a+dy1a>dx2a+dy2a; if (b1MoreThan2 != pView->IsBigOrtho()) { long xtemp=dy2a-dx1a; if (dx1<0) xtemp=-xtemp; long ytemp=dx2a-dy1a; if (dy1<0) ytemp=-ytemp; @@ -528,10 +529,10 @@ public: basegfx::B2DPolyPolygon getSpecialDragPoly(const SdrDragStat& rDrag) const; // create stuff - FASTBOOL BegCreate(SdrDragStat& rStat); - FASTBOOL MovCreate(SdrDragStat& rStat); - FASTBOOL EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); - FASTBOOL BckCreate(SdrDragStat& rStat); + bool BegCreate(SdrDragStat& rStat); + bool MovCreate(SdrDragStat& rStat); + bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd); + bool BckCreate(SdrDragStat& rStat); void BrkCreate(SdrDragStat& rStat); Pointer GetCreatePointer() const; @@ -669,30 +670,30 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const mpSdrPathDragData->ResetPoly(mrSdrPathObject); // Div. Daten lokal Kopieren fuer weniger Code und schnelleren Zugriff - FASTBOOL bClosed =mpSdrPathDragData->bClosed ; // geschlossenes Objekt? + bool bClosed =mpSdrPathDragData->bClosed ; // geschlossenes Objekt? USHORT nPnt =mpSdrPathDragData->nPnt ; // Punktnummer innerhalb des obigen Polygons - FASTBOOL bBegPnt =mpSdrPathDragData->bBegPnt ; // Gedraggter Punkt ist der Anfangspunkt einer Polyline - FASTBOOL bEndPnt =mpSdrPathDragData->bEndPnt ; // Gedraggter Punkt ist der Endpunkt einer Polyline + bool bBegPnt =mpSdrPathDragData->bBegPnt ; // Gedraggter Punkt ist der Anfangspunkt einer Polyline + bool bEndPnt =mpSdrPathDragData->bEndPnt ; // Gedraggter Punkt ist der Endpunkt einer Polyline USHORT nPrevPnt =mpSdrPathDragData->nPrevPnt ; // Index des vorherigen Punkts USHORT nNextPnt =mpSdrPathDragData->nNextPnt ; // Index des naechsten Punkts - FASTBOOL bPrevIsBegPnt =mpSdrPathDragData->bPrevIsBegPnt ; // Vorheriger Punkt ist Anfangspunkt einer Polyline - FASTBOOL bNextIsEndPnt =mpSdrPathDragData->bNextIsEndPnt ; // Folgepunkt ist Endpunkt einer Polyline + bool bPrevIsBegPnt =mpSdrPathDragData->bPrevIsBegPnt ; // Vorheriger Punkt ist Anfangspunkt einer Polyline + bool bNextIsEndPnt =mpSdrPathDragData->bNextIsEndPnt ; // Folgepunkt ist Endpunkt einer Polyline USHORT nPrevPrevPnt =mpSdrPathDragData->nPrevPrevPnt ; // Index des vorvorherigen Punkts USHORT nNextNextPnt =mpSdrPathDragData->nNextNextPnt ; // Index des uebernaechsten Punkts - FASTBOOL bControl =mpSdrPathDragData->bControl ; // Punkt ist ein Kontrollpunkt - //FASTBOOL bIsPrevControl=mpSdrPathDragData->bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt - FASTBOOL bIsNextControl=mpSdrPathDragData->bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt - FASTBOOL bPrevIsControl=mpSdrPathDragData->bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt - FASTBOOL bNextIsControl=mpSdrPathDragData->bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt + bool bControl =mpSdrPathDragData->bControl ; // Punkt ist ein Kontrollpunkt + //bool bIsPrevControl=mpSdrPathDragData->bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt + bool bIsNextControl =mpSdrPathDragData->bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt + bool bPrevIsControl =mpSdrPathDragData->bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt + bool bNextIsControl =mpSdrPathDragData->bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt // Ortho bei Linien/Polygonen = Winkel beibehalten if (!bControl && rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho()) { - FASTBOOL bBigOrtho=rDrag.GetView()->IsBigOrtho(); + bool bBigOrtho=rDrag.GetView()->IsBigOrtho(); Point aPos(rDrag.GetNow()); // die aktuelle Position Point aPnt(mpSdrPathDragData->aXP[nPnt]); // der gedraggte Punkt USHORT nPnt1=0xFFFF,nPnt2=0xFFFF; // seine Nachbarpunkte Point aNeuPos1,aNeuPos2; // die neuen Alternativen fuer aPos - FASTBOOL bPnt1=FALSE,bPnt2=FALSE; // die neuen Alternativen gueltig? + bool bPnt1 = false, bPnt2 = false; // die neuen Alternativen gueltig? if (!bClosed && mpSdrPathDragData->nPntAnz>=2) { // Mind. 2 Pt bei Linien if (!bBegPnt) nPnt1=nPrevPnt; if (!bEndPnt) nPnt2=nNextPnt; @@ -705,16 +706,16 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const Point aPnt1=mpSdrPathDragData->aXP[nPnt1]; long ndx0=aPnt.X()-aPnt1.X(); long ndy0=aPnt.Y()-aPnt1.Y(); - FASTBOOL bHLin=ndy0==0; - FASTBOOL bVLin=ndx0==0; + bool bHLin=ndy0==0; + bool bVLin=ndx0==0; if (!bHLin || !bVLin) { long ndx=aPos.X()-aPnt1.X(); long ndy=aPos.Y()-aPnt1.Y(); bPnt1=TRUE; double nXFact=0; if (!bVLin) nXFact=(double)ndx/(double)ndx0; double nYFact=0; if (!bHLin) nYFact=(double)ndy/(double)ndy0; - FASTBOOL bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); - FASTBOOL bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); + bool bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); + bool bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); if (bHor) ndy=long(ndy0*nXFact); if (bVer) ndx=long(ndx0*nYFact); aNeuPos1=aPnt1; @@ -726,16 +727,16 @@ bool ImpPathForDragAndCreate::movePathDrag( SdrDragStat& rDrag ) const Point aPnt2=mpSdrPathDragData->aXP[nPnt2]; long ndx0=aPnt.X()-aPnt2.X(); long ndy0=aPnt.Y()-aPnt2.Y(); - FASTBOOL bHLin=ndy0==0; - FASTBOOL bVLin=ndx0==0; + bool bHLin=ndy0==0; + bool bVLin=ndx0==0; if (!bHLin || !bVLin) { long ndx=aPos.X()-aPnt2.X(); long ndy=aPos.Y()-aPnt2.Y(); bPnt2=TRUE; double nXFact=0; if (!bVLin) nXFact=(double)ndx/(double)ndx0; double nYFact=0; if (!bHLin) nYFact=(double)ndy/(double)ndy0; - FASTBOOL bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); - FASTBOOL bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); + bool bHor=bHLin || (!bVLin && (nXFact>nYFact) ==bBigOrtho); + bool bVer=bVLin || (!bHLin && (nXFact<=nYFact)==bBigOrtho); if (bHor) ndy=long(ndy0*nXFact); if (bVer) ndx=long(ndx0*nYFact); aNeuPos2=aPnt2; @@ -912,8 +913,8 @@ bool ImpPathForDragAndCreate::endPathDrag(SdrDragStat& rDrag) { // #40549# Point aLinePt1_(aPathPolygon[0][0]); Point aLinePt2_(aPathPolygon[0][1]); - FASTBOOL bXMirr=(aLinePt1_.X()>aLinePt2_.X())!=(aLinePt1.X()>aLinePt2.X()); - FASTBOOL bYMirr=(aLinePt1_.Y()>aLinePt2_.Y())!=(aLinePt1.Y()>aLinePt2.Y()); + bool bXMirr=(aLinePt1_.X()>aLinePt2_.X())!=(aLinePt1.X()>aLinePt2.X()); + bool bYMirr=(aLinePt1_.Y()>aLinePt2_.Y())!=(aLinePt1.Y()>aLinePt2.Y()); if (bXMirr || bYMirr) { Point aRef1(mrSdrPathObject.GetSnapRect().Center()); if (bXMirr) { @@ -1188,22 +1189,22 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra return aRetval.getB2DPolyPolygon(); } // Div. Daten lokal Kopieren fuer weniger Code und schnelleren Zugriff - FASTBOOL bClosed =mpSdrPathDragData->bClosed ; // geschlossenes Objekt? + bool bClosed =mpSdrPathDragData->bClosed ; // geschlossenes Objekt? USHORT nPntAnz =mpSdrPathDragData->nPntAnz ; // Punktanzahl USHORT nPnt =mpSdrPathDragData->nPnt ; // Punktnummer innerhalb des Polygons - FASTBOOL bBegPnt =mpSdrPathDragData->bBegPnt ; // Gedraggter Punkt ist der Anfangspunkt einer Polyline - FASTBOOL bEndPnt =mpSdrPathDragData->bEndPnt ; // Gedraggter Punkt ist der Endpunkt einer Polyline + bool bBegPnt =mpSdrPathDragData->bBegPnt ; // Gedraggter Punkt ist der Anfangspunkt einer Polyline + bool bEndPnt =mpSdrPathDragData->bEndPnt ; // Gedraggter Punkt ist der Endpunkt einer Polyline USHORT nPrevPnt =mpSdrPathDragData->nPrevPnt ; // Index des vorherigen Punkts USHORT nNextPnt =mpSdrPathDragData->nNextPnt ; // Index des naechsten Punkts - FASTBOOL bPrevIsBegPnt =mpSdrPathDragData->bPrevIsBegPnt ; // Vorheriger Punkt ist Anfangspunkt einer Polyline - FASTBOOL bNextIsEndPnt =mpSdrPathDragData->bNextIsEndPnt ; // Folgepunkt ist Endpunkt einer Polyline + bool bPrevIsBegPnt =mpSdrPathDragData->bPrevIsBegPnt ; // Vorheriger Punkt ist Anfangspunkt einer Polyline + bool bNextIsEndPnt =mpSdrPathDragData->bNextIsEndPnt ; // Folgepunkt ist Endpunkt einer Polyline USHORT nPrevPrevPnt =mpSdrPathDragData->nPrevPrevPnt ; // Index des vorvorherigen Punkts USHORT nNextNextPnt =mpSdrPathDragData->nNextNextPnt ; // Index des uebernaechsten Punkts - FASTBOOL bControl =mpSdrPathDragData->bControl ; // Punkt ist ein Kontrollpunkt - //FASTBOOL bIsPrevControl=mpSdrPathDragData->bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt - FASTBOOL bIsNextControl=mpSdrPathDragData->bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt - FASTBOOL bPrevIsControl=mpSdrPathDragData->bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt - FASTBOOL bNextIsControl=mpSdrPathDragData->bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt + bool bControl =mpSdrPathDragData->bControl ; // Punkt ist ein Kontrollpunkt + //bool bIsPrevControl=mpSdrPathDragData->bIsPrevControl; // Punkt ist Kontrollpunkt vor einem Stuetzpunkt + bool bIsNextControl =mpSdrPathDragData->bIsNextControl; // Punkt ist Kontrollpunkt hinter einem Stuetzpunkt + bool bPrevIsControl =mpSdrPathDragData->bPrevIsControl; // Falls nPnt ein StPnt: Davor ist ein Kontrollpunkt + bool bNextIsControl =mpSdrPathDragData->bNextIsControl; // Falls nPnt ein StPnt: Dahinter ist ein Kontrollpunkt XPolygon aXPoly(mpSdrPathDragData->aXP); XPolygon aLine1(2); XPolygon aLine2(2); @@ -1281,18 +1282,18 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::getSpecialDragPoly(const SdrDra return aRetval.getB2DPolyPolygon(); } -FASTBOOL ImpPathForDragAndCreate::BegCreate(SdrDragStat& rStat) +bool ImpPathForDragAndCreate::BegCreate(SdrDragStat& rStat) { bool bFreeHand(IsFreeHand(meObjectKind)); rStat.SetNoSnap(bFreeHand); rStat.SetOrtho8Possible(); aPathPolygon.Clear(); mbCreating=TRUE; - FASTBOOL bMakeStartPoint=TRUE; + bool bMakeStartPoint = true; SdrView* pView=rStat.GetView(); if (pView!=NULL && pView->IsUseIncompatiblePathCreateInterface() && (meObjectKind==OBJ_POLY || meObjectKind==OBJ_PLIN || meObjectKind==OBJ_PATHLINE || meObjectKind==OBJ_PATHFILL)) { - bMakeStartPoint=FALSE; + bMakeStartPoint = false; } aPathPolygon.Insert(XPolygon()); aPathPolygon[0][0]=rStat.GetStart(); @@ -1303,10 +1304,10 @@ FASTBOOL ImpPathForDragAndCreate::BegCreate(SdrDragStat& rStat) pU->eStartKind=meObjectKind; pU->eAktKind=meObjectKind; rStat.SetUser(pU); - return TRUE; + return true; } -FASTBOOL ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) +bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) { ImpPathCreateUser* pU=(ImpPathCreateUser*)rStat.GetUser(); SdrView* pView=rStat.GetView(); @@ -1343,7 +1344,7 @@ FASTBOOL ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) if (nActPoint==0) { rXPoly[0]=rStat.GetPos0(); } else nActPoint--; - FASTBOOL bFreeHand=IsFreeHand(pU->eAktKind); + bool bFreeHand=IsFreeHand(pU->eAktKind); rStat.SetNoSnap(bFreeHand /*|| (pU->bMixed && pU->eAktKind==OBJ_LINE)*/); rStat.SetOrtho8Possible(pU->eAktKind!=OBJ_CARC && pU->eAktKind!=OBJ_RECT && (!pU->bMixedCreate || pU->eAktKind!=OBJ_LINE)); Point aActMerk(rXPoly[nActPoint]); @@ -1410,24 +1411,24 @@ FASTBOOL ImpPathForDragAndCreate::MovCreate(SdrDragStat& rStat) pU->CalcRect(rXPoly[nActPoint-1],rXPoly[nActPoint],rXPoly[nActPoint-1]-rXPoly[nActPoint-2],pView); } - return TRUE; + return true; } -FASTBOOL ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { ImpPathCreateUser* pU=(ImpPathCreateUser*)rStat.GetUser(); - FASTBOOL bRet=FALSE; + bool bRet = false; SdrView* pView=rStat.GetView(); - FASTBOOL bIncomp=pView!=NULL && pView->IsUseIncompatiblePathCreateInterface(); + bool bIncomp=pView!=NULL && pView->IsUseIncompatiblePathCreateInterface(); XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1]; USHORT nActPoint=rXPoly.GetPointCount()-1; Point aAktMerk(rXPoly[nActPoint]); rXPoly[nActPoint]=rStat.Now(); if (!pU->bMixedCreate && pU->eStartKind==OBJ_LINE) { if (rStat.GetPointAnz()>=2) eCmd=SDRCREATE_FORCEEND; - bRet=eCmd==SDRCREATE_FORCEEND; + bRet = eCmd==SDRCREATE_FORCEEND; if (bRet) { - mbCreating=FALSE; + mbCreating = FALSE; delete pU; rStat.SetUser(NULL); } @@ -1529,7 +1530,7 @@ FASTBOOL ImpPathForDragAndCreate::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCm return bRet; } -FASTBOOL ImpPathForDragAndCreate::BckCreate(SdrDragStat& rStat) +bool ImpPathForDragAndCreate::BckCreate(SdrDragStat& rStat) { ImpPathCreateUser* pU=(ImpPathCreateUser*)rStat.GetUser(); if (aPathPolygon.Count()>0) { @@ -1867,8 +1868,8 @@ void SdrPathObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { rInfo.bNoContortion=FALSE; - FASTBOOL bCanConv = !HasText() || ImpCanConvTextToCurve(); - FASTBOOL bIsPath = IsBezier() || IsSpline(); + bool bCanConv = !HasText() || ImpCanConvTextToCurve(); + bool bIsPath = IsBezier() || IsSpline(); rInfo.bEdgeRadiusAllowed = FALSE; rInfo.bCanConvToPath = bCanConv && !bIsPath; @@ -2061,7 +2062,7 @@ void SdrPathObj::AddToHdlList(SdrHdlList& rHdlList) const // keep old stuff to be able to keep old SdrHdl stuff, too const XPolyPolygon aOldPathPolygon(GetPathPoly()); USHORT nPolyCnt=aOldPathPolygon.Count(); - FASTBOOL bClosed=IsClosed(); + bool bClosed=IsClosed(); USHORT nIdx=0; for (USHORT i=0; i<nPolyCnt; i++) { @@ -2241,20 +2242,20 @@ basegfx::B2DPolyPolygon SdrPathObj::getSpecialDragPoly(const SdrDragStat& rDrag) //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrPathObj::BegCreate(SdrDragStat& rStat) +bool SdrPathObj::BegCreate(SdrDragStat& rStat) { impDeleteDAC(); return impGetDAC().BegCreate(rStat); } -FASTBOOL SdrPathObj::MovCreate(SdrDragStat& rStat) +bool SdrPathObj::MovCreate(SdrDragStat& rStat) { return impGetDAC().MovCreate(rStat); } -FASTBOOL SdrPathObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrPathObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { - FASTBOOL bRetval(impGetDAC().EndCreate(rStat, eCmd)); + bool bRetval(impGetDAC().EndCreate(rStat, eCmd)); if(bRetval && mpDAC) { @@ -2299,7 +2300,7 @@ FASTBOOL SdrPathObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) return bRetval; } -FASTBOOL SdrPathObj::BckCreate(SdrDragStat& rStat) +bool SdrPathObj::BckCreate(SdrDragStat& rStat) { return impGetDAC().BckCreate(rStat); } @@ -2382,7 +2383,7 @@ void SdrPathObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs) SdrTextObj::NbcRotate(rRef,nWink,sn,cs); } -void SdrPathObj::NbcShear(const Point& rRefPnt, long nAngle, double fTan, FASTBOOL bVShear) +void SdrPathObj::NbcShear(const Point& rRefPnt, long nAngle, double fTan, bool bVShear) { basegfx::B2DHomMatrix aTrans(basegfx::tools::createTranslateB2DHomMatrix(-rRefPnt.X(), -rRefPnt.Y())); @@ -3116,3 +3117,5 @@ void SdrPathObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index e6af868dde..df1aebd96e 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -136,9 +137,9 @@ void SdrRectObj::SetXPolyDirty() } } -FASTBOOL SdrRectObj::PaintNeedsXPoly(long nEckRad) const +bool SdrRectObj::PaintNeedsXPoly(long nEckRad) const { - FASTBOOL bNeed=aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || nEckRad!=0; + bool bNeed=aGeo.nDrehWink!=0 || aGeo.nShearWink!=0 || nEckRad!=0; return bNeed; } @@ -183,7 +184,7 @@ const XPolygon& SdrRectObj::GetXPoly() const void SdrRectObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { - FASTBOOL bNoTextFrame=!IsTextFrame(); + bool bNoTextFrame=!IsTextFrame(); rInfo.bResizeFreeAllowed=bNoTextFrame || aGeo.nDrehWink%9000==0; rInfo.bResizePropAllowed=TRUE; rInfo.bRotateFreeAllowed=TRUE; @@ -202,7 +203,7 @@ void SdrRectObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bShearAllowed =bNoTextFrame; rInfo.bEdgeRadiusAllowed=TRUE; - FASTBOOL bCanConv=!HasText() || ImpCanConvTextToCurve(); + bool bCanConv=!HasText() || ImpCanConvTextToCurve(); if (bCanConv && !bNoTextFrame && !HasText()) { bCanConv=HasFill() || HasLine(); } @@ -509,7 +510,7 @@ void SdrRectObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs) SetXPolyDirty(); } -void SdrRectObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrRectObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SdrTextObj::NbcShear(rRef,nWink,tn,bVShear); SetXPolyDirty(); @@ -521,7 +522,7 @@ void SdrRectObj::NbcMirror(const Point& rRef1, const Point& rRef2) SetXPolyDirty(); } -FASTBOOL SdrRectObj::DoMacro(const SdrObjMacroHitRec& rRec) +bool SdrRectObj::DoMacro(const SdrObjMacroHitRec& rRec) { return SdrTextObj::DoMacro(rRec); } @@ -618,3 +619,5 @@ void SdrRectObj::RestGeoData(const SdrObjGeoData& rGeo) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index c42180bced..ebb0c61f81 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -137,6 +138,7 @@ SdrTextObj::SdrTextObj() // #i25616# mbSupportTextIndentingOnLineWidthChange = sal_True; + mbInDownScale = sal_False; } SdrTextObj::SdrTextObj(const Rectangle& rNewRect) @@ -162,6 +164,7 @@ SdrTextObj::SdrTextObj(const Rectangle& rNewRect) // #111096# mbTextAnimationAllowed = sal_True; + mbInDownScale = sal_False; // #108784# maTextEditOffset = Point(0, 0); @@ -192,6 +195,7 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind) // #111096# mbTextAnimationAllowed = sal_True; + mbInDownScale = sal_False; // #108784# maTextEditOffset = Point(0, 0); @@ -224,6 +228,7 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect) // #111096# mbTextAnimationAllowed = sal_True; + mbInDownScale = sal_False; // #108784# maTextEditOffset = Point(0, 0); @@ -258,6 +263,7 @@ SdrTextObj::SdrTextObj(SdrObjKind eNewTextKind, const Rectangle& rNewRect, SvStr // #111096# mbTextAnimationAllowed = sal_True; + mbInDownScale = sal_False; // #108784# maTextEditOffset = Point(0, 0); @@ -385,7 +391,7 @@ const Size& SdrTextObj::GetTextSize() const return aTextSize; } -FASTBOOL SdrTextObj::IsAutoGrowHeight() const +bool SdrTextObj::IsAutoGrowHeight() const { if(!bTextFrame) return FALSE; // AutoGrow nur bei TextFrames @@ -410,7 +416,7 @@ FASTBOOL SdrTextObj::IsAutoGrowHeight() const return bRet; } -FASTBOOL SdrTextObj::IsAutoGrowWidth() const +bool SdrTextObj::IsAutoGrowWidth() const { if(!bTextFrame) return FALSE; // AutoGrow nur bei TextFrames @@ -523,7 +529,7 @@ void SdrTextObj::ImpCheckShear() void SdrTextObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { - FASTBOOL bNoTextFrame=!IsTextFrame(); + bool bNoTextFrame=!IsTextFrame(); rInfo.bResizeFreeAllowed=bNoTextFrame || aGeo.nDrehWink%9000==0; rInfo.bResizePropAllowed=TRUE; rInfo.bRotateFreeAllowed=TRUE; @@ -540,7 +546,7 @@ void SdrTextObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bGradientAllowed = (eFillStyle == XFILL_GRADIENT); rInfo.bShearAllowed =bNoTextFrame; rInfo.bEdgeRadiusAllowed=TRUE; - FASTBOOL bCanConv=ImpCanConvTextToCurve(); + bool bCanConv=ImpCanConvTextToCurve(); rInfo.bCanConvToPath =bCanConv; rInfo.bCanConvToPoly =bCanConv; rInfo.bCanConvToPathLineToArea=bCanConv; @@ -577,16 +583,16 @@ bool SdrTextObj::HasTextImpl( SdrOutliner* pOutliner ) return bRet; } -FASTBOOL SdrTextObj::HasEditText() const +bool SdrTextObj::HasEditText() const { return HasTextImpl( pEdtOutl ); } void SdrTextObj::SetPage(SdrPage* pNewPage) { - FASTBOOL bRemove=pNewPage==NULL && pPage!=NULL; - FASTBOOL bInsert=pNewPage!=NULL && pPage==NULL; - FASTBOOL bLinked=IsLinkedText(); + bool bRemove=pNewPage==NULL && pPage!=NULL; + bool bInsert=pNewPage!=NULL && pPage==NULL; + bool bLinked=IsLinkedText(); if (bLinked && bRemove) { ImpLinkAbmeldung(); @@ -632,23 +638,23 @@ void SdrTextObj::SetModel(SdrModel* pNewModel) } } -FASTBOOL SdrTextObj::NbcSetEckenradius(long nRad) +bool SdrTextObj::NbcSetEckenradius(long nRad) { SetObjectItem(SdrEckenradiusItem(nRad)); - return TRUE; + return true; } -FASTBOOL SdrTextObj::NbcSetAutoGrowHeight(bool bAuto) +bool SdrTextObj::NbcSetAutoGrowHeight(bool bAuto) { if(bTextFrame) { SetObjectItem(SdrTextAutoGrowHeightItem(bAuto)); - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetMinTextFrameHeight(long nHgt) +bool SdrTextObj::NbcSetMinTextFrameHeight(long nHgt) { if( bTextFrame && ( !pModel || !pModel->isLocked() ) ) // SJ: #i44922# { @@ -662,32 +668,32 @@ FASTBOOL SdrTextObj::NbcSetMinTextFrameHeight(long nHgt) SetObjectItem(SdrTextAutoGrowHeightItem(FALSE)); } - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetMaxTextFrameHeight(long nHgt) +bool SdrTextObj::NbcSetMaxTextFrameHeight(long nHgt) { if(bTextFrame) { SetObjectItem(SdrTextMaxFrameHeightItem(nHgt)); - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetAutoGrowWidth(bool bAuto) +bool SdrTextObj::NbcSetAutoGrowWidth(bool bAuto) { if(bTextFrame) { SetObjectItem(SdrTextAutoGrowWidthItem(bAuto)); - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetMinTextFrameWidth(long nWdt) +bool SdrTextObj::NbcSetMinTextFrameWidth(long nWdt) { if( bTextFrame && ( !pModel || !pModel->isLocked() ) ) // SJ: #i44922# { @@ -701,29 +707,29 @@ FASTBOOL SdrTextObj::NbcSetMinTextFrameWidth(long nWdt) SetObjectItem(SdrTextAutoGrowWidthItem(FALSE)); } - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetMaxTextFrameWidth(long nWdt) +bool SdrTextObj::NbcSetMaxTextFrameWidth(long nWdt) { if(bTextFrame) { SetObjectItem(SdrTextMaxFrameWidthItem(nWdt)); - return TRUE; + return true; } - return FALSE; + return false; } -FASTBOOL SdrTextObj::NbcSetFitToSize(SdrFitToSizeType eFit) +bool SdrTextObj::NbcSetFitToSize(SdrFitToSizeType eFit) { if(bTextFrame) { SetObjectItem(SdrTextFitToSizeTypeItem(eFit)); - return TRUE; + return true; } - return FALSE; + return false; } void SdrTextObj::ImpSetContourPolygon( SdrOutliner& rOutliner, Rectangle& rAnchorRect, BOOL bLineWidth ) const @@ -795,7 +801,7 @@ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const long nUpperDist=GetTextUpperDistance(); long nLowerDist=GetTextLowerDistance(); Rectangle aAnkRect(aRect); // Rect innerhalb dem geankert wird - FASTBOOL bFrame=IsTextFrame(); + bool bFrame=IsTextFrame(); if (!bFrame) { TakeUnrotatedSnapRect(aAnkRect); } @@ -824,7 +830,7 @@ void SdrTextObj::TakeTextAnchorRect(Rectangle& rAnchorRect) const rAnchorRect=aAnkRect; } -void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, +void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, BOOL bLineWidth ) const { Rectangle aAnkRect; // Rect innerhalb dem geankert wird @@ -834,11 +840,10 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FAS SdrTextAniKind eAniKind=GetTextAniKind(); SdrTextAniDirection eAniDirection=GetTextAniDirection(); - SdrFitToSizeType eFit=GetFitToSize(); - FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); - FASTBOOL bContourFrame=IsContourTextFrame(); + bool bFitToSize(IsFitToSize()); + bool bContourFrame=IsContourTextFrame(); - FASTBOOL bFrame=IsTextFrame(); + bool bFrame=IsTextFrame(); ULONG nStat0=rOutliner.GetControlWord(); Size aNullSize; if (!bContourFrame) @@ -996,7 +1001,7 @@ OutlinerParaObject* SdrTextObj::GetEditOutlinerParaObject() const return pPara; } -void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& rTextRect, const Rectangle& rAnchorRect, Fraction& rFitXKorreg) const +void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextSize, const Size& rShapeSize, Fraction& rFitXKorreg) const { OutputDevice* pOut = rOutliner.GetRefDevice(); BOOL bNoStretching(FALSE); @@ -1039,14 +1044,14 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& r #endif } unsigned nLoopCount=0; - FASTBOOL bNoMoreLoop=FALSE; + bool bNoMoreLoop = false; long nXDiff0=0x7FFFFFFF; - long nWantWdt=rAnchorRect.Right()-rAnchorRect.Left(); - long nIsWdt=rTextRect.Right()-rTextRect.Left(); + long nWantWdt=rShapeSize.Width(); + long nIsWdt=rTextSize.Width(); if (nIsWdt==0) nIsWdt=1; - long nWantHgt=rAnchorRect.Bottom()-rAnchorRect.Top(); - long nIsHgt=rTextRect.Bottom()-rTextRect.Top(); + long nWantHgt=rShapeSize.Height(); + long nIsHgt=rTextSize.Height(); if (nIsHgt==0) nIsHgt=1; long nXTolPl=nWantWdt/100; // Toleranz +1% @@ -1055,34 +1060,33 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& r long nX=(nWantWdt*100) /nIsWdt; // X-Stretching berechnen long nY=(nWantHgt*100) /nIsHgt; // Y-Stretching berechnen - FASTBOOL bChkX=TRUE; - FASTBOOL bChkY=TRUE; + bool bChkX = true; if (bNoStretching) { // #35762# evtl. nur proportional moeglich if (nX>nY) { nX=nY; bChkX=FALSE; } - else { nY=nX; bChkY=FALSE; } + else { nY=nX; } } while (nLoopCount<5 && !bNoMoreLoop) { if (nX<0) nX=-nX; - if (nX<1) { nX=1; bNoMoreLoop=TRUE; } - if (nX>65535) { nX=65535; bNoMoreLoop=TRUE; } + if (nX<1) { nX=1; bNoMoreLoop = true; } + if (nX>65535) { nX=65535; bNoMoreLoop = true; } if (nY<0) nY=-nY; - if (nY<1) { nY=1; bNoMoreLoop=TRUE; } - if (nY>65535) { nY=65535; bNoMoreLoop=TRUE; } + if (nY<1) { nY=1; bNoMoreLoop = true; } + if (nY>65535) { nY=65535; bNoMoreLoop = true; } // exception, there is no text yet (horizontal case) if(nIsWdt <= 1) { nX = nY; - bNoMoreLoop = TRUE; + bNoMoreLoop = true; } // #87877# exception, there is no text yet (vertical case) if(nIsHgt <= 1) { nY = nX; - bNoMoreLoop = TRUE; + bNoMoreLoop = true; } rOutliner.SetGlobalCharStretching((USHORT)nX,(USHORT)nY); @@ -1091,7 +1095,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Rectangle& r long nXDiff=aSiz.Width()-nWantWdt; rFitXKorreg=Fraction(nWantWdt,aSiz.Width()); if (((nXDiff>=nXTolMi || !bChkX) && nXDiff<=nXTolPl) || nXDiff==nXDiff0/*&& Abs(nYDiff)<=nYTol*/) { - bNoMoreLoop=TRUE; + bNoMoreLoop = true; } else { // Stretchingfaktoren korregieren long nMul=nWantWdt; @@ -1274,8 +1278,7 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const Rectangle aR; TakeTextRect(rOutliner,aR,FALSE,&aAnchor2); rOutliner.Clear(); - SdrFitToSizeType eFit=GetFitToSize(); - FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); + bool bFitToSize(IsFitToSize()); if (bFitToSize) aR=aAnchor2; Polygon aPol(aR); if (aGeo.nDrehWink!=0) RotatePoly(aPol,aR.TopLeft(),aGeo.nSin,aGeo.nCos); @@ -1382,7 +1385,7 @@ boost::shared_ptr< SdrOutliner > SdrTextObj::CreateDrawOutliner() } // #101029#: Extracted from Paint() -void SdrTextObj::ImpSetupDrawOutlinerForPaint( FASTBOOL bContourFrame, +void SdrTextObj::ImpSetupDrawOutlinerForPaint( bool bContourFrame, SdrOutliner& rOutliner, Rectangle& rTextRect, Rectangle& rAnchorRect, @@ -1392,8 +1395,7 @@ void SdrTextObj::ImpSetupDrawOutlinerForPaint( FASTBOOL bContourFrame, if (!bContourFrame) { // FitToSize erstmal nicht mit ContourFrame - SdrFitToSizeType eFit=GetFitToSize(); - if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES) + if (IsFitToSize() || IsAutoFit()) { ULONG nStat=rOutliner.GetControlWord(); nStat|=EE_CNTRL_STRETCHING|EE_CNTRL_AUTOPAGESIZE; @@ -1407,15 +1409,75 @@ void SdrTextObj::ImpSetupDrawOutlinerForPaint( FASTBOOL bContourFrame, if (!bContourFrame) { // FitToSize erstmal nicht mit ContourFrame - SdrFitToSizeType eFit=GetFitToSize(); - if (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES) + if (IsFitToSize()) { - ImpSetCharStretching(rOutliner,rTextRect,rAnchorRect,rFitXKorreg); + ImpSetCharStretching(rOutliner,rTextRect.GetSize(),rAnchorRect.GetSize(),rFitXKorreg); rPaintRect=rAnchorRect; } + else if (IsAutoFit()) + { + ImpAutoFitText(rOutliner); + } } } +void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner ) const +{ + const Size aShapeSize=GetSnapRect().GetSize(); + ImpAutoFitText( rOutliner, + Size(aShapeSize.Width()-GetTextLeftDistance()-GetTextRightDistance(), + aShapeSize.Height()-GetTextUpperDistance()-GetTextLowerDistance()), + IsVerticalWriting() ); +} + +void SdrTextObj::ImpAutoFitText( SdrOutliner& rOutliner, const Size& rTextSize, bool bIsVerticalWriting ) +{ + // EditEngine formatting is unstable enough for + // line-breaking text that we need some more samples + + // loop early-exits if we detect an already attained value + USHORT nMinStretchX=0, nMinStretchY=0; + USHORT aOldStretchXVals[]={0,0,0,0,0,0,0,0,0,0}; + const size_t aStretchArySize=sizeof(aOldStretchXVals)/sizeof(*aOldStretchXVals); + for(unsigned int i=0; i<aStretchArySize; ++i) + { + const Size aCurrTextSize = rOutliner.CalcTextSize(); + double fFactor(1.0); + if( bIsVerticalWriting ) + fFactor = double(rTextSize.Width())/aCurrTextSize.Width(); + else + fFactor = double(rTextSize.Height())/aCurrTextSize.Height(); + + USHORT nCurrStretchX, nCurrStretchY; + rOutliner.GetGlobalCharStretching(nCurrStretchX, nCurrStretchY); + + if (fFactor >= 1.0 ) + { + // resulting text area fits into available shape rect - + // err on the larger streching, to optimally fill area + nMinStretchX = std::max(nMinStretchX,nCurrStretchX); + nMinStretchY = std::max(nMinStretchY,nCurrStretchY); + } + + aOldStretchXVals[i] = nCurrStretchX; + if( std::find(aOldStretchXVals, aOldStretchXVals+i, nCurrStretchX) != aOldStretchXVals+i ) + break; // same value already attained once; algo is looping, exit + + if (fFactor < 1.0 || (fFactor >= 1.0 && nCurrStretchX != 100)) + { + nCurrStretchX = sal::static_int_cast<USHORT>(nCurrStretchX*fFactor); + nCurrStretchY = sal::static_int_cast<USHORT>(nCurrStretchY*fFactor); + rOutliner.SetGlobalCharStretching(std::min(USHORT(100),nCurrStretchX), + std::min(USHORT(100),nCurrStretchY)); + OSL_TRACE("SdrTextObj::onEditOutlinerStatusEvent(): zoom is %d", nCurrStretchX); + } + } + + OSL_TRACE("---- SdrTextObj::onEditOutlinerStatusEvent(): final zoom is %d ----", nMinStretchX); + rOutliner.SetGlobalCharStretching(std::min(USHORT(100),nMinStretchX), + std::min(USHORT(100),nMinStretchY)); +} + void SdrTextObj::SetupOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaintRect ) const { ImpInitDrawOutliner( rOutl ); @@ -1428,7 +1490,7 @@ void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaint Rectangle aAnchorRect; Fraction aFitXKorreg(1,1); - FASTBOOL bContourFrame=IsContourTextFrame(); + bool bContourFrame=IsContourTextFrame(); if( GetModel() ) { @@ -1866,21 +1928,21 @@ long SdrTextObj::GetMaxTextFrameWidth() const return ((SdrTextMaxFrameWidthItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_MAXFRAMEWIDTH))).GetValue(); } -FASTBOOL SdrTextObj::IsFontwork() const +bool SdrTextObj::IsFontwork() const { - return (bTextFrame) ? FALSE // Default ist FALSE + return (bTextFrame) ? false // Default ist FALSE : ((XFormTextStyleItem&)(GetObjectItemSet().Get(XATTR_FORMTXTSTYLE))).GetValue()!=XFT_NONE; } -FASTBOOL SdrTextObj::IsHideContour() const +bool SdrTextObj::IsHideContour() const { - return (bTextFrame) ? FALSE // Default ist: Nein, kein HideContour; HideContour nicht bei TextFrames + return (bTextFrame) ? false // Default ist: Nein, kein HideContour; HideContour nicht bei TextFrames : ((XFormTextHideFormItem&)(GetObjectItemSet().Get(XATTR_FORMTXTHIDEFORM))).GetValue(); } -FASTBOOL SdrTextObj::IsContourTextFrame() const +bool SdrTextObj::IsContourTextFrame() const { - return (bTextFrame) ? FALSE // ContourFrame nicht bei normalen TextFrames + return (bTextFrame) ? false // ContourFrame nicht bei normalen TextFrames : ((SdrTextContourFrameItem&)(GetObjectItemSet().Get(SDRATTR_TEXT_CONTOURFRAME))).GetValue(); } @@ -1992,6 +2054,17 @@ bool SdrTextObj::IsTextAnimationAllowed() const return mbTextAnimationAllowed; } +bool SdrTextObj::IsAutoFit() const +{ + return GetFitToSize()==SDRTEXTFIT_AUTOFIT; +} + +bool SdrTextObj::IsFitToSize() const +{ + const SdrFitToSizeType eFit=GetFitToSize(); + return (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); +} + void SdrTextObj::SetTextAnimationAllowed(sal_Bool bNew) { if(mbTextAnimationAllowed != bNew) @@ -2009,13 +2082,21 @@ void SdrTextObj::onEditOutlinerStatusEvent( EditStatus* pEditStatus ) const bool bGrowY=(nStat & EE_STAT_TEXTHEIGHTCHANGED) !=0; if(bTextFrame && (bGrowX || bGrowY)) { - const bool bAutoGrowHgt= bTextFrame && IsAutoGrowHeight(); - const bool bAutoGrowWdt= bTextFrame && IsAutoGrowWidth(); - - if ((bGrowX && bAutoGrowWdt) || (bGrowY && bAutoGrowHgt)) + if ((bGrowX && IsAutoGrowWidth()) || (bGrowY && IsAutoGrowHeight())) { AdjustTextFrameWidthAndHeight(); } + else if (IsAutoFit() && !mbInDownScale) + { + OSL_ASSERT(pEdtOutl); + mbInDownScale = sal_True; + + // sucks that we cannot disable paints via + // pEdtOutl->SetUpdateMode(FALSE) - but EditEngine skips + // formatting as well, then. + ImpAutoFitText(*pEdtOutl); + mbInDownScale = sal_False; + } } } @@ -2130,3 +2211,4 @@ void SdrTextObj::SetObjectItemNoBroadcast(const SfxPoolItem& rItem) // ///////////////////////////////////////////////////////////////////////////////////////////////// +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 8f2e21e9cf..621e2591e8 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -370,7 +371,9 @@ namespace aDXArray, aFontAttribute, rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale(), - aBFontColor); + aBFontColor, + rInfo.mbFilled, + rInfo.mnWidthToFill); } if(rInfo.mbEndOfBullet) @@ -727,6 +730,140 @@ void SdrTextObj::impDecomposeContourTextPrimitive( rTarget = aConverter.getPrimitive2DSequence(); } +void SdrTextObj::impDecomposeAutoFitTextPrimitive( + drawinglayer::primitive2d::Primitive2DSequence& rTarget, + const drawinglayer::primitive2d::SdrAutoFitTextPrimitive2D& rSdrAutofitTextPrimitive, + const drawinglayer::geometry::ViewInformation2D& aViewInformation) const +{ + // decompose matrix to have position and size of text + basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + rSdrAutofitTextPrimitive.getTextRangeTransform().decompose(aScale, aTranslate, fRotate, fShearX); + + // use B2DRange aAnchorTextRange for calculations + basegfx::B2DRange aAnchorTextRange(aTranslate); + aAnchorTextRange.expand(aTranslate + aScale); + + // prepare outliner + const SfxItemSet& rTextItemSet = rSdrAutofitTextPrimitive.getSdrText()->GetItemSet(); + SdrOutliner& rOutliner = ImpGetDrawOutliner(); + SdrTextVertAdjust eVAdj = GetTextVerticalAdjust(rTextItemSet); + SdrTextHorzAdjust eHAdj = GetTextHorizontalAdjust(rTextItemSet); + const sal_uInt32 nOriginalControlWord(rOutliner.GetControlWord()); + const Size aNullSize; + + // set visualizing page at Outliner; needed e.g. for PageNumberField decomposition + rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage())); + + rOutliner.SetControlWord(nOriginalControlWord|EE_CNTRL_AUTOPAGESIZE|EE_CNTRL_STRETCHING); + rOutliner.SetMinAutoPaperSize(aNullSize); + rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000)); + + // add one to rage sizes to get back to the old Rectangle and outliner measurements + const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1L)); + const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1L)); + const OutlinerParaObject* pOutlinerParaObject = rSdrAutofitTextPrimitive.getSdrText()->GetOutlinerParaObject(); + OSL_ENSURE(pOutlinerParaObject, "impDecomposeBlockTextPrimitive used with no OutlinerParaObject (!)"); + const bool bVerticalWritintg(pOutlinerParaObject->IsVertical()); + const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight)); + + if((rSdrAutofitTextPrimitive.getWordWrap() || IsTextFrame())) + { + rOutliner.SetMaxAutoPaperSize(aAnchorTextSize); + } + + if(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg) + { + rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0)); + } + + if(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg) + { + rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight)); + } + + rOutliner.SetPaperSize(aNullSize); + rOutliner.SetUpdateMode(true); + rOutliner.SetText(*pOutlinerParaObject); + ImpAutoFitText(rOutliner,aAnchorTextSize,bVerticalWritintg); + + // set visualizing page at Outliner; needed e.g. for PageNumberField decomposition + rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage())); + + // now get back the layouted text size from outliner + const Size aOutlinerTextSiz(rOutliner.GetPaperSize()); + const basegfx::B2DVector aOutlinerScale(aOutlinerTextSiz.Width(), aOutlinerTextSiz.Height()); + basegfx::B2DVector aAdjustTranslate(0.0, 0.0); + + // correct horizontal translation using the now known text size + if(SDRTEXTHORZADJUST_CENTER == eHAdj || SDRTEXTHORZADJUST_RIGHT == eHAdj) + { + const double fFree(aAnchorTextRange.getWidth() - aOutlinerScale.getX()); + + if(SDRTEXTHORZADJUST_CENTER == eHAdj) + { + aAdjustTranslate.setX(fFree / 2.0); + } + + if(SDRTEXTHORZADJUST_RIGHT == eHAdj) + { + aAdjustTranslate.setX(fFree); + } + } + + // correct vertical translation using the now known text size + if(SDRTEXTVERTADJUST_CENTER == eVAdj || SDRTEXTVERTADJUST_BOTTOM == eVAdj) + { + const double fFree(aAnchorTextRange.getHeight() - aOutlinerScale.getY()); + + if(SDRTEXTVERTADJUST_CENTER == eVAdj) + { + aAdjustTranslate.setY(fFree / 2.0); + } + + if(SDRTEXTVERTADJUST_BOTTOM == eVAdj) + { + aAdjustTranslate.setY(fFree); + } + } + + // prepare matrices to apply to newly created primitives. aNewTransformA + // will get coordinates in aOutlinerScale size and positive in X, Y. + basegfx::B2DHomMatrix aNewTransformA; + basegfx::B2DHomMatrix aNewTransformB; + + // translate relative to given primitive to get same rotation and shear + // as the master shape we are working on. For vertical, use the top-right + // corner + const double fStartInX(bVerticalWritintg ? aAdjustTranslate.getX() + aOutlinerScale.getX() : aAdjustTranslate.getX()); + aNewTransformA.translate(fStartInX, aAdjustTranslate.getY()); + + // mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y, + // move the null point which was top left to bottom right. + const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0)); + const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0)); + aNewTransformB.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0); + + // in-between the translations of the single primitives will take place. Afterwards, + // the object's transformations need to be applied + aNewTransformB.shearX(fShearX); + aNewTransformB.rotate(fRotate); + aNewTransformB.translate(aTranslate.getX(), aTranslate.getY()); + + basegfx::B2DRange aClipRange; + + // now break up text primitives. + impTextBreakupHandler aConverter(rOutliner); + aConverter.decomposeBlockTextPrimitive(aNewTransformA, aNewTransformB, aClipRange); + + // cleanup outliner + rOutliner.Clear(); + rOutliner.setVisualizedPage(0); + rOutliner.SetControlWord(nOriginalControlWord); + + rTarget = aConverter.getPrimitive2DSequence(); +} + void SdrTextObj::impDecomposeBlockTextPrimitive( drawinglayer::primitive2d::Primitive2DSequence& rTarget, const drawinglayer::primitive2d::SdrBlockTextPrimitive2D& rSdrBlockTextPrimitive, @@ -1256,3 +1393,5 @@ void SdrTextObj::impGetScrollTextTiming(drawinglayer::animation::AnimationEntryL ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index de1e48c354..04b5a925b6 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -273,7 +274,7 @@ namespace { // prepare BreakIterator Reference < XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); - Reference < XInterface > xInterface = xMSF->createInstance(::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator")); + Reference < XInterface > xInterface = xMSF->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator"))); if(xInterface.is()) { @@ -592,7 +593,7 @@ namespace const drawinglayer::attribute::StrokeAttribute& rStrokeAttribute, std::vector< drawinglayer::primitive2d::BasePrimitive2D* >& rTarget) { - for(basegfx::B2DPolyPolygonVector::const_iterator aPolygon(rB2DPolyPolyVector.begin()); aPolygon != rB2DPolyPolyVector.end(); aPolygon++) + for(basegfx::B2DPolyPolygonVector::const_iterator aPolygon(rB2DPolyPolyVector.begin()); aPolygon != rB2DPolyPolyVector.end(); ++aPolygon) { // prepare PolyPolygons basegfx::B2DPolyPolygon aB2DPolyPolygon = *aPolygon; @@ -822,3 +823,5 @@ void SdrTextObj::impDecomposePathTextPrimitive( ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 5b5e94d8ec..e374e6aab2 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,19 +76,18 @@ // //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt, FASTBOOL bWdt) const +bool SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt, bool bWdt) const { if (bTextFrame && pModel!=NULL && !rR.IsEmpty()) { - SdrFitToSizeType eFit=GetFitToSize(); - FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); - FASTBOOL bWdtGrow=bWdt && IsAutoGrowWidth(); - FASTBOOL bHgtGrow=bHgt && IsAutoGrowHeight(); + bool bFitToSize(IsFitToSize()); + bool bWdtGrow=bWdt && IsAutoGrowWidth(); + bool bHgtGrow=bHgt && IsAutoGrowHeight(); SdrTextAniKind eAniKind=GetTextAniKind(); SdrTextAniDirection eAniDir=GetTextAniDirection(); - FASTBOOL bScroll=eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE; - FASTBOOL bHScroll=bScroll && (eAniDir==SDRTEXTANI_LEFT || eAniDir==SDRTEXTANI_RIGHT); - FASTBOOL bVScroll=bScroll && (eAniDir==SDRTEXTANI_UP || eAniDir==SDRTEXTANI_DOWN); + bool bScroll=eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE; + bool bHScroll=bScroll && (eAniDir==SDRTEXTANI_LEFT || eAniDir==SDRTEXTANI_RIGHT); + bool bVScroll=bScroll && (eAniDir==SDRTEXTANI_UP || eAniDir==SDRTEXTANI_DOWN); if (!bFitToSize && (bWdtGrow || bHgtGrow)) { Rectangle aR0(rR); @@ -210,9 +210,9 @@ FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt, return FALSE; } -FASTBOOL SdrTextObj::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt) +bool SdrTextObj::NbcAdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { - FASTBOOL bRet=AdjustTextFrameWidthAndHeight(aRect,bHgt,bWdt); + bool bRet=AdjustTextFrameWidthAndHeight(aRect,bHgt,bWdt); if (bRet) { SetRectsDirty(); if (HAS_BASE(SdrRectObj,this)) { // mal wieder 'nen Hack @@ -225,10 +225,10 @@ FASTBOOL SdrTextObj::NbcAdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bW return bRet; } -FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt) +bool SdrTextObj::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { Rectangle aNeuRect(aRect); - FASTBOOL bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt,bWdt); + bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt,bWdt); if (bRet) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); // #110094#-14 SendRepaintBroadcast(); @@ -460,3 +460,5 @@ bool SdrTextObj::HasText() const return bHasText; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdotxdr.cxx b/svx/source/svdraw/svdotxdr.cxx index dd08c4e080..4401bbf5b5 100644 --- a/svx/source/svdraw/svdotxdr.cxx +++ b/svx/source/svdraw/svdotxdr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,19 +98,19 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const Rectangle aTmpRect(aRect); const SdrHdl* pHdl=rDrag.GetHdl(); SdrHdlKind eHdl=pHdl==NULL ? HDL_MOVE : pHdl->GetKind(); - FASTBOOL bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT); - FASTBOOL bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); - FASTBOOL bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho(); + bool bEcke=(eHdl==HDL_UPLFT || eHdl==HDL_UPRGT || eHdl==HDL_LWLFT || eHdl==HDL_LWRGT); + bool bOrtho=rDrag.GetView()!=NULL && rDrag.GetView()->IsOrtho(); + bool bBigOrtho=bEcke && bOrtho && rDrag.GetView()->IsBigOrtho(); Point aPos(rDrag.GetNow()); // Unrotate: if (aGeo.nDrehWink!=0) RotatePoint(aPos,aTmpRect.TopLeft(),-aGeo.nSin,aGeo.nCos); // Unshear: if (aGeo.nShearWink!=0) ShearPoint(aPos,aTmpRect.TopLeft(),-aGeo.nTan); // - FASTBOOL bLft=(eHdl==HDL_UPLFT || eHdl==HDL_LEFT || eHdl==HDL_LWLFT); - FASTBOOL bRgt=(eHdl==HDL_UPRGT || eHdl==HDL_RIGHT || eHdl==HDL_LWRGT); - FASTBOOL bTop=(eHdl==HDL_UPRGT || eHdl==HDL_UPPER || eHdl==HDL_UPLFT); - FASTBOOL bBtm=(eHdl==HDL_LWRGT || eHdl==HDL_LOWER || eHdl==HDL_LWLFT); + bool bLft=(eHdl==HDL_UPLFT || eHdl==HDL_LEFT || eHdl==HDL_LWLFT); + bool bRgt=(eHdl==HDL_UPRGT || eHdl==HDL_RIGHT || eHdl==HDL_LWRGT); + bool bTop=(eHdl==HDL_UPRGT || eHdl==HDL_UPPER || eHdl==HDL_UPLFT); + bool bBtm=(eHdl==HDL_LWRGT || eHdl==HDL_LOWER || eHdl==HDL_LWLFT); if (bLft) aTmpRect.Left() =aPos.X(); if (bRgt) aTmpRect.Right() =aPos.X(); if (bTop) aTmpRect.Top() =aPos.Y(); @@ -121,8 +122,8 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const long nYMul=aTmpRect.Bottom()-aTmpRect.Top(); long nXDiv=nWdt0; long nYDiv=nHgt0; - FASTBOOL bXNeg=(nXMul<0)!=(nXDiv<0); - FASTBOOL bYNeg=(nYMul<0)!=(nYDiv<0); + bool bXNeg=(nXMul<0)!=(nXDiv<0); + bool bYNeg=(nYMul<0)!=(nYDiv<0); nXMul=Abs(nXMul); nYMul=Abs(nYMul); nXDiv=Abs(nXDiv); @@ -134,7 +135,7 @@ Rectangle SdrTextObj::ImpDragCalcRect(const SdrDragStat& rDrag) const nXDiv=aXFact.GetDenominator(); nYDiv=aYFact.GetDenominator(); if (bEcke) { // Eckpunkthandles - FASTBOOL bUseX=(aXFact<aYFact) != bBigOrtho; + bool bUseX=(aXFact<aYFact) != bBigOrtho; if (bUseX) { long nNeed=long(BigInt(nHgt0)*BigInt(nXMul)/BigInt(nXDiv)); if (bYNeg) nNeed=-nNeed; @@ -204,17 +205,17 @@ String SdrTextObj::getSpecialDragComment(const SdrDragStat& /*rDrag*/) const //////////////////////////////////////////////////////////////////////////////////////////////////// // Create -FASTBOOL SdrTextObj::BegCreate(SdrDragStat& rStat) +bool SdrTextObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); aRect = aRect1; - return TRUE; + return true; } -FASTBOOL SdrTextObj::MovCreate(SdrDragStat& rStat) +bool SdrTextObj::MovCreate(SdrDragStat& rStat) { Rectangle aRect1; rStat.TakeCreateRect(aRect1); @@ -226,10 +227,10 @@ FASTBOOL SdrTextObj::MovCreate(SdrDragStat& rStat) if (HAS_BASE(SdrRectObj,this)) { ((SdrRectObj*)this)->SetXPolyDirty(); } - return TRUE; + return true; } -FASTBOOL SdrTextObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrTextObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { rStat.TakeCreateRect(aRect); ImpJustifyRect(aRect); @@ -260,9 +261,9 @@ void SdrTextObj::BrkCreate(SdrDragStat& /*rStat*/) { } -FASTBOOL SdrTextObj::BckCreate(SdrDragStat& /*rStat*/) +bool SdrTextObj::BckCreate(SdrDragStat& /*rStat*/) { - return TRUE; + return true; } basegfx::B2DPolyPolygon SdrTextObj::TakeCreatePoly(const SdrDragStat& rDrag) const @@ -283,3 +284,4 @@ Pointer SdrTextObj::GetCreatePointer() const return Pointer(POINTER_CROSS); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index ffe6953f57..d44d631a82 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,11 +53,11 @@ // //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrTextObj::HasTextEdit() const +bool SdrTextObj::HasTextEdit() const { // lt. Anweisung von MB duerfen gelinkte Textobjekte nun doch // geaendert werden (kein automatisches Reload) - return TRUE; + return true; } sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) @@ -73,15 +74,17 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) rOutl.Init( nOutlinerMode ); rOutl.SetRefDevice( pModel->GetRefDevice() ); - SdrFitToSizeType eFit=GetFitToSize(); - FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); - FASTBOOL bContourFrame=IsContourTextFrame(); + bool bFitToSize(IsFitToSize()); + bool bContourFrame=IsContourTextFrame(); ImpSetTextEditParams(); if (!bContourFrame) { ULONG nStat=rOutl.GetControlWord(); nStat|=EE_CNTRL_AUTOPAGESIZE; - if (bFitToSize) nStat|=EE_CNTRL_STRETCHING; else nStat&=~EE_CNTRL_STRETCHING; + if (bFitToSize || IsAutoFit()) + nStat|=EE_CNTRL_STRETCHING; + else + nStat&=~EE_CNTRL_STRETCHING; rOutl.SetControlWord(nStat); } @@ -119,7 +122,11 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) TakeTextRect(rOutl, aTextRect, FALSE, &aAnchorRect/* #97097# give TRUE here, not FALSE */); Fraction aFitXKorreg(1,1); - ImpSetCharStretching(rOutl,aTextRect,aAnchorRect,aFitXKorreg); + ImpSetCharStretching(rOutl,aTextRect.GetSize(),aAnchorRect.GetSize(),aFitXKorreg); + } + else if (IsAutoFit()) + { + ImpAutoFitText(rOutl); } if(pOutlinerParaObject) @@ -146,8 +153,7 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, Rectangle* pViewInit, Rectangle* pViewMin) const { - SdrFitToSizeType eFit=GetFitToSize(); - FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); + bool bFitToSize(IsFitToSize()); Size aPaperMin,aPaperMax; Rectangle aViewInit; TakeTextAnchorRect(aViewInit); @@ -325,15 +331,15 @@ USHORT SdrTextObj::GetOutlinerViewAnchorMode() const void SdrTextObj::ImpSetTextEditParams() const { if (pEdtOutl!=NULL) { - FASTBOOL bUpdMerk=pEdtOutl->GetUpdateMode(); + bool bUpdMerk=pEdtOutl->GetUpdateMode(); if (bUpdMerk) pEdtOutl->SetUpdateMode(FALSE); Size aPaperMin; Size aPaperMax; Rectangle aEditArea; TakeTextEditArea(&aPaperMin,&aPaperMax,&aEditArea,NULL); //SdrFitToSizeType eFit=GetFitToSize(); - //FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); - FASTBOOL bContourFrame=IsContourTextFrame(); + //bool bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); + bool bContourFrame=IsContourTextFrame(); //EVAnchorMode eAM=(EVAnchorMode)GetOutlinerViewAnchorMode(); //ULONG nViewAnz=pEdtOutl->GetViewCount(); pEdtOutl->SetMinAutoPaperSize(aPaperMin); @@ -348,3 +354,4 @@ void SdrTextObj::ImpSetTextEditParams() const } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdotxfl.cxx b/svx/source/svdraw/svdotxfl.cxx index a8e7cf120b..2cba5d849d 100644 --- a/svx/source/svdraw/svdotxfl.cxx +++ b/svx/source/svdraw/svdotxfl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,9 +51,10 @@ void SdrRegisterFieldClasses() ///////////////////////////////////////////////////////////////////////////////////////////////// */ -FASTBOOL SdrTextObj::CalcFieldValue(const SvxFieldItem& /*rField*/, USHORT /*nPara*/, USHORT /*nPos*/, - FASTBOOL /*bEdit*/, Color*& /*rpTxtColor*/, Color*& /*rpFldColor*/, XubString& /*rRet*/) const +bool SdrTextObj::CalcFieldValue(const SvxFieldItem& /*rField*/, USHORT /*nPara*/, USHORT /*nPos*/, + bool /*bEdit*/, Color*& /*rpTxtColor*/, Color*& /*rpFldColor*/, XubString& /*rRet*/) const { return FALSE; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx index 0a84a46d5e..262f5beaec 100644 --- a/svx/source/svdraw/svdotxln.cxx +++ b/svx/source/svdraw/svdotxln.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -101,7 +102,7 @@ void ImpSdrObjTextLink::Closed() void ImpSdrObjTextLink::DataChanged( const String& /*rMimeType*/, const ::com::sun::star::uno::Any & /*rValue */) { - FASTBOOL bForceReload=FALSE; + bool bForceReload = false; SdrModel* pModel = pSdrObj ? pSdrObj->GetModel() : 0; sfx2::LinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0; if( pLinkManager ) @@ -119,7 +120,7 @@ void ImpSdrObjTextLink::DataChanged( const String& /*rMimeType*/, pData->aFileName = aFile; pData->aFilterName = aFilter; pSdrObj->SetChanged(); - bForceReload = TRUE; + bForceReload = true; } } } @@ -208,10 +209,10 @@ void SdrTextObj::ReleaseTextLink() } } -FASTBOOL SdrTextObj::ReloadLinkedText( FASTBOOL bForceLoad) +bool SdrTextObj::ReloadLinkedText( bool bForceLoad) { ImpSdrObjTextLinkUserData* pData = GetLinkUserData(); - FASTBOOL bRet = TRUE; + bool bRet = true; if( pData ) { @@ -260,7 +261,7 @@ FASTBOOL SdrTextObj::ReloadLinkedText( FASTBOOL bForceLoad) return bRet; } -FASTBOOL SdrTextObj::LoadText(const String& rFileName, const String& /*rFilterName*/, rtl_TextEncoding eCharSet) +bool SdrTextObj::LoadText(const String& rFileName, const String& /*rFilterName*/, rtl_TextEncoding eCharSet) { INetURLObject aFileURL( rFileName ); BOOL bRet = FALSE; @@ -348,3 +349,4 @@ void SdrTextObj::ImpLinkAbmeldung() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index a8d770b427..06b4a4972c 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -84,9 +85,6 @@ void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect) if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139# if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1); if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1); - if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) { - NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0)); - } NbcAdjustTextFrameWidthAndHeight(); } ImpCheckShear(); @@ -112,9 +110,6 @@ void SdrTextObj::NbcSetLogicRect(const Rectangle& rRect) if (bTextFrame) { if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1); if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1); - if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) { - NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0)); - } NbcAdjustTextFrameWidthAndHeight(); } SetRectsDirty(); @@ -125,7 +120,7 @@ long SdrTextObj::GetRotateAngle() const return aGeo.nDrehWink; } -long SdrTextObj::GetShearAngle(FASTBOOL /*bVertical*/) const +long SdrTextObj::GetShearAngle(bool /*bVertical*/) const { return aGeo.nShearWink; } @@ -140,14 +135,14 @@ void SdrTextObj::NbcMove(const Size& rSiz) void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { - FASTBOOL bNoShearMerk=aGeo.nShearWink==0; - FASTBOOL bRota90Merk=bNoShearMerk && aGeo.nDrehWink % 9000 ==0; + bool bNoShearMerk=aGeo.nShearWink==0; + bool bRota90Merk=bNoShearMerk && aGeo.nDrehWink % 9000 ==0; long nHDist=GetTextLeftDistance()+GetTextRightDistance(); long nVDist=GetTextUpperDistance()+GetTextLowerDistance(); long nTWdt0=aRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0; long nTHgt0=aRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0; - FASTBOOL bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); - FASTBOOL bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); + bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); + bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { @@ -205,7 +200,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract } if (bRota90Merk) { - FASTBOOL bRota90=aGeo.nDrehWink % 9000 ==0; + bool bRota90=aGeo.nDrehWink % 9000 ==0; if (!bRota90) { // Scheinbar Rundungsfehler: Korregieren long a=NormAngle360(aGeo.nDrehWink); if (a<4500) a=0; @@ -228,9 +223,6 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract if (bTextFrame && (pModel==NULL || !pModel->IsPasteResize())) { // #51139# if (nTWdt0!=nTWdt1 && IsAutoGrowWidth() ) NbcSetMinTextFrameWidth(nTWdt1); if (nTHgt0!=nTHgt1 && IsAutoGrowHeight()) NbcSetMinTextFrameHeight(nTHgt1); - if (GetFitToSize()==SDRTEXTFIT_RESIZEATTR) { - NbcResizeTextAttributes(Fraction(nTWdt1,nTWdt0),Fraction(nTHgt1,nTHgt0)); - } NbcAdjustTextFrameWidthAndHeight(); } ImpCheckShear(); @@ -261,7 +253,7 @@ void SdrTextObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs) SetGlueReallyAbsolute(FALSE); } -void SdrTextObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrTextObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { SetGlueReallyAbsolute(TRUE); @@ -286,8 +278,8 @@ void SdrTextObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVS void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) { SetGlueReallyAbsolute(TRUE); - FASTBOOL bNoShearMerk=aGeo.nShearWink==0; - FASTBOOL bRota90Merk=FALSE; + bool bNoShearMerk=aGeo.nShearWink==0; + bool bRota90Merk = false; if (bNoShearMerk && (rRef1.X()==rRef2.X() || rRef1.Y()==rRef2.Y() || Abs(rRef1.X()-rRef2.X())==Abs(rRef1.Y()-rRef2.Y()))) { @@ -309,7 +301,7 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) Poly2Rect(aPol,aRect,aGeo); if (bRota90Merk) { - FASTBOOL bRota90=aGeo.nDrehWink % 9000 ==0; + bool bRota90=aGeo.nDrehWink % 9000 ==0; if (bRota90Merk && !bRota90) { // Scheinbar Rundungsfehler: Korregieren long a=NormAngle360(aGeo.nDrehWink); if (a<4500) a=0; @@ -515,7 +507,7 @@ SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPol return pPathObj; } -SdrObject* SdrTextObj::ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) const +SdrObject* SdrTextObj::ImpConvertAddText(SdrObject* pObj, bool bBezier) const { if(!ImpCanConvTextToCurve()) { @@ -556,3 +548,5 @@ SdrObject* SdrTextObj::ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) cons ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index a28b1dba87..d986326333 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -343,21 +344,21 @@ void SdrUnoObj::operator = (const SdrObject& rObj) if ( xObj.is() && xFactory.is() ) { // creating a pipe - uno::Reference< io::XOutputStream > xOutPipe(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.Pipe")), uno::UNO_QUERY); + uno::Reference< io::XOutputStream > xOutPipe(xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe"))), uno::UNO_QUERY); uno::Reference< io::XInputStream > xInPipe(xOutPipe, uno::UNO_QUERY); // creating the mark streams - uno::Reference< io::XInputStream > xMarkIn(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.MarkableInputStream")), uno::UNO_QUERY); + uno::Reference< io::XInputStream > xMarkIn(xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.MarkableInputStream"))), uno::UNO_QUERY); uno::Reference< io::XActiveDataSink > xMarkSink(xMarkIn, uno::UNO_QUERY); - uno::Reference< io::XOutputStream > xMarkOut(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.MarkableOutputStream")), uno::UNO_QUERY); + uno::Reference< io::XOutputStream > xMarkOut(xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.MarkableOutputStream"))), uno::UNO_QUERY); uno::Reference< io::XActiveDataSource > xMarkSource(xMarkOut, uno::UNO_QUERY); // connect mark and sink - uno::Reference< io::XActiveDataSink > xSink(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.ObjectInputStream")), uno::UNO_QUERY); + uno::Reference< io::XActiveDataSink > xSink(xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.ObjectInputStream"))), uno::UNO_QUERY); // connect mark and source - uno::Reference< io::XActiveDataSource > xSource(xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.io.ObjectOutputStream")), uno::UNO_QUERY); + uno::Reference< io::XActiveDataSource > xSource(xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.ObjectOutputStream"))), uno::UNO_QUERY); uno::Reference< io::XObjectOutputStream > xOutStrm(xSource, uno::UNO_QUERY); uno::Reference< io::XObjectInputStream > xInStrm(xSink, uno::UNO_QUERY); @@ -387,7 +388,7 @@ void SdrUnoObj::operator = (const SdrObject& rObj) uno::Reference< beans::XPropertySet > xSet(xUnoControlModel, uno::UNO_QUERY); if (xSet.is()) { - uno::Any aValue( xSet->getPropertyValue( rtl::OUString::createFromAscii("DefaultControl")) ); + uno::Any aValue( xSet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultControl"))) ); ::rtl::OUString aStr; if( aValue >>= aStr ) @@ -663,3 +664,5 @@ bool SdrUnoObj::impl_getViewContact( ViewContactOfUnoControl*& _out_rpContact ) // ----------------------------------------------------------------------------- // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx index 20f248c3c9..506f4272e2 100644 --- a/svx/source/svdraw/svdoutl.cxx +++ b/svx/source/svdraw/svdoutl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,7 +112,7 @@ void SdrOutliner::SetTextObjNoInit( const SdrTextObj* pObj ) XubString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor) { - FASTBOOL bOk = FALSE; + bool bOk = false; XubString aRet; if(mpTextObj.is()) @@ -130,3 +131,5 @@ const SdrTextObj* SdrOutliner::GetTextObj() const else return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdoutlinercache.cxx b/svx/source/svdraw/svdoutlinercache.cxx index e9b0be44b3..9d96e2a5ad 100644 --- a/svx/source/svdraw/svdoutlinercache.cxx +++ b/svx/source/svdraw/svdoutlinercache.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -113,3 +114,4 @@ void SdrOutlinerCache::disposeOutliner( SdrOutliner* pOutliner ) } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index f9b2af6e88..cc72b2ff30 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -91,7 +92,7 @@ SdrObject& SdrVirtObj::ReferencedObj() return rRefObj; } -void __EXPORT SdrVirtObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/) +void SdrVirtObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/) { bClosedObj=rRefObj.IsClosedObj(); SetRectsDirty(); // hier noch Optimieren. @@ -347,22 +348,22 @@ String SdrVirtObj::getSpecialDragComment(const SdrDragStat& rDrag) const //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrVirtObj::BegCreate(SdrDragStat& rStat) +bool SdrVirtObj::BegCreate(SdrDragStat& rStat) { return rRefObj.BegCreate(rStat); } -FASTBOOL SdrVirtObj::MovCreate(SdrDragStat& rStat) +bool SdrVirtObj::MovCreate(SdrDragStat& rStat) { return rRefObj.MovCreate(rStat); } -FASTBOOL SdrVirtObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrVirtObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { return rRefObj.EndCreate(rStat,eCmd); } -FASTBOOL SdrVirtObj::BckCreate(SdrDragStat& rStat) +bool SdrVirtObj::BckCreate(SdrDragStat& rStat) { return rRefObj.BckCreate(rStat); } @@ -404,7 +405,7 @@ void SdrVirtObj::NbcMirror(const Point& rRef1, const Point& rRef2) SetRectsDirty(); } -void SdrVirtObj::NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrVirtObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { rRefObj.NbcShear(rRef-aAnchor,nWink,tn,bVShear); SetRectsDirty(); @@ -452,7 +453,7 @@ void SdrVirtObj::Mirror(const Point& rRef1, const Point& rRef2) SendUserCall(SDRUSERCALL_RESIZE,aBoundRect0); } -void SdrVirtObj::Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear) +void SdrVirtObj::Shear(const Point& rRef, long nWink, double tn, bool bVShear) { if (nWink!=0) { Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect(); @@ -531,7 +532,7 @@ long SdrVirtObj::GetRotateAngle() const return rRefObj.GetRotateAngle(); } -long SdrVirtObj::GetShearAngle(FASTBOOL bVertical) const +long SdrVirtObj::GetShearAngle(bool bVertical) const { return rRefObj.GetShearAngle(bVertical); } @@ -620,7 +621,7 @@ void SdrVirtObj::ReformatText() //////////////////////////////////////////////////////////////////////////////////////////////////// -FASTBOOL SdrVirtObj::HasMacro() const +bool SdrVirtObj::HasMacro() const { return rRefObj.HasMacro(); } @@ -640,7 +641,7 @@ void SdrVirtObj::PaintMacro(OutputDevice& rOut, const Rectangle& rDirtyRect, con rRefObj.PaintMacro(rOut,rDirtyRect,rRec); // Todo: Positionsversatz } -FASTBOOL SdrVirtObj::DoMacro(const SdrObjMacroHitRec& rRec) +bool SdrVirtObj::DoMacro(const SdrObjMacroHitRec& rRec) { return rRefObj.DoMacro(rRec); // Todo: Positionsversatz } @@ -657,3 +658,5 @@ const Point SdrVirtObj::GetOffset() const } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx index e687093291..4998ad7df7 100644 --- a/svx/source/svdraw/svdpage.cxx +++ b/svx/source/svdraw/svdpage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -178,13 +179,14 @@ void SdrObjList::CopyObjects(const SdrObjList& rSrcList) nCloneErrCnt++; } } - // und nun zu den Konnektoren - // Die neuen Objekte werden auf die der rSrcList abgebildet - // und so die Objektverbindungen hergestellt. - // Aehnliche Implementation an folgenden Stellen: + + // and now for the Connectors + // The new objects would be shown in the rSrcList + // and then the object connections are made. + // Similar implementation are setup as the following: // void SdrObjList::CopyObjects(const SdrObjList& rSrcList) // SdrModel* SdrExchangeView::GetMarkedObjModel() const - // FASTBOOL SdrExchangeView::Paste(const SdrModel& rMod,...) + // BOOL SdrExchangeView::Paste(const SdrModel& rMod,...) // void SdrEditView::CopyMarked() if (nCloneErrCnt==0) { for (no=0; no<nAnz; no++) { @@ -772,9 +774,9 @@ SdrObject* SdrObjList::GetObj(ULONG nNum) const -FASTBOOL SdrObjList::IsReadOnly() const +bool SdrObjList::IsReadOnly() const { - FASTBOOL bRet=FALSE; + bool bRet = false; if (pPage!=NULL && pPage!=this) bRet=pPage->IsReadOnly(); return bRet; } @@ -979,8 +981,6 @@ void SdrObjList::ClearObjectNavigationOrder (void) bool SdrObjList::RecalcNavigationPositions (void) { - bool bUpToDate (false); - if (mbIsNavigationOrderDirty) { if (mpNavigationOrder.get() != NULL) @@ -992,8 +992,6 @@ bool SdrObjList::RecalcNavigationPositions (void) sal_uInt32 nIndex (0); for (iObject=mpNavigationOrder->begin(); iObject!=iEnd; ++iObject,++nIndex) (*iObject)->SetNavigationPosition(nIndex); - - bUpToDate = true; } } @@ -1859,13 +1857,13 @@ SfxStyleSheet* SdrPage::GetTextStyleSheetForObject( SdrObject* pObj ) const return pObj->GetStyleSheet(); } -FASTBOOL SdrPage::HasTransparentObjects( BOOL bCheckForAlphaChannel ) const +bool SdrPage::HasTransparentObjects( BOOL bCheckForAlphaChannel ) const { - FASTBOOL bRet = FALSE; + bool bRet = false; for( ULONG n = 0, nCount = GetObjCount(); ( n < nCount ) && !bRet; n++ ) if( GetObj( n )->IsTransparent( bCheckForAlphaChannel ) ) - bRet = TRUE; + bRet = true; return bRet; } @@ -1936,12 +1934,12 @@ void SdrPage::ActionChanged() const } // NYI: Dummy implementations for declarations in svdpage.hxx -Bitmap SdrPage::GetBitmap(const SetOfByte& /*rVisibleLayers*/, FASTBOOL /*bTrimBorders*/) const +Bitmap SdrPage::GetBitmap(const SetOfByte& /*rVisibleLayers*/, bool /*bTrimBorders*/) const { DBG_ASSERT(0, "SdrPage::GetBitmap(): not yet implemented."); return Bitmap(); } -GDIMetaFile SdrPage::GetMetaFile(const SetOfByte& /*rVisibleLayers*/, FASTBOOL /*bTrimBorders*/) +GDIMetaFile SdrPage::GetMetaFile(const SetOfByte& /*rVisibleLayers*/, bool /*bTrimBorders*/) { DBG_ASSERT(0, "SdrPage::GetMetaFile(): not yet implemented."); return GDIMetaFile(); @@ -2030,3 +2028,5 @@ drawinglayer::primitive2d::Primitive2DSequence StandardCheckVisisbilityRedirecto ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index c97b202166..d138746228 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,7 +77,7 @@ DBG_NAME(SdrPageView); SdrPageWindow* SdrPageView::FindPageWindow(SdrPaintWindow& rPaintWindow) const { - for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); a++) + for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); ++a) { if(&((*a)->GetPaintWindow()) == &rPaintWindow) { @@ -107,7 +108,7 @@ const SdrPageWindow* SdrPageView::FindPatchedPageWindow( const OutputDevice& _rO SdrPageWindow* SdrPageView::FindPageWindow(const OutputDevice& rOutDev) const { - for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); a++) + for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); ++a) { if(&((*a)->GetPaintWindow().GetOutputDevice()) == &rOutDev) { @@ -132,7 +133,7 @@ SdrPageWindow* SdrPageView::GetPageWindow(sal_uInt32 nIndex) const void SdrPageView::ClearPageWindows() { // #126416# - for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); a++) + for(SdrPageWindowVector::const_iterator a = maPageWindows.begin(); a != maPageWindows.end(); ++a) { delete *a; } @@ -262,7 +263,7 @@ void SdrPageView::RemovePaintWindowFromPageView(SdrPaintWindow& rPaintWindow) return xReturn; } -void __EXPORT SdrPageView::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/) +void SdrPageView::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*rHint*/) { // not really interested in } @@ -330,7 +331,7 @@ void SdrPageView::PaintOutlinerView(OutputDevice* pOut, const Rectangle& rRect) if (GetView().pTextEditOutliner==NULL) return; //const SdrObject* pTextObjTmp=GetView().GetTextEditObject(); //const SdrTextObj* pText=PTR_CAST(SdrTextObj,pTextObjTmp); - //FASTBOOL bTextFrame=pText!=NULL && pText->IsTextFrame(); + //bool bTextFrame=pText!=NULL && pText->IsTextFrame(); ULONG nViewAnz=GetView().pTextEditOutliner->GetViewCount(); for (ULONG i=0; i<nViewAnz; i++) { OutlinerView* pOLV=GetView().pTextEditOutliner->GetView(i); @@ -550,8 +551,8 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C Size aMinDotDist(rOut.PixelToLogic(Size(nMinDotPix,nMinDotPix))); //Size a3PixSiz(rOut.PixelToLogic(Size(2,2))); Size aMinLinDist(rOut.PixelToLogic(Size(nMinLinPix,nMinLinPix))); - FASTBOOL bHoriSolid=nx2<aMinDotDist.Width(); - FASTBOOL bVertSolid=ny2<aMinDotDist.Height(); + bool bHoriSolid=nx2<aMinDotDist.Width(); + bool bVertSolid=ny2<aMinDotDist.Height(); // Linienabstand vergroessern (mind. 4 Pixel) // Vergroesserung: *2 *5 *10 *20 *50 *100 ... int nTgl=0; @@ -586,10 +587,10 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const Rectangle& rRect, C //if (nx2<a2PixSiz.Width()) nx2=nx1; //if (ny2<a2PixSiz.Height()) ny2=ny1; - FASTBOOL bHoriFine=nx2<nx1; - FASTBOOL bVertFine=ny2<ny1; - FASTBOOL bHoriLines=bHoriSolid || bHoriFine || !bVertFine; - FASTBOOL bVertLines=bVertSolid || bVertFine; + bool bHoriFine=nx2<nx1; + bool bVertFine=ny2<ny1; + bool bHoriLines=bHoriSolid || bHoriFine || !bVertFine; + bool bVertLines=bVertSolid || bVertFine; Color aColorMerk( rOut.GetLineColor() ); rOut.SetLineColor( aColor ); @@ -856,11 +857,11 @@ void SdrPageView::SetHelpLines(const SdrHelpLineList& rHLL) void SdrPageView::SetHelpLine(USHORT nNum, const SdrHelpLine& rNewHelpLine) { if (nNum<aHelpLines.GetCount() && aHelpLines[nNum]!=rNewHelpLine) { - FASTBOOL bNeedRedraw=TRUE; + bool bNeedRedraw = true; if (aHelpLines[nNum].GetKind()==rNewHelpLine.GetKind()) { switch (rNewHelpLine.GetKind()) { - case SDRHELPLINE_VERTICAL : if (aHelpLines[nNum].GetPos().X()==rNewHelpLine.GetPos().X()) bNeedRedraw=FALSE; break; - case SDRHELPLINE_HORIZONTAL: if (aHelpLines[nNum].GetPos().Y()==rNewHelpLine.GetPos().Y()) bNeedRedraw=FALSE; break; + case SDRHELPLINE_VERTICAL : if (aHelpLines[nNum].GetPos().X()==rNewHelpLine.GetPos().X()) bNeedRedraw = false; break; + case SDRHELPLINE_HORIZONTAL: if (aHelpLines[nNum].GetPos().Y()==rNewHelpLine.GetPos().Y()) bNeedRedraw = false; break; default: break; } // switch } @@ -1131,3 +1132,5 @@ Color SdrPageView::GetApplicationDocumentColor() const //////////////////////////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index f9ab9e9a28..2bc11793b8 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1,10 +1,11 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * - * OpenOffice.org - a multi-platform office productivity suite + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -145,7 +146,7 @@ void ImplEncirclementOverlay::SetSecondPosition(const basegfx::B2DPoint& rNewPos SdrPaintWindow* SdrPaintView::FindPaintWindow(const OutputDevice& rOut) const { - for(SdrPaintWindowVector::const_iterator a = maPaintWindows.begin(); a != maPaintWindows.end(); a++) + for(SdrPaintWindowVector::const_iterator a = maPaintWindows.begin(); a != maPaintWindows.end(); ++a) { if(&((*a)->GetOutputDevice()) == &rOut) { @@ -187,7 +188,7 @@ SdrPaintWindow* SdrPaintView::RemovePaintWindow(SdrPaintWindow& rOld) } OutputDevice* SdrPaintView::GetFirstOutputDevice() const -{ +{ if(PaintWindowCount()) { return &(GetPaintWindow(0)->GetOutputDevice()); @@ -279,7 +280,7 @@ SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut) pMod=pModel1; ImpClearVars(); - if(pOut) + if(pOut) { AddWindowToPaintView(pOut); } @@ -301,7 +302,7 @@ SdrPaintView::~SdrPaintView() ClearPageView(); #ifdef DBG_UTIL - if(pItemBrowser) + if(pItemBrowser) { delete pItemBrowser; } @@ -398,7 +399,7 @@ void SdrPaintView::ModelHasChanged() } #ifdef DBG_UTIL - if(pItemBrowser) + if(pItemBrowser) { pItemBrowser->SetDirty(); } @@ -414,7 +415,7 @@ BOOL SdrPaintView::IsAction() const void SdrPaintView::MovAction(const Point& rPnt) { - if (IsEncirclement()) + if (IsEncirclement()) { MovEncirclement(rPnt); } @@ -422,7 +423,7 @@ void SdrPaintView::MovAction(const Point& rPnt) void SdrPaintView::EndAction() { - if(IsEncirclement()) + if(IsEncirclement()) { EndEncirclement(); } @@ -440,7 +441,7 @@ void SdrPaintView::BrkAction() void SdrPaintView::TakeActionRect(Rectangle& rRect) const { - if(IsEncirclement()) + if(IsEncirclement()) { rRect = Rectangle(aDragStat.GetStart(),aDragStat.GetNow()); } @@ -464,7 +465,7 @@ SdrPageView* SdrPaintView::GetTextEditPageView() const USHORT SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const { if (nMinMov>=0) return USHORT(nMinMov); - if (pOut==NULL) + if (pOut==NULL) { pOut = GetFirstOutputDevice(); } @@ -478,7 +479,7 @@ USHORT SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) USHORT SdrPaintView::ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const { if (nHitTol>=0) return USHORT(nHitTol); - if (pOut==NULL) + if (pOut==NULL) { pOut = GetFirstOutputDevice(); } @@ -520,7 +521,7 @@ void SdrPaintView::BegEncirclement(const Point& rPnt) void SdrPaintView::MovEncirclement(const Point& rPnt) { - if(IsEncirclement() && aDragStat.CheckMinMoved(rPnt)) + if(IsEncirclement() && aDragStat.CheckMinMoved(rPnt)) { aDragStat.NextMove(rPnt); @@ -536,10 +537,10 @@ Rectangle SdrPaintView::EndEncirclement(sal_Bool bNoJustify) if(IsEncirclement()) { - if(aDragStat.IsMinMoved()) + if(aDragStat.IsMinMoved()) { aRetval = Rectangle(aDragStat.GetStart(), aDragStat.GetNow()); - + if(!bNoJustify) { aRetval.Justify(); @@ -555,7 +556,7 @@ Rectangle SdrPaintView::EndEncirclement(sal_Bool bNoJustify) void SdrPaintView::BrkEncirclement() { - if(IsEncirclement()) + if(IsEncirclement()) { DBG_ASSERT(mpEncirclementOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)"); delete mpEncirclementOverlay; @@ -616,7 +617,7 @@ void SdrPaintView::AddWindowToPaintView(OutputDevice* pNewWin) } #ifdef DBG_UTIL - if (pItemBrowser!=NULL) + if (pItemBrowser!=NULL) pItemBrowser->ForceParent(); #endif } @@ -638,7 +639,7 @@ void SdrPaintView::DeleteWindowFromPaintView(OutputDevice* pOldWin) } #ifdef DBG_UTIL - if (pItemBrowser!=NULL) + if (pItemBrowser!=NULL) pItemBrowser->ForceParent(); #endif } @@ -687,7 +688,7 @@ bool SdrPaintView::IsLayerLocked(const XubString& rName) const { return mpPageView->IsLayerLocked(rName); } - + return false; } @@ -766,11 +767,11 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::c #endif // SVX_REPAINT_TIMER_TEST // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region - // rReg may be made more granular (fine) with using it. Normally, rReg - // does come from Window::Paint() anyways and thus is based on a single + // rReg may be made more granular (fine) with using it. Normally, rReg + // does come from Window::Paint() anyways and thus is based on a single // rectangle which was derived from exactly that repaint region Region aOptimizedRepaintRegion(rReg); - + if(pOut && OUTDEV_WINDOW == pOut->GetOutDevType()) { Window* pWindow = (Window*)pOut; @@ -788,7 +789,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::c { RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects()); Rectangle aRegionRectangle; - + while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle)) { pWindow->SetLineColor(COL_LIGHTGREEN); @@ -964,11 +965,11 @@ SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const Region& if(pKnownTarget) { // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region - // rReg may be made more granular (fine) with using it. Normally, rReg - // does come from Window::Paint() anyways and thus is based on a single + // rReg may be made more granular (fine) with using it. Normally, rReg + // does come from Window::Paint() anyways and thus is based on a single // rectangle which was derived from exactly that repaint region Region aOptimizedRepaintRegion(rReg); - + // #i76114# Intersecting the region with the Window's paint region is disabled // for print preview in Calc, because the intersection can be empty (if the paint // region is outside of the table area of the page), and then no clip region @@ -990,7 +991,7 @@ SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const Region& { RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects()); Rectangle aRegionRectangle; - + while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle)) { pWindow->SetLineColor(COL_LIGHTGREEN); @@ -1083,7 +1084,7 @@ void SdrPaintView::GlueInvalidate() const { SdrPaintWindow* pPaintWindow = GetPaintWindow(nWinNum); - if(pPaintWindow->OutputToWindow()) + if(pPaintWindow->OutputToWindow()) { OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); @@ -1111,7 +1112,7 @@ void SdrPaintView::InvalidateAllWin() { SdrPaintWindow* pPaintWindow = GetPaintWindow(a); - if(pPaintWindow->OutputToWindow()) + if(pPaintWindow->OutputToWindow()) { InvalidateOneWin((Window&)pPaintWindow->GetOutputDevice()); } @@ -1126,12 +1127,12 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, BOOL bPlus1Pix) { SdrPaintWindow* pPaintWindow = GetPaintWindow(a); - if(pPaintWindow->OutputToWindow()) + if(pPaintWindow->OutputToWindow()) { OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); Rectangle aRect(rRect); - if(bPlus1Pix) + if(bPlus1Pix) { Size aPixSiz(1,1); Size aSiz(rOutDev.PixelToLogic(aPixSiz)); @@ -1140,12 +1141,12 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, BOOL bPlus1Pix) aRect.Right ()+=aSiz.Width(); aRect.Bottom()+=aSiz.Height(); } - + Point aOrg(rOutDev.GetMapMode().GetOrigin()); aOrg.X()=-aOrg.X(); aOrg.Y()=-aOrg.Y(); Rectangle aOutRect(aOrg, rOutDev.GetOutputSize()); - - if (aRect.IsOver(aOutRect)) + + if (aRect.IsOver(aOutRect)) { InvalidateOneWin((Window&)rOutDev, aRect); } @@ -1388,16 +1389,16 @@ void SdrPaintView::DoConnect(SdrOle2Obj* /*pOleObj*/) { } -void SdrPaintView::SetAnimationEnabled( BOOL bEnable ) -{ - SetAnimationMode( bEnable ? SDR_ANIMATION_ANIMATE : SDR_ANIMATION_DISABLE ); +void SdrPaintView::SetAnimationEnabled( BOOL bEnable ) +{ + SetAnimationMode( bEnable ? SDR_ANIMATION_ANIMATE : SDR_ANIMATION_DISABLE ); } -void SdrPaintView::SetAnimationPause( bool bSet ) -{ +void SdrPaintView::SetAnimationPause( bool bSet ) +{ if((bool)bAnimationPause != bSet) { - bAnimationPause = bSet; + bAnimationPause = bSet; if(mpPageView) { @@ -1416,9 +1417,9 @@ void SdrPaintView::SetAnimationPause( bool bSet ) } } -void SdrPaintView::SetAnimationMode( const SdrAnimationMode eMode ) -{ - eAnimationMode = eMode; +void SdrPaintView::SetAnimationMode( const SdrAnimationMode eMode ) +{ + eAnimationMode = eMode; } void SdrPaintView::VisAreaChanged(const OutputDevice* pOut) @@ -1489,8 +1490,8 @@ void SdrPaintView::SetApplicationDocumentColor(Color aDocumentColor) } // #114898# -bool SdrPaintView::IsBufferedOutputAllowed() const -{ +bool SdrPaintView::IsBufferedOutputAllowed() const +{ return (mbBufferedOutputAllowed && maDrawinglayerOpt.IsPaintBuffer()); } @@ -1503,8 +1504,8 @@ void SdrPaintView::SetBufferedOutputAllowed(bool bNew) } } -bool SdrPaintView::IsBufferedOverlayAllowed() const -{ +bool SdrPaintView::IsBufferedOverlayAllowed() const +{ return (mbBufferedOverlayAllowed && maDrawinglayerOpt.IsOverlayBuffer()); } @@ -1516,9 +1517,9 @@ void SdrPaintView::SetBufferedOverlayAllowed(bool bNew) } } -sal_Bool SdrPaintView::IsPagePaintingAllowed() const -{ - return mbPagePaintingAllowed; +sal_Bool SdrPaintView::IsPagePaintingAllowed() const +{ + return mbPagePaintingAllowed; } void SdrPaintView::SetPagePaintingAllowed(bool bNew) @@ -1546,3 +1547,5 @@ void SdrPaintView::SetAnimationTimer(sal_uInt32 nTime) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index e3f825dafe..f0b72c4633 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -383,7 +384,6 @@ void SdrPolyEditView::RipUpAtMarkedPoints() if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj)); sal_Bool bKorregFlag(sal_False); - sal_Bool bInsAny(sal_False); sal_uInt32 nMarkPtsAnz(pPts->GetCount()); sal_uInt32 nMax(pObj->GetHdlCount()); @@ -395,7 +395,6 @@ void SdrPolyEditView::RipUpAtMarkedPoints() if(pNeuObj) { - bInsAny = sal_True; SdrInsertReason aReason(SDRREASON_VIEWCALL, pObj); pM->GetPageView()->GetObjList()->InsertObject(pNeuObj, pObj->GetOrdNum() + 1, &aReason); if( bUndo ) @@ -570,7 +569,7 @@ void SdrPolyEditView::CloseMarkedObjects(BOOL bToggle, BOOL bOpen) // , long nOp SdrMark* pM=GetSdrMarkByIndex(nm); SdrObject* pO=pM->GetMarkedSdrObj(); BOOL bClosed=pO->IsClosedObj(); - if (pO->IsPolyObj() && (bClosed==bOpen) || bToggle) + if ((pO->IsPolyObj() && (bClosed==bOpen)) || bToggle) { if( bUndo ) AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pO)); @@ -743,3 +742,5 @@ void SdrPolyEditView::RotateMarkedPoints(const Point& rRef, long nWink, bool bCo } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx index 047a358e2d..50dd8647bb 100644 --- a/svx/source/svdraw/svdsnpv.cxx +++ b/svx/source/svdraw/svdsnpv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -320,11 +321,9 @@ Point SdrSnapView::GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const USHORT SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const { if (!bSnapEnab) return SDRSNAP_NOTSNAPPED; - BOOL bPVOfs=FALSE; long x=rPnt.X(); long y=rPnt.Y(); if (pPV==NULL) { - bPVOfs=TRUE; pPV=GetSdrPageView(); if (pPV==NULL) return SDRSNAP_NOTSNAPPED; } @@ -728,3 +727,5 @@ void SdrSnapView::BrkDragHelpLine() } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src index 6aeec1d1b5..1140ab68a0 100644 --- a/svx/source/svdraw/svdstr.src +++ b/svx/source/svdraw/svdstr.src @@ -1124,7 +1124,7 @@ String STR_UndoMovLayer { Text [ en-US ] = "Change order of layers" ; }; -// --> OD 2009-07-09 #i73249# +// Undo/Redo for setting object's name (#i73249#) String STR_UndoObjName { Text [ en-US ] = "Change object name of %1 to" ; @@ -1137,7 +1137,6 @@ String STR_UndoObjDescription { Text [ en-US ] = "Change object description of %1" ; }; -// <-- String STR_StandardLayerName { Text [ en-US ] = "Standard" ; @@ -1600,8 +1599,8 @@ String STR_ItemNam_SHEARANGLE // Ende der gecachten Strings // und hier noch Bitmaps -Bitmap BMAP_GrafikEi { File = "grafikei.bmp" ; }; -Bitmap BMAP_GrafikDe { File = "grafikde.bmp" ; }; +Bitmap BMAP_GrafikEi { File = "grafikei.png" ; }; +Bitmap BMAP_GrafikDe { File = "grafikde.png" ; }; // Strings fuer den Vorlagen-Dialog String SIP_UNKNOWN_ATTR @@ -2147,7 +2146,7 @@ String SIP_SA_XMLATTRIBUTES String SIP_SA_TEXT_USEFIXEDCELLHEIGHT { - Text [ en-US ] = "Use font-independent line spacing"; + Text [ en-US ] = "Use font-independent line spacing"; }; String SIP_SA_WORDWRAP @@ -2753,24 +2752,18 @@ Bitmap SIP_SA_PAGESHADOW35X35 Bitmap SIP_SA_MARKERS { - File = "markers.bmp"; + File = "markers.png"; }; Bitmap SIP_SA_FINE_MARKERS { - File = "markers2.bmp"; + File = "markers2.png"; }; // #100499# Bitmap BMP_SVXOLEOBJ { - File = "oleobj.bmp" ; -}; - -// #101928# -Bitmap SIP_SA_ACCESSIBILITY_MARKERS -{ - File = "markersACC.bmp"; + File = "oleobj.png" ; }; String STR_ObjNameSingulMEDIA @@ -2852,89 +2845,12 @@ String STR_ObjNamePluralTable Bitmap SIP_SA_CROP_MARKERS { - File = "cropmarkers.bmp"; + File = "cropmarkers.png"; }; Bitmap SIP_SA_CROP_FINE_MARKERS { - File = "cropmarkers2.bmp"; -}; - -Bitmap SIP_SA_ACCESSIBILITY_CROP_MARKERS -{ - File = "cropmarkersACC.bmp"; + File = "cropmarkers2.png"; }; // ******************************************************************* EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx index 5a731ad9b3..1e270a8239 100644 --- a/svx/source/svdraw/svdtext.cxx +++ b/svx/source/svdraw/svdtext.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -144,7 +145,7 @@ void SdrText::SetModel( SdrModel* pNewModel ) MapUnit aOldUnit(pOldModel->GetScaleUnit()); MapUnit aNewUnit(pNewModel->GetScaleUnit()); - FASTBOOL bScaleUnitChanged=aNewUnit!=aOldUnit; + bool bScaleUnitChanged=aNewUnit!=aOldUnit; // und nun dem OutlinerParaObject einen neuen Pool verpassen // !!! Hier muss noch DefTab und RefDevice der beiden Models // !!! verglichen werden und dann ggf. AutoGrow zuschlagen !!! @@ -222,3 +223,5 @@ SfxStyleSheet* SdrText::GetStyleSheet() const { return mrObject.GetStyleSheet(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index bfaba25c4e..0084e0a8ac 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,7 +52,7 @@ void MoveXPoly(XPolyPolygon& rPoly, const Size& S) //////////////////////////////////////////////////////////////////////////////////////////////////// -void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact, FASTBOOL bNoJustify) +void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, const Fraction& ryFact, bool bNoJustify) { Fraction xFact(rxFact); Fraction yFact(ryFact); @@ -159,7 +160,7 @@ void RotateXPoly(XPolyPolygon& rPoly, const Point& rRef, double sn, double cs) //////////////////////////////////////////////////////////////////////////////////////////////////// -void MirrorRect(Rectangle& rRect, const Point& /*rRef1*/, const Point& /*rRef2*/, FASTBOOL bNoJustify) +void MirrorRect(Rectangle& rRect, const Point& /*rRef1*/, const Point& /*rRef2*/, bool bNoJustify) { // !!! fehlende Implementation !!! if (!bNoJustify) rRect.Justify(); @@ -234,7 +235,7 @@ void MirrorXPoly(XPolyPolygon& rPoly, const Point& rRef1, const Point& rRef2) //////////////////////////////////////////////////////////////////////////////////////////////////// -void ShearPoly(Polygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) +void ShearPoly(Polygon& rPoly, const Point& rRef, double tn, bool bVShear) { USHORT nAnz=rPoly.GetSize(); for (USHORT i=0; i<nAnz; i++) { @@ -242,7 +243,7 @@ void ShearPoly(Polygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) } } -void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) +void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, bool bVShear) { USHORT nAnz=rPoly.GetPointCount(); for (USHORT i=0; i<nAnz; i++) { @@ -250,7 +251,7 @@ void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) } } -void ShearPoly(PolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) +void ShearPoly(PolyPolygon& rPoly, const Point& rRef, double tn, bool bVShear) { USHORT nAnz=rPoly.Count(); for (USHORT i=0; i<nAnz; i++) { @@ -258,7 +259,7 @@ void ShearPoly(PolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShea } } -void ShearXPoly(XPolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVShear) +void ShearXPoly(XPolyPolygon& rPoly, const Point& rRef, double tn, bool bVShear) { USHORT nAnz=rPoly.Count(); for (USHORT i=0; i<nAnz; i++) { @@ -279,10 +280,10 @@ void ShearXPoly(XPolyPolygon& rPoly, const Point& rRef, double tn, FASTBOOL bVSh //////////////////////////////////////////////////////////////////////////////////////////////////// double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, - const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert) + const Point& rRad, double& rSin, double& rCos, bool bVert) { - FASTBOOL bC1=pC1!=NULL; - FASTBOOL bC2=pC2!=NULL; + bool bC1=pC1!=NULL; + bool bC2=pC2!=NULL; long x0=rPnt.X(); long y0=rPnt.Y(); long cx=rCenter.X(); @@ -333,10 +334,10 @@ double CrookRotateXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCent } double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, - const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert) + const Point& rRad, double& rSin, double& rCos, bool bVert) { - FASTBOOL bC1=pC1!=NULL; - FASTBOOL bC2=pC2!=NULL; + bool bC1=pC1!=NULL; + bool bC2=pC2!=NULL; long x0=rPnt.X(); long y0=rPnt.Y(); long dx1=0,dy1=0; @@ -388,11 +389,11 @@ double CrookSlantXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCente } double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCenter, - const Point& rRad, double& rSin, double& rCos, FASTBOOL bVert, + const Point& rRad, double& rSin, double& rCos, bool bVert, const Rectangle rRefRect) { - //FASTBOOL bC1=pC1!=NULL; - //FASTBOOL bC2=pC2!=NULL; + //bool bC1=pC1!=NULL; + //bool bC2=pC2!=NULL; //long x0=rPnt.X(); long y0=rPnt.Y(); CrookSlantXPoint(rPnt,pC1,pC2,rCenter,rRad,rSin,rCos,bVert); @@ -403,7 +404,7 @@ double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCen long nBtm=rRefRect.Bottom(); long nHgt=nBtm-nTop; long dy=rPnt.Y()-y0; - //FASTBOOL bOben=rRad.Y()<0; + //bool bOben=rRad.Y()<0; double a=((double)(y0-nTop))/nHgt; a*=dy; rPnt.Y()=y0+Round(a); @@ -412,7 +413,7 @@ double CrookStretchXPoint(Point& rPnt, Point* pC1, Point* pC2, const Point& rCen //////////////////////////////////////////////////////////////////////////////////////////////////// -void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert) +void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert) { double nSin,nCos; USHORT nPointAnz=rPoly.GetPointCount(); @@ -435,7 +436,7 @@ void CrookRotatePoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, F } } -void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert) +void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert) { double nSin,nCos; USHORT nPointAnz=rPoly.GetPointCount(); @@ -458,7 +459,7 @@ void CrookSlantPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FA } } -void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert, const Rectangle rRefRect) +void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle rRefRect) { double nSin,nCos; USHORT nPointAnz=rPoly.GetPointCount(); @@ -483,7 +484,7 @@ void CrookStretchPoly(XPolygon& rPoly, const Point& rCenter, const Point& rRad, //////////////////////////////////////////////////////////////////////////////////////////////////// -void CrookRotatePoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert) +void CrookRotatePoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert) { USHORT nPolyAnz=rPoly.Count(); for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) { @@ -491,7 +492,7 @@ void CrookRotatePoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRa } } -void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert) +void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert) { USHORT nPolyAnz=rPoly.Count(); for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) { @@ -499,7 +500,7 @@ void CrookSlantPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad } } -void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, FASTBOOL bVert, const Rectangle rRefRect) +void CrookStretchPoly(XPolyPolygon& rPoly, const Point& rCenter, const Point& rRad, bool bVert, const Rectangle rRefRect) { USHORT nPolyAnz=rPoly.Count(); for (USHORT nPolyNum=0; nPolyNum<nPolyAnz; nPolyNum++) { @@ -644,7 +645,7 @@ void Poly2Rect(const Polygon& rPol, Rectangle& rRect, GeoStat& rGeo) nShW-=27000; // ShearWink wird zur Senkrechten gemessen nShW=-nShW; // Negieren, denn '+' ist Rechtskursivierung - FASTBOOL bMirr=aPt3.Y()<0; + bool bMirr=aPt3.Y()<0; if (bMirr) { // "Punktetausch" bei Spiegelung nHgt=-nHgt; nShW+=18000; @@ -666,7 +667,7 @@ void Poly2Rect(const Polygon& rPol, Rectangle& rRect, GeoStat& rGeo) //////////////////////////////////////////////////////////////////////////////////////////////////// -void OrthoDistance8(const Point& rPt0, Point& rPt, FASTBOOL bBigOrtho) +void OrthoDistance8(const Point& rPt0, Point& rPt, bool bBigOrtho) { long dx=rPt.X()-rPt0.X(); long dy=rPt.Y()-rPt0.Y(); @@ -682,7 +683,7 @@ void OrthoDistance8(const Point& rPt0, Point& rPt, FASTBOOL bBigOrtho) } } -void OrthoDistance4(const Point& rPt0, Point& rPt, FASTBOOL bBigOrtho) +void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho) { long dx=rPt.X()-rPt0.X(); long dy=rPt.Y()-rPt0.Y(); @@ -718,7 +719,7 @@ void Kuerzen(Fraction& rF, unsigned nDigits) { INT32 nMul=rF.GetNumerator(); INT32 nDiv=rF.GetDenominator(); - FASTBOOL bNeg=FALSE; + bool bNeg = false; if (nMul<0) { nMul=-nMul; bNeg=!bNeg; } if (nDiv<0) { nDiv=-nDiv; bNeg=!bNeg; } if (nMul==0 || nDiv==0) return; @@ -809,8 +810,8 @@ FrPair GetMapFactor(MapUnit eS, MapUnit eD) if (eS==eD) return FrPair(1,1,1,1); FrPair aS(GetInchOrMM(eS)); FrPair aD(GetInchOrMM(eD)); - FASTBOOL bSInch=IsInch(eS); - FASTBOOL bDInch=IsInch(eD); + bool bSInch=IsInch(eS); + bool bDInch=IsInch(eD); FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y()); if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); } if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); } @@ -821,8 +822,8 @@ FrPair GetMapFactor(MapUnit eS, FieldUnit eD) { FrPair aS(GetInchOrMM(eS)); FrPair aD(GetInchOrMM(eD)); - FASTBOOL bSInch=IsInch(eS); - FASTBOOL bDInch=IsInch(eD); + bool bSInch=IsInch(eS); + bool bDInch=IsInch(eD); FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y()); if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); } if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); } @@ -833,8 +834,8 @@ FrPair GetMapFactor(FieldUnit eS, MapUnit eD) { FrPair aS(GetInchOrMM(eS)); FrPair aD(GetInchOrMM(eD)); - FASTBOOL bSInch=IsInch(eS); - FASTBOOL bDInch=IsInch(eD); + bool bSInch=IsInch(eS); + bool bDInch=IsInch(eD); FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y()); if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); } if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); } @@ -846,8 +847,8 @@ FrPair GetMapFactor(FieldUnit eS, FieldUnit eD) if (eS==eD) return FrPair(1,1,1,1); FrPair aS(GetInchOrMM(eS)); FrPair aD(GetInchOrMM(eD)); - FASTBOOL bSInch=IsInch(eS); - FASTBOOL bDInch=IsInch(eD); + bool bSInch=IsInch(eS); + bool bDInch=IsInch(eD); FrPair aRet(aD.X()/aS.X(),aD.Y()/aS.Y()); if (bSInch && !bDInch) { aRet.X()*=Fraction(127,5); aRet.Y()*=Fraction(127,5); } if (!bSInch && bDInch) { aRet.X()*=Fraction(5,127); aRet.Y()*=Fraction(5,127); } @@ -863,24 +864,24 @@ FrPair GetMapFactor(FieldUnit eS, FieldUnit eD) // 1 yd = 3 ft = 36" = 914,4mm // 1 ft = 12 " = 1" = 304,8mm -void GetMeterOrInch(MapUnit eMU, short& rnKomma, long& rnMul, long& rnDiv, FASTBOOL& rbMetr, FASTBOOL& rbInch) +void GetMeterOrInch(MapUnit eMU, short& rnKomma, long& rnMul, long& rnDiv, bool& rbMetr, bool& rbInch) { rnMul=1; rnDiv=1; short nKomma=0; - FASTBOOL bMetr=FALSE,bInch=FALSE; + bool bMetr = false, bInch = false; switch (eMU) { // Metrisch - case MAP_100TH_MM : bMetr=TRUE; nKomma=5; break; - case MAP_10TH_MM : bMetr=TRUE; nKomma=4; break; - case MAP_MM : bMetr=TRUE; nKomma=3; break; - case MAP_CM : bMetr=TRUE; nKomma=2; break; + case MAP_100TH_MM : bMetr = true; nKomma=5; break; + case MAP_10TH_MM : bMetr = true; nKomma=4; break; + case MAP_MM : bMetr = true; nKomma=3; break; + case MAP_CM : bMetr = true; nKomma=2; break; // Inch - case MAP_1000TH_INCH: bInch=TRUE; nKomma=3; break; - case MAP_100TH_INCH : bInch=TRUE; nKomma=2; break; - case MAP_10TH_INCH : bInch=TRUE; nKomma=1; break; - case MAP_INCH : bInch=TRUE; nKomma=0; break; - case MAP_POINT : bInch=TRUE; rnDiv=72; break; // 1Pt = 1/72" - case MAP_TWIP : bInch=TRUE; rnDiv=144; nKomma=1; break; // 1Twip = 1/1440" + case MAP_1000TH_INCH: bInch = true; nKomma=3; break; + case MAP_100TH_INCH : bInch = true; nKomma=2; break; + case MAP_10TH_INCH : bInch = true; nKomma=1; break; + case MAP_INCH : bInch = true; nKomma=0; break; + case MAP_POINT : bInch = true; rnDiv=72; break; // 1Pt = 1/72" + case MAP_TWIP : bInch = true; rnDiv=144; nKomma=1; break; // 1Twip = 1/1440" // Sonstiges case MAP_PIXEL : break; case MAP_SYSFONT : break; @@ -893,29 +894,32 @@ void GetMeterOrInch(MapUnit eMU, short& rnKomma, long& rnMul, long& rnDiv, FASTB rbInch=bInch; } -void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, FASTBOOL& rbMetr, FASTBOOL& rbInch) +void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, bool& rbMetr, bool& rbInch) { rnMul=1; rnDiv=1; short nKomma=0; - FASTBOOL bMetr=FALSE,bInch=FALSE; + bool bMetr = false, bInch = false; switch (eFU) { case FUNIT_NONE : break; // Metrisch - case FUNIT_100TH_MM : bMetr=TRUE; nKomma=5; break; - case FUNIT_MM : bMetr=TRUE; nKomma=3; break; - case FUNIT_CM : bMetr=TRUE; nKomma=2; break; - case FUNIT_M : bMetr=TRUE; nKomma=0; break; - case FUNIT_KM : bMetr=TRUE; nKomma=-3; break; + case FUNIT_100TH_MM : bMetr = true; nKomma=5; break; + case FUNIT_MM : bMetr = true; nKomma=3; break; + case FUNIT_CM : bMetr = true; nKomma=2; break; + case FUNIT_M : bMetr = true; nKomma=0; break; + case FUNIT_KM : bMetr = true; nKomma=-3; break; // Inch - case FUNIT_TWIP : bInch=TRUE; rnDiv=144; nKomma=1; break; // 1Twip = 1/1440" - case FUNIT_POINT : bInch=TRUE; rnDiv=72; break; // 1Pt = 1/72" - case FUNIT_PICA : bInch=TRUE; rnDiv=6; break; // 1Pica = 1/6" ? - case FUNIT_INCH : bInch=TRUE; break; // 1" = 1" - case FUNIT_FOOT : bInch=TRUE; rnMul=12; break; // 1Ft = 12" - case FUNIT_MILE : bInch=TRUE; rnMul=6336; nKomma=-1; break; // 1mile = 63360" + case FUNIT_TWIP : bInch = true; rnDiv=144; nKomma=1; break; // 1Twip = 1/1440" + case FUNIT_POINT : bInch = true; rnDiv=72; break; // 1Pt = 1/72" + case FUNIT_PICA : bInch = true; rnDiv=6; break; // 1Pica = 1/6" ? + case FUNIT_INCH : bInch = true; break; // 1" = 1" + case FUNIT_FOOT : bInch = true; rnMul=12; break; // 1Ft = 12" + case FUNIT_MILE : bInch = true; rnMul=6336; nKomma=-1; break; // 1mile = 63360" // sonstiges case FUNIT_CUSTOM : break; case FUNIT_PERCENT : nKomma=2; break; + // TODO: Add code to handle the following (added to remove warning) + case FUNIT_CHAR : break; + case FUNIT_LINE : break; } // switch rnKomma=nKomma; rbMetr=bMetr; @@ -925,7 +929,7 @@ void GetMeterOrInch(FieldUnit eFU, short& rnKomma, long& rnMul, long& rnDiv, FAS void SdrFormatter::Undirty() { if (aScale.GetNumerator()==0 || aScale.GetDenominator()==0) aScale=Fraction(1,1); - FASTBOOL bSrcMetr,bSrcInch,bDstMetr,bDstInch; + bool bSrcMetr,bSrcInch,bDstMetr,bDstInch; long nMul1,nDiv1,nMul2,nDiv2; short nKomma1,nKomma2; // Zunaechst normalisieren auf m bzw. " @@ -1084,46 +1088,39 @@ void SdrFormatter::TakeUnitStr(MapUnit eUnit, XubString& rStr) // Metrisch case MAP_100TH_MM : { - sal_Char aText[] = "/100mm"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/100mm")); break; } case MAP_10TH_MM : { - sal_Char aText[] = "/10mm"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/10mm")); break; } case MAP_MM : { - sal_Char aText[] = "mm"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mm")); break; } case MAP_CM : { - sal_Char aText[] = "cm"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("cm")); break; } // Inch case MAP_1000TH_INCH: { - sal_Char aText[] = "/1000\""; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/1000\"")); break; } case MAP_100TH_INCH : { - sal_Char aText[] = "/100\""; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/100\"")); break; } case MAP_10TH_INCH : { - sal_Char aText[] = "/10\""; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/10\"")); break; } case MAP_INCH : @@ -1134,34 +1131,29 @@ void SdrFormatter::TakeUnitStr(MapUnit eUnit, XubString& rStr) } case MAP_POINT : { - sal_Char aText[] = "pt"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pt")); break; } case MAP_TWIP : { - sal_Char aText[] = "twip"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("twip")); break; } // Sonstiges case MAP_PIXEL : { - sal_Char aText[] = "pixel"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pixel")); break; } case MAP_SYSFONT : { - sal_Char aText[] = "sysfont"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("sysfont")); break; } case MAP_APPFONT : { - sal_Char aText[] = "appfont"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("appfont")); break; } case MAP_RELATIVE : @@ -1189,20 +1181,17 @@ void SdrFormatter::TakeUnitStr(FieldUnit eUnit, XubString& rStr) // Metrisch case FUNIT_100TH_MM: { - sal_Char aText[] = "/100mm"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("/100mm")); break; } case FUNIT_MM : { - sal_Char aText[] = "mm"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mm")); break; } case FUNIT_CM : { - sal_Char aText[] = "cm"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("cm")); break; } case FUNIT_M : @@ -1213,28 +1202,24 @@ void SdrFormatter::TakeUnitStr(FieldUnit eUnit, XubString& rStr) } case FUNIT_KM : { - sal_Char aText[] = "km"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("km")); break; } // Inch case FUNIT_TWIP : { - sal_Char aText[] = "twip"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("twip")); break; } case FUNIT_POINT : { - sal_Char aText[] = "pt"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pt")); break; } case FUNIT_PICA : { - sal_Char aText[] = "pica"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("pica")); break; } case FUNIT_INCH : @@ -1245,14 +1230,12 @@ void SdrFormatter::TakeUnitStr(FieldUnit eUnit, XubString& rStr) } case FUNIT_FOOT : { - sal_Char aText[] = "ft"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("ft")); break; } case FUNIT_MILE : { - sal_Char aText[] = "mile(s)"; - rStr = UniString(aText, sizeof(aText-1)); + rStr = UniString(RTL_CONSTASCII_USTRINGPARAM("mile(s)")); break; } @@ -1269,3 +1252,4 @@ void SdrFormatter::TakeUnitStr(FieldUnit eUnit, XubString& rStr) //////////////////////////////////////////////////////////////////////////////////////////////////// +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index 79a9c36626..5516404da0 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -159,8 +160,8 @@ void SdrUndoGroup::Redo() XubString SdrUndoGroup::GetComment() const { XubString aRet(aComment); - sal_Char aSearchText[] = "%1"; - String aSearchString(aSearchText, sizeof(aSearchText-1)); + + String aSearchString(RTL_CONSTASCII_USTRINGPARAM("%1")); aRet.SearchAndReplace(aSearchString, aObjDescription); @@ -217,8 +218,8 @@ void SdrUndoGroup::SdrRepeat(SdrView& rView) XubString SdrUndoGroup::GetSdrRepeatComment(SdrView& /*rView*/) const { XubString aRet(aComment); - sal_Char aSearchText[] = "%1"; - String aSearchString(aSearchText, sizeof(aSearchText-1)); + + String aSearchString(RTL_CONSTASCII_USTRINGPARAM("%1")); aRet.SearchAndReplace(aSearchString, ImpGetResStr(STR_ObjNameSingulPlural)); @@ -245,11 +246,11 @@ SdrUndoObj::SdrUndoObj(SdrObject& rNewObj): { } -void SdrUndoObj::GetDescriptionStringForObject( const SdrObject& _rForObject, USHORT nStrCacheID, String& rStr, FASTBOOL bRepeat ) +void SdrUndoObj::GetDescriptionStringForObject( const SdrObject& _rForObject, USHORT nStrCacheID, String& rStr, bool bRepeat ) { rStr = ImpGetResStr(nStrCacheID); - sal_Char aSearchText[] = "%1"; - String aSearchString(aSearchText, sizeof(aSearchText-1)); + + String aSearchString(RTL_CONSTASCII_USTRINGPARAM("%1")); xub_StrLen nPos = rStr.Search(aSearchString); @@ -271,7 +272,7 @@ void SdrUndoObj::GetDescriptionStringForObject( const SdrObject& _rForObject, US } } -void SdrUndoObj::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, FASTBOOL bRepeat) const +void SdrUndoObj::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, bool bRepeat) const { if ( pObj ) GetDescriptionStringForObject( *pObj, nStrCacheID, rStr, bRepeat ); @@ -294,7 +295,7 @@ void SdrUndoObj::ImpShowPageOfThisObject() //////////////////////////////////////////////////////////////////////////////////////////////////// -SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, FASTBOOL bStyleSheet1, FASTBOOL bSaveText) +SdrUndoAttrObj::SdrUndoAttrObj(SdrObject& rNewObj, bool bStyleSheet1, bool bSaveText) : SdrUndoObj(rNewObj), pUndoSet(NULL), pRedoSet(NULL), @@ -822,9 +823,9 @@ void SdrUndoInsertObj::Redo() DBG_ASSERT(!pObj->IsInserted(),"RedoInsertObj: pObj ist bereits Inserted"); if (!pObj->IsInserted()) { - // --> OD 2005-05-10 #i45952# - restore anchor position of an object, + // Restore anchor position of an object, // which becomes a member of a group, because its cleared in method - // <InsertObject(..)>. Needed for correct ReDo in Writer. + // <InsertObject(..)>. Needed for correct ReDo in Writer. (#i45952#) Point aAnchorPos( 0, 0 ); if ( pObjList && pObjList->GetOwnerObj() && @@ -832,17 +833,15 @@ void SdrUndoInsertObj::Redo() { aAnchorPos = pObj->GetAnchorPos(); } - // <-- SdrInsertReason aReason(SDRREASON_UNDO); pObjList->InsertObject(pObj,nOrdNum,&aReason); - // --> OD 2005-05-10 #i45952# + // Arcs lose position when grouped (#i45952#) if ( aAnchorPos.X() || aAnchorPos.Y() ) { pObj->NbcSetAnchorPos( aAnchorPos ); } - // <-- } // #94278# Trigger PageChangeCall @@ -1209,14 +1208,14 @@ void SdrUndoObjSetText::SdrRepeat(SdrView& rView) bool SdrUndoObjSetText::CanSdrRepeat(SdrView& rView) const { - FASTBOOL bOk=FALSE; + bool bOk = false; if (bNewTextAvailable && rView.AreObjectsMarked()) { bOk=TRUE; } return bOk; } -// --> OD 2009-07-09 #i73249# +// Undo/Redo for setting object's name (#i73249#) SdrUndoObjStrAttr::SdrUndoObjStrAttr( SdrObject& rNewObj, const ObjStrAttrType eObjStrAttr, const String& sOldStr, @@ -1455,6 +1454,7 @@ void SdrUndoPage::ImpRemovePage(USHORT nNum) pChkPg=rMod.RemovePage(nNum); } DBG_ASSERT(pChkPg==&mrPage,"SdrUndoPage::ImpRemovePage(): RemovePage!=&mrPage"); + (void)pChkPg; } } @@ -1470,7 +1470,7 @@ void SdrUndoPage::ImpMovePage(USHORT nOldNum, USHORT nNewNum) } } -void SdrUndoPage::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, USHORT /*n*/, FASTBOOL /*bRepeat*/) const +void SdrUndoPage::ImpTakeDescriptionStr(USHORT nStrCacheID, XubString& rStr, USHORT /*n*/, bool /*bRepeat*/) const { rStr=ImpGetResStr(nStrCacheID); } @@ -1572,7 +1572,7 @@ void SdrUndoDelPage::SdrRepeat(SdrView& /*rView*/) bool SdrUndoDelPage::CanSdrRepeat(SdrView& /*rView*/) const { - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1621,7 +1621,7 @@ void SdrUndoCopyPage::SdrRepeat(SdrView& /*rView*/) bool SdrUndoCopyPage::CanSdrRepeat(SdrView& /*rView*/) const { - return FALSE; + return false; } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1869,3 +1869,5 @@ SdrUndoAction* SdrUndoFactory::CreateUndoPageChangeMasterPage(SdrPage& rChangedP } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 4b3ed1855d..bdfed9e872 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -371,7 +372,6 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co USHORT nHitPassNum=0; USHORT nHlplIdx=0; USHORT nGlueId=0; - BOOL bUnmarkedObjHit=FALSE; if (bTextEditHit || bTextEditSel) { eHit=SDRHIT_TEXTEDIT; @@ -429,7 +429,6 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co break; } } - bUnmarkedObjHit=TRUE; } else if (bEditMode && IsHlplVisible() && !IsHlplFront() && pOut!=NULL && PickHelpLine(aLocalLogicPosition,nHitTolLog,*pOut,nHlplIdx,pPV)) { @@ -502,8 +501,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co Point aTemporaryTextRelativePosition(aLocalLogicPosition - aTextRect.TopLeft()); // FitToSize berueksichtigen - SdrFitToSizeType eFit=pTextObj->GetFitToSize(); - BOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); + BOOL bFitToSize(pTextObj->IsFitToSize()); if (bFitToSize) { Fraction aX(aTextRect.GetWidth()-1,aAnchor.GetWidth()-1); Fraction aY(aTextRect.GetHeight()-1,aAnchor.GetHeight()-1); @@ -662,7 +660,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co eEvent=SDREVENT_BEGDRAGOBJ; // Mark+Drag,AddMark+Drag,DeepMark+Drag,Unmark BOOL bGlue=pHdl->GetKind()==HDL_GLUE; BOOL bPoly=!bGlue && IsPointMarkable(*pHdl); - BOOL bMarked=bGlue || bPoly && pHdl->IsSelected(); + BOOL bMarked=bGlue || (bPoly && pHdl->IsSelected()); if (bGlue || bPoly) { eEvent=bGlue ? SDREVENT_MARKGLUEPOINT : SDREVENT_MARKPOINT; @@ -1602,3 +1600,5 @@ void SdrView::SetMasterPagePaintCaching(sal_Bool bOn) } } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdviter.cxx b/svx/source/svdraw/svdviter.cxx index b6260d2c8f..a331aa8b55 100644 --- a/svx/source/svdraw/svdviter.cxx +++ b/svx/source/svdraw/svdviter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -349,3 +350,4 @@ Window* SdrViewIter::NextWindow() //////////////////////////////////////////////////////////////////////////////////////////////////// +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index c9ae654211..e605c8e58b 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -892,3 +893,5 @@ BOOL SdrExchangeView::Paste(Window* /*pWin*/, ULONG /*nFormat*/) DBG_ERROR( "SdrExchangeView::Paste: Not supported anymore" ); return FALSE; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index ff2af501d3..bb73444cd6 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -194,7 +195,7 @@ void SAL_CALL AccessibleCell::release( ) throw () */ sal_Int32 SAL_CALL AccessibleCell::getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ThrowIfDisposed (); return mpText != NULL ? mpText->GetChildCount () : 0; } @@ -206,7 +207,7 @@ sal_Int32 SAL_CALL AccessibleCell::getAccessibleChildCount() throw (::com::sun:: */ Reference<XAccessible> SAL_CALL AccessibleCell::getAccessibleChild (sal_Int32 nIndex) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ThrowIfDisposed (); // todo: does GetChild throw IndexOutOfBoundsException? @@ -223,7 +224,7 @@ Reference<XAccessible> SAL_CALL AccessibleCell::getAccessibleChild (sal_Int32 nI */ Reference<XAccessibleStateSet> SAL_CALL AccessibleCell::getAccessibleStateSet (void) throw (RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); Reference<XAccessibleStateSet> xStateSet; @@ -275,7 +276,7 @@ sal_Bool SAL_CALL AccessibleCell::containsPoint( const ::com::sun::star::awt::Po */ Reference<XAccessible > SAL_CALL AccessibleCell::getAccessibleAtPoint ( const ::com::sun::star::awt::Point& aPoint) throw(RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); sal_Int32 nChildCount = getAccessibleChildCount (); @@ -306,7 +307,7 @@ Reference<XAccessible > SAL_CALL AccessibleCell::getAccessibleAtPoint ( const : ::com::sun::star::awt::Rectangle SAL_CALL AccessibleCell::getBounds(void) throw(RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); ThrowIfDisposed (); @@ -465,7 +466,7 @@ sal_Int32 SAL_CALL AccessibleCell::getBackground (void) throw (RuntimeException) void SAL_CALL AccessibleCell::addEventListener( const Reference<XAccessibleEventListener >& rxListener) throw (RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); if (rBHelper.bDisposed || rBHelper.bInDispose) { @@ -485,7 +486,7 @@ void SAL_CALL AccessibleCell::addEventListener( const Reference<XAccessibleEvent void SAL_CALL AccessibleCell::removeEventListener( const Reference<XAccessibleEventListener >& rxListener) throw (RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; AccessibleContextBase::removeEventListener(rxListener); if (mpText != NULL) mpText->RemoveEventListener (rxListener); @@ -539,7 +540,7 @@ void AccessibleCell::ViewForwarderChanged (ChangeType /*aChangeType*/, const IAc void AccessibleCell::disposing (void) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard (maMutex); // Make sure to send an event that this object looses the focus in the @@ -573,7 +574,7 @@ sal_Int32 SAL_CALL AccessibleCell::getAccessibleIndexInParent (void) throw (Runt ::rtl::OUString SAL_CALL AccessibleCell::getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException) { ThrowIfDisposed (); - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( mxCell.is() ) return mxCell->getName(); @@ -582,3 +583,5 @@ sal_Int32 SAL_CALL AccessibleCell::getAccessibleIndexInParent (void) throw (Runt } } // end of namespace accessibility + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/accessiblecell.hxx b/svx/source/table/accessiblecell.hxx index 9bbaf03003..7d2fd221c1 100644 --- a/svx/source/table/accessiblecell.hxx +++ b/svx/source/table/accessiblecell.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -147,3 +148,5 @@ private: } // end of namespace accessibility #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index 5cdc8b1d7a..5b3890f66f 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,7 +34,7 @@ #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <comphelper/accessiblewrapper.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <tools/debug.hxx> #include <vcl/svapp.hxx> @@ -228,7 +229,7 @@ void SAL_CALL AccessibleTableShapeImpl::modified( const EventObject& /*aEvent*/ // all accessible cell instances still left in aTempChildMap must be disposed // as they are no longer part of the table - for( AccessibleCellMap::iterator iter( aTempChildMap.begin() ); iter != aTempChildMap.end(); iter++ ) + for( AccessibleCellMap::iterator iter( aTempChildMap.begin() ); iter != aTempChildMap.end(); ++iter ) { (*iter).second->dispose(); } @@ -342,14 +343,14 @@ OUString AccessibleTableShape::CreateAccessibleBaseName(void) throw (RuntimeExce sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleChildCount( ) throw(RuntimeException) { - ::vos::OGuard aSolarGuard(::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; return mxImpl->mxTable.is() ? mxImpl->mxTable->getRowCount() * mxImpl->mxTable->getColumnCount() : 0; } //-------------------------------------------------------------------- Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleChild( sal_Int32 i ) throw(IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; ThrowIfDisposed(); return mxImpl->getAccessibleChild( i ); @@ -384,7 +385,7 @@ void SAL_CALL AccessibleTableShape::disposing (void) sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRowCount() throw (RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; return mxImpl->mxTable.is() ? mxImpl->mxTable->getRowCount() : 0; } @@ -392,7 +393,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRowCount() throw (RuntimeE sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumnCount( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; return mxImpl->mxTable.is() ? mxImpl->mxTable->getColumnCount() : 0; } @@ -408,7 +409,7 @@ OUString SAL_CALL AccessibleTableShape::getAccessibleRowDescription( sal_Int32 n OUString SAL_CALL AccessibleTableShape::getAccessibleColumnDescription( sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, 0 ); return OUString(); } @@ -417,7 +418,7 @@ OUString SAL_CALL AccessibleTableShape::getAccessibleColumnDescription( sal_Int3 sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, nRow ); if( mxImpl->mxTable.is() ) { @@ -432,7 +433,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRowExtentAt( sal_Int32 nRo sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, nRow ); if( mxImpl->mxTable.is() ) { @@ -479,7 +480,7 @@ Sequence< sal_Int32 > SAL_CALL AccessibleTableShape::getSelectedAccessibleColumn sal_Bool SAL_CALL AccessibleTableShape::isAccessibleRowSelected( sal_Int32 nRow ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( 0, nRow ); return sal_False; } @@ -488,7 +489,7 @@ sal_Bool SAL_CALL AccessibleTableShape::isAccessibleRowSelected( sal_Int32 nRow sal_Bool SAL_CALL AccessibleTableShape::isAccessibleColumnSelected( sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, 0 ); return sal_False; } @@ -497,7 +498,7 @@ sal_Bool SAL_CALL AccessibleTableShape::isAccessibleColumnSelected( sal_Int32 nC Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, nRow ); sal_Int32 nChildIndex = 0; @@ -527,7 +528,7 @@ Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleSummary( ) sal_Bool SAL_CALL AccessibleTableShape::isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, nRow ); SvxTableController* pController = getTableController(); @@ -546,7 +547,7 @@ sal_Bool SAL_CALL AccessibleTableShape::isAccessibleSelected( sal_Int32 nRow, sa sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; checkCellPosition( nColumn, nRow ); return mxImpl->mxTable.is() ? (nRow * mxImpl->mxTable->getColumnCount() + nColumn) : 0; } @@ -555,7 +556,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleIndex( sal_Int32 nRow, sal sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRow( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; sal_Int32 nColumn = 0, nRow = 0; mxImpl->getColumnAndRow( nChildIndex, nColumn, nRow ); return nRow; @@ -565,7 +566,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleRow( sal_Int32 nChildIndex sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumn( sal_Int32 nChildIndex ) throw (IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; sal_Int32 nColumn = 0, nRow = 0; mxImpl->getColumnAndRow( nChildIndex, nColumn, nRow ); return nChildIndex; @@ -577,7 +578,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getAccessibleColumn( sal_Int32 nChildIn void SAL_CALL AccessibleTableShape::selectAccessibleChild( sal_Int32 nChildIndex ) throw ( IndexOutOfBoundsException, RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; CellPos aPos; mxImpl->getColumnAndRow( nChildIndex, aPos.mnCol, aPos.mnRow ); @@ -603,7 +604,7 @@ void SAL_CALL AccessibleTableShape::selectAccessibleChild( sal_Int32 nChildIndex sal_Bool SAL_CALL AccessibleTableShape::isAccessibleChildSelected( sal_Int32 nChildIndex ) throw ( IndexOutOfBoundsException, RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; CellPos aPos; mxImpl->getColumnAndRow( nChildIndex, aPos.mnCol, aPos.mnRow ); @@ -614,7 +615,7 @@ sal_Bool SAL_CALL AccessibleTableShape::isAccessibleChildSelected( sal_Int32 nCh void SAL_CALL AccessibleTableShape::clearAccessibleSelection() throw ( RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SvxTableController* pController = getTableController(); if( pController ) @@ -624,7 +625,7 @@ void SAL_CALL AccessibleTableShape::clearAccessibleSelection() throw ( RuntimeEx void SAL_CALL AccessibleTableShape::selectAllAccessibleChildren() throw ( RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; // todo: force selection of shape? SvxTableController* pController = getTableController(); @@ -636,7 +637,7 @@ void SAL_CALL AccessibleTableShape::selectAllAccessibleChildren() throw ( Runtim sal_Int32 SAL_CALL AccessibleTableShape::getSelectedAccessibleChildCount() throw ( RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SvxTableController* pController = getTableController(); if( pController && pController->hasSelectedCells() ) @@ -656,7 +657,7 @@ sal_Int32 SAL_CALL AccessibleTableShape::getSelectedAccessibleChildCount() throw Reference< XAccessible > SAL_CALL AccessibleTableShape::getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw ( IndexOutOfBoundsException, RuntimeException) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; SvxTableController* pController = getTableController(); if( pController && pController->hasSelectedCells() ) @@ -685,7 +686,7 @@ Reference< XAccessible > SAL_CALL AccessibleTableShape::getSelectedAccessibleChi void SAL_CALL AccessibleTableShape::deselectAccessibleChild( sal_Int32 nChildIndex ) throw ( IndexOutOfBoundsException, RuntimeException ) { - ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; CellPos aPos; mxImpl->getColumnAndRow( nChildIndex, aPos.mnCol, aPos.mnRow ); @@ -721,3 +722,5 @@ void AccessibleTableShape::checkCellPosition( sal_Int32 nCol, sal_Int32 nRow ) t } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 3d75c031f9..0030b622d3 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,12 +33,13 @@ #include <com/sun/star/style/XStyle.hpp> #include <com/sun/star/text/WritingMode.hpp> #include <com/sun/star/table/TableBorder.hpp> +#include <com/sun/star/table/BorderLine2.hpp> #include <cppuhelper/typeprovider.hxx> #include <svl/style.hxx> #include <svl/itemset.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include "svx/sdr/properties/textproperties.hxx" @@ -64,7 +66,6 @@ // ----------------------------------------------------------------------------- using ::rtl::OUString; -using ::vos::OGuard; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; @@ -992,7 +993,7 @@ Reference< XPropertySetInfo > SAL_CALL Cell::getPropertySetInfo() throw(RuntimeE void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any& rValue ) throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1137,7 +1138,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any& Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1253,7 +1254,7 @@ void SAL_CALL Cell::removeVetoableChangeListener( const OUString& /*PropertyName void SAL_CALL Cell::setPropertyValues( const Sequence< OUString >& aPropertyNames, const Sequence< Any >& aValues ) throw (PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { - OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1284,7 +1285,7 @@ void SAL_CALL Cell::setPropertyValues( const Sequence< OUString >& aPropertyName Sequence< Any > SAL_CALL Cell::getPropertyValues( const Sequence< OUString >& aPropertyNames ) throw (RuntimeException) { - OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1338,7 +1339,7 @@ void SAL_CALL Cell::firePropertiesChangeEvent( const Sequence< OUString >& /*aPr PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) throw(UnknownPropertyException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1450,7 +1451,7 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) th Sequence< PropertyState > SAL_CALL Cell::getPropertyStates( const Sequence< OUString >& aPropertyName ) throw(UnknownPropertyException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1481,7 +1482,7 @@ Sequence< PropertyState > SAL_CALL Cell::getPropertyStates( const Sequence< OUSt void SAL_CALL Cell::setPropertyToDefault( const OUString& PropertyName ) throw(UnknownPropertyException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1524,7 +1525,7 @@ void SAL_CALL Cell::setPropertyToDefault( const OUString& PropertyName ) throw(U Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( (mpProperties == 0) || (GetModel() == 0) ) throw DisposedException(); @@ -1807,3 +1808,4 @@ OUString Cell::getName() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx index 87c8198461..32ba7b388f 100644 --- a/svx/source/table/cell.hxx +++ b/svx/source/table/cell.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -242,3 +243,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/cellcursor.cxx b/svx/source/table/cellcursor.cxx index d3eebb8f73..c1f6ac6ddc 100644 --- a/svx/source/table/cellcursor.cxx +++ b/svx/source/table/cellcursor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -588,3 +589,5 @@ sal_Bool SAL_CALL CellCursor::isUnmergeable( ) throw (RuntimeException) // ----------------------------------------------------------------------------- } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/cellcursor.hxx b/svx/source/table/cellcursor.hxx index e437edcf23..8876abe7ea 100644 --- a/svx/source/table/cellcursor.hxx +++ b/svx/source/table/cellcursor.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -81,3 +82,5 @@ protected: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/celleditsource.cxx b/svx/source/table/celleditsource.cxx index f599bcd502..5fea647594 100644 --- a/svx/source/table/celleditsource.cxx +++ b/svx/source/table/celleditsource.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,7 @@ #include <rtl/ref.hxx> #include <osl/mutex.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <comphelper/processfactory.hxx> #include <svl/lstner.hxx> @@ -61,7 +62,6 @@ using ::rtl::OUString; using namespace ::osl; -using namespace ::vos; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::linguistic2; @@ -938,7 +938,7 @@ CellEditSource::CellEditSource( CellEditSourceImpl* pImpl ) //------------------------------------------------------------------------ CellEditSource::~CellEditSource() { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; mpImpl->release(); } @@ -1054,3 +1054,5 @@ void CellEditSource::ChangeModel( SdrModel* pNewModel ) //------------------------------------------------------------------------ } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/celleditsource.hxx b/svx/source/table/celleditsource.hxx index f94b4812c0..cc9249a5b1 100644 --- a/svx/source/table/celleditsource.hxx +++ b/svx/source/table/celleditsource.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -87,3 +88,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/cellrange.cxx b/svx/source/table/cellrange.cxx index 50f400e218..4adb71dd71 100644 --- a/svx/source/table/cellrange.cxx +++ b/svx/source/table/cellrange.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -130,3 +131,5 @@ Reference< XCellRange > SAL_CALL CellRange::getCellRangeByName( const OUString& // ----------------------------------------------------------------------------- } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/cellrange.hxx b/svx/source/table/cellrange.hxx index 3fa3fef891..49725fa1c1 100644 --- a/svx/source/table/cellrange.hxx +++ b/svx/source/table/cellrange.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,5 @@ protected: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/celltypes.hxx b/svx/source/table/celltypes.hxx index b81caf6ee7..9f28ebbb67 100644 --- a/svx/source/table/celltypes.hxx +++ b/svx/source/table/celltypes.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -107,3 +108,4 @@ private: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/propertyset.cxx b/svx/source/table/propertyset.cxx index 247f9bd7a2..c3f643b05e 100644 --- a/svx/source/table/propertyset.cxx +++ b/svx/source/table/propertyset.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -257,3 +258,5 @@ void SAL_CALL FastPropertySet::firePropertiesChangeEvent( const Sequence< OUStri } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/propertyset.hxx b/svx/source/table/propertyset.hxx index 43ce01a7b3..ae07d035ae 100644 --- a/svx/source/table/propertyset.hxx +++ b/svx/source/table/propertyset.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -107,3 +108,5 @@ private: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index ed5c3849c1..ab74a5cdf5 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -270,6 +271,7 @@ public: SdrTableObjImpl::SdrTableObjImpl() : mpTableObj( 0 ) , mpLayouter( 0 ) +, mbModifyPending( false ) { } @@ -1351,16 +1353,16 @@ void SdrTableObj::FitFrameToTextSize() // -------------------------------------------------------------------- -FASTBOOL SdrTableObj::IsAutoGrowHeight() const +bool SdrTableObj::IsAutoGrowHeight() const { - return TRUE; + return true; } // -------------------------------------------------------------------- -FASTBOOL SdrTableObj::IsAutoGrowWidth() const +bool SdrTableObj::IsAutoGrowWidth() const { - return TRUE; + return true; } // -------------------------------------------------------------------- @@ -1460,7 +1462,7 @@ void SdrTableObj::SetModel(SdrModel* pNewModel) // -------------------------------------------------------------------- -void SdrTableObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, Rectangle* pAnchorRect, BOOL bLineWidth ) const +void SdrTableObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, BOOL bLineWidth ) const { if( mpImpl ) TakeTextRect( mpImpl->maEditPos, rOutliner, rTextRect, bNoEditText, pAnchorRect, bLineWidth ); @@ -1468,7 +1470,7 @@ void SdrTableObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FA // -------------------------------------------------------------------- -void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rectangle& rTextRect, FASTBOOL bNoEditText, Rectangle* pAnchorRect, BOOL /*bLineWidth*/ ) const +void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, Rectangle& rTextRect, bool bNoEditText, Rectangle* pAnchorRect, BOOL /*bLineWidth*/ ) const { if( !mpImpl ) return; @@ -2050,7 +2052,7 @@ sal_Bool SdrTableObj::BegTextEdit(SdrOutliner& rOutl) rOutl.SetRefDevice( pModel->GetRefDevice() ); // -- - FASTBOOL bUpdMerk=rOutl.GetUpdateMode(); + bool bUpdMerk=rOutl.GetUpdateMode(); if (bUpdMerk) rOutl.SetUpdateMode(FALSE); Size aPaperMin; Size aPaperMax; @@ -2212,10 +2214,10 @@ void SdrTableObj::NbcResize(const Point& rRef, const Fraction& xFact, const Frac // -------------------------------------------------------------------- -FASTBOOL SdrTableObj::AdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt) +bool SdrTableObj::AdjustTextFrameWidthAndHeight(bool bHgt, bool bWdt) { Rectangle aNeuRect(maLogicRect); - FASTBOOL bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt,bWdt); + bool bRet=AdjustTextFrameWidthAndHeight(aNeuRect,bHgt,bWdt); if (bRet) { Rectangle aBoundRect0; @@ -2232,7 +2234,7 @@ FASTBOOL SdrTableObj::AdjustTextFrameWidthAndHeight(FASTBOOL bHgt, FASTBOOL bWdt // -------------------------------------------------------------------- -FASTBOOL SdrTableObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHeight, FASTBOOL bWidth) const +bool SdrTableObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHeight, bool bWidth) const { if((pModel == NULL) || rR.IsEmpty() || !mpImpl || !mpImpl->mxTable.is() ) return FALSE; @@ -2328,9 +2330,9 @@ bool SdrTableObj::IsRealyEdited() const // -------------------------------------------------------------------- -FASTBOOL SdrTableObj::IsFontwork() const +bool SdrTableObj::IsFontwork() const { - return FALSE; + return false; } // -------------------------------------------------------------------- @@ -2599,19 +2601,19 @@ basegfx::B2DPolyPolygon SdrTableObj::getSpecialDragPoly(const SdrDragStat& rDrag // Create // -------------------------------------------------------------------- -FASTBOOL SdrTableObj::BegCreate(SdrDragStat& rStat) +bool SdrTableObj::BegCreate(SdrDragStat& rStat) { rStat.SetOrtho4Possible(); Rectangle aRect1(rStat.GetStart(), rStat.GetNow()); aRect1.Justify(); rStat.SetActionRect(aRect1); aRect = aRect1; - return TRUE; + return true; } // -------------------------------------------------------------------- -FASTBOOL SdrTableObj::MovCreate(SdrDragStat& rStat) +bool SdrTableObj::MovCreate(SdrDragStat& rStat) { Rectangle aRect1; rStat.TakeCreateRect(aRect1); @@ -2620,12 +2622,12 @@ FASTBOOL SdrTableObj::MovCreate(SdrDragStat& rStat) aRect=aRect1; // fuer ObjName SetBoundRectDirty(); bSnapRectDirty=TRUE; - return TRUE; + return true; } // -------------------------------------------------------------------- -FASTBOOL SdrTableObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) +bool SdrTableObj::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) { rStat.TakeCreateRect(aRect); ImpJustifyRect(aRect); @@ -2638,9 +2640,9 @@ void SdrTableObj::BrkCreate(SdrDragStat& /*rStat*/) // -------------------------------------------------------------------- -FASTBOOL SdrTableObj::BckCreate(SdrDragStat& /*rStat*/) +bool SdrTableObj::BckCreate(SdrDragStat& /*rStat*/) { - return TRUE; + return true; } // -------------------------------------------------------------------- @@ -2818,3 +2820,5 @@ void SdrTableObj::uno_unlock() } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablecolumn.cxx b/svx/source/table/tablecolumn.cxx index f59c2bf262..62258ee8af 100644 --- a/svx/source/table/tablecolumn.cxx +++ b/svx/source/table/tablecolumn.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,6 +98,8 @@ TableColumn& TableColumn::operator=( const TableColumn& r ) mbOptimalWidth = r.mbOptimalWidth; mbIsVisible = r.mbIsVisible; mbIsStartOfNewPage = r.mbIsStartOfNewPage; + maName = r.maName; + mnColumn = r.mnColumn; return *this; } @@ -303,3 +306,5 @@ rtl::Reference< ::comphelper::FastPropertySetInfo > TableColumn::getStaticProper // ----------------------------------------------------------------------------- } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablecolumn.hxx b/svx/source/table/tablecolumn.hxx index 5d9f012cc3..37e041101b 100644 --- a/svx/source/table/tablecolumn.hxx +++ b/svx/source/table/tablecolumn.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -86,3 +87,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablecolumns.cxx b/svx/source/table/tablecolumns.cxx index b04a9da88d..f05492061e 100644 --- a/svx/source/table/tablecolumns.cxx +++ b/svx/source/table/tablecolumns.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -139,3 +140,5 @@ sal_Bool SAL_CALL TableColumns::hasElements() throw (RuntimeException) // ----------------------------------------------------------------------------- } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablecolumns.hxx b/svx/source/table/tablecolumns.hxx index f8be12c717..6fd9f21f72 100644 --- a/svx/source/table/tablecolumns.hxx +++ b/svx/source/table/tablecolumns.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,3 +70,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index fbfcdbc296..73fd948eda 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -2616,3 +2617,5 @@ IMPL_LINK( SvxTableController, UpdateHdl, void *, EMPTYARG ) } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablecontroller.hxx b/svx/source/table/tablecontroller.hxx index 8528db051a..b0e199e899 100644 --- a/svx/source/table/tablecontroller.hxx +++ b/svx/source/table/tablecontroller.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -168,3 +169,4 @@ private: #endif // _SVX_TABLECONTROLLER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx index 3d4f0e10cf..9c46944f07 100644 --- a/svx/source/table/tabledesign.cxx +++ b/svx/source/table/tabledesign.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,7 +41,7 @@ #include <comphelper/serviceinfohelper.hxx> #include <osl/mutex.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <cppuhelper/basemutex.hxx> @@ -70,7 +71,6 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::container; using ::rtl::OUString; -using ::vos::OGuard; using ::osl::MutexGuard; using ::osl::ClearableMutexGuard; using ::cppu::OInterfaceContainerHelper; @@ -313,7 +313,7 @@ void SAL_CALL TableDesignStyle::setName( const OUString& rName ) throw (RuntimeE Any SAL_CALL TableDesignStyle::getByName( const OUString& rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const CellStyleNameMap& rMap = getCellStyleNameMap(); @@ -328,7 +328,7 @@ Any SAL_CALL TableDesignStyle::getByName( const OUString& rName ) throw(NoSuchEl Sequence< OUString > SAL_CALL TableDesignStyle::getElementNames() throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const CellStyleNameMap& rMap = getCellStyleNameMap(); Sequence< OUString > aRet( rMap.size() ); @@ -345,7 +345,7 @@ Sequence< OUString > SAL_CALL TableDesignStyle::getElementNames() throw(RuntimeE sal_Bool SAL_CALL TableDesignStyle::hasByName( const OUString& rName ) throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const CellStyleNameMap& rMap = getCellStyleNameMap(); @@ -382,7 +382,7 @@ sal_Int32 SAL_CALL TableDesignStyle::getCount() throw(RuntimeException) Any SAL_CALL TableDesignStyle::getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (Index < 0) || (Index >= style_count) ) throw IndexOutOfBoundsException(); @@ -396,7 +396,7 @@ Any SAL_CALL TableDesignStyle::getByIndex( sal_Int32 Index ) throw(IndexOutOfBou void SAL_CALL TableDesignStyle::replaceByName( const OUString& rName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const CellStyleNameMap& rMap = getCellStyleNameMap(); CellStyleNameMap::const_iterator iter = rMap.find( rName ); @@ -546,7 +546,7 @@ void SAL_CALL TableDesignFamily::setName( const OUString& ) throw (RuntimeExcept Any SAL_CALL TableDesignFamily::getByName( const OUString& rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ ) { @@ -561,7 +561,7 @@ Any SAL_CALL TableDesignFamily::getByName( const OUString& rName ) throw(NoSuchE Sequence< OUString > SAL_CALL TableDesignFamily::getElementNames() throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Sequence< OUString > aRet( maDesigns.size() ); OUString* pNames = aRet.getArray(); @@ -576,7 +576,7 @@ Sequence< OUString > SAL_CALL TableDesignFamily::getElementNames() throw(Runtime sal_Bool SAL_CALL TableDesignFamily::hasByName( const OUString& aName ) throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ ) if( (*iter)->getName() == aName ) @@ -598,7 +598,7 @@ Type SAL_CALL TableDesignFamily::getElementType() throw(RuntimeException) sal_Bool SAL_CALL TableDesignFamily::hasElements() throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return maDesigns.empty() ? sal_False : sal_True; } @@ -609,7 +609,7 @@ sal_Bool SAL_CALL TableDesignFamily::hasElements() throw(RuntimeException) sal_Int32 SAL_CALL TableDesignFamily::getCount() throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return sal::static_int_cast< sal_Int32 >( maDesigns.size() ); } @@ -618,7 +618,7 @@ sal_Int32 SAL_CALL TableDesignFamily::getCount() throw(RuntimeException) Any SAL_CALL TableDesignFamily::getByIndex( sal_Int32 Index ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (Index >= 0) && (Index < sal::static_int_cast< sal_Int32 >( maDesigns.size() ) ) ) return Any( maDesigns[Index] ); @@ -632,7 +632,7 @@ Any SAL_CALL TableDesignFamily::getByIndex( sal_Int32 Index ) throw(IndexOutOfBo void SAL_CALL TableDesignFamily::insertByName( const OUString& rName, const Any& rElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XStyle > xStyle( rElement, UNO_QUERY ); if( !xStyle.is() ) @@ -650,7 +650,7 @@ void SAL_CALL TableDesignFamily::insertByName( const OUString& rName, const Any& void SAL_CALL TableDesignFamily::removeByName( const OUString& rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; for( TableDesignStyleVector::iterator iter( maDesigns.begin() ); iter != maDesigns.end(); iter++ ) { @@ -671,7 +671,7 @@ void SAL_CALL TableDesignFamily::removeByName( const OUString& rName ) throw(NoS void SAL_CALL TableDesignFamily::replaceByName( const OUString& rName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XStyle > xStyle( aElement, UNO_QUERY ); if( !xStyle.is() ) @@ -696,7 +696,7 @@ void SAL_CALL TableDesignFamily::replaceByName( const OUString& rName, const Any Reference< XInterface > SAL_CALL TableDesignFamily::createInstance() throw(Exception, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return Reference< XInterface >( static_cast< XStyle* >( new TableDesignStyle ) ); } @@ -717,7 +717,7 @@ void SAL_CALL TableDesignFamily::dispose( ) throw (RuntimeException) TableDesignStyleVector aDesigns; aDesigns.swap( maDesigns ); - for( TableDesignStyleVector::iterator iter( aDesigns.begin() ); iter != aDesigns.end(); iter++ ) + for( TableDesignStyleVector::iterator iter( aDesigns.begin() ); iter != aDesigns.end(); ++iter ) { Reference< XComponent > xComp( (*iter), UNO_QUERY ); if( xComp.is() ) @@ -806,3 +806,5 @@ SVX_DLLPUBLIC Reference< XNameAccess > CreateTableDesignFamily() } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx index 26aa2fce2c..c626e6abe0 100644 --- a/svx/source/table/tablehandles.cxx +++ b/svx/source/table/tablehandles.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -312,3 +313,5 @@ void TableBorderHdl::CreateB2dIAObject() } // end of namespace table } // end of namespace sdr + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablehandles.hxx b/svx/source/table/tablehandles.hxx index 907abe6604..b243e1d82a 100644 --- a/svx/source/table/tablehandles.hxx +++ b/svx/source/table/tablehandles.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -94,3 +95,5 @@ private: } // end of namespace sdr #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 5a4af333b2..138b665735 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -155,8 +156,7 @@ bool TableLayouter::getCellArea( const CellPos& rPos, basegfx::B2IRectangle& rAr } // ----------------------------------------------------------------------------- - -sal_Int32 TableLayouter::getRowHeight( sal_Int32 nRow ) +sal_Int32 TableLayouter::getRowHeight( sal_Int32 nRow ) const { if( isValidRow(nRow) ) return maRows[nRow].mnSize; @@ -179,8 +179,7 @@ void TableLayouter::setRowHeight( sal_Int32 nRow, sal_Int32 nHeight ) } // ----------------------------------------------------------------------------- - -sal_Int32 TableLayouter::getColumnWidth( sal_Int32 nColumn ) +sal_Int32 TableLayouter::getColumnWidth( sal_Int32 nColumn ) const { if( isValidColumn(nColumn) ) return maColumns[nColumn].mnSize; @@ -1203,7 +1202,6 @@ void TableLayouter::DistributeRows( ::Rectangle& rArea, sal_Int32 nFirstRow, sal } // ----------------------------------------------------------------------------- - void TableLayouter::SetWritingMode( com::sun::star::text::WritingMode eWritingMode ) { meWritingMode = eWritingMode; @@ -1298,3 +1296,5 @@ sal_Int32 TableLayouter::detectInsertedOrRemovedRows() // ----------------------------------------------------------------------------- } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablelayouter.hxx b/svx/source/table/tablelayouter.hxx index 6e3c17c3c7..1bbe0c474d 100644 --- a/svx/source/table/tablelayouter.hxx +++ b/svx/source/table/tablelayouter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -94,13 +95,12 @@ public: ::sal_Int32 getRowCount() const { return static_cast< ::sal_Int32 >( maRows.size() ); } ::sal_Int32 getColumnCount() const { return static_cast< ::sal_Int32 >( maColumns.size() ); } - - sal_Int32 getRowHeight( sal_Int32 nRow ); + sal_Int32 getRowHeight( sal_Int32 nRow ) const; // sets the layout height of the given row hard, LayoutTable must be called directly after calling this method! */ void setRowHeight( sal_Int32 nRow, sal_Int32 nHeight ); - sal_Int32 getColumnWidth( sal_Int32 nColumn ); + sal_Int32 getColumnWidth( sal_Int32 nColumn ) const; // sets the layout width of the given column hard, LayoutTable must be called directly after calling this method! */ void setColumnWidth( sal_Int32 nColumn, sal_Int32 nWidth ); @@ -176,3 +176,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablemodel.cxx b/svx/source/table/tablemodel.cxx index 7c02473b17..6e7b6643b3 100644 --- a/svx/source/table/tablemodel.cxx +++ b/svx/source/table/tablemodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,7 +35,7 @@ #include <boost/bind.hpp> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include "cell.hxx" #include "cellcursor.hxx" @@ -53,7 +54,6 @@ using ::rtl::OUString; using namespace ::osl; -using namespace ::vos; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::table; using namespace ::com::sun::star::lang; @@ -315,7 +315,7 @@ void TableModel::UndoRemoveColumns( sal_Int32 nIndex, ColumnVector& aCols, CellV Reference< XCellCursor > SAL_CALL TableModel::createCursor() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; return createCursorByRange( Reference< XCellRange >( this ) ); } @@ -323,7 +323,7 @@ Reference< XCellCursor > SAL_CALL TableModel::createCursor() throw (RuntimeExcep Reference< XCellCursor > SAL_CALL TableModel::createCursorByRange( const Reference< XCellRange >& Range ) throw (IllegalArgumentException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; ICellRange* pRange = dynamic_cast< ICellRange* >( Range.get() ); if( (pRange == 0) || (pRange->getTable().get() != this) ) @@ -337,7 +337,7 @@ Reference< XCellCursor > SAL_CALL TableModel::createCursorByRange( const Referen sal_Int32 SAL_CALL TableModel::getRowCount() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; return getRowCountImpl(); } @@ -345,7 +345,7 @@ sal_Int32 SAL_CALL TableModel::getRowCount() throw (RuntimeException) sal_Int32 SAL_CALL TableModel::getColumnCount() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; return getColumnCountImpl(); } @@ -355,7 +355,7 @@ sal_Int32 SAL_CALL TableModel::getColumnCount() throw (RuntimeException) void TableModel::dispose() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; TableModelBase::dispose(); } @@ -379,7 +379,7 @@ void SAL_CALL TableModel::removeEventListener( const Reference< XEventListener > sal_Bool SAL_CALL TableModel::isModified( ) throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; return mbModified; } @@ -388,7 +388,7 @@ sal_Bool SAL_CALL TableModel::isModified( ) throw (RuntimeException) void SAL_CALL TableModel::setModified( sal_Bool bModified ) throw (PropertyVetoException, RuntimeException) { { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; mbModified = bModified; } if( bModified ) @@ -417,7 +417,7 @@ void SAL_CALL TableModel::removeModifyListener( const Reference< XModifyListener Reference< XTableColumns > SAL_CALL TableModel::getColumns() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( !mxTableColumns.is() ) mxTableColumns.set( new TableColumns( this ) ); @@ -428,7 +428,7 @@ Reference< XTableColumns > SAL_CALL TableModel::getColumns() throw (RuntimeExcep Reference< XTableRows > SAL_CALL TableModel::getRows() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( !mxTableRows.is() ) mxTableRows.set( new TableRows( this ) ); @@ -441,7 +441,7 @@ Reference< XTableRows > SAL_CALL TableModel::getRows() throw (RuntimeException) Reference< XCell > SAL_CALL TableModel::getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw ( IndexOutOfBoundsException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; CellRef xCell( getCell( nColumn, nRow ) ); if( xCell.is() ) @@ -454,7 +454,7 @@ Reference< XCell > SAL_CALL TableModel::getCellByPosition( sal_Int32 nColumn, sa Reference< XCellRange > SAL_CALL TableModel::getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw (IndexOutOfBoundsException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( (nLeft >= 0) && (nTop >= 0) && (nRight >= nLeft) && (nBottom >= nTop) && (nRight < getColumnCountImpl()) && (nBottom < getRowCountImpl() ) ) { @@ -592,14 +592,14 @@ void TableModel::disposing() void TableModel::lockBroadcasts() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; ++mnNotifyLock; } // ----------------------------------------------------------------------------- void TableModel::unlockBroadcasts() throw (RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; --mnNotifyLock; if( mnNotifyLock <= 0 ) { @@ -1256,3 +1256,5 @@ void TableModel::updateColumns() // ----------------------------------------------------------------------------- } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablemodel.hxx b/svx/source/table/tablemodel.hxx index c67def74e6..518bf1caba 100644 --- a/svx/source/table/tablemodel.hxx +++ b/svx/source/table/tablemodel.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -223,3 +224,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablerow.cxx b/svx/source/table/tablerow.cxx index 1de353a875..16764e2bc1 100644 --- a/svx/source/table/tablerow.cxx +++ b/svx/source/table/tablerow.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -115,6 +116,7 @@ TableRow& TableRow::operator=( const TableRow& r ) mbIsVisible = r.mbIsVisible; mbIsStartOfNewPage = r.mbIsStartOfNewPage; maName = r.maName; + mnRow = r.mnRow; return *this; } @@ -379,3 +381,5 @@ rtl::Reference< ::comphelper::FastPropertySetInfo > TableRow::getStaticPropertyS } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablerow.hxx b/svx/source/table/tablerow.hxx index a259dfa787..9d7e506101 100644 --- a/svx/source/table/tablerow.hxx +++ b/svx/source/table/tablerow.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -90,3 +91,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablerows.cxx b/svx/source/table/tablerows.cxx index 1e3587033e..ed04a5d81c 100644 --- a/svx/source/table/tablerows.cxx +++ b/svx/source/table/tablerows.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -134,3 +135,5 @@ sal_Bool SAL_CALL TableRows::hasElements() throw (RuntimeException) // ----------------------------------------------------------------------------- } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablerows.hxx b/svx/source/table/tablerows.hxx index 8e449be1c7..e8e82281a2 100644 --- a/svx/source/table/tablerows.hxx +++ b/svx/source/table/tablerows.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,3 +70,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablertfexporter.cxx b/svx/source/table/tablertfexporter.cxx index bbdb03aff8..e01946bcd5 100644 --- a/svx/source/table/tablertfexporter.cxx +++ b/svx/source/table/tablertfexporter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,7 +51,6 @@ #include "editeng/editeng.hxx" #include "editeng/outlobj.hxx" -//#include <tablertfexporter.hxx> using ::rtl::OUString; using namespace ::com::sun::star::uno; @@ -282,3 +282,4 @@ void SdrTableRtfExporter::WriteCell( sal_Int32 nCol, sal_Int32 nRow ) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index 7b9bef62b4..5c217129c9 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -445,3 +446,4 @@ void SdrTableObj::ImportAsRTF( SvStream& rStream, SdrTableObj& rObj ) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tableundo.cxx b/svx/source/table/tableundo.cxx index 5c3c1d48b2..67b36aaf0b 100644 --- a/svx/source/table/tableundo.cxx +++ b/svx/source/table/tableundo.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -557,3 +558,5 @@ void TableStyleUndo::getData( Data& rData ) } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/tableundo.hxx b/svx/source/table/tableundo.hxx index 1bfc8c5748..185a816c64 100644 --- a/svx/source/table/tableundo.hxx +++ b/svx/source/table/tableundo.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,7 +76,7 @@ private: ::sal_Int32 mnRowSpan; ::sal_Int32 mnColSpan; - Data() : mpProperties(0), mpOutlinerParaObject(0) {}; + Data() : mpProperties(NULL), mpOutlinerParaObject(NULL), mfValue(0) {}; }; void setDataToCell( const Data& rData ); @@ -257,3 +258,5 @@ private: } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index 5f0af00fc5..b2e24ed4e8 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -332,7 +333,8 @@ namespace drawinglayer fExtendOE * fTwipsToMM, true, getLeftIsOutside(), - getLeftLine().GetColor().getBColor())); + getLeftLine().GetColor().getBColor(), + getLeftLine().GetStyle())); } } @@ -374,7 +376,8 @@ namespace drawinglayer fExtendOE * fTwipsToMM, true, getBottomIsOutside(), - getBottomLine().GetColor().getBColor())); + getBottomLine().GetColor().getBColor(), + getBottomLine().GetStyle())); } } @@ -416,7 +419,8 @@ namespace drawinglayer fExtendIE * fTwipsToMM, getRightIsOutside(), true, - getRightLine().GetColor().getBColor())); + getRightLine().GetColor().getBColor(), + getRightLine().GetStyle())); } } @@ -458,7 +462,8 @@ namespace drawinglayer fExtendIE * fTwipsToMM, getTopIsOutside(), true, - getTopLine().GetColor().getBColor())); + getTopLine().GetColor().getBColor(), + getTopLine().GetStyle())); } } @@ -734,3 +739,5 @@ namespace sdr ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/table/viewcontactoftableobj.hxx b/svx/source/table/viewcontactoftableobj.hxx index 90fb2627b8..3a7b5e4c83 100644 --- a/svx/source/table/viewcontactoftableobj.hxx +++ b/svx/source/table/viewcontactoftableobj.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,5 @@ namespace sdr #endif // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/colorwindow.hxx b/svx/source/tbxctrls/colorwindow.hxx index d3e22e9c0a..763f2bfb8f 100644 --- a/svx/source/tbxctrls/colorwindow.hxx +++ b/svx/source/tbxctrls/colorwindow.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ //======================================================================== // class SvxColorWindow_Impl -------------------------------------------------- //======================================================================== @@ -46,3 +47,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index f5d4d0194b..af072230f1 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -659,3 +660,5 @@ long SvxColorDockingWindow::Notify( NotifyEvent& rNEvt ) return nRet ? nRet : SfxDockingWindow::Notify( rNEvt ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/colrctrl.src b/svx/source/tbxctrls/colrctrl.src index da7b5eba64..151261ee15 100644 --- a/svx/source/tbxctrls/colrctrl.src +++ b/svx/source/tbxctrls/colrctrl.src @@ -24,8 +24,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - // include --------------------------------------------------------------- - //#include "colrctrl.hrc" + #include <svx/dialogs.hrc> #include "helpid.hrc" // pragma ---------------------------------------------------------------- diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index c0e630efb7..3e9992f9c9 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,8 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -// include --------------------------------------------------------------- - #include <string> // HACK: prevent conflict between STLPORT and Workshop headers #include <com/sun/star/util/XURLTransformer.hpp> @@ -102,7 +101,6 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow( svt::ToolboxController& rCon for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) { maImgDirection[i] = Image( SVX_RES( IMG_DIRECTION + i ) ); - maImgDirectionH[i] = Image( SVX_RES( IMG_DIRECTION_H + i ) ); } SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) ); @@ -113,12 +111,10 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow( svt::ToolboxController& rCon mpDirectionSet->SetColCount( 3 ); mpDirectionSet->EnableFullItemMode( FALSE ); - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) { String aText( SVX_RES( STR_DIRECTION + i ) ); - mpDirectionSet->InsertItem( i+1, bHighContrast ? maImgDirectionH[ i ] : maImgDirection[ i ], aText ); + mpDirectionSet->InsertItem( i+1, maImgDirection[ i ], aText ); } mpDirectionSet->SetOutputSizePixel( Size( 72, 72 ) ); @@ -146,7 +142,7 @@ void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt ) for( USHORT i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) { - mpDirectionSet->SetItemImage( i+1, bHighContrast ? maImgDirectionH[ i ] : maImgDirection[ i ] ); + mpDirectionSet->SetItemImage( i+1, maImgDirection[ i ] ); } setEntryImage( 0, bHighContrast ? maImgPerspectiveH : maImgPerspective ); @@ -317,7 +313,7 @@ ExtrusionDepthDialog::ExtrusionDepthDialog( Window* pParent, double fDepth, Fiel maOKButton( this, SVX_RES( BTN_OK ) ), maCancelButton( this, SVX_RES( BTN_CANCEL ) ), maHelpButton( this, SVX_RES( BTN_HELP ) ) -{ +{ bool bMetric = IsMetric( eDefaultUnit ); maMtrDepth.SetUnit( bMetric ? FUNIT_CM : FUNIT_INCH ); maMtrDepth.SetValue( (int) fDepth * 100, FUNIT_100TH_MM ); @@ -331,8 +327,7 @@ ExtrusionDepthDialog::~ExtrusionDepthDialog() double ExtrusionDepthDialog::getDepth() const { -// bool bMetric = IsMetric( meDefaultUnit ); - return (double)( maMtrDepth.GetValue( FUNIT_100TH_MM ) ) / 100.0; + return (double)( maMtrDepth.GetValue( FUNIT_100TH_MM ) ) / 100.0; } // #################################################################### @@ -599,13 +594,10 @@ ExtrusionLightingWindow::ExtrusionLightingWindow( svt::ToolboxController& rContr { if( i != FROM_FRONT ) { - maImgLightingOff[i] = Image( SVX_RES( IMG_LIGHT_OFF + i ) ); - maImgLightingOn[i] = Image( SVX_RES( IMG_LIGHT_ON + i ) ); - maImgLightingOffh[i] = Image( SVX_RES( IMG_LIGHT_OFF_H + i ) ); - maImgLightingOnh[i] = Image( SVX_RES( IMG_LIGHT_ON_H + i ) ); + maImgLightingOff[ i ] = Image( SVX_RES( IMG_LIGHT_OFF + i ) ); + maImgLightingOn[ i ] = Image( SVX_RES( IMG_LIGHT_ON + i ) ); } maImgLightingPreview[i] = Image( SVX_RES( IMG_LIGHT_PREVIEW + i ) ); - maImgLightingPreviewh[i] = Image( SVX_RES( IMG_LIGHT_PREVIEW_H + i ) ); } SetHelpId( HID_MENU_EXTRUSION_LIGHTING ); @@ -618,17 +610,15 @@ ExtrusionLightingWindow::ExtrusionLightingWindow( svt::ToolboxController& rContr mpLightingSet->SetColCount( 3 ); mpLightingSet->EnableFullItemMode( FALSE ); - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - for( i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; i++ ) { if( i != FROM_FRONT ) { - mpLightingSet->InsertItem( i+1, bHighContrast ? maImgLightingOffh[i] : maImgLightingOff[i] ); + mpLightingSet->InsertItem( i+1, maImgLightingOff[i] ); } else { - mpLightingSet->InsertItem( 5, bHighContrast ? maImgLightingPreviewh[FROM_FRONT] : maImgLightingPreview[FROM_FRONT] ); + mpLightingSet->InsertItem( 5, maImgLightingPreview[FROM_FRONT] ); } } mpLightingSet->SetOutputSizePixel( Size( 72, 72 ) ); @@ -668,8 +658,6 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled ) mnDirection = nDirection; mbDirectionEnabled = bEnabled; - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - if( !bEnabled ) nDirection = FROM_FRONT; @@ -678,18 +666,14 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled ) { if( nItemId == FROM_FRONT ) { - mpLightingSet->SetItemImage( nItemId + 1, bHighContrast ? maImgLightingPreviewh[ nDirection ] : maImgLightingPreview[ nDirection ] ); + mpLightingSet->SetItemImage( nItemId + 1, maImgLightingPreview[ nDirection ] ); } else { - if( bHighContrast ) - { - mpLightingSet->SetItemImage( nItemId + 1, (USHORT)nDirection == nItemId ? maImgLightingOnh[nItemId] : maImgLightingOffh[nItemId] ); - } - else - { - mpLightingSet->SetItemImage( nItemId + 1, (USHORT)nDirection == nItemId ? maImgLightingOn[nItemId] : maImgLightingOff[nItemId] ); - } + mpLightingSet->SetItemImage( + nItemId + 1, + (USHORT)nDirection == nItemId ? maImgLightingOn[nItemId] : maImgLightingOff[nItemId] + ); } } @@ -736,8 +720,6 @@ void ExtrusionLightingWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - implSetDirection( mnDirection, mbDirectionEnabled ); setEntryImage( 0, bHighContrast ? maImgBrighth : maImgBright ); setEntryImage( 1, bHighContrast ? maImgNormalh : maImgNormal ); @@ -989,7 +971,7 @@ Sequence< OUString > SAL_CALL ExtrusionSurfaceControl::getSupportedServiceNames( SFX_IMPL_TOOLBOX_CONTROL( ExtrusionColorControl, SvxColorItem ); -ExtrusionColorControl::ExtrusionColorControl( +ExtrusionColorControl::ExtrusionColorControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : SfxToolBoxControl ( nSlotId, nId, rTbx ) { @@ -1015,10 +997,10 @@ SfxPopupWindowType ExtrusionColorControl::GetPopupWindowType() const SfxPopupWindow* ExtrusionColorControl::CreatePopupWindow() { - SvxColorWindow_Impl* pColorWin = new SvxColorWindow_Impl( + SvxColorWindow_Impl* pColorWin = new SvxColorWindow_Impl( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Extrusion3DColor" )), - SID_EXTRUSION_3D_COLOR, - m_xFrame, + SID_EXTRUSION_3D_COLOR, + m_xFrame, SVX_RESSTR( RID_SVXSTR_EXTRUSION_COLOR ), &GetToolBox() ); pColorWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_ALLOWTEAROFF ); diff --git a/svx/source/tbxctrls/extrusioncontrols.hrc b/svx/source/tbxctrls/extrusioncontrols.hrc index c406d5c683..978e7ea044 100644 --- a/svx/source/tbxctrls/extrusioncontrols.hrc +++ b/svx/source/tbxctrls/extrusioncontrols.hrc @@ -64,7 +64,6 @@ #define STR_DIRECTION 30 // needs 10 resource ids #define IMG_DIRECTION 1 // needs 10 resource ids -#define IMG_DIRECTION_H 10 // needs 10 resource ids #define IMG_DEPTH_0 19 #define IMG_DEPTH_1 20 @@ -73,48 +72,24 @@ #define IMG_DEPTH_4 23 #define IMG_DEPTH_INFINITY 24 -#define IMG_DEPTH_0_H 25 -#define IMG_DEPTH_1_H 26 -#define IMG_DEPTH_2_H 27 -#define IMG_DEPTH_3_H 28 -#define IMG_DEPTH_4_H 29 -#define IMG_DEPTH_INFINITY_H 30 - #define IMG_PERSPECTIVE 31 -#define IMG_PERSPECTIVE_H 32 #define IMG_PARALLEL 33 -#define IMG_PARALLEL_H 34 #define IMG_WIRE_FRAME 35 #define IMG_MATTE 36 #define IMG_PLASTIC 37 #define IMG_METAL 38 -#define IMG_WIRE_FRAME_H 39 -#define IMG_MATTE_H 40 -#define IMG_PLASTIC_H 41 -#define IMG_METAL_H 42 - #define IMG_LIGHT_OFF 50 // needs 10 resource ids #define IMG_LIGHT_ON 60 // needs 10 resource ids #define IMG_LIGHT_PREVIEW 70 // needs 10 resource ids -#define IMG_LIGHT_OFF_H 80 // needs 10 resource ids -#define IMG_LIGHT_ON_H 90 // needs 10 resource ids -#define IMG_LIGHT_PREVIEW_H 100 // needs 10 resource ids - #define IMG_LIGHTING_BRIGHT 110 #define IMG_LIGHTING_NORMAL 111 #define IMG_LIGHTING_DIM 112 -#define IMG_LIGHTING_BRIGHT_H 113 -#define IMG_LIGHTING_NORMAL_H 114 -#define IMG_LIGHTING_DIM_H 115 - #define FL_DEPTH 1 #define MTR_DEPTH 2 #define BTN_OK 3 #define BTN_CANCEL 4 #define BTN_HELP 5 - -// diff --git a/svx/source/tbxctrls/extrusioncontrols.src b/svx/source/tbxctrls/extrusioncontrols.src index 240065ce87..4ca6f104fe 100644 --- a/svx/source/tbxctrls/extrusioncontrols.src +++ b/svx/source/tbxctrls/extrusioncontrols.src @@ -48,117 +48,62 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION ImageBitmap = Bitmap { File = "directionnorthwest_22.bmp" ; }; MASKCOLOR }; - Image IMG_DIRECTION_H + DIRECTION_NW - { - ImageBitmap = Bitmap { File = "directionnorthwest_22_h.bmp" ; }; - MASKCOLOR - }; Image IMG_DIRECTION + DIRECTION_N { ImageBitmap = Bitmap { File = "directionnorth_22.bmp" ; }; MASKCOLOR }; - Image IMG_DIRECTION_H + DIRECTION_N - { - ImageBitmap = Bitmap { File = "directionnorth_22_h.bmp"; }; - MASKCOLOR - }; Image IMG_DIRECTION + DIRECTION_NE { ImageBitmap = Bitmap { File = "directionnortheast_22.bmp"; }; MASKCOLOR }; - Image IMG_DIRECTION_H + DIRECTION_NE - { - ImageBitmap = Bitmap { File = "directionnortheast_22_h.bmp"; }; - MASKCOLOR - }; Image IMG_DIRECTION + DIRECTION_W { ImageBitmap = Bitmap { File = "directionwest_22.bmp"; }; MASKCOLOR }; - Image IMG_DIRECTION_H + DIRECTION_W - { - ImageBitmap = Bitmap { File = "directionwest_22_h.bmp"; }; - MASKCOLOR - }; Image IMG_DIRECTION + DIRECTION_NONE { ImageBitmap = Bitmap { File = "directionstraight_22.bmp"; }; MASKCOLOR }; - Image IMG_DIRECTION_H + DIRECTION_NONE - { - ImageBitmap = Bitmap { File = "directionstraight_22_h.bmp"; }; - MASKCOLOR - }; Image IMG_DIRECTION + DIRECTION_E { ImageBitmap = Bitmap { File = "directioneast_22.bmp"; }; MASKCOLOR }; - Image IMG_DIRECTION_H + DIRECTION_E - { - ImageBitmap = Bitmap { File = "directioneast_22_h.bmp"; }; - MASKCOLOR - }; Image IMG_DIRECTION + DIRECTION_SW { ImageBitmap = Bitmap { File = "directionsouthwest_22.bmp"; }; MASKCOLOR }; - Image IMG_DIRECTION_H + DIRECTION_SW - { - ImageBitmap = Bitmap { File = "directionsouthwest_22_h.bmp"; }; - MASKCOLOR - }; Image IMG_DIRECTION + DIRECTION_S { ImageBitmap = Bitmap { File = "directionsouth_22.bmp"; }; MASKCOLOR }; - Image IMG_DIRECTION_H + DIRECTION_S - { - ImageBitmap = Bitmap { File = "directionsouth_22_h.bmp"; }; - MASKCOLOR - }; Image IMG_DIRECTION + DIRECTION_SE { ImageBitmap = Bitmap { File = "directionsoutheast_22.bmp"; }; MASKCOLOR }; - Image IMG_DIRECTION_H + DIRECTION_SE - { - ImageBitmap = Bitmap { File = "directionsoutheast_22_h.bmp"; }; - MASKCOLOR - }; Image IMG_PERSPECTIVE { ImageBitmap = Bitmap { File = "perspective_16.bmp"; }; MASKCOLOR }; - Image IMG_PERSPECTIVE_H - { - ImageBitmap = Bitmap { File = "perspective_16_h.bmp"; }; - MASKCOLOR - }; Image IMG_PARALLEL { ImageBitmap = Bitmap { File = "parallel_16.bmp"; }; MASKCOLOR }; - Image IMG_PARALLEL_H - { - ImageBitmap = Bitmap { File = "parallel_16_h.bmp"; }; - MASKCOLOR - }; - + String STR_PERSPECTIVE { Text [ en-US ] = "~Perspective" ; }; - + String STR_PARALLEL { Text [ en-US ] = "P~arallel" ; @@ -213,12 +158,12 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_DEPTH Zoomable = TRUE ; Text [ en-US ] = "Extrusion Depth" ; - + String STR_CUSTOM { Text [ en-US ] = "~Custom..."; }; - + String STR_INFINITY { Text [ en-US ] = "~Infinity"; @@ -229,65 +174,35 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_DEPTH ImageBitmap = Bitmap { File = "extrusion0inch_16.bmp"; }; MASKCOLOR }; - Image IMG_DEPTH_0_H - { - ImageBitmap = Bitmap { File = "extrusion0inch_16_h.bmp"; }; - MASKCOLOR - }; Image IMG_DEPTH_1 { ImageBitmap = Bitmap { File = "extrusion05inch_16.bmp"; }; MASKCOLOR }; - Image IMG_DEPTH_1_H - { - ImageBitmap = Bitmap { File = "extrusion05inch_16_h.bmp"; }; - MASKCOLOR - }; Image IMG_DEPTH_2 { ImageBitmap = Bitmap { File = "extrusion1inch_16.bmp"; }; MASKCOLOR }; - Image IMG_DEPTH_2_H - { - ImageBitmap = Bitmap { File = "extrusion1inch_16_h.bmp"; }; - MASKCOLOR - }; Image IMG_DEPTH_3 { ImageBitmap = Bitmap { File = "extrusion2inch_16.bmp"; }; MASKCOLOR }; - Image IMG_DEPTH_3_H - { - ImageBitmap = Bitmap { File = "extrusion2inch_16_h.bmp"; }; - MASKCOLOR - }; Image IMG_DEPTH_4 { ImageBitmap = Bitmap { File = "extrusion4inch_16.bmp"; }; MASKCOLOR }; - Image IMG_DEPTH_4_H - { - ImageBitmap = Bitmap { File = "extrusion4inch_16_h.bmp"; }; - MASKCOLOR - }; Image IMG_DEPTH_INFINITY { ImageBitmap = Bitmap { File = "extrusioninfinity_16.bmp"; }; MASKCOLOR - }; - Image IMG_DEPTH_INFINITY_H - { - ImageBitmap = Bitmap { File = "extrusioninfinity_16_h.bmp"; }; - MASKCOLOR }; }; @@ -304,7 +219,7 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING Zoomable = TRUE ; Text [ en-US ] = "Extrusion Lighting" ; - + Image IMG_LIGHT_OFF + FROM_TOP_LEFT { ImageBitmap = Bitmap { File = "lightofffromtopleft_22.bmp"; }; @@ -346,47 +261,6 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING MASKCOLOR }; - Image IMG_LIGHT_OFF_H + FROM_TOP_LEFT - { - ImageBitmap = Bitmap { File = "lightofffromtopleft_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_OFF_H + FROM_TOP - { - ImageBitmap = Bitmap { File = "lightofffromtop_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_OFF_H + FROM_TOP_RIGHT - { - ImageBitmap = Bitmap { File = "lightofffromtopright_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_OFF_H + FROM_LEFT - { - ImageBitmap = Bitmap { File = "lightofffromleft_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_OFF_H + FROM_RIGHT - { - ImageBitmap = Bitmap { File = "lightofffromright_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_OFF_H + FROM_BOTTOM_LEFT - { - ImageBitmap = Bitmap { File = "lightofffrombottomleft_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_OFF_H + FROM_BOTTOM - { - ImageBitmap = Bitmap { File = "lightofffrombottom_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_OFF_H + FROM_BOTTOM_RIGHT - { - ImageBitmap = Bitmap { File = "lightofffrombottomright_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_ON + FROM_TOP_LEFT { ImageBitmap = Bitmap { File = "lightonfromtopleft_22.bmp"; }; @@ -428,47 +302,6 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING MASKCOLOR }; - Image IMG_LIGHT_ON_H + FROM_TOP_LEFT - { - ImageBitmap = Bitmap { File = "lightonfromtopleft_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_ON_H + FROM_TOP - { - ImageBitmap = Bitmap { File = "lightonfromtop_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_ON_H + FROM_TOP_RIGHT - { - ImageBitmap = Bitmap { File = "lightonfromtopright_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_ON_H + FROM_LEFT - { - ImageBitmap = Bitmap { File = "lightonfromleft_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_ON_H + FROM_RIGHT - { - ImageBitmap = Bitmap { File = "lightonfromright_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_ON_H + FROM_BOTTOM_LEFT - { - ImageBitmap = Bitmap { File = "lightonfrombottomleft_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_ON_H + FROM_BOTTOM - { - ImageBitmap = Bitmap { File = "lightonfrombottom_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_ON_H + FROM_BOTTOM_RIGHT - { - ImageBitmap = Bitmap { File = "lightonfrombottomright_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_PREVIEW + FROM_TOP_LEFT { ImageBitmap = Bitmap { File = "lightfromtopleft_22.bmp"; }; @@ -515,52 +348,6 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING MASKCOLOR }; - Image IMG_LIGHT_PREVIEW_H + FROM_TOP_LEFT - { - ImageBitmap = Bitmap { File = "lightfromtopleft_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_PREVIEW_H + FROM_TOP - { - ImageBitmap = Bitmap { File = "lightfromtop_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_PREVIEW_H + FROM_TOP_RIGHT - { - ImageBitmap = Bitmap { File = "lightfromtopright_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_PREVIEW_H + FROM_LEFT - { - ImageBitmap = Bitmap { File = "lightfromleft_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_PREVIEW_H + FROM_RIGHT - { - ImageBitmap = Bitmap { File = "lightfromright_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_PREVIEW_H + FROM_FRONT - { - ImageBitmap = Bitmap { File = "lightfromfront_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_PREVIEW_H + FROM_BOTTOM_LEFT - { - ImageBitmap = Bitmap { File = "lightfrombottomleft_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_PREVIEW_H + FROM_BOTTOM - { - ImageBitmap = Bitmap { File = "lightfrombottom_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHT_PREVIEW_H + FROM_BOTTOM_RIGHT - { - ImageBitmap = Bitmap { File = "lightfrombottomright_22_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHTING_BRIGHT { ImageBitmap = Bitmap { File = "brightlit_16.bmp"; }; @@ -577,22 +364,6 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING MASKCOLOR }; - Image IMG_LIGHTING_BRIGHT_H - { - ImageBitmap = Bitmap { File = "brightlit_16_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHTING_NORMAL_H - { - ImageBitmap = Bitmap { File = "normallit_16_h.bmp"; }; - MASKCOLOR - }; - Image IMG_LIGHTING_DIM_H - { - ImageBitmap = Bitmap { File = "dimlit_16_h.bmp"; }; - MASKCOLOR - }; - String STR_BRIGHT { Text [ en-US ] = "~Bright"; @@ -621,7 +392,7 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_SURFACE Zoomable = TRUE ; Text [ en-US ] = "Extrusion Surface" ; - + String STR_WIREFRAME { Text [ en-US ] = "~Wire Frame"; @@ -646,43 +417,25 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_SURFACE { ImageBitmap = Bitmap { File = "wireframe_16.bmp"; }; MASKCOLOR - }; - Image IMG_WIRE_FRAME_H - { - ImageBitmap = Bitmap { File = "wireframe_16_h.bmp"; }; - MASKCOLOR - }; + }; + Image IMG_MATTE { ImageBitmap = Bitmap { File = "matte_16.bmp"; }; MASKCOLOR - }; - Image IMG_MATTE_H - { - ImageBitmap = Bitmap { File = "matte_16_h.bmp"; }; - MASKCOLOR - }; + }; + Image IMG_PLASTIC { ImageBitmap = Bitmap { File = "plastic_16.bmp"; }; MASKCOLOR - }; - Image IMG_PLASTIC_H - { - ImageBitmap = Bitmap { File = "plastic_16_h.bmp"; }; - MASKCOLOR - }; + }; + Image IMG_METAL { ImageBitmap = Bitmap { File = "metal_16.bmp"; }; MASKCOLOR - }; - Image IMG_METAL_H - { - ImageBitmap = Bitmap { File = "metal_16_h.bmp"; }; - MASKCOLOR - }; - + }; }; #define WIDTH 140 diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx index 0a7b007bd4..f097be75b4 100644 --- a/svx/source/tbxctrls/fillctrl.cxx +++ b/svx/source/tbxctrls/fillctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -109,7 +110,7 @@ void SvxFillToolBoxControl::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) { - FASTBOOL bEnableControls = FALSE; + bool bEnableControls = false; if ( bIgnoreStatusUpdate ) return; @@ -152,7 +153,7 @@ void SvxFillToolBoxControl::StateChanged( pColorItem = (XFillColorItem*) pState->Clone(); if( eXFS == XFILL_SOLID ) - bEnableControls = TRUE; + bEnableControls = true; } else if( nSID == SID_ATTR_FILL_GRADIENT ) { @@ -160,7 +161,7 @@ void SvxFillToolBoxControl::StateChanged( pGradientItem = (XFillGradientItem*) pState->Clone(); if( eXFS == XFILL_GRADIENT ) - bEnableControls = TRUE; + bEnableControls = true; } else if( nSID == SID_ATTR_FILL_HATCH ) { @@ -168,7 +169,7 @@ void SvxFillToolBoxControl::StateChanged( pHatchItem = (XFillHatchItem*) pState->Clone(); if( eXFS == XFILL_HATCH ) - bEnableControls = TRUE; + bEnableControls = true; } else if( nSID == SID_ATTR_FILL_BITMAP ) { @@ -176,7 +177,7 @@ void SvxFillToolBoxControl::StateChanged( pBitmapItem = (XFillBitmapItem*) pState->Clone(); if( eXFS == XFILL_BITMAP ) - bEnableControls = TRUE; + bEnableControls = true; } } if( bEnableControls ) @@ -186,7 +187,7 @@ void SvxFillToolBoxControl::StateChanged( bUpdate = TRUE; } - + Update( pState ); } else @@ -819,9 +820,6 @@ void FillControl::Resize() pLbFillType->SetSizePixel( Size( nW * 2 - nSep, nH ) ); pLbFillAttr->SetPosSizePixel( Point( nW * 2 + nSep, 0 ), Size( nW * 3 - nSep, nH ) ); } -/* -----------------------------08.03.2002 15:04------------------------------ - - ---------------------------------------------------------------------------*/ void FillControl::DataChanged( const DataChangedEvent& rDCEvt ) { @@ -844,3 +842,4 @@ void FillControl::DataChanged( const DataChangedEvent& rDCEvt ) Window::DataChanged( rDCEvt ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 01cb08c9cc..b58dd1dd33 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -404,7 +405,8 @@ FontWorkAlignmentWindow::FontWorkAlignmentWindow( svt::ToolboxController& rContr SetOutputSizePixel( getMenuSize() ); - FreeResource(); + void implSetAlignment( int nAlignmentMode, bool bEnabled ); +}; AddStatusListener( msFontworkAlignment ); } diff --git a/svx/source/tbxctrls/fontworkgallery.src b/svx/source/tbxctrls/fontworkgallery.src index fa3ede424c..afa616556d 100644 --- a/svx/source/tbxctrls/fontworkgallery.src +++ b/svx/source/tbxctrls/fontworkgallery.src @@ -105,7 +105,7 @@ DockingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT Zoomable = TRUE ; Text [ en-US ] = "Fontwork Alignment" ; - + String STR_ALIGN_LEFT { Text [ en-US ] = "~Left Align"; @@ -131,102 +131,52 @@ DockingWindow RID_SVXFLOAT_FONTWORK_ALIGNMENT { ImageBitmap = Bitmap { File = "fontworkalignleft_16.png"; }; MASKCOLOR - }; - Image IMG_FONTWORK_ALIGN_LEFT_16_H - { - ImageBitmap = Bitmap { File = "fontworkalignleft_16_h.png"; }; - MASKCOLOR - }; + }; Image IMG_FONTWORK_ALIGN_LEFT_26 { ImageBitmap = Bitmap { File = "fontworkalignleft_26.png"; }; MASKCOLOR - }; - Image IMG_FONTWORK_ALIGN_LEFT_26_H - { - ImageBitmap = Bitmap { File = "fontworkalignleft_26_h.png"; }; - MASKCOLOR - }; + }; Image IMG_FONTWORK_ALIGN_CENTER_16 { ImageBitmap = Bitmap { File = "fontworkaligncentered_16.png"; }; MASKCOLOR - }; - Image IMG_FONTWORK_ALIGN_CENTER_16_H - { - ImageBitmap = Bitmap { File = "fontworkaligncentered_16_h.png"; }; - MASKCOLOR - }; + }; Image IMG_FONTWORK_ALIGN_CENTER_26 { ImageBitmap = Bitmap { File = "fontworkaligncentered_26.png"; }; MASKCOLOR - }; - Image IMG_FONTWORK_ALIGN_CENTER_26_H - { - ImageBitmap = Bitmap { File = "fontworkaligncentered_26_h.png"; }; - MASKCOLOR }; Image IMG_FONTWORK_ALIGN_RIGHT_16 { ImageBitmap = Bitmap { File = "fontworkalignright_16.png"; }; MASKCOLOR - }; - Image IMG_FONTWORK_ALIGN_RIGHT_16_H - { - ImageBitmap = Bitmap { File = "fontworkalignright_16_h.png"; }; - MASKCOLOR - }; + }; Image IMG_FONTWORK_ALIGN_RIGHT_26 { ImageBitmap = Bitmap { File = "fontworkalignright_26.png"; }; MASKCOLOR - }; - Image IMG_FONTWORK_ALIGN_RIGHT_26_H - { - ImageBitmap = Bitmap { File = "fontworkalignright_26_h.png"; }; - MASKCOLOR - }; + }; Image IMG_FONTWORK_ALIGN_WORD_16 { ImageBitmap = Bitmap { File = "fontworkalignjustified_16.png"; }; MASKCOLOR - }; - Image IMG_FONTWORK_ALIGN_WORD_16_H - { - ImageBitmap = Bitmap { File = "fontworkalignjustified_16_h.png"; }; - MASKCOLOR - }; + }; Image IMG_FONTWORK_ALIGN_WORD_26 { ImageBitmap = Bitmap { File = "fontworkalignjustified_26.png"; }; MASKCOLOR - }; - Image IMG_FONTWORK_ALIGN_WORD_26_H - { - ImageBitmap = Bitmap { File = "fontworkalignjustified_26_h.png"; }; - MASKCOLOR - }; + }; Image IMG_FONTWORK_ALIGN_STRETCH_16 { ImageBitmap = Bitmap { File = "fontworkalignstretch_16.png"; }; MASKCOLOR }; - Image IMG_FONTWORK_ALIGN_STRETCH_16_H - { - ImageBitmap = Bitmap { File = "fontworkalignstretch_16_h.png"; }; - MASKCOLOR - }; Image IMG_FONTWORK_ALIGN_STRETCH_26 { ImageBitmap = Bitmap { File = "fontworkalignstretch_26.png"; }; MASKCOLOR }; - Image IMG_FONTWORK_ALIGN_STRETCH_26_H - { - ImageBitmap = Bitmap { File = "fontworkalignstretch_26_h.png"; }; - MASKCOLOR - }; }; DockingWindow RID_SVXFLOAT_FONTWORK_CHARSPACING @@ -241,7 +191,7 @@ DockingWindow RID_SVXFLOAT_FONTWORK_CHARSPACING Zoomable = TRUE ; Text [ en-US ] = "Fontwork Character Spacing" ; - + String STR_CHARS_SPACING_VERY_TIGHT { Text [ en-US ] = "~Very Tight"; diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx index 9f12bdd0fa..1fc16fd080 100644 --- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx +++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -118,3 +119,5 @@ void FormatPaintBrushToolBoxControl::StateChanged( USHORT nSID, SfxItemState eSt //............................................................................. } //namespace svx //............................................................................. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 8282eb4257..f910e987f5 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,12 +31,8 @@ #include <string> // HACK: prevent conflict between STLPORT and Workshop headers -#ifndef _TOOLBOX_HXX //autogen #include <vcl/toolbox.hxx> -#endif -#ifndef _FIELD_HXX //autogen #include <vcl/field.hxx> -#endif #include <vcl/fixed.hxx> #include <vcl/msgbox.hxx> #include <svl/intitem.hxx> @@ -56,7 +53,7 @@ #include <editeng/brshitem.hxx> #include <editeng/sizeitem.hxx> #include <svx/sdgcpitm.hxx> -//CHINA001 #include "../dialog/grfpage.hxx" + #include <svx/itemwin.hxx> #include <svx/dialmgr.hxx> #include <svx/svdview.hxx> @@ -75,7 +72,7 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; -#include <svx/svxdlg.hxx> //CHINA001 +#include <svx/svxdlg.hxx> // ----------- // - Defines - // ----------- @@ -151,7 +148,7 @@ ImplGrafMetricField::ImplGrafMetricField( Window* pParent, const rtl::OUString& aSize.Width() += 20, aSize.Height() += 6; SetSizePixel( aSize ); - if ( maCommand.equalsAscii( ".uno:GrafGamma" )) + if ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafGamma" ) )) { SetDecimalDigits( 2 ); @@ -163,7 +160,7 @@ ImplGrafMetricField::ImplGrafMetricField( Window* pParent, const rtl::OUString& } else { - const long nMinVal = ( maCommand.equalsAscii( ".uno:GrafTransparence" )) ? 0 : -100; + const long nMinVal = ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafTransparence" ) )) ? 0 : -100; SetUnit( FUNIT_CUSTOM ); SetCustomUnitText( String::CreateFromAscii(" %") ); @@ -201,14 +198,14 @@ IMPL_LINK( ImplGrafMetricField, ImplModifyHdl, Timer*, EMPTYARG ) // Convert value to an any to be usable with dispatch API Any a; - if ( maCommand.equalsAscii( ".uno:GrafRed" ) || - maCommand.equalsAscii( ".uno:GrafGreen" ) || - maCommand.equalsAscii( ".uno:GrafBlue" ) || - maCommand.equalsAscii( ".uno:GrafLuminance" ) || - maCommand.equalsAscii( ".uno:GrafContrast" )) + if ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafRed" ) ) || + maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafGreen" ) ) || + maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafBlue" ) ) || + maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafLuminance" ) ) || + maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafContrast" ) )) a = makeAny( sal_Int16( nVal )); - else if ( maCommand.equalsAscii( ".uno:GrafGamma" ) || - maCommand.equalsAscii( ".uno:GrafTransparence" )) + else if ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafGamma" ) ) || + maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafTransparence" ) )) a = makeAny( sal_Int32( nVal )); if ( a.hasValue() ) @@ -235,9 +232,9 @@ void ImplGrafMetricField::Update( const SfxPoolItem* pItem ) { long nValue; - if ( maCommand.equalsAscii( ".uno:GrafTransparence" )) + if ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafTransparence" ) )) nValue = ( (SfxUInt16Item*) pItem )->GetValue(); - else if ( maCommand.equalsAscii( ".uno:GrafGamma" )) + else if ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafGamma" ) )) nValue = ( (SfxUInt32Item*) pItem )->GetValue(); else nValue = ( (SfxInt16Item*) pItem )->GetValue(); @@ -256,21 +253,20 @@ struct CommandToRID { const char* pCommand; USHORT nResId; - USHORT nHCResId; }; -static USHORT ImplGetRID( const OUString& aCommand, bool bHighContrast ) +static USHORT ImplGetRID( const OUString& aCommand ) { static const CommandToRID aImplCommandToResMap[] = { - { ".uno:GrafRed", RID_SVXIMG_GRAF_RED, RID_SVXIMG_GRAF_RED_H }, - { ".uno:GrafGreen", RID_SVXIMG_GRAF_GREEN, RID_SVXIMG_GRAF_GREEN_H }, - { ".uno:GrafBlue", RID_SVXIMG_GRAF_BLUE, RID_SVXIMG_GRAF_BLUE_H }, - { ".uno:GrafLuminance", RID_SVXIMG_GRAF_LUMINANCE, RID_SVXIMG_GRAF_LUMINANCE_H }, - { ".uno:GrafContrast", RID_SVXIMG_GRAF_CONTRAST, RID_SVXIMG_GRAF_CONTRAST_H }, - { ".uno:GrafGamma", RID_SVXIMG_GRAF_GAMMA, RID_SVXIMG_GRAF_GAMMA_H }, - { ".uno:GrafTransparence", RID_SVXIMG_GRAF_TRANSPARENCE, RID_SVXIMG_GRAF_TRANSPARENCE_H }, - { 0, 0, 0 } + { ".uno:GrafRed", RID_SVXIMG_GRAF_RED }, + { ".uno:GrafGreen", RID_SVXIMG_GRAF_GREEN }, + { ".uno:GrafBlue", RID_SVXIMG_GRAF_BLUE }, + { ".uno:GrafLuminance", RID_SVXIMG_GRAF_LUMINANCE }, + { ".uno:GrafContrast", RID_SVXIMG_GRAF_CONTRAST }, + { ".uno:GrafGamma", RID_SVXIMG_GRAF_GAMMA }, + { ".uno:GrafTransparence", RID_SVXIMG_GRAF_TRANSPARENCE }, + { 0, 0 } }; USHORT nRID = 0; @@ -280,10 +276,7 @@ static USHORT ImplGetRID( const OUString& aCommand, bool bHighContrast ) { if ( aCommand.equalsAscii( aImplCommandToResMap[ i ].pCommand )) { - if ( bHighContrast ) - nRID = aImplCommandToResMap[ i ].nHCResId; - else - nRID = aImplCommandToResMap[ i ].nResId; + nRID = aImplCommandToResMap[ i ].nResId; break; } ++i; @@ -321,18 +314,14 @@ ImplGrafControl::ImplGrafControl( Window* pParent, USHORT, const rtl::OUString& maImage ( this ), maField ( this, rCmd, rFrame ) { - ResId aResId( ImplGetRID( rCmd, false ), DIALOG_MGR() ) ; + ResId aResId( ImplGetRID( rCmd ), DIALOG_MGR() ) ; Image aImage( aResId ); - ResId aResIdHC( ImplGetRID( rCmd, true ), DIALOG_MGR() ) ; - Image aImageHC( aResIdHC ); - Size aImgSize( aImage.GetSizePixel() ); Size aFldSize( maField.GetSizePixel() ); long nFldY, nImgY; maImage.SetImage( aImage ); - maImage.SetModeImage( aImageHC, BMP_COLOR_HIGHCONTRAST ); maImage.SetSizePixel( aImgSize ); // we want to see the backbround of the toolbox, not of the FixedImage or Control maImage.SetBackground( Wallpaper( COL_TRANSPARENT ) ); @@ -350,7 +339,7 @@ ImplGrafControl::ImplGrafControl( Window* pParent, USHORT, const rtl::OUString& Max( aImgSize.Height(), aFldSize.Height() ) ) ); SetBackground( Wallpaper() ); // transparent background - + maImage.Show(); maField.SetHelpId( rtl::OUStringToOString( rCmd, RTL_TEXTENCODING_UTF8 ) ); @@ -403,9 +392,9 @@ ImplGrafModeControl::ImplGrafModeControl( Window* pParent, const Reference< XFra { SetSizePixel( Size( 100, 260 ) ); - InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_STANDARD ) ); - InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_GREYS ) ); - InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_MONO ) ); + InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_STANDARD ) ); + InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_GREYS ) ); + InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_MONO ) ); InsertEntry( SVX_RESSTR( RID_SVXSTR_GRAFMODE_WATERMARK ) ); Show(); @@ -506,109 +495,6 @@ void ImplGrafModeControl::Update( const SfxPoolItem* pItem ) SetNoSelection(); } -// ----------------------- -// - ImplGrafFilterPopup - -// ----------------------- -/* -CD!!! -class ImplGrafFilterPopup : public SfxPopupWindow -{ -private: - - SvxGrafFilterToolBoxControl* mpParent; - Reference< XConfigurableUIElement > m_xToolBar; -// SfxToolBoxManager maTbxMgr; - ResId maResIdWin; - ResId maResIdTbx; - WindowAlign meTbxAlign; - Link maSelectHdl; - - DECL_LINK( TbxSelectHdl, void* ); - -public: - ImplGrafFilterPopup( USHORT nId, SvxGrafFilterToolBoxControl* pParent, - WindowAlign eAlign, - const ResId& rResIdWin, const ResId& rResIdTbx, - SfxBindings& rBindings ); - ~ImplGrafFilterPopup(); - - virtual SfxPopupWindow* Clone() const; - virtual void PopupModeEnd(); - - void StartSelection() { maTbxMgr.GetToolBox().StartSelection(); } - void Update(); -}; - -// ----------------------------------------------------------------------------- - -ImplGrafFilterPopup::ImplGrafFilterPopup( USHORT nId, SvxGrafFilterToolBoxControl* pParent, - WindowAlign eAlign, - const ResId& rResIdWin, const ResId& rResIdTbx ) : - SfxPopupWindow ( nId, rResIdWin ), - mpParent ( pParent ), - maTbxMgr ( this, GetBindings(), rResIdTbx ), - maResIdWin ( rResIdWin ), - maResIdTbx ( rResIdTbx ), - meTbxAlign ( eAlign ) -{ - maTbxMgr.UseDefault(); - - maSelectHdl = maTbxMgr.GetToolBox().GetSelectHdl(); - maTbxMgr.GetToolBox().SetSelectHdl( LINK( this, ImplGrafFilterPopup, TbxSelectHdl ) ); - - FreeResource(); - - const Size aSize( maTbxMgr.CalcWindowSizePixel() ); - maTbxMgr.SetPosSizePixel( Point(), aSize ); - SetOutputSizePixel( aSize ); -} - -// ----------------------------------------------------------------------------- - -ImplGrafFilterPopup::~ImplGrafFilterPopup() -{ -} - -// ----------------------------------------------------------------------------- - -SfxPopupWindow* ImplGrafFilterPopup::Clone() const -{ - return( new ImplGrafFilterPopup( GetId(), mpParent, meTbxAlign, - maResIdWin, maResIdTbx, - (SfxBindings&) GetBindings() ) ); -} - -// ----------------------------------------------------------------------------- - -void ImplGrafFilterPopup::Update() -{ - ToolBox* pBox = &maTbxMgr.GetToolBox(); - maTbxMgr.Activate( pBox ); - maTbxMgr.Deactivate( pBox ); -} - -// ----------------------------------------------------------------------------- - -void ImplGrafFilterPopup::PopupModeEnd() -{ - maTbxMgr.GetToolBox().EndSelection(); - SfxPopupWindow::PopupModeEnd(); -} - -// ----------------------------------------------------------------------------- - -IMPL_LINK( ImplGrafFilterPopup, TbxSelectHdl, void*, EMPTYARG ) -{ - const USHORT nSlotId = maTbxMgr.GetToolBox().GetCurItemId(); - - if( IsInPopupMode() ) - EndPopupMode(); - - GetBindings().GetDispatcher()->Execute( nSlotId, SFX_CALLMODE_ASYNCHRON ); - - return 0; -} -*/ // ------------------------------- // - SvxGrafFilterToolBoxControl - // ------------------------------- @@ -860,7 +746,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) const bool bUndo = rView.IsUndoEnabled(); String aUndoStr; - + if( bUndo ) { aUndoStr = rView.GetDescriptionOfMarkedObjects(); @@ -873,7 +759,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, FALSE, &pItem )) pItem = 0; - + switch( nSlot ) { case SID_ATTR_GRAF_RED: @@ -971,7 +857,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) if( 0 < rMarkList.GetMarkCount() ) { SdrGrafObj* pObj = (SdrGrafObj*) rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - + if( pObj && pObj->ISA( SdrGrafObj ) && ( pObj->GetGraphicType() != GRAPHIC_NONE ) && ( pObj->GetGraphicType() != GRAPHIC_DEFAULT ) ) @@ -980,64 +866,64 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) const SfxMapUnit eOldMetric = rPool.GetMetric( 0 ); const MapMode aMap100( MAP_100TH_MM ); const MapMode aMapTwip( MAP_TWIP ); - + aGrfAttr.Put(pObj->GetMergedItemSet()); rPool.SetDefaultMetric( SFX_MAPUNIT_TWIP ); - + SfxItemSet aCropDlgAttr( rPool, SDRATTR_GRAFCROP, SDRATTR_GRAFCROP, SID_ATTR_GRAF_GRAPHIC, SID_ATTR_GRAF_GRAPHIC, SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE, SID_ATTR_GRAF_FRMSIZE, SID_ATTR_GRAF_FRMSIZE, SID_ATTR_GRAF_CROP, SID_ATTR_GRAF_CROP, 0 ); - + aCropDlgAttr.Put( SvxBrushItem( pObj->GetGraphic(), GPOS_MM, SID_ATTR_GRAF_GRAPHIC ) ); aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_PAGE_SIZE, Size( OutputDevice::LogicToLogic( Size( 200000, 200000 ), aMap100, aMapTwip ) ) ) ); aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_GRAF_FRMSIZE, OutputDevice::LogicToLogic( pObj->GetLogicRect().GetSize(), aMap100, aMapTwip ) ) ); - + const SdrGrafCropItem& rCrop = (const SdrGrafCropItem&) aGrfAttr.Get( SDRATTR_GRAFCROP ); Size aLTSize( OutputDevice::LogicToLogic( Size( rCrop.GetLeft(), rCrop.GetTop() ), aMap100, aMapTwip ) ); Size aRBSize( OutputDevice::LogicToLogic( Size( rCrop.GetRight(), rCrop.GetBottom() ), aMap100, aMapTwip ) ); - + aCropDlgAttr.Put( SdrGrafCropItem( aLTSize.Width(), aLTSize.Height(), aRBSize.Width(), aRBSize.Height() ) ); - + SfxSingleTabDialog aCropDialog( SfxViewShell::Current() ? SfxViewShell::Current()->GetWindow() : NULL, aCropDlgAttr, 950 ); const String aCropStr = SVX_RESSTR( RID_SVXSTR_GRAFCROP ); - //CHINA001 SfxTabPage* pTabPage = SvxGrfCropPage::Create( &aCropDialog, aCropDlgAttr ); + SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "Dialogdiet error!");//CHINA001 + DBG_ASSERT(pFact, "Dialogdiet error!"); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_GRFCROP ); - DBG_ASSERT(fnCreatePage, "Dialogdiet error!");//CHINA001 + DBG_ASSERT(fnCreatePage, "Dialogdiet error!"); SfxTabPage* pTabPage = (*fnCreatePage)( &aCropDialog, aCropDlgAttr ); - //CHINA001 end + pTabPage->SetText( aCropStr ); aCropDialog.SetTabPage( pTabPage ); - + if( aCropDialog.Execute() == RET_OK ) { const SfxItemSet* pOutAttr = aCropDialog.GetOutputItemSet(); - + if( pOutAttr ) { aUndoStr.Append( String( SVX_RESSTR( RID_SVXSTR_UNDO_GRAFCROP ) ) ); - + // set crop attributes if( SFX_ITEM_SET <= pOutAttr->GetItemState( SDRATTR_GRAFCROP ) ) { const SdrGrafCropItem& rNewCrop = (const SdrGrafCropItem&) pOutAttr->Get( SDRATTR_GRAFCROP ); - + aLTSize = OutputDevice::LogicToLogic( Size( rNewCrop.GetLeft(), rNewCrop.GetTop() ), aMapTwip, aMap100 ); aRBSize = OutputDevice::LogicToLogic( Size( rNewCrop.GetRight(), rNewCrop.GetBottom() ), aMapTwip, aMap100 ); aSet.Put( SdrGrafCropItem( aLTSize.Width(), aLTSize.Height(), aRBSize.Width(), aRBSize.Height() ) ); } - + // set new logic rect if( SFX_ITEM_SET <= pOutAttr->GetItemState( SID_ATTR_GRAF_FRMSIZE ) ) { @@ -1045,18 +931,18 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) const Size& rGrfSize = ( (const SvxSizeItem&) pOutAttr->Get( SID_ATTR_GRAF_FRMSIZE ) ).GetSize(); Size aNewGrfSize( OutputDevice::LogicToLogic( rGrfSize, aMapTwip, aMap100 ) ); Size aOldGrfSize( pObj->GetLogicRect().GetSize() ); - + Rectangle aNewRect( aNewOrigin, aNewGrfSize ); Point aOffset( (aNewGrfSize.Width() - aOldGrfSize.Width()) >> 1, (aNewGrfSize.Height() - aOldGrfSize.Height()) >> 1 ); - + // #106181# rotate snap rect before setting it const GeoStat& aGeo = pObj->GetGeoStat(); - + if (aGeo.nDrehWink!=0 || aGeo.nShearWink!=0) { Polygon aPol(aNewRect); - + // also transform origin offset if (aGeo.nShearWink!=0) { @@ -1072,7 +958,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) aGeo.nSin,aGeo.nCos); RotatePoint(aOffset, Point(0,0), aGeo.nSin,aGeo.nCos); } - + // apply offset aPol.Move( -aOffset.X(), -aOffset.Y() ); aNewRect=aPol.GetBoundRect(); @@ -1081,7 +967,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) { aNewRect.Move( -aOffset.X(), -aOffset.Y() ); } - + if( !aSet.Count() ) rView.SetMarkedObjRect( aNewRect ); else @@ -1101,7 +987,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) } } } - + rPool.SetDefaultMetric( eOldMetric ); } } @@ -1288,3 +1174,5 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) nWhich = aIter.NextWhich(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 2f0ca7fc7c..549d212853 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -71,7 +72,6 @@ using namespace ::com::sun::star::beans; SvxLineBox::SvxLineBox( Window* pParent, const Reference< XFrame >& rFrame, WinBits nBits ) : LineLB( pParent, nBits ), - meBmpMode ( GetSettings().GetStyleSettings().GetHighContrastMode() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ), nCurPos ( 0 ), aLogicalSize(40,140), bRelease ( TRUE ), @@ -115,8 +115,6 @@ void SvxLineBox::Select() { XLineStyle eXLS; USHORT nPos = GetSelectEntryPos(); -// SfxDispatcher* pDisp = rBindings.GetDispatcher(); - //DBG_ASSERT( pDisp, "invalid Dispatcher" ); switch ( nPos ) { @@ -151,7 +149,6 @@ void SvxLineBox::Select() SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:LineDash" )), aArgs ); -// pDisp->Execute( SID_ATTR_LINE_DASH, SFX_CALLMODE_RECORD, &aLineDashItem, 0L ); } } break; @@ -166,7 +163,6 @@ void SvxLineBox::Select() SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:XLineStyle" )), aArgs ); -// pDisp->Execute( SID_ATTR_LINE_STYLE, SFX_CALLMODE_RECORD, &aLineStyleItem, 0L ); nCurPos = GetSelectEntryPos(); ReleaseFocus_Impl(); @@ -247,9 +243,7 @@ void SvxLineBox::ReleaseFocus_Impl() pShellWnd->GrabFocus(); } } -/* -----------------------------08.03.2002 15:39------------------------------ - ---------------------------------------------------------------------------*/ void SvxLineBox::DataChanged( const DataChangedEvent& rDCEvt ) { if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && @@ -258,20 +252,9 @@ void SvxLineBox::DataChanged( const DataChangedEvent& rDCEvt ) SetSizePixel(LogicToPixel(aLogicalSize, MAP_APPFONT)); Size aDropSize( aLogicalSize.Width(), LOGICAL_EDIT_HEIGHT); SetDropDownSizePixel(LogicToPixel(aDropSize, MAP_APPFONT)); - } + } LineLB::DataChanged( rDCEvt ); - - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) - { - BmpColorMode eMode = GetSettings().GetStyleSettings().GetHighContrastMode() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL; - if( eMode != meBmpMode ) - { - meBmpMode = eMode; - FillControl(); - } - } } void SvxLineBox::FillControl() @@ -290,6 +273,7 @@ void SvxLineBox::FillControl() // rBindings.Invalidate( SID_ATTR_LINE_DASH ); } + //======================================================================== // SvxColorBox //======================================================================== @@ -331,7 +315,6 @@ IMPL_LINK( SvxColorBox, DelayHdl_Impl, Timer *, EMPTYARG ) const SvxColorTableItem* pItem = (const SvxColorTableItem*)( pSh->GetItem( SID_COLOR_TABLE ) ); if ( pItem ) Fill( pItem->GetColorTable() ); -// rBindings.Invalidate( nId ); } return 0; } @@ -372,7 +355,6 @@ void SvxColorBox::Select() SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ), maCommand, aArgs ); -// rBindings.GetDispatcher()->Execute( nId, SFX_CALLMODE_RECORD, &aLineColorItem, 0L ); nCurPos = GetSelectEntryPos(); ReleaseFocus_Impl(); @@ -435,9 +417,7 @@ long SvxColorBox::Notify( NotifyEvent& rNEvt ) } return nHandled; } -/* -----------------------------08.03.2002 15:35------------------------------ - ---------------------------------------------------------------------------*/ void SvxColorBox::DataChanged( const DataChangedEvent& rDCEvt ) { if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && @@ -531,7 +511,6 @@ void SvxMetricField::Modify() SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:LineWidth" )), aArgs ); -// rBindings.GetDispatcher()->Execute( SID_ATTR_LINE_WIDTH, SFX_CALLMODE_RECORD, &aLineWidthItem, 0L ); } // ----------------------------------------------------------------------- @@ -612,18 +591,18 @@ long SvxMetricField::Notify( NotifyEvent& rNEvt ) pSh->KeyInput( *pKEvt ); else { - FASTBOOL bHandled = FALSE; + bool bHandled = false; switch ( rKey.GetCode() ) { case KEY_RETURN: Reformat(); - bHandled = TRUE; + bHandled = true; break; case KEY_ESCAPE: SetText( aCurTxt ); - bHandled = TRUE; + bHandled = true; break; } @@ -637,9 +616,7 @@ long SvxMetricField::Notify( NotifyEvent& rNEvt ) } return nHandled; } -/* -----------------------------08.03.2002 15:32------------------------------ - ---------------------------------------------------------------------------*/ void SvxMetricField::DataChanged( const DataChangedEvent& rDCEvt ) { if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && @@ -823,3 +800,5 @@ void SvxFillAttrBox::ReleaseFocus_Impl() pShellWnd->GrabFocus(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index 60ed2370f0..0f9a9f2754 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,6 @@ #include <string> // HACK: prevent conflict between STLPORT and Workshop headers #include <vcl/toolbox.hxx> -#ifndef _SV_BUTTON_HXX //autogen #include <vcl/button.hxx> #endif #include <svl/intitem.hxx> @@ -56,51 +56,72 @@ SFX_IMPL_TOOLBOX_CONTROL(SvxColumnsToolBoxControl,SfxUInt16Item); // class TableWindow ----------------------------------------------------- +const long TABLE_CELL_WIDTH = 15; +const long TABLE_CELL_HEIGHT = 15; + +const long TABLE_CELLS_HORIZ = 10; +const long TABLE_CELLS_VERT = 15; + +const long TABLE_POS_X = 2; +const long TABLE_POS_Y = 2; + +const long TABLE_WIDTH = TABLE_POS_X + TABLE_CELLS_HORIZ*TABLE_CELL_WIDTH; +const long TABLE_HEIGHT = TABLE_POS_Y + TABLE_CELLS_VERT*TABLE_CELL_HEIGHT; + class TableWindow : public SfxPopupWindow { private: + PushButton aTableButton; ::Color aLineColor; - ::Color aHighlightLineColor; ::Color aFillColor; ::Color aHighlightFillColor; + ::Color aBackgroundColor; long nCol; long nLine; - long nWidth; - long nHeight; - long nMX; - long nMY; - long nTextHeight; BOOL bInitialKeyInput; BOOL m_bMod1; ToolBox& rTbx; Reference< XFrame > mxFrame; rtl::OUString maCommand; - void UpdateSize_Impl( long nNewCol, long nNewLine); + DECL_LINK( SelectHdl, void * ); public: TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, + const String& rText, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ); ~TableWindow(); void KeyInput( const KeyEvent& rKEvt ); virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); virtual void MouseButtonUp( const MouseEvent& rMEvt ); virtual void Paint( const Rectangle& ); virtual void PopupModeEnd(); virtual SfxPopupWindow* Clone() const; - USHORT GetColCount() const { return (USHORT)nCol; } - USHORT GetLineCount() const { return (USHORT)nLine; } +private: + void Update( long nNewCol, long nNewLine ); + void TableDialog( const Sequence< PropertyValue >& rArgs ); + void CloseAndShowTableDialog(); }; // ----------------------------------------------------------------------- -TableWindow::TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) : - SfxPopupWindow( nSlotId, rFrame, WB_SYSTEMWINDOW ), +IMPL_LINK( TableWindow, SelectHdl, void *, EMPTYARG ) +{ + CloseAndShowTableDialog(); + return 0; +} + +// ----------------------------------------------------------------------- + +TableWindow::TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, const String& rText, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) : + SfxPopupWindow( nSlotId, rFrame, WinBits( WB_STDPOPUP ) ), + aTableButton( this ), + nCol( 0 ), + nLine( 0 ), bInitialKeyInput(TRUE), m_bMod1(FALSE), rTbx(rParentTbx), @@ -109,38 +130,41 @@ TableWindow::TableWindow( USHORT nSlotId, const rtl::OUString& rCmd, ToolBox& rP { const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); svtools::ColorConfig aColorConfig; - aLineColor = ::Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); - aHighlightLineColor = rStyles.GetHighlightTextColor(); + + aLineColor = rStyles.GetShadowColor(); aFillColor = rStyles.GetWindowColor(); aHighlightFillColor = rStyles.GetHighlightColor(); + aBackgroundColor = GetSettings().GetStyleSettings().GetFaceColor(); - nTextHeight = GetTextHeight()+1; - SetBackground(); + SetBackground( aBackgroundColor ); Font aFont = GetFont(); - aFont.SetColor( aLineColor ); - aFont.SetFillColor( aFillColor ); + aFont.SetColor( ::Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ) ); + aFont.SetFillColor( aBackgroundColor ); aFont.SetTransparent( FALSE ); SetFont( aFont ); - nCol = 0; - nLine = 0; - nWidth = 5; - nHeight = 5; + SetText( rText ); - Size aLogicSize = LogicToPixel( Size( 55, 35 ), MapMode( MAP_10TH_MM ) ); - nMX = aLogicSize.Width(); - nMY = aLogicSize.Height(); - SetOutputSizePixel( Size( nMX*nWidth-1, nMY*nHeight-1+nTextHeight ) ); + aTableButton.SetPosSizePixel( Point( TABLE_POS_X + TABLE_CELL_WIDTH, TABLE_HEIGHT + 5 ), + Size( TABLE_WIDTH - TABLE_POS_X - 2*TABLE_CELL_WIDTH, 24 ) ); + aTableButton.SetText( String( SVX_RESSTR( RID_SVXSTR_MORE ) ) ); + aTableButton.SetClickHdl( LINK( this, TableWindow, SelectHdl ) ); + aTableButton.Show(); + + SetOutputSizePixel( Size( TABLE_WIDTH + 3, TABLE_HEIGHT + 33 ) ); } + // ----------------------------------------------------------------------- + TableWindow::~TableWindow() { } + // ----------------------------------------------------------------------- SfxPopupWindow* TableWindow::Clone() const { - return new TableWindow( GetId(), maCommand, rTbx, mxFrame ); + return new TableWindow( GetId(), maCommand, GetText(), rTbx, mxFrame ); } // ----------------------------------------------------------------------- @@ -151,164 +175,64 @@ void TableWindow::MouseMove( const MouseEvent& rMEvt ) Point aPos = rMEvt.GetPosPixel(); Point aMousePos( aPos ); - if ( rMEvt.IsEnterWindow() ) - CaptureMouse(); - else if ( aMousePos.X() < 0 || aMousePos.Y() < 0 ) - { - nCol = 0; - nLine = 0; - ReleaseMouse(); - Invalidate(); - return; - } - - long nNewCol = 0; - long nNewLine = 0; - - if ( aPos.X() > 0 ) - nNewCol = aPos.X() / nMX + 1; - if ( aPos.Y() > 0 ) - nNewLine = aPos.Y() / nMY + 1; - - if ( nNewCol > 500 ) - nNewCol = 500; - if ( nNewLine > 1000 ) - nNewLine = 1000; - - UpdateSize_Impl( nNewCol, nNewLine); + long nNewCol = ( aMousePos.X() - TABLE_POS_X + TABLE_CELL_WIDTH ) / TABLE_CELL_WIDTH; + long nNewLine = ( aMousePos.Y() - TABLE_POS_Y + TABLE_CELL_HEIGHT ) / TABLE_CELL_HEIGHT; + Update( nNewCol, nNewLine ); } -/* -----------------------------15.05.2002 17:14------------------------------ - - ---------------------------------------------------------------------------*/ -void TableWindow::UpdateSize_Impl( long nNewCol, long nNewLine) -{ - Size aWinSize = GetOutputSizePixel(); - Point aWinPos = GetPosPixel(); - Point aMaxPos = OutputToScreenPixel( GetDesktopRectPixel().BottomRight() ); - if ( (nWidth <= nNewCol) || (nHeight < nNewLine) ) - { - long nOff = 0; - if ( nWidth <= nNewCol ) - { - nWidth = nNewCol; - nWidth++; - } - if ( nHeight <= nNewLine ) - { - nHeight = nNewLine; - nOff = 1; - } - while ( nWidth > 0 && - (short)(aWinPos.X()+(nMX*nWidth-1)) >= aMaxPos.X()-3 ) - nWidth--; - - while ( nHeight > 0 && - (short)(aWinPos.Y()+(nMY*nHeight-1+nTextHeight)) >= - aMaxPos.Y()-3 ) - nHeight--; - - if ( nNewCol > nWidth ) - nNewCol = nWidth; - - if ( nNewLine > nHeight ) - nNewLine = nHeight; - - Size _aWinSize = GetOutputSizePixel(); - Invalidate( Rectangle( 0, _aWinSize.Height()-nTextHeight+2-nOff, - _aWinSize.Width(), _aWinSize.Height() ) ); - SetOutputSizePixel( Size( nMX*nWidth-1, nMY*nHeight-1+nTextHeight ) ); - } - long nMinCol = 0; - long nMaxCol = 0; - long nMinLine = 0; - long nMaxLine = 0; - if ( nNewCol < nCol ) - { - nMinCol = nNewCol; - nMaxCol = nCol; - } - else - { - nMinCol = nCol; - nMaxCol = nNewCol; - } - if ( nNewLine < nLine ) - { - nMinLine = nNewLine; - nMaxLine = nLine; - } - else - { - nMinLine = nLine; - nMaxLine = nNewLine; - } - - if ( (nNewCol != nCol) || (nNewLine != nLine) ) - { - Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2, - aWinSize.Width(), aWinSize.Height() ) ); - - if ( nNewCol != nCol ) - { - Invalidate( Rectangle( nMinCol*nMX-1, 0, nMaxCol*nMX+1, nMaxLine*nMY ) ); - nCol = nNewCol; - } - if ( nNewLine != nLine ) - { - Invalidate( Rectangle( 0, nMinLine*nMY-2, nMaxCol*nMX, nMaxLine*nMY+1 ) ); - nLine = nNewLine; - } - } - Update(); -} -/* -----------------------------15.05.2002 14:22------------------------------ +// ----------------------------------------------------------------------- - ---------------------------------------------------------------------------*/ void TableWindow::KeyInput( const KeyEvent& rKEvt ) { - BOOL bHandled = FALSE; + bool bHandled = false; USHORT nModifier = rKEvt.GetKeyCode().GetModifier(); USHORT nKey = rKEvt.GetKeyCode().GetCode(); - if(!nModifier) + if ( !nModifier ) { - if( KEY_UP == nKey || KEY_DOWN == nKey || - KEY_LEFT == nKey || KEY_RIGHT == nKey || - KEY_ESCAPE == nKey ||KEY_RETURN == nKey ) + bHandled = true; + long nNewCol = nCol; + long nNewLine = nLine; + switch(nKey) { - bHandled = TRUE; - long nNewCol = nCol; - long nNewLine = nLine; - switch(nKey) - { - case KEY_UP : - if(nNewLine > 1) - { - nNewLine--; - break; - } - //no break; - case KEY_ESCAPE: - EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL); + case KEY_UP: + if ( nNewLine > 1 ) + nNewLine--; + else + EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); break; - case KEY_DOWN : + case KEY_DOWN: + if ( nNewLine < TABLE_CELLS_VERT ) nNewLine++; + else + CloseAndShowTableDialog(); break; - case KEY_LEFT : - - if(nNewCol) - nNewCol--; + case KEY_LEFT: + if ( nNewCol > 1 ) + nNewCol--; + else + EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); break; - case KEY_RIGHT : + case KEY_RIGHT: + if ( nNewCol < TABLE_CELLS_HORIZ ) nNewCol++; + else + CloseAndShowTableDialog(); break; - case KEY_RETURN : - if(IsMouseCaptured()) - ReleaseMouse(); - EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL ); + case KEY_ESCAPE: + EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); break; - } + case KEY_RETURN: + EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL ); + break; + case KEY_TAB: + CloseAndShowTableDialog(); + break; + default: + bHandled = false; + } + if ( bHandled ) + { //make sure that a table can initially be created if(bInitialKeyInput) { @@ -318,27 +242,17 @@ void TableWindow::KeyInput( const KeyEvent& rKEvt ) if(!nNewCol) nNewCol = 1; } - UpdateSize_Impl( nNewCol, nNewLine); + Update( nNewCol, nNewLine ); } } else if(KEY_MOD1 == nModifier && KEY_RETURN == nKey) { m_bMod1 = TRUE; - if(IsMouseCaptured()) - ReleaseMouse(); - EndPopupMode(FLOATWIN_POPUPMODEEND_CLOSEALL ); + EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL ); } if(!bHandled) SfxPopupWindow::KeyInput(rKEvt); - -} -// ----------------------------------------------------------------------- - -void TableWindow::MouseButtonDown( const MouseEvent& rMEvt ) -{ - SfxPopupWindow::MouseButtonDown( rMEvt ); - CaptureMouse(); } // ----------------------------------------------------------------------- @@ -346,56 +260,45 @@ void TableWindow::MouseButtonDown( const MouseEvent& rMEvt ) void TableWindow::MouseButtonUp( const MouseEvent& rMEvt ) { SfxPopupWindow::MouseButtonUp( rMEvt ); - ReleaseMouse(); - - if ( IsInPopupMode() ) - EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL ); + EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL ); } // ----------------------------------------------------------------------- void TableWindow::Paint( const Rectangle& ) { - long i; - long nStart; - Size aSize = GetOutputSizePixel(); + const long nSelectionWidth = TABLE_POS_X + nCol*TABLE_CELL_WIDTH; + const long nSelectionHeight = TABLE_POS_Y + nLine*TABLE_CELL_HEIGHT; - SetLineColor(); - SetFillColor( aHighlightFillColor ); - DrawRect( Rectangle( 0, 0, nCol*nMX-1, nLine*nMY-1 ) ); - SetFillColor( aFillColor ); - DrawRect( Rectangle( nCol*nMX-1, 0, - aSize.Width(), aSize.Height()-nTextHeight+1 ) ); - DrawRect( Rectangle( 0, nLine*nMY-1, - aSize.Width(), aSize.Height()-nTextHeight+1 ) ); - - SetLineColor( aHighlightLineColor ); - for ( i = 1; i < nCol; i++ ) - DrawLine( Point( i*nMX-1, 0 ), Point( i*nMX-1, nLine*nMY-1 ) ); - for ( i = 1; i < nLine; i++ ) - DrawLine( Point( 0, i*nMY-1 ), Point( nCol*nMX-1, i*nMY-1 ) ); + // the non-selected parts of the table SetLineColor( aLineColor ); - for ( i = 1; i <= nWidth; i++ ) - { - if ( i < nCol ) - nStart = nLine*nMY-1; - else - nStart = 0; - DrawLine( Point( i*nMX-1, nStart ), Point( i*nMX-1, nHeight*nMY-1 ) ); - } - for ( i = 1; i <= nHeight; i++ ) + SetFillColor( aFillColor ); + DrawRect( Rectangle( nSelectionWidth, TABLE_POS_Y, TABLE_WIDTH, nSelectionHeight ) ); + DrawRect( Rectangle( TABLE_POS_X, nSelectionHeight, nSelectionWidth, TABLE_HEIGHT ) ); + DrawRect( Rectangle( nSelectionWidth, nSelectionHeight, TABLE_WIDTH, TABLE_HEIGHT ) ); + + // the selection + if ( nCol > 0 && nLine > 0 ) { - if ( i < nLine ) - nStart = nCol*nMX-1; - else - nStart = 0; - DrawLine( Point( nStart, i*nMY-1 ), Point( nWidth*nMX-1, i*nMY-1 ) ); + SetFillColor( aHighlightFillColor ); + DrawRect( Rectangle( TABLE_POS_X, TABLE_POS_Y, + nSelectionWidth, nSelectionHeight ) ); } - SetLineColor(); - String aText; + // lines inside of the table + SetLineColor( aLineColor ); + for ( long i = 1; i < TABLE_CELLS_VERT; ++i ) + DrawLine( Point( TABLE_POS_X, TABLE_POS_Y + i*TABLE_CELL_HEIGHT ), + Point( TABLE_WIDTH, TABLE_POS_Y + i*TABLE_CELL_HEIGHT ) ); + + for ( long i = 1; i < TABLE_CELLS_HORIZ; ++i ) + DrawLine( Point( TABLE_POS_X + i*TABLE_CELL_WIDTH, TABLE_POS_Y ), + Point( TABLE_POS_X + i*TABLE_CELL_WIDTH, TABLE_HEIGHT ) ); + + // the text near the mouse cursor telling the table dimensions if ( nCol && nLine ) { + String aText; aText += String::CreateFromInt32( nCol ); aText.AppendAscii( " x " ); aText += String::CreateFromInt32( nLine ); @@ -405,22 +308,30 @@ void TableWindow::Paint( const Rectangle& ) aText += String(SVX_RESSTR(RID_SVXSTR_PAGES)); } - } - else - aText = Button::GetStandardText( BUTTON_CANCEL ); - Size aTextSize( GetTextWidth( aText ), GetTextHeight() ); + Size aSize = GetOutputSizePixel(); + Size aTextSize( GetTextWidth( aText ), GetTextHeight() ); - Rectangle aClearRect( 0, aSize.Height()-nTextHeight+2, (aSize.Width()), aSize.Height() ); - DrawRect( aClearRect ); + long nTextX = nSelectionWidth + TABLE_CELL_WIDTH; + long nTextY = nSelectionHeight + TABLE_CELL_HEIGHT; + const long nTipBorder = 2; - // #i95350# force RTL output - if( IsRTLEnabled() && nCol && nLine ) - aText.Insert(0x202D, 0); - DrawText( Point( (aSize.Width() - aTextSize.Width()) / 2, aSize.Height() - nTextHeight + 2 ), aText ); + if ( aTextSize.Width() + TABLE_POS_X + TABLE_CELL_WIDTH + 2*nTipBorder < nSelectionWidth ) + nTextX = nSelectionWidth - TABLE_CELL_WIDTH - aTextSize.Width(); - SetLineColor( aLineColor ); - SetFillColor(); - DrawRect( Rectangle( Point(0,0), aSize ) ); + if ( aTextSize.Height() + TABLE_POS_Y + TABLE_CELL_HEIGHT + 2*nTipBorder < nSelectionHeight ) + nTextY = nSelectionHeight - TABLE_CELL_HEIGHT - aTextSize.Height(); + + SetLineColor( aLineColor ); + SetFillColor( aBackgroundColor ); + DrawRect( Rectangle ( nTextX - 2*nTipBorder, nTextY - 2*nTipBorder, + nTextX + aTextSize.Width() + nTipBorder, nTextY + aTextSize.Height() + nTipBorder ) ); + + // #i95350# force RTL output + if ( IsRTLEnabled() ) + aText.Insert( 0x202D, 0 ); + + DrawText( Point( nTextX, nTextY ), aText ); + } } // ----------------------------------------------------------------------- @@ -429,37 +340,71 @@ void TableWindow::PopupModeEnd() { if ( !IsPopupModeCanceled() && nCol && nLine ) { - Window* pParent = rTbx.GetParent(); - USHORT nId = GetId(); - pParent->UserEvent(SVX_EVENT_COLUM_WINDOW_EXECUTE, reinterpret_cast<void*>(nId)); - - Reference< XDispatchProvider > xDispatchProvider( mxFrame, UNO_QUERY ); - if ( xDispatchProvider.is() ) - { - com::sun::star::util::URL aTargetURL; - Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), - UNO_QUERY ); - aTargetURL.Complete = maCommand; - xTrans->parseStrict( aTargetURL ); - Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 ); - if ( xDispatch.is() ) - { - Sequence< PropertyValue > aArgs( 2 ); - aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Columns" )); - aArgs[0].Value = makeAny( sal_Int16( nCol )); - aArgs[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Rows" )); - aArgs[1].Value = makeAny( sal_Int16( nLine )); + Sequence< PropertyValue > aArgs( 2 ); + aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Columns" )); + aArgs[0].Value = makeAny( sal_Int16( nCol )); + aArgs[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Rows" )); + aArgs[1].Value = makeAny( sal_Int16( nLine )); - xDispatch->dispatch( aTargetURL, aArgs ); - } - } + TableDialog( aArgs ); } - else if ( IsPopupModeCanceled() ) - ReleaseMouse(); + SfxPopupWindow::PopupModeEnd(); } +// ----------------------------------------------------------------------- + +void TableWindow::Update( long nNewCol, long nNewLine ) +{ + if ( nNewCol < 0 || nNewCol > TABLE_CELLS_HORIZ ) + nNewCol = 0; + + if ( nNewLine < 0 || nNewLine > TABLE_CELLS_VERT ) + nNewLine = 0; + + if ( nNewCol != nCol || nNewLine != nLine ) + { + nCol = nNewCol; + nLine = nNewLine; + Invalidate( Rectangle( TABLE_POS_X, TABLE_POS_Y, TABLE_WIDTH, TABLE_HEIGHT ) ); + } +} + +// ----------------------------------------------------------------------- + +void TableWindow::TableDialog( const Sequence< PropertyValue >& rArgs ) +{ + Window* pParent = rTbx.GetParent(); + USHORT nId = GetId(); + pParent->UserEvent(SVX_EVENT_COLUM_WINDOW_EXECUTE, reinterpret_cast<void*>(nId)); + + Reference< XDispatchProvider > xDispatchProvider( mxFrame, UNO_QUERY ); + if ( xDispatchProvider.is() ) + { + com::sun::star::util::URL aTargetURL; + Reference < XURLTransformer > xTrans( ::comphelper::getProcessServiceFactory()->createInstance( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"))), + UNO_QUERY ); + aTargetURL.Complete = maCommand; + xTrans->parseStrict( aTargetURL ); + + Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( aTargetURL, rtl::OUString(), 0 ); + if ( xDispatch.is() ) + xDispatch->dispatch( aTargetURL, rArgs ); + } +} + +// ----------------------------------------------------------------------- + +void TableWindow::CloseAndShowTableDialog() +{ + // close the toolbar tool + EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); + + // and open the table dialog instead + TableDialog( Sequence< PropertyValue >() ); +} + // class ColumnsWindow --------------------------------------------------- class ColumnsWindow : public SfxPopupWindow @@ -469,6 +414,7 @@ private: ::Color aHighlightLineColor; ::Color aFillColor; ::Color aHighlightFillColor; + ::Color aFaceColor; long nCol; long nWidth; long nMX; @@ -481,7 +427,7 @@ private: void UpdateSize_Impl( long nNewCol ); public: - ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ); + ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, const String& rText, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ); void KeyInput( const KeyEvent& rKEvt ); virtual void MouseMove( const MouseEvent& rMEvt ); @@ -496,8 +442,8 @@ public: // ----------------------------------------------------------------------- -ColumnsWindow::ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) : - SfxPopupWindow( nId, rFrame, WB_SYSTEMWINDOW ), +ColumnsWindow::ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, const String& rText, ToolBox& rParentTbx, const Reference< XFrame >& rFrame ) : + SfxPopupWindow( nId, rFrame, WB_STDPOPUP ), bInitialKeyInput(TRUE), m_bMod1(FALSE), rTbx(rParentTbx), @@ -510,18 +456,21 @@ ColumnsWindow::ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, ToolBox& aHighlightLineColor = rStyles.GetHighlightTextColor(); aFillColor = rStyles.GetWindowColor(); aHighlightFillColor = rStyles.GetHighlightColor(); + aFaceColor = rStyles.GetFaceColor(); nTextHeight = GetTextHeight()+1; SetBackground(); Font aFont( GetFont() ); aFont.SetColor( aLineColor ); - aFont.SetFillColor( aFillColor ); + aFont.SetFillColor( aFaceColor ); aFont.SetTransparent( FALSE ); SetFont( aFont ); nCol = 0; nWidth = 4; + SetText( rText ); + Size aLogicSize = LogicToPixel( Size( 95, 155 ), MapMode( MAP_10TH_MM ) ); nMX = aLogicSize.Width(); SetOutputSizePixel( Size( nMX*nWidth-1, aLogicSize.Height()+nTextHeight ) ); @@ -532,7 +481,7 @@ ColumnsWindow::ColumnsWindow( USHORT nId, const ::rtl::OUString& rCmd, ToolBox& SfxPopupWindow* ColumnsWindow::Clone() const { - return new ColumnsWindow( GetId(), maCommand, rTbx, mxFrame ); + return new ColumnsWindow( GetId(), maCommand, GetText(), rTbx, mxFrame ); } // ----------------------------------------------------------------------- @@ -563,14 +512,10 @@ void ColumnsWindow::MouseMove( const MouseEvent& rMEvt ) nNewCol = 20; UpdateSize_Impl( nNewCol ); } -/* -----------------------------21.05.2002 16:16------------------------------ - ---------------------------------------------------------------------------*/ void ColumnsWindow::UpdateSize_Impl( long nNewCol ) { Size aWinSize = GetOutputSizePixel(); - long nMinCol = 0; - long nMaxCol = 0; Point aWinPos;// = GetPosPixel(); if ( nWidth <= nNewCol ) @@ -601,6 +546,8 @@ void ColumnsWindow::UpdateSize_Impl( long nNewCol ) Invalidate( Rectangle( 0, aWinSize.Height()-nTextHeight+2, aWinSize.Width(), aWinSize.Height() ) ); + long nMinCol = 0, nMaxCol = 0; + if ( nNewCol < nCol ) { nMinCol = nNewCol; @@ -625,9 +572,7 @@ void ColumnsWindow::MouseButtonDown( const MouseEvent& rMEvt ) SfxPopupWindow::MouseButtonDown( rMEvt ); CaptureMouse(); } -/* -----------------------------21.05.2002 16:11------------------------------ - ---------------------------------------------------------------------------*/ void ColumnsWindow::KeyInput( const KeyEvent& rKEvt ) { BOOL bHandled = FALSE; @@ -730,12 +675,13 @@ void ColumnsWindow::Paint( const Rectangle& ) } SetLineColor(); - SetFillColor( aFillColor ); + SetFillColor( aFaceColor ); String aText; if ( nCol ) aText = String( String::CreateFromInt32(nCol) ); else - aText = Button::GetStandardText( BUTTON_CANCEL ); + aText = Button::GetStandardText( BUTTON_CANCEL ).EraseAllChars( '~' ); + Size aTextSize(GetTextWidth( aText ), GetTextHeight()); DrawText( Point( ( aSize.Width() - aTextSize.Width() ) / 2, aSize.Height() - nTextHeight + 2 ), aText ); @@ -744,7 +690,7 @@ void ColumnsWindow::Paint( const Rectangle& ) SetLineColor( aLineColor ); SetFillColor(); - DrawRect( Rectangle( Point(0,0), aSize ) ); + DrawRect( Rectangle( 0, 0, aSize.Width() - 1, aSize.Height() - nTextHeight + 1 ) ); } // ----------------------------------------------------------------------- @@ -802,7 +748,7 @@ SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindow() if ( bEnabled ) { ToolBox& rTbx = GetToolBox(); - TableWindow* pWin = new TableWindow( GetSlotId(), m_aCommandURL, rTbx, m_xFrame ); + TableWindow* pWin = new TableWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), rTbx, m_xFrame ); pWin->StartPopupMode( &rTbx, FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_NOKEYCLOSE ); SetPopupWindow( pWin ); return pWin; @@ -815,7 +761,7 @@ SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindow() SfxPopupWindow* SvxTableToolBoxControl::CreatePopupWindowCascading() { if ( bEnabled ) - return new TableWindow( GetSlotId(), m_aCommandURL, GetToolBox(), m_xFrame ); + return new TableWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame ); return 0; } @@ -868,7 +814,7 @@ SfxPopupWindow* SvxColumnsToolBoxControl::CreatePopupWindow() ColumnsWindow* pWin = 0; if(bEnabled) { - pWin = new ColumnsWindow( GetSlotId(), m_aCommandURL, GetToolBox(), m_xFrame ); + pWin = new ColumnsWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame ); pWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS|FLOATWIN_POPUPMODE_NOKEYCLOSE ); SetPopupWindow( pWin ); @@ -883,13 +829,11 @@ SfxPopupWindow* SvxColumnsToolBoxControl::CreatePopupWindowCascading() ColumnsWindow* pWin = 0; if(bEnabled) { - pWin = new ColumnsWindow( GetSlotId(), m_aCommandURL, GetToolBox(), m_xFrame ); + pWin = new ColumnsWindow( GetSlotId(), m_aCommandURL, GetToolBox().GetItemText( GetId() ), GetToolBox(), m_xFrame ); } return pWin; } -/* -----------------18.11.99 16:38------------------- - --------------------------------------------------*/ void SvxColumnsToolBoxControl::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ) @@ -897,3 +841,5 @@ void SvxColumnsToolBoxControl::StateChanged( USHORT nSID, bEnabled = SFX_ITEM_DISABLED != eState; SfxToolBoxControl::StateChanged(nSID, eState, pState ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index f821116c65..0af35c1b05 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,7 +50,6 @@ #include <svx/lboxctrl.hxx> #ifndef _VCL_MNEMONIC_HXX_ #include <vcl/mnemonic.hxx> -#endif #include <tools/urlobj.hxx> #include <svx/svxids.hrc> @@ -70,7 +70,6 @@ class SvxPopupWindowListBox : public SfxPopupWindow { using FloatingWindow::StateChanged; - FixedInfo aInfo; ListBox * pListBox; ToolBox & rToolBox; BOOL bUserSel; @@ -95,7 +94,6 @@ public: void StartSelection(); inline ListBox & GetListBox() { return *pListBox; } - inline FixedInfo & GetInfo() { return aInfo; } BOOL IsUserSelected() const { return bUserSel; } void SetUserSelected( BOOL bVal ) { bUserSel = bVal; } @@ -106,7 +104,6 @@ public: SvxPopupWindowListBox::SvxPopupWindowListBox( USHORT nSlotId, const rtl::OUString& rCommandURL, USHORT nId, ToolBox& rTbx ) : SfxPopupWindow( nSlotId, Reference< XFrame >(), SVX_RES( RID_SVXTBX_UNDO_REDO_CTRL ) ), - aInfo ( this, SVX_RES( FT_NUM_OPERATIONS ) ), rToolBox ( rTbx ), bUserSel ( FALSE ), nTbxId ( nId ), @@ -242,7 +239,7 @@ void SvxListBoxControl::Impl_SetInfo( USHORT nCount ) String aText( aActionStr ); aText.SearchAndReplaceAllAscii( "$(ARG1)", String::CreateFromInt32( nCount ) ); - pPopupWin->GetInfo().SetText( aText ); + pPopupWin->SetText( aText ); } @@ -321,7 +318,7 @@ SfxPopupWindow* SvxUndoRedoControl::CreatePopupWindow() { DBG_ASSERT(( SID_UNDO == GetSlotId() || SID_REDO == GetSlotId() ), "mismatching ids" ); - if ( m_aCommandURL.equalsAscii( ".uno:Undo" )) + if ( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:Undo" ) )) updateStatus( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GetUndoStrings" ))); else updateStatus( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GetRedoStrings" ))); @@ -349,3 +346,5 @@ SfxPopupWindow* SvxUndoRedoControl::CreatePopupWindow() return pPopupWin; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/lboxctrl.src b/svx/source/tbxctrls/lboxctrl.src index d640d76cb0..b82be11fb5 100644 --- a/svx/source/tbxctrls/lboxctrl.src +++ b/svx/source/tbxctrls/lboxctrl.src @@ -32,28 +32,21 @@ FloatingWindow RID_SVXTBX_UNDO_REDO_CTRL { Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( 150 , 74 ) ; + Size = MAP_APPFONT ( 102 , 87 ) ; HelpID = HID_SVXTBX_UNDO_REDO_CTRL ; - SysWin = TRUE; - Border = TRUE ; + StdPopup = TRUE; Hide = TRUE ; - SVLook = TRUE ; OutputSize = TRUE ; ListBox LB_SVXTBX_UNDO_REDO_CTRL { HelpID = "svx:ListBox:RID_SVXTBX_UNDO_REDO_CTRL:LB_SVXTBX_UNDO_REDO_CTRL"; Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( 150 , 60 ) ; + Size = MAP_APPFONT ( 100 , 85 ) ; Border = TRUE ; DropDown = FALSE ; OutputSize = TRUE ; }; - FixedText FT_NUM_OPERATIONS - { - Pos = MAP_APPFONT ( 6 , 64 ) ; - Size = MAP_APPFONT ( 138 , 10 ) ; - }; }; String RID_SVXSTR_NUM_UNDO_ACTIONS diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index f307a7b25d..f28f3c2342 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,9 +33,7 @@ #include <string> // HACK: prevent conflict between STLPORT and Workshop headers -#ifndef _TOOLBOX_HXX //autogen #include <vcl/toolbox.hxx> -#endif #include <sfx2/app.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/objsh.hxx> @@ -382,7 +381,7 @@ SvxLineEndWindow::SvxLineEndWindow( const String& rWndTitle ) : SfxPopupWindow( nSlotId, rFrame, - WinBits( WB_BORDER | WB_STDFLOATWIN | WB_SIZEABLE | WB_3DLOOK ) ), + WinBits( WB_STDPOPUP ) ), pLineEndList ( NULL ), aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ), nCols ( 2 ), @@ -404,7 +403,7 @@ SvxLineEndWindow::SvxLineEndWindow( SfxPopupWindow( nSlotId, rFrame, pParentWindow, - WinBits( WB_BORDER | WB_STDFLOATWIN | WB_SIZEABLE | WB_3DLOOK ) ), + WinBits( WB_STDPOPUP ) ), pLineEndList ( NULL ), aLineEndSet ( this, WinBits( WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ), nCols ( 2 ), @@ -600,7 +599,7 @@ void SvxLineEndWindow::Resize() // ----------------------------------------------------------------------- -void __EXPORT SvxLineEndWindow::Resizing( Size& rNewSize ) +void SvxLineEndWindow::Resizing( Size& rNewSize ) { Size aBitmapSize = aBmpSize; // -> Member aBitmapSize.Width() += 6; // @@ -766,7 +765,7 @@ SfxPopupWindow* SvxLineEndToolBoxControl::CreatePopupWindow() { SvxLineEndWindow* pLineEndWin = new SvxLineEndWindow( GetId(), m_xFrame, &GetToolBox(), SVX_RESSTR( RID_SVXSTR_LINEEND ) ); - pLineEndWin->StartPopupMode( &GetToolBox(), TRUE ); + pLineEndWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS | FLOATWIN_POPUPMODE_ALLOWTEAROFF ); pLineEndWin->StartSelection(); SetPopupWindow( pLineEndWin ); return pLineEndWin; @@ -782,3 +781,5 @@ void SvxLineEndToolBoxControl::StateChanged( USHORT, SfxItemState eState, const rTbx.EnableItem( nId, SFX_ITEM_DISABLED != eState ); rTbx.SetItemState( nId, ( SFX_ITEM_DONTCARE == eState ) ? STATE_DONTKNOW : STATE_NOCHECK ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/subtoolboxcontrol.cxx b/svx/source/tbxctrls/subtoolboxcontrol.cxx index a7fc22778e..96d98ebc67 100644 --- a/svx/source/tbxctrls/subtoolboxcontrol.cxx +++ b/svx/source/tbxctrls/subtoolboxcontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,5 @@ SfxPopupWindowType SvxSubToolBoxControl::GetPopupWindowType() const { return SFX_POPUPWINDOW_ONCLICK; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 603117048f..f510df654c 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,6 +89,7 @@ #include "colorwindow.hxx" #include <memory> +#include <svx/framelink.hxx> #include <svx/tbxcolorupdate.hxx> #include <editeng/eerdll.hxx> #include <editeng/editrids.hrc> @@ -273,15 +275,8 @@ public: const SfxPoolItem* pState ); virtual SfxPopupWindow* Clone() const; virtual void DataChanged( const DataChangedEvent& rDCEvt ); - - inline BOOL IsHighContrast( void ) const; }; -inline BOOL SvxFrameWindow_Impl::IsHighContrast( void ) const -{ - return GetSettings().GetStyleSettings().GetHighContrastMode(); -} - //======================================================================== // class SvxLineWindow_Impl --------------------------------------------------- //======================================================================== @@ -437,16 +432,16 @@ void SvxStyleBox_Impl::Select() Sequence< PropertyValue > aArgs( 2 ); aArgs[0].Value = makeAny( OUString( aSelEntry ) ); - aArgs[1].Name = OUString::createFromAscii( "Family" ); + aArgs[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Family")); aArgs[1].Value = makeAny( sal_Int16( eStyleFamily )); if( bCreateNew ) { - aArgs[0].Name = OUString::createFromAscii( "Param" ); + aArgs[0].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Param")); SfxToolBoxControl::Dispatch( m_xDispatchProvider, String::CreateFromAscii(".uno:StyleNewByExample"), aArgs); } else { - aArgs[0].Name = OUString::createFromAscii( "Template" ); + aArgs[0].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Template")); SfxToolBoxControl::Dispatch( m_xDispatchProvider, m_aCommand, aArgs ); } } @@ -508,9 +503,7 @@ long SvxStyleBox_Impl::Notify( NotifyEvent& rNEvt ) } return nHandled ? nHandled : ComboBox::Notify( rNEvt ); } -/* -----------------------------08.03.2002 13:03------------------------------ - ---------------------------------------------------------------------------*/ void SvxStyleBox_Impl::DataChanged( const DataChangedEvent& rDCEvt ) { if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && @@ -829,7 +822,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, const String& rWndTitle, Window* pParentWindow ) : - SfxPopupWindow( nSlotId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK|WB_DIALOGCONTROL ) ), + SfxPopupWindow( nSlotId, rFrame, pParentWindow, WinBits( WB_STDPOPUP ) ), theSlotId( nSlotId ), aColorSet( this, WinBits( WB_ITEMBORDER | WB_NAMEFIELD | WB_3DLOOK | WB_NO_DIRECTSELECT) ), @@ -1055,7 +1048,7 @@ void SvxColorWindow_Impl::StateChanged( USHORT nSID, SfxItemState eState, const SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) : - SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL ) ), + SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP ) ), aFrameSet ( this, WinBits( WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT ) ), bParagraphMode(sal_False) @@ -1063,7 +1056,7 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >& BindListener(); String sCommand(String::CreateFromAscii( ".uno:BorderReducedMode" )); AddStatusListener( sCommand ); - aImgList = ImageList( SVX_RES( IsHighContrast()? RID_SVXIL_FRAME_HC : RID_SVXIL_FRAME ) ); + aImgList = ImageList( SVX_RES( RID_SVXIL_FRAME ) ); /* * 1 2 3 4 @@ -1094,9 +1087,7 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >& SetText( SVX_RESSTR(RID_SVXSTR_FRAME) ); aFrameSet.Show(); } -/*-- 22.09.2004 12:27:50--------------------------------------------------- - -----------------------------------------------------------------------*/ SvxFrameWindow_Impl::~SvxFrameWindow_Impl() { UnbindListener(); @@ -1124,7 +1115,7 @@ void SvxFrameWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - aImgList = ImageList( SVX_RES( IsHighContrast()? RID_SVXIL_FRAME_HC : RID_SVXIL_FRAME ) ); + aImgList = ImageList( SVX_RES( RID_SVXIL_FRAME ) ); USHORT nNumOfItems = aFrameSet.GetItemCount(); @@ -1329,7 +1320,7 @@ BOOL SvxFrameWindow_Impl::Close() SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& rFrame, Window* pParentWindow ) : - SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_BORDER | WB_STDFLOATWIN | WB_3DLOOK | WB_DIALOGCONTROL ) ), + SfxPopupWindow( nId, rFrame, pParentWindow, WinBits( WB_STDPOPUP ) ), aLineSet( this, WinBits( WB_3DLOOK | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_NONEFIELD | WB_NO_DIRECTSELECT ) ) { @@ -1522,6 +1513,21 @@ void SvxLineWindow_Impl::MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& r aVirDev.DrawRect( aRect ); nLineWidth = (USHORT) (DEF_DOUBLE_LINE6_OUT+DEF_DOUBLE_LINE6_IN+DEF_DOUBLE_LINE6_DIST)/20; break; + case 17: // Dotted line + aRect.Top() = 6; + aRect.Bottom() = 6; + aVirDev.SetLineColor( rLineCol ); + aVirDev.SetFillColor(); + svtools::DrawLine( aVirDev, aRect.LeftCenter(), aRect.RightCenter(), 1, DOTTED ); + break; + + case 18: // Dashed line + aRect.Top() = 6; + aRect.Bottom() = 6; + aVirDev.SetLineColor( rLineCol ); + aVirDev.SetFillColor(); + svtools::DrawLine( aVirDev, aRect.LeftCenter(), aRect.RightCenter(), 1, DASHED ); + break; default: break; @@ -1542,6 +1548,7 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG ) USHORT n1 = 0, n2 = 0, n3 = 0; + SvxBorderStyle nStyle = SOLID; BOOL bSetLine = TRUE; switch ( aLineSet.GetSelectItemId() ) @@ -1585,6 +1592,14 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG ) case 16: n1 = DEF_DOUBLE_LINE6_OUT; n2 = DEF_DOUBLE_LINE6_IN; n3 = DEF_DOUBLE_LINE6_DIST; break; + case 17: + n1 = DEF_LINE_WIDTH_5; + nStyle = DOTTED; + break; + case 18: + n1 = DEF_LINE_WIDTH_5; + nStyle = DASHED; + break; case 0: default: bSetLine = FALSE; @@ -1592,7 +1607,7 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG ) } if ( bSetLine ) { - SvxBorderLine aTmp( NULL, n1, n2, n3 ); + SvxBorderLine aTmp( NULL, n1, n2, n3, nStyle ); aLineItem.SetLine( &aTmp ); } else @@ -1676,7 +1691,7 @@ void SvxLineWindow_Impl::CreateBitmaps( void ) ::Color aBackCol( rStyleSettings.GetWindowColor() ); aLineSet.Clear(); - for( USHORT i = 1 ; i < 17 ; ++i ) + for( USHORT i = 1 ; i < 19 ; ++i ) { MakeLineBitmap( i, aBmp, aBmpSize, aStr, aLineCol, aBackCol ); aLineSet.InsertItem( i, aBmp, aStr ); @@ -1965,7 +1980,6 @@ void SvxStyleToolBoxControl::FillStyleBox() { const SfxStyleFamily eFamily = GetActFamily(); USHORT nCount = pStyleSheetPool->Count(); - USHORT i = 0; SfxStyleSheetBase* pStyle = NULL; BOOL bDoFill = FALSE; @@ -1984,6 +1998,7 @@ void SvxStyleToolBoxControl::FillStyleBox() } else { + USHORT i= 0; while ( pStyle && !bDoFill ) { bDoFill = ( pBox->GetEntry(i) != pStyle->GetName() ); @@ -2000,12 +2015,12 @@ void SvxStyleToolBoxControl::FillStyleBox() { USHORT _i; sal_uInt32 nCnt = pImpl->aDefaultStyles.size(); - bool bInsert; pStyle = pStyleSheetPool->First(); if( pImpl->bSpecModeWriter || pImpl->bSpecModeCalc ) { + bool bInsert; while ( pStyle ) { // sort out default styles @@ -2639,7 +2654,7 @@ SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const SfxPopupWindow* SvxFrameLineStyleToolBoxControl::CreatePopupWindow() { SvxLineWindow_Impl* pLineWin = new SvxLineWindow_Impl( GetSlotId(), m_xFrame, &GetToolBox() ); - pLineWin->StartPopupMode( &GetToolBox(), TRUE ); + pLineWin->StartPopupMode( &GetToolBox(), FLOATWIN_POPUPMODE_GRABFOCUS | FLOATWIN_POPUPMODE_ALLOWTEAROFF ); pLineWin->StartSelection(); SetPopupWindow( pLineWin ); @@ -2858,3 +2873,5 @@ Reference< ::com::sun::star::accessibility::XAccessible > SvxFontNameBox_Impl::C FillList(); return FontNameBox::CreateAccessible(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/tbcontrl.src b/svx/source/tbxctrls/tbcontrl.src index 67cff9ac45..d2f02adfa8 100644 --- a/svx/source/tbxctrls/tbcontrl.src +++ b/svx/source/tbxctrls/tbcontrl.src @@ -40,11 +40,13 @@ Image RID_SVX_RELOAD_NORMAL ImageBitmap = Bitmap { File = "reload.bmp" ; }; MASKCOLOR }; + Image RID_SVX_RELOAD_SPECIAL { ImageBitmap = Bitmap { File = "reloads.bmp" ; }; MASKCOLOR }; + ImageList RID_SVXIL_FRAME { Prefix = "fr"; @@ -52,33 +54,32 @@ ImageList RID_SVXIL_FRAME IdCount = { 12 ; }; MASKCOLOR }; -ImageList RID_SVXIL_FRAME_HC -{ - Prefix = "frh"; - IdList = { 1 ; 2 ; 3 ; 4 ; 5 ; 6 ; 7 ; 8 ; 9 ; 10 ; 11 ; 12 ; }; - IdCount = { 12 ; }; - MASKCOLOR -}; + String RID_SVXSTR_TRANSPARENT { Text [ en-US ] = "No Fill" ; }; String RID_SVXSTR_FILLPATTERN + { Text [ en-US ] = "Pattern" ; }; + String RID_SVXSTR_FRAME { Text [ en-US ] = "Borders" ; }; + String RID_SVXSTR_FRAME_STYLE { Text [ en-US ] = "Border Style" ; }; + String RID_SVXSTR_FRAME_COLOR { Text [ en-US ] = "Border Color" ; }; + ComboBox RID_SVXTBX_STYLE { HelpId = HID_STYLE_LISTBOX ; @@ -90,22 +91,27 @@ ComboBox RID_SVXTBX_STYLE Border = TRUE ; Hide = TRUE ; }; + String RID_SVXSTR_EXTRAS_CHARBACKGROUND { Text [ en-US ] = "Highlighting" ; }; + String RID_SVXSTR_BACKGROUND { Text [ en-US ] = "Background"; }; + String RID_SVXSTR_AUTOMATIC { Text [ en-US ] = "Automatic"; }; + String RID_SVXSTR_PAGES { Text [ en-US ] = "Pages"; }; + Image RID_SVXIMG_GRAF_RED { ImageBitmap = Bitmap { File = "sc10865.bmp" ; }; @@ -141,45 +147,12 @@ Image RID_SVXIMG_GRAF_TRANSPARENCE ImageBitmap = Bitmap { File = "sc10869.bmp" ; }; MASKCOLOR }; -Image RID_SVXIMG_GRAF_RED_H -{ - ImageBitmap = Bitmap { File = "sch10865.bmp" ; }; - MASKCOLOR -}; -Image RID_SVXIMG_GRAF_GREEN_H -{ - ImageBitmap = Bitmap { File = "sch10866.bmp" ; }; - MASKCOLOR -}; -Image RID_SVXIMG_GRAF_BLUE_H -{ - ImageBitmap = Bitmap { File = "sch10867.bmp" ; }; - MASKCOLOR -}; -Image RID_SVXIMG_GRAF_LUMINANCE_H -{ - ImageBitmap = Bitmap { File = "sch10863.bmp" ; }; - MASKCOLOR -}; -Image RID_SVXIMG_GRAF_CONTRAST_H -{ - ImageBitmap = Bitmap { File = "sch10864.bmp" ; }; - MASKCOLOR -}; -Image RID_SVXIMG_GRAF_GAMMA_H -{ - ImageBitmap = Bitmap { File = "sch10868.bmp" ; }; - MASKCOLOR -}; -Image RID_SVXIMG_GRAF_TRANSPARENCE_H -{ - ImageBitmap = Bitmap { File = "sch10869.bmp" ; }; - MASKCOLOR -}; + String RID_SVXSTR_CLEARFORM { Text [ en-US ] = "Clear formatting"; }; + String RID_SVXSTR_MORE { Text [ en-US ] = "More..."; diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 4e84217a36..b4cd3375e6 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,7 +40,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <svtools/ctrltool.hxx> #include <svtools/ctrlbox.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <memory> @@ -323,7 +324,7 @@ throw (uno::RuntimeException) { svt::ToolboxController::dispose(); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; delete m_pBox; m_pBox = 0; } @@ -335,8 +336,8 @@ throw ( uno::RuntimeException ) { if ( m_pBox ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - if ( rEvent.FeatureURL.Path.equalsAscii( "FontHeight" )) + SolarMutexGuard aSolarMutexGuard; + if ( rEvent.FeatureURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FontHeight" ) )) { if ( rEvent.IsEnabled ) { @@ -350,7 +351,7 @@ throw ( uno::RuntimeException ) else m_pBox->Disable(); } - else if ( rEvent.FeatureURL.Path.equalsAscii( "CharFontName" )) + else if ( rEvent.FeatureURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CharFontName" ) )) { if ( rEvent.State >>= m_aCurrentFont ) m_pBox->UpdateFont( m_aCurrentFont ); @@ -390,7 +391,7 @@ uno::Reference< awt::XWindow > SAL_CALL FontHeightToolBoxControl::createItemWind Window* pParent = VCLUnoHelper::GetWindow( xParent ); if ( pParent ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; m_pBox = new SvxFontSizeBox_Impl( pParent, uno::Reference< frame::XDispatchProvider >( m_xFrame, uno::UNO_QUERY ), @@ -427,3 +428,5 @@ uno::Reference< uno::XInterface > SAL_CALL FontHeightToolBoxControl_createInstan } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.src.orig b/svx/source/tbxctrls/tbunosearchcontrollers.src.orig new file mode 100644 index 0000000000..ff1565e2d2 --- /dev/null +++ b/svx/source/tbxctrls/tbunosearchcontrollers.src.orig @@ -0,0 +1,33 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <svx/dialogs.hrc> + +String RID_SVXSTR_FINDBAR_FIND +{ + Text [ en-US ] = "Find" ; +}; diff --git a/svx/source/tbxctrls/tbxalign.cxx b/svx/source/tbxctrls/tbxalign.cxx index 7e998fd02e..3f4b256b8f 100644 --- a/svx/source/tbxctrls/tbxalign.cxx +++ b/svx/source/tbxctrls/tbxalign.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,11 +37,9 @@ #include "svx/tbxdraw.hxx" #include "tbxdraw.hrc" #include <tools/shl.hxx> -#ifndef _SFX_IMAGEMGR_HXX #include <sfx2/imagemgr.hxx> -#endif #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <sfx2/app.hxx> #include <vcl/toolbox.hxx> @@ -85,7 +84,7 @@ SfxPopupWindowType SvxTbxCtlAlign::GetPopupWindowType() const SfxPopupWindow* SvxTbxCtlAlign::CreatePopupWindow() { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( GetSlotId() == SID_OBJECT_ALIGN ) createAndPositionSubToolBar( m_aSubTbResName ); return NULL; @@ -103,9 +102,9 @@ SfxPopupWindow* SvxTbxCtlAlign::CreatePopupWindow() ::rtl::OUString SAL_CALL SvxTbxCtlAlign::getSubToolbarName() throw (::com::sun::star::uno::RuntimeException) { - // Provide the controlled sub-toolbar name, so we are notified whenever + // Provide the controlled sub-toolbar name, so we are notified whenever // this toolbar executes a function. - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return m_aSubTbName; } @@ -113,13 +112,13 @@ void SAL_CALL SvxTbxCtlAlign::functionSelected( const ::rtl::OUString& aCommand { // Our sub-toolbar wants to executes a function. We have to change // the image of our toolbar button to reflect the new function. - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( !m_bDisposed ) { if ( aCommand.getLength() > 0 ) { ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( getFrameInterface()); - Image aImage = GetImage( xFrame, aCommand, hasBigImages(), isHighContrast() ); + Image aImage = GetImage( xFrame, aCommand, hasBigImages() ); if ( !!aImage ) GetToolBox().SetItemImage( GetId(), aImage ); } @@ -130,12 +129,14 @@ void SAL_CALL SvxTbxCtlAlign::updateImage() throw (::com::sun::star::uno::Runtim { // We should update the button image of our parent (toolbar). Use the stored // command to set the correct current image. - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( m_aCommand.getLength() > 0 ) { ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( getFrameInterface()); - Image aImage = GetImage( xFrame, m_aCommand, hasBigImages(), isHighContrast() ); + Image aImage = GetImage( xFrame, m_aCommand, hasBigImages() ); if ( !!aImage ) GetToolBox().SetItemImage( GetId(), aImage ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/tbxcolor.cxx b/svx/source/tbxctrls/tbxcolor.cxx index 6a849f47ed..206903d080 100644 --- a/svx/source/tbxctrls/tbxcolor.cxx +++ b/svx/source/tbxctrls/tbxcolor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -116,3 +117,4 @@ namespace svx } // namespace svx //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index e646229f10..80d1b46ed6 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -206,3 +207,5 @@ namespace svx //........................................................................ } // namespace svx //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/tbxdrctl.cxx b/svx/source/tbxctrls/tbxdrctl.cxx index 3c626387e5..1418d9e92c 100644 --- a/svx/source/tbxctrls/tbxdrctl.cxx +++ b/svx/source/tbxctrls/tbxdrctl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -118,3 +119,4 @@ void SvxTbxCtlDraw::Select( BOOL ) toggleToolbox(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/tbxctrls/verttexttbxctrl.cxx b/svx/source/tbxctrls/verttexttbxctrl.cxx index 89d2dd532b..282798fc6c 100644 --- a/svx/source/tbxctrls/verttexttbxctrl.cxx +++ b/svx/source/tbxctrls/verttexttbxctrl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,8 +41,6 @@ SFX_IMPL_TOOLBOX_CONTROL(SvxCTLTextTbxCtrl, SfxBoolItem); SFX_IMPL_TOOLBOX_CONTROL(SvxVertTextTbxCtrl, SfxBoolItem); -// -----------------------------27.04.01 15:50-------------------------------- - SvxCTLTextTbxCtrl::SvxCTLTextTbxCtrl(USHORT nSlotId, USHORT nId, ToolBox& rTbx ) : SvxVertCTLTextTbxCtrl( nSlotId, nId, rTbx ) { @@ -63,15 +62,10 @@ SvxVertCTLTextTbxCtrl::SvxVertCTLTextTbxCtrl( USHORT nSlotId, USHORT nId, ToolBo { } -/* -----------------------------27.04.01 15:53-------------------------------- - - ---------------------------------------------------------------------------*/ SvxVertCTLTextTbxCtrl::~SvxVertCTLTextTbxCtrl( ) { } -/* -----------------------------27.04.01 15:50-------------------------------- - ---------------------------------------------------------------------------*/ void SvxVertCTLTextTbxCtrl::StateChanged( USHORT nSID, SfxItemState eState, @@ -117,7 +111,5 @@ void SvxVertCTLTextTbxCtrl::StateChanged( } } } -/* -----------------------------27.04.01 15:50-------------------------------- - - ---------------------------------------------------------------------------*/ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx index 126d624609..2becd0da86 100644 --- a/svx/source/toolbars/extrusionbar.cxx +++ b/svx/source/toolbars/extrusionbar.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" -#ifndef _COM_SUN_STAR_DRAWING_ENHANCEDCUSTOMSHAPEPARAMETERPARIR_HPP_ #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> -#endif #include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp> #include <com/sun/star/drawing/ShadeMode.hpp> #include <com/sun/star/drawing/Position3D.hpp> @@ -45,9 +44,7 @@ #include <svx/xsflclit.hxx> #include <svx/dialmgr.hxx> #include <svx/svdoashp.hxx> -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> -#endif #include <svx/svdview.hxx> #include <editeng/colritem.hxx> #include "svx/chrtitem.hxx" @@ -689,10 +686,7 @@ void getExtrusionDirectionState( SdrView* pSdrView, SfxItemSet& rSet ) sal_Bool bParallel = sal_True; Position3D aViewPoint( 3472, -3472, 25000 ); - double fOriginX = 0.50; - double fOriginY = -0.50; double fSkewAngle = -135; - double fSkew = 50.0; pAny = aGeometryItem.GetPropertyValueByName( sExtrusion, sProjectionMode ); sal_Int16 nProjectionMode = sal_Int16(); @@ -701,6 +695,7 @@ void getExtrusionDirectionState( SdrView* pSdrView, SfxItemSet& rSet ) if( bParallel ) { + double fSkew = 50.0; EnhancedCustomShapeParameterPair aSkewPropPair; pAny = aGeometryItem.GetPropertyValueByName( sExtrusion, sSkew ); if( pAny && ( *pAny >>= aSkewPropPair ) ) @@ -715,6 +710,8 @@ void getExtrusionDirectionState( SdrView* pSdrView, SfxItemSet& rSet ) } else { + double fOriginX = 0.50; + double fOriginY = -0.50; pAny = aGeometryItem.GetPropertyValueByName( sExtrusion, sViewPoint ); if( pAny ) *pAny >>= aViewPoint; @@ -1372,3 +1369,5 @@ void ExtrusionBar::getState( SdrView* pSdrView, SfxItemSet& rSet ) getExtrusionColorState( pSdrView, rSet ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index e2457c838d..3f0005f823 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,9 +38,7 @@ #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp> #include <svx/dialmgr.hxx> #include <svx/svdoashp.hxx> -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> -#endif #include <svx/svdview.hxx> #include <svx/sdasitm.hxx> #include <svx/svdoashp.hxx> @@ -639,3 +638,5 @@ void FontworkBar::getState( SdrView* pSdrView, SfxItemSet& rSet ) SetFontWorkShapeTypeState( pSdrView, rSet ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 309fbb6700..d32b77254a 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -48,14 +49,10 @@ #include <unotools/linguprops.hxx> // header for class IntlWrapper #include <unotools/intlwrapper.hxx> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif // header for class Application #include <vcl/svapp.hxx> -#ifndef _SVX_HELPID_HRC #include "helpid.hrc" -#endif //disable compiler warning C4355: 'this' : used in base member initializer list #ifdef _MSC_VER @@ -495,7 +492,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent ) SvtLinguConfig aLngCfg; sal_Bool bValue = sal_Bool(); - Any aAny( aLngCfg.GetProperty( rtl::OUString::createFromAscii( UPN_IS_REVERSE_MAPPING ) ) ); + Any aAny( aLngCfg.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_REVERSE_MAPPING )) ) ); if( aAny >>= bValue ) m_aCB_Reverse.Check( bValue ); @@ -514,7 +511,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent ) { Reference< linguistic2::XConversionDictionaryList > xDictionaryList( m_xFactory->createInstanceWithContext( - rtl::OUString::createFromAscii("com.sun.star.linguistic2.ConversionDictionaryList") + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ConversionDictionaryList")) , m_xContext), uno::UNO_QUERY); if( xDictionaryList.is() ) { @@ -523,8 +520,8 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent ) { try { - rtl::OUString aNameTo_Simplified( rtl::OUString::createFromAscii("ChineseT2S") ); - rtl::OUString aNameTo_Traditional( rtl::OUString::createFromAscii("ChineseS2T") ); + rtl::OUString aNameTo_Simplified( RTL_CONSTASCII_USTRINGPARAM("ChineseT2S") ); + rtl::OUString aNameTo_Traditional( RTL_CONSTASCII_USTRINGPARAM("ChineseS2T") ); lang::Locale aLocale; aLocale.Language = rtl::OUString::createFromAscii("zh"); @@ -533,7 +530,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent ) xContainer->getByName( aNameTo_Simplified ), UNO_QUERY ); else { - aLocale.Country = rtl::OUString::createFromAscii("TW"); + aLocale.Country = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TW") ); xDictionary_To_Simplified = Reference< linguistic2::XConversionDictionary >( xDictionaryList->addNewDictionary( aNameTo_Simplified , aLocale, linguistic2::ConversionDictionaryType::SCHINESE_TCHINESE @@ -548,7 +545,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog( Window* pParent ) xContainer->getByName( aNameTo_Traditional ), UNO_QUERY ); else { - aLocale.Country = rtl::OUString::createFromAscii("CN"); + aLocale.Country = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CN") ); xDictionary_To_Traditional = Reference< linguistic2::XConversionDictionary >( xDictionaryList->addNewDictionary( aNameTo_Traditional , aLocale, linguistic2::ConversionDictionaryType::SCHINESE_TCHINESE @@ -853,7 +850,7 @@ short ChineseDictionaryDialog::Execute() SvtLinguConfig aLngCfg; Any aAny; aAny <<= sal_Bool( !!m_aCB_Reverse.IsChecked() ); - aLngCfg.SetProperty( rtl::OUString::createFromAscii( UPN_IS_REVERSE_MAPPING ), aAny ); + aLngCfg.SetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_REVERSE_MAPPING )), aAny ); m_aCT_DictionaryToSimplified.save(); m_aCT_DictionaryToTraditional.save(); @@ -893,3 +890,5 @@ IMPL_LINK( ChineseDictionaryDialog, HeaderBarClick, void*, EMPTYARG ) //............................................................................. } //end namespace //............................................................................. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx index d8590b973f..3f97c1df8a 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,9 +33,7 @@ // header for class FixedLine #include <vcl/fixed.hxx> // header for class RadioButton -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif // header for class Edit #include <vcl/edit.hxx> // header for class ListBox @@ -199,3 +198,5 @@ private: } //end namespace //............................................................................. #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx index 84ac6a5070..b0706e5af7 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +32,7 @@ #include "chinese_translation_unodialog.hxx" #include "chinese_translationdialog.hxx" #include <osl/mutex.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> // header for class Application #include <vcl/svapp.hxx> #include <toolkit/awt/vclxwindow.hxx> @@ -51,8 +52,8 @@ namespace textconversiondlgs //............................................................................. using namespace ::com::sun::star; -#define SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.comp.linguistic2.ChineseTranslationDialog") -#define SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.linguistic2.ChineseTranslationDialog") +#define SERVICE_IMPLEMENTATION_NAME ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.linguistic2.ChineseTranslationDialog")) +#define SERVICE_NAME ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ChineseTranslationDialog")) #define C2U(cChar) rtl::OUString::createFromAscii(cChar) @@ -69,7 +70,7 @@ ChineseTranslation_UnoDialog::ChineseTranslation_UnoDialog( const uno::Reference ChineseTranslation_UnoDialog::~ChineseTranslation_UnoDialog() { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; impl_DeleteDialog(); } @@ -131,7 +132,7 @@ void SAL_CALL ChineseTranslation_UnoDialog::setTitle( const ::rtl::OUString& ) t //------------------------------------------------------------------------- void SAL_CALL ChineseTranslation_UnoDialog::initialize( const uno::Sequence< uno::Any >& aArguments ) throw(uno::Exception, uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose ) return; @@ -154,7 +155,7 @@ sal_Int16 SAL_CALL ChineseTranslation_UnoDialog::execute() throw(uno::RuntimeExc { sal_Int16 nRet = ui::dialogs::ExecutableDialogResults::CANCEL; { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose ) return nRet; @@ -186,7 +187,7 @@ void SAL_CALL ChineseTranslation_UnoDialog::dispose() throw (uno::RuntimeExcepti { lang::EventObject aEvt; { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose ) return; m_bInDispose = true; @@ -203,7 +204,7 @@ void SAL_CALL ChineseTranslation_UnoDialog::dispose() throw (uno::RuntimeExcepti void SAL_CALL ChineseTranslation_UnoDialog::addEventListener( const uno::Reference< lang::XEventListener > & xListener ) throw (uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose ) return; m_aDisposeEventListeners.addInterface( xListener ); @@ -211,7 +212,7 @@ void SAL_CALL ChineseTranslation_UnoDialog::addEventListener( const uno::Referen void SAL_CALL ChineseTranslation_UnoDialog::removeEventListener( const uno::Reference< lang::XEventListener > & xListener ) throw (uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose ) return; m_aDisposeEventListeners.removeInterface( xListener ); @@ -238,7 +239,7 @@ uno::Any SAL_CALL ChineseTranslation_UnoDialog::getPropertyValue( const ::rtl::O sal_Bool bTranslateCommonTerms = sal_False; { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex()); + SolarMutexGuard aSolarGuard; if( m_bDisposed || m_bInDispose || !m_pDialog ) return aRet; m_pDialog->getSettings( bDirectionToSimplified, bUseCharacterVariants, bTranslateCommonTerms ); @@ -283,3 +284,5 @@ void SAL_CALL ChineseTranslation_UnoDialog::removeVetoableChangeListener( const //............................................................................. } //end namespace //............................................................................. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx index 79d3ccf668..9a2924c8ef 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -141,3 +142,5 @@ private: } //end namespace //............................................................................. #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx index 401242860a..7ad46a8126 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,7 +41,6 @@ #include <unotools/linguprops.hxx> #ifndef _SVX_HELPID_HRC #include "helpid.hrc" -#endif //disable compiler warning C4355: 'this' : used in base member initializer list #ifdef _MSC_VER @@ -78,18 +78,18 @@ ChineseTranslationDialog::ChineseTranslationDialog( Window* pParent ) SvtLinguConfig aLngCfg; sal_Bool bValue = sal_Bool(); - Any aAny( aLngCfg.GetProperty( rtl::OUString::createFromAscii( UPN_IS_DIRECTION_TO_SIMPLIFIED ) ) ); + Any aAny( aLngCfg.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_DIRECTION_TO_SIMPLIFIED )) ) ); aAny >>= bValue; if( bValue ) m_aRB_To_Simplified.Check(); else m_aRB_To_Traditional.Check(); - aAny = aLngCfg.GetProperty( rtl::OUString::createFromAscii( UPN_IS_USE_CHARACTER_VARIANTS ) ); + aAny = aLngCfg.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_USE_CHARACTER_VARIANTS )) ); if( aAny >>= bValue ) m_aCB_Use_Variants.Check( bValue ); - // #117820# (search for other occurences!) + // #117820# (search for other occurrences!) // disable and hide that checkbox until it is decided if it is needed or not. // If it is to be removed later the respective code needs to be removed as // well, otherwise we just have to remove the next lines again. @@ -97,7 +97,7 @@ ChineseTranslationDialog::ChineseTranslationDialog( Window* pParent ) m_aCB_Use_Variants.Enable( sal_False ); m_aCB_Use_Variants.Show( sal_False ); - aAny = aLngCfg.GetProperty( rtl::OUString::createFromAscii( UPN_IS_TRANSLATE_COMMON_TERMS ) ); + aAny = aLngCfg.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_TRANSLATE_COMMON_TERMS )) ); if( aAny >>= bValue ) m_aCB_Translate_Commonterms.Check( bValue ); @@ -131,7 +131,7 @@ void ChineseTranslationDialog::getSettings( sal_Bool& rbDirectionToSimplified void ChineseTranslationDialog::impl_UpdateVariantsCheckBox() { -// #117820# (search for other occurences!) +// #117820# (search for other occurrences!) // m_aCB_Use_Variants.Enable( m_aRB_To_Traditional.IsChecked() ); } @@ -143,7 +143,7 @@ IMPL_LINK( ChineseTranslationDialog, DirectionHdl, void*, EMPTYARG ) IMPL_LINK( ChineseTranslationDialog, CommonTermsHdl, void*, EMPTYARG ) { -// #117820# (search for other occurences!) +// #117820# (search for other occurrences!) // if( m_aCB_Translate_Commonterms.IsChecked() && m_aRB_To_Traditional.IsChecked() ) // m_aCB_Use_Variants.Check( true ); return 0; @@ -155,11 +155,11 @@ IMPL_LINK( ChineseTranslationDialog, OkHdl, void*, EMPTYARG ) SvtLinguConfig aLngCfg; Any aAny; aAny <<= sal_Bool( !!m_aRB_To_Simplified.IsChecked() ); - aLngCfg.SetProperty( rtl::OUString::createFromAscii( UPN_IS_DIRECTION_TO_SIMPLIFIED ), aAny ); + aLngCfg.SetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_DIRECTION_TO_SIMPLIFIED )), aAny ); aAny <<= sal_Bool( !!m_aCB_Use_Variants.IsChecked() ); - aLngCfg.SetProperty( rtl::OUString::createFromAscii( UPN_IS_USE_CHARACTER_VARIANTS ), aAny ); + aLngCfg.SetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_USE_CHARACTER_VARIANTS )), aAny ); aAny <<= sal_Bool( !!m_aCB_Translate_Commonterms.IsChecked() ); - aLngCfg.SetProperty( rtl::OUString::createFromAscii( UPN_IS_TRANSLATE_COMMON_TERMS ), aAny ); + aLngCfg.SetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_TRANSLATE_COMMON_TERMS )), aAny ); EndDialog( RET_OK ); return 0; @@ -199,3 +199,5 @@ IMPL_LINK( ChineseTranslationDialog, DictionaryHdl, void*, EMPTYARG ) //............................................................................. } //end namespace //............................................................................. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx index 630ac959e5..2805217c77 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,9 +33,7 @@ // header for class FixedLine #include <vcl/fixed.hxx> // header for class RadioButton -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif //............................................................................. namespace textconversiondlgs @@ -88,3 +87,5 @@ private: } //end namespace //............................................................................. #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodialogs/textconversiondlgs/resid.cxx b/svx/source/unodialogs/textconversiondlgs/resid.cxx index 06112499dd..bb0a62be9e 100644 --- a/svx/source/unodialogs/textconversiondlgs/resid.cxx +++ b/svx/source/unodialogs/textconversiondlgs/resid.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,3 +51,5 @@ TextConversionDlgs_ResId::TextConversionDlgs_ResId(USHORT nId) //............................................................................. } //end namespace //............................................................................. + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodialogs/textconversiondlgs/resid.hxx b/svx/source/unodialogs/textconversiondlgs/resid.hxx index 004a92b214..f920fd3a90 100644 --- a/svx/source/unodialogs/textconversiondlgs/resid.hxx +++ b/svx/source/unodialogs/textconversiondlgs/resid.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -48,3 +49,5 @@ class TextConversionDlgs_ResId : public ResId } //end namespace //............................................................................. #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodialogs/textconversiondlgs/services.cxx b/svx/source/unodialogs/textconversiondlgs/services.cxx index c80795a175..2ecf1be3d0 100644 --- a/svx/source/unodialogs/textconversiondlgs/services.cxx +++ b/svx/source/unodialogs/textconversiondlgs/services.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ void * SAL_CALL component_getFactory( } } //========================================================================= + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 6d6c9fdf32..0427596780 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,7 +30,7 @@ #include "precompiled_svx.hxx" #include <vector> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <com/sun/star/io/XOutputStream.hpp> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/frame/XModel.hpp> @@ -85,7 +86,6 @@ using namespace ::comphelper; using namespace ::osl; -using namespace ::vos; using ::rtl::OUString; using namespace ::cppu; using namespace ::com::sun::star; @@ -1000,7 +1000,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDescriptor ) throw(RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( NULL == mpUnoPage ) return sal_False; @@ -1089,7 +1089,7 @@ void SAL_CALL GraphicExporter::cancel() void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XComponent >& xComponent ) throw(IllegalArgumentException, RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; mxShapes = NULL; mpUnoPage = NULL; @@ -1281,3 +1281,4 @@ Graphic SvxGetGraphicForShape( SdrObject& rShape, bool bVector ) return aGraphic; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/UnoGraphicExporter.hxx b/svx/source/unodraw/UnoGraphicExporter.hxx index 5f82a9a56a..775e6acaa3 100644 --- a/svx/source/unodraw/UnoGraphicExporter.hxx +++ b/svx/source/unodraw/UnoGraphicExporter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,3 +39,5 @@ namespace svx } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx index a3511edee5..596fd70596 100644 --- a/svx/source/unodraw/UnoNameItemTable.cxx +++ b/svx/source/unodraw/UnoNameItemTable.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,7 +37,7 @@ #include <svx/svdmodel.hxx> #include "UnoNameItemTable.hxx" -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include "svx/unoapi.hxx" @@ -44,7 +45,6 @@ using namespace ::com::sun::star; using namespace ::rtl; using namespace ::cppu; -using namespace ::vos; SvxUnoNameItemTable::SvxUnoNameItemTable( SdrModel* pModel, USHORT nWhich, BYTE nMemberId ) throw() : mpModel( pModel ), @@ -116,7 +116,7 @@ void SAL_CALL SvxUnoNameItemTable::ImplInsertByName( const OUString& aName, cons void SAL_CALL SvxUnoNameItemTable::insertByName( const OUString& aApiName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( hasByName( aApiName ) ) throw container::ElementExistException(); @@ -132,7 +132,7 @@ void SAL_CALL SvxUnoNameItemTable::insertByName( const OUString& aApiName, const void SAL_CALL SvxUnoNameItemTable::removeByName( const OUString& aApiName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // a little quickfix for 2.0 to let applications clear api // created items that are not used @@ -160,7 +160,7 @@ void SAL_CALL SvxUnoNameItemTable::removeByName( const OUString& aApiName ) maItemSetVector.erase( aIter ); return; } - aIter++; + ++aIter; } if( !hasByName( Name ) ) @@ -171,7 +171,7 @@ void SAL_CALL SvxUnoNameItemTable::removeByName( const OUString& aApiName ) void SAL_CALL SvxUnoNameItemTable::replaceByName( const OUString& aApiName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aName; SvxUnogetInternalNameForItem( mnWhich, aApiName, aName ); @@ -195,7 +195,7 @@ void SAL_CALL SvxUnoNameItemTable::replaceByName( const OUString& aApiName, cons (*aIter)->Put( *pNewItem ); return; } - aIter++; + ++aIter; } // if it is not in our own sets, modify the pool! @@ -227,7 +227,7 @@ void SAL_CALL SvxUnoNameItemTable::replaceByName( const OUString& aApiName, cons uno::Any SAL_CALL SvxUnoNameItemTable::getByName( const OUString& aApiName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aName; SvxUnogetInternalNameForItem( mnWhich, aApiName, aName ); @@ -259,7 +259,7 @@ uno::Any SAL_CALL SvxUnoNameItemTable::getByName( const OUString& aApiName ) uno::Sequence< OUString > SAL_CALL SvxUnoNameItemTable::getElementNames( ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; std::set< OUString, comphelper::UStringLess > aNameSet; @@ -296,7 +296,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoNameItemTable::getElementNames( ) sal_Bool SAL_CALL SvxUnoNameItemTable::hasByName( const OUString& aApiName ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aName; SvxUnogetInternalNameForItem( mnWhich, aApiName, aName ); @@ -323,7 +323,7 @@ sal_Bool SAL_CALL SvxUnoNameItemTable::hasByName( const OUString& aApiName ) sal_Bool SAL_CALL SvxUnoNameItemTable::hasElements( ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const NameOrIndex *pItem; @@ -339,3 +339,5 @@ sal_Bool SAL_CALL SvxUnoNameItemTable::hasElements( ) return sal_False; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/UnoNameItemTable.hxx b/svx/source/unodraw/UnoNameItemTable.hxx index 0d71a7b67f..fe919c2a97 100644 --- a/svx/source/unodraw/UnoNameItemTable.hxx +++ b/svx/source/unodraw/UnoNameItemTable.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,5 @@ public: }; #endif // _SVX_UNONAMEITEMTABLE_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx index eb48f1ea4b..ccab088399 100644 --- a/svx/source/unodraw/UnoNamespaceMap.cxx +++ b/svx/source/unodraw/UnoNamespaceMap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,9 +35,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> -#ifndef _CPPUHELPER_IMPLBASE3_HXX_ #include <cppuhelper/implbase2.hxx> -#endif #include <osl/diagnose.h> #include <osl/mutex.hxx> #include <comphelper/stl_types.hxx> @@ -312,3 +311,5 @@ Sequence< ::rtl::OUString > SAL_CALL NamespaceMap::getSupportedServiceNames( ) { return NamespaceMap_getSupportedServiceNames(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx index cd5ce824ff..d75ec8eaac 100644 --- a/svx/source/unodraw/XPropertyTable.cxx +++ b/svx/source/unodraw/XPropertyTable.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,7 +36,7 @@ #include <com/sun/star/drawing/Hatch.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/container/XNameContainer.hpp> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <cppuhelper/implbase2.hxx> @@ -49,7 +50,6 @@ using namespace com::sun::star; using namespace ::cppu; using namespace ::rtl; -using namespace ::vos; class SvxUnoXPropertyTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo > { @@ -133,7 +133,7 @@ sal_Bool SAL_CALL SvxUnoXPropertyTable::supportsService( const OUString& Servic void SAL_CALL SvxUnoXPropertyTable::insertByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( NULL == mpList && NULL == mpTable ) throw lang::IllegalArgumentException(); @@ -157,7 +157,7 @@ void SAL_CALL SvxUnoXPropertyTable::insertByName( const OUString& aName, const void SAL_CALL SvxUnoXPropertyTable::removeByName( const OUString& Name ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aInternalName; SvxUnogetInternalNameForItem( mnWhich, Name, aInternalName ); @@ -185,7 +185,7 @@ void SAL_CALL SvxUnoXPropertyTable::removeByName( const OUString& Name ) void SAL_CALL SvxUnoXPropertyTable::replaceByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aInternalName; SvxUnogetInternalNameForItem( mnWhich, aName, aInternalName ); @@ -217,7 +217,7 @@ void SAL_CALL SvxUnoXPropertyTable::replaceByName( const OUString& aName, const uno::Any SAL_CALL SvxUnoXPropertyTable::getByName( const OUString& aName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aInternalName; SvxUnogetInternalNameForItem( mnWhich, aName, aInternalName ); @@ -239,7 +239,7 @@ uno::Any SAL_CALL SvxUnoXPropertyTable::getByName( const OUString& aName ) uno::Sequence< OUString > SAL_CALL SvxUnoXPropertyTable::getElementNames() throw( uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; const long nCount = getCount(); uno::Sequence< OUString > aNames( nCount ); @@ -263,7 +263,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoXPropertyTable::getElementNames() sal_Bool SAL_CALL SvxUnoXPropertyTable::hasByName( const OUString& aName ) throw( uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aInternalName; SvxUnogetInternalNameForItem( mnWhich, aName, aInternalName ); @@ -285,7 +285,7 @@ sal_Bool SAL_CALL SvxUnoXPropertyTable::hasByName( const OUString& aName ) sal_Bool SAL_CALL SvxUnoXPropertyTable::hasElements( ) throw( uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return getCount() != 0; } @@ -741,3 +741,5 @@ uno::Sequence< OUString > SAL_CALL SvxUnoXBitmapTable::getSupportedServiceNames uno::Sequence< OUString > aServices( &aServiceName, 1 ); return aServices; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/gluepts.cxx b/svx/source/unodraw/gluepts.cxx index 801d7bc93c..79675e8511 100644 --- a/svx/source/unodraw/gluepts.cxx +++ b/svx/source/unodraw/gluepts.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,9 +30,7 @@ #include "precompiled_svx.hxx" #include <com/sun/star/container/XIdentifierContainer.hpp> #include <com/sun/star/container/XIndexContainer.hpp> -#ifndef _COM_SUN_STAR_DRAWING_GLUEPOINT2_HDL_ #include <com/sun/star/drawing/GluePoint2.hpp> -#endif #include <cppuhelper/implbase2.hxx> @@ -546,3 +545,5 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoGluePointAccess_createInstance( { return *new SvxUnoGluePointAccess(pObject); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx index 98a0686bf4..e131ffc5ad 100644 --- a/svx/source/unodraw/recoveryui.cxx +++ b/svx/source/unodraw/recoveryui.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,8 +45,8 @@ //=============================================== // const -#define IMPLEMENTATIONNAME_RECOVERYUI ::rtl::OUString::createFromAscii("com.sun.star.comp.svx.RecoveryUI") -#define SERVICENAME_RECOVERYUI ::rtl::OUString::createFromAscii("com.sun.star.dialog.RecoveryUI") +#define IMPLEMENTATIONNAME_RECOVERYUI ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.svx.RecoveryUI")) +#define SERVICENAME_RECOVERYUI ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.dialog.RecoveryUI")) //=============================================== // namespace @@ -109,7 +110,7 @@ css::uno::Any SAL_CALL RecoveryUI::dispatchWithReturnValue(const css::util::URL& { // Internaly we use VCL ... every call into vcl based code must // be guarded by locking the global solar mutex. - ::vos::OGuard aSolarLock(&Application::GetSolarMutex()); + ::SolarMutexGuard aSolarLock; css::uno::Any aRet; RecoveryUI::EJob eJob = impl_classifyJob(aURL); @@ -190,16 +191,16 @@ static OUString GetCrashConfigDir() { #if defined(WNT) || defined(OS2) - OUString ustrValue = OUString::createFromAscii("${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}"); + OUString ustrValue = OUString(RTL_CONSTASCII_USTRINGPARAM("${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}")); #elif defined(MACOSX) - OUString ustrValue = OUString::createFromAscii("~"); + OUString ustrValue = OUString(RTL_CONSTASCII_USTRINGPARAM("~")); #else - OUString ustrValue = OUString::createFromAscii("$SYSUSERCONFIG"); + OUString ustrValue = OUString(RTL_CONSTASCII_USTRINGPARAM("$SYSUSERCONFIG")); #endif Bootstrap::expandMacros( ustrValue ); #if defined(WNT) || defined(OS2) - ustrValue += OUString::createFromAscii("/user/crashdata"); + ustrValue += OUString(RTL_CONSTASCII_USTRINGPARAM("/user/crashdata")); #endif return ustrValue; } @@ -230,7 +231,7 @@ static bool new_crash_pending() OUString aUnsentURL = GetUnsentURL(); File aFile( aUnsentURL ); - if ( FileBase::E_None == aFile.open( OpenFlag_Read ) ) + if ( FileBase::E_None == aFile.open( osl_File_OpenFlag_Read ) ) { aFile.close(); return true; @@ -397,3 +398,5 @@ void RecoveryUI::impl_showAllRecoveredDocs() } } // namespace svx + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx index ba3feed6d3..f1b460c427 100644 --- a/svx/source/unodraw/shapeimpl.hxx +++ b/svx/source/unodraw/shapeimpl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -127,3 +128,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/shapepropertynotifier.cxx b/svx/source/unodraw/shapepropertynotifier.cxx index 3efda09cf7..4e249ead34 100644 --- a/svx/source/unodraw/shapepropertynotifier.cxx +++ b/svx/source/unodraw/shapepropertynotifier.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -205,3 +206,5 @@ namespace svx //........................................................................ } // namespace svx //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/tableshape.cxx b/svx/source/unodraw/tableshape.cxx index 7f76ade673..1f9c93c13a 100644 --- a/svx/source/unodraw/tableshape.cxx +++ b/svx/source/unodraw/tableshape.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -192,3 +193,4 @@ void SvxTableShape::unlock() SvxShape::unlock(); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unobtabl.cxx b/svx/source/unodraw/unobtabl.cxx index a0a033dea6..7a1b91927d 100644 --- a/svx/source/unodraw/unobtabl.cxx +++ b/svx/source/unodraw/unobtabl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index 9358fa47c2..a6542b0f5c 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -391,3 +392,5 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unodtabl.cxx b/svx/source/unodraw/unodtabl.cxx index fca8e0f936..31bc9c28a9 100644 --- a/svx/source/unodraw/unodtabl.cxx +++ b/svx/source/unodraw/unodtabl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -106,3 +107,4 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDashTable_createInstance( SdrMo +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unogtabl.cxx b/svx/source/unodraw/unogtabl.cxx index 242f675d27..a6f7562138 100644 --- a/svx/source/unodraw/unogtabl.cxx +++ b/svx/source/unodraw/unogtabl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,3 +106,4 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoGradientTable_createInstance( S +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unohtabl.cxx b/svx/source/unodraw/unohtabl.cxx index 4d68c31d3f..971f9c7d69 100644 --- a/svx/source/unodraw/unohtabl.cxx +++ b/svx/source/unodraw/unohtabl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,4 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoHatchTable_createInstance( SdrM +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unomlstr.cxx b/svx/source/unodraw/unomlstr.cxx index 6a7fdd4d0a..925d447e96 100644 --- a/svx/source/unodraw/unomlstr.cxx +++ b/svx/source/unodraw/unomlstr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,7 +30,7 @@ #include "precompiled_svx.hxx" #include <svx/svdobj.hxx> // header for class OGuard -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> // header for class Application #include <vcl/svapp.hxx> @@ -49,7 +50,7 @@ SvxUnoShapeModifyListener::~SvxUnoShapeModifyListener() throw() // ::com::sun::star::util::XModifyListener void SAL_CALL SvxUnoShapeModifyListener::modified(const lang::EventObject& ) throw( uno::RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpObj ) { mpObj->SetChanged(); @@ -70,3 +71,4 @@ void SvxUnoShapeModifyListener::invalidate() throw() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index b0035e5f04..d1d22d8775 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,7 @@ #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> #include <com/sun/star/lang/NoSupportException.hpp> #include <com/sun/star/drawing/XShape.hpp> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <tools/list.hxx> #include <svl/itemprop.hxx> @@ -62,13 +63,10 @@ #include <svx/svdpage.hxx> #include <svx/unoshape.hxx> -extern UHashMapEntry pSdrShapeIdentifierMap[]; - //-//////////////////////////////////////////////////////////////////// using namespace ::rtl; using namespace ::osl; -using namespace ::vos; using namespace ::com::sun::star; //-//////////////////////////////////////////////////////////////////// @@ -185,14 +183,14 @@ sal_Bool SvxUnoDrawMSFactory::createEvent( const SdrModel* pDoc, const SdrHint* return sal_True; } -uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstance( const OUString& ServiceSpecifier ) +uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstance( const OUString& rServiceSpecifier ) throw( uno::Exception, uno::RuntimeException ) { const OUString aDrawingPrefix( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.") ); - if( ServiceSpecifier.compareTo( aDrawingPrefix, aDrawingPrefix.getLength() ) == 0 ) + if( rServiceSpecifier.compareTo( aDrawingPrefix, aDrawingPrefix.getLength() ) == 0 ) { - UINT32 nType = aSdrShapeIdentifierMap.getId( ServiceSpecifier ); + sal_uInt32 nType = UHashMap::getId( rServiceSpecifier ); if( nType != UHASHMAP_NOTFOUND ) { UINT16 nT = (UINT16)(nType & ~E3D_INVENTOR_FLAG); @@ -202,7 +200,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstance( } } - uno::Reference< uno::XInterface > xRet( createTextField( ServiceSpecifier ) ); + uno::Reference< uno::XInterface > xRet( createTextField( rServiceSpecifier ) ); if( !xRet.is() ) throw lang::ServiceNotRegisteredException(); @@ -223,28 +221,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstanceWi uno::Sequence< OUString > SAL_CALL SvxUnoDrawMSFactory::getAvailableServiceNames() throw( uno::RuntimeException ) { - UHashMapEntry* pMap = pSdrShapeIdentifierMap; - - UINT32 nCount = 0; - while (pMap->aIdentifier.getLength()) - { - pMap++; - nCount++; - } - - uno::Sequence< OUString > aSeq( nCount ); - OUString* pStrings = aSeq.getArray(); - - pMap = pSdrShapeIdentifierMap; - UINT32 nIdx = 0; - while(pMap->aIdentifier.getLength()) - { - pStrings[nIdx] = pMap->aIdentifier; - pMap++; - nIdx++; - } - - return aSeq; + return UHashMap::getServiceNames(); } uno::Sequence< OUString > SvxUnoDrawMSFactory::concatServiceNames( uno::Sequence< OUString >& rServices1, uno::Sequence< OUString >& rServices2 ) throw() @@ -348,7 +325,7 @@ void SAL_CALL SvxUnoDrawingModel::lockControllers( ) throw(uno::RuntimeException) { if( mpDoc ) - mpDoc->setLock( sal_True ); + mpDoc->setLock(true); } void SAL_CALL SvxUnoDrawingModel::unlockControllers( ) @@ -356,7 +333,7 @@ void SAL_CALL SvxUnoDrawingModel::unlockControllers( ) { if( mpDoc && mpDoc->isLocked() ) { - mpDoc->setLock( sal_False ); + mpDoc->setLock(false); } } @@ -370,7 +347,7 @@ sal_Bool SAL_CALL SvxUnoDrawingModel::hasControllersLocked( ) uno::Reference< drawing::XDrawPages > SAL_CALL SvxUnoDrawingModel::getDrawPages() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; uno::Reference< drawing::XDrawPages > xDrawPages( mxDrawPagesAccess ); @@ -384,7 +361,7 @@ uno::Reference< drawing::XDrawPages > SAL_CALL SvxUnoDrawingModel::getDrawPages( uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( const OUString& aServiceSpecifier ) throw(uno::Exception, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DashTable") ) ) { @@ -623,7 +600,7 @@ SvxUnoDrawPagesAccess::~SvxUnoDrawPagesAccess() throw() sal_Int32 SAL_CALL SvxUnoDrawPagesAccess::getCount() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; sal_Int32 nCount = 0; @@ -636,7 +613,7 @@ sal_Int32 SAL_CALL SvxUnoDrawPagesAccess::getCount() uno::Any SAL_CALL SvxUnoDrawPagesAccess::getByIndex( sal_Int32 Index ) throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; uno::Any aAny; @@ -688,7 +665,7 @@ sal_Bool SAL_CALL SvxUnoDrawPagesAccess::hasElements() uno::Reference< drawing::XDrawPage > SAL_CALL SvxUnoDrawPagesAccess::insertNewByIndex( sal_Int32 nIndex ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; uno::Reference< drawing::XDrawPage > xDrawPage; @@ -711,7 +688,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SvxUnoDrawPagesAccess::insertNewBy void SAL_CALL SvxUnoDrawPagesAccess::remove( const uno::Reference< drawing::XDrawPage >& xPage ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; sal_uInt16 nPageCount = mrModel.mpDoc->GetPageCount(); if( nPageCount > 1 ) @@ -776,3 +753,5 @@ com::sun::star::uno::Reference< com::sun::star::container::XIndexReplace > SvxCr /////////////////////////////////////////////////////////////////////// #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx index fb72806b32..3d6fd2a0c0 100644 --- a/svx/source/unodraw/unomtabl.cxx +++ b/svx/source/unodraw/unomtabl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,7 +47,7 @@ #include <svx/xflhtit.hxx> #include <vector> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> @@ -57,7 +58,6 @@ using namespace ::com::sun::star; using namespace ::rtl; using namespace ::cppu; -using namespace ::vos; typedef std::vector< SfxItemSet* > ItemPoolVector; @@ -187,7 +187,7 @@ void SAL_CALL SvxUnoMarkerTable::ImplInsertByName( const OUString& aName, const void SAL_CALL SvxUnoMarkerTable::insertByName( const OUString& aApiName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::ElementExistException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( hasByName( aApiName ) ) throw container::ElementExistException(); @@ -201,7 +201,7 @@ void SAL_CALL SvxUnoMarkerTable::insertByName( const OUString& aApiName, const u void SAL_CALL SvxUnoMarkerTable::removeByName( const OUString& aApiName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // a little quickfix for 2.0 to let applications clear api // created items that are not used @@ -229,7 +229,7 @@ void SAL_CALL SvxUnoMarkerTable::removeByName( const OUString& aApiName ) maItemSetVector.erase( aIter ); return; } - aIter++; + ++aIter; } if( !hasByName( Name ) ) @@ -240,7 +240,7 @@ void SAL_CALL SvxUnoMarkerTable::removeByName( const OUString& aApiName ) void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aName; SvxUnogetInternalNameForItem( XATTR_LINEEND, aApiName, aName ); @@ -270,7 +270,7 @@ void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const (*aIter)->Put( aStartMarker, XATTR_LINESTART ); return; } - aIter++; + ++aIter; } // if it is not in our own sets, modify the pool! @@ -329,7 +329,7 @@ static sal_Bool getByNameFromPool( const String& rSearchName, SfxItemPool* pPool uno::Any SAL_CALL SvxUnoMarkerTable::getByName( const OUString& aApiName ) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; String aName; SvxUnogetInternalNameForItem( XATTR_LINEEND, aApiName, aName ); @@ -378,7 +378,7 @@ static void createNamesForPool( SfxItemPool* pPool, USHORT nWhich, std::set< OUS uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getElementNames() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; std::set< OUString, comphelper::UStringLess > aNameSet; @@ -405,7 +405,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoMarkerTable::getElementNames() sal_Bool SAL_CALL SvxUnoMarkerTable::hasByName( const OUString& aName ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( aName.getLength() == 0 ) return sal_False; @@ -446,7 +446,7 @@ uno::Type SAL_CALL SvxUnoMarkerTable::getElementType( ) sal_Bool SAL_CALL SvxUnoMarkerTable::hasElements( ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; NameOrIndex *pItem; @@ -480,3 +480,4 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoMarkerTable_createInstance( Sdr +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index b2f4d44434..8d132b9ada 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +32,7 @@ #define _SVX_USE_UNOGLOBALS_ #include <com/sun/star/document/EventObject.hpp> #include <com/sun/star/lang/DisposedException.hpp> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <osl/mutex.hxx> #include <sfx2/dispatch.hxx> #include <sot/clsids.hxx> @@ -60,7 +61,6 @@ #include <vcl/svapp.hxx> using ::rtl::OUString; -using namespace ::vos; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -71,13 +71,6 @@ using namespace ::com::sun::star::drawing; #define INTERFACE_TYPE( xint ) \ ::getCppuType((const Reference< xint >*)0) -#define QUERYINT( xint ) \ - if( rType == ::getCppuType((const Reference< xint >*)0) ) \ - aAny <<= Reference< xint >(this) - -DECLARE_LIST( SvxDrawPageList, SvxDrawPage * ) - - /********************************************************************** * class SvxDrawPage * **********************************************************************/ @@ -89,7 +82,7 @@ SvxDrawPage::SvxDrawPage( SdrPage* pInPage ) throw() , mpPage( pInPage ) , mpModel( 0 ) { - DBG_CTOR(SvxDrawPage,NULL); + DBG_CTOR(SvxDrawPage,NULL); // Am Broadcaster anmelden if( mpPage ) mpModel = mpPage->GetModel(); @@ -112,7 +105,7 @@ SvxDrawPage::SvxDrawPage() throw() , mpModel( NULL ) , mpView( NULL ) { - DBG_CTOR(SvxDrawPage,NULL); + DBG_CTOR(SvxDrawPage,NULL); } //---------------------------------------------------------------------- @@ -124,7 +117,7 @@ SvxDrawPage::~SvxDrawPage() throw() acquire(); dispose(); } - DBG_DTOR(SvxDrawPage,NULL); + DBG_DTOR(SvxDrawPage,NULL); } //---------------------------------------------------------------------- @@ -195,7 +188,7 @@ void SvxDrawPage::disposing() throw() void SvxDrawPage::dispose() throw(::com::sun::star::uno::RuntimeException) { - OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; // An frequently programming error is to release the last // reference to this object in the disposing message. @@ -252,7 +245,7 @@ void SvxDrawPage::dispose() void SAL_CALL SvxDrawPage::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpModel == 0 ) throw lang::DisposedException(); @@ -264,7 +257,7 @@ void SAL_CALL SvxDrawPage::addEventListener( const ::com::sun::star::uno::Refere void SAL_CALL SvxDrawPage::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpModel == 0 ) throw lang::DisposedException(); @@ -304,7 +297,7 @@ void SvxDrawPage::Notify( SfxBroadcaster&, const SfxHint& /*rHint*/ ) void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -329,8 +322,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape if(pObj == NULL) return; - if(pShape) - pShape->Create( pObj, this ); + pShape->Create( pObj, this ); if( mpModel ) mpModel->SetChanged(); @@ -340,7 +332,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape void SAL_CALL SvxDrawPage::remove( const Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -377,7 +369,7 @@ void SAL_CALL SvxDrawPage::remove( const Reference< drawing::XShape >& xShape ) sal_Int32 SAL_CALL SvxDrawPage::getCount() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -389,7 +381,7 @@ sal_Int32 SAL_CALL SvxDrawPage::getCount() uno::Any SAL_CALL SvxDrawPage::getByIndex( sal_Int32 Index ) throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -420,7 +412,7 @@ uno::Type SAL_CALL SvxDrawPage::getElementType() sal_Bool SAL_CALL SvxDrawPage::hasElements() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -488,7 +480,7 @@ void SvxDrawPage::_SelectObjectInView( const Reference< drawing::XShape > & xSha Reference< drawing::XShapeGroup > SAL_CALL SvxDrawPage::group( const Reference< drawing::XShapes >& xShapes ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -527,7 +519,7 @@ Reference< drawing::XShapeGroup > SAL_CALL SvxDrawPage::group( const Reference< void SAL_CALL SvxDrawPage::ungroup( const Reference< drawing::XShapeGroup >& aGroup ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( (mpModel == 0) || (mpPage == 0) ) throw lang::DisposedException(); @@ -650,7 +642,7 @@ SdrObject *SvxDrawPage::_CreateSdrObject( const Reference< drawing::XShape > & x //---------------------------------------------------------------------- void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor, const OUString& aName ) const throw() { - sal_uInt32 nTempType = aSdrShapeIdentifierMap.getId( aName ); + sal_uInt32 nTempType = UHashMap::getId( aName ); if( nTempType == UHASHMAP_NOTFOUND ) { @@ -995,7 +987,7 @@ SdrPage* GetSdrPageFromXDrawPage( uno::Reference< drawing::XDrawPage > xDrawPage if(xDrawPage.is()) { SvxDrawPage* pDrawPage = SvxDrawPage::getImplementation( xDrawPage ); - + if(pDrawPage) { return pDrawPage->GetSdrPage(); @@ -1006,3 +998,5 @@ SdrPage* GetSdrPageFromXDrawPage( uno::Reference< drawing::XDrawPage > xDrawPage } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index 585a9d604d..3f1712fab7 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,13 +29,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include <com/sun/star/lang/XServiceInfo.hpp> -#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HDL_ #include <com/sun/star/beans/PropertyState.hpp> -#endif #include <comphelper/propertysetinfo.hxx> #include <rtl/uuid.h> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include "svx/unopool.hxx" #include <svx/svdmodel.hxx> @@ -208,7 +207,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn void SvxUnoDrawPool::_setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const uno::Any* pValues ) throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SfxItemPool* pPool = getModelPool( sal_False ); @@ -223,7 +222,7 @@ void SvxUnoDrawPool::_setPropertyValues( const comphelper::PropertyMapEntry** pp void SvxUnoDrawPool::_getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, uno::Any* pValue ) throw(beans::UnknownPropertyException, lang::WrappedTargetException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SfxItemPool* pPool = getModelPool( sal_True ); @@ -238,7 +237,7 @@ void SvxUnoDrawPool::_getPropertyValues( const comphelper::PropertyMapEntry** pp void SvxUnoDrawPool::_getPropertyStates( const comphelper::PropertyMapEntry** ppEntries, beans::PropertyState* pStates ) throw(beans::UnknownPropertyException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SfxItemPool* pPool = getModelPool( sal_True ); @@ -301,7 +300,7 @@ void SvxUnoDrawPool::_getPropertyStates( const comphelper::PropertyMapEntry** pp void SvxUnoDrawPool::_setPropertyToDefault( const comphelper::PropertyMapEntry* pEntry ) throw(beans::UnknownPropertyException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SfxItemPool* pPool = getModelPool( sal_True ); @@ -320,7 +319,7 @@ void SvxUnoDrawPool::_setPropertyToDefault( const comphelper::PropertyMapEntry* uno::Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry* pEntry ) throw(beans::UnknownPropertyException, lang::WrappedTargetException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // OD 13.10.2003 #i18732# - use method <GetPoolDefaultItem(..)> instead of // using probably incompatible item pool <mpDefaultsPool> @@ -391,7 +390,7 @@ uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawPool::getTypes() uno::Sequence< sal_Int8 > SAL_CALL SvxUnoDrawPool::getImplementationId() throw (uno::RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; static uno::Sequence< sal_Int8 > aId; if( aId.getLength() == 0 ) @@ -428,3 +427,5 @@ uno::Sequence< OUString > SAL_CALL SvxUnoDrawPool::getSupportedServiceNames( ) aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Defaults" )); return aSNS; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 3c87712a30..a0d59f1402 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,6 +29,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" +#include <sal/macros.h> + #define _SVX_USE_UNOGLOBALS_ #include <com/sun/star/table/XTable.hpp> @@ -41,7 +44,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <tools/fldunit.hxx> #include <tools/shl.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <comphelper/propertysetinfo.hxx> #include <svx/dialmgr.hxx> @@ -818,7 +821,6 @@ comphelper::PropertyMapEntry* ImplGetSvxDrawingDefaultsPropertyMap() return aSvxDrawingDefaultsPropertyMap_Impl; } -// OD 13.10.2003 #i18732# comphelper::PropertyMapEntry* ImplGetAdditionalWriterDrawingDefaultsPropertyMap() { static comphelper::PropertyMapEntry aSvxAdditionalDefaultsPropertyMap_Impl[] = @@ -831,92 +833,104 @@ comphelper::PropertyMapEntry* ImplGetAdditionalWriterDrawingDefaultsPropertyMap( return aSvxAdditionalDefaultsPropertyMap_Impl; } -// --------------------------------------------------------------------- - -SvxUnoPropertyMapProvider aSvxMapProvider; - -UHashMapEntry pSdrShapeIdentifierMap[] = -{ - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.RectangleShape"), OBJ_RECT ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.EllipseShape"), OBJ_CIRC ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ControlShape"), OBJ_UNO ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ConnectorShape"), OBJ_EDGE ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MeasureShape"), OBJ_MEASURE ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.LineShape"), OBJ_LINE ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonShape"), OBJ_POLY ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLineShape"), OBJ_PLIN ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenBezierShape"), OBJ_PATHLINE ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedBezierShape"), OBJ_PATHFILL ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenFreeHandShape"), OBJ_FREELINE ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedFreeHandShape"), OBJ_FREEFILL ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonPathShape"), OBJ_PATHPOLY ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLinePathShape"), OBJ_PATHPLIN ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GraphicObjectShape"), OBJ_GRAF ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GroupShape"), OBJ_GRUP ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TextShape"), OBJ_TEXT ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape"), OBJ_OLE2 ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PageShape"), OBJ_PAGE ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CaptionShape"), OBJ_CAPTION ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.FrameShape"), OBJ_FRAME ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PluginShape"), OBJ_OLE2_PLUGIN ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.AppletShape"), OBJ_OLE2_APPLET ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CustomShape"), OBJ_CUSTOMSHAPE ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape"), OBJ_MEDIA ), - - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSceneObject"), E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DCubeObject"), E3D_CUBEOBJ_ID | E3D_INVENTOR_FLAG ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSphereObject"), E3D_SPHEREOBJ_ID | E3D_INVENTOR_FLAG ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DLatheObject"), E3D_LATHEOBJ_ID | E3D_INVENTOR_FLAG ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DPolygonObject"), E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG ), - UHashMapEntry (RTL_CONSTASCII_STRINGPARAM(""), 0 ) -}; - -// --------------------------------------------------------------------- - -UHashMap aSdrShapeIdentifierMap( pSdrShapeIdentifierMap ); - /*********************************************************************** * class UHashMap * ***********************************************************************/ -UHashMap::UHashMap( UHashMapEntry* pMap ) +typedef ::std::hash_map< rtl::OUString, sal_uInt32, rtl::OUStringHash > UHashMapImpl; + +namespace { + static const UHashMapImpl &GetUHashImpl() + { + static UHashMapImpl aImpl(63); + static bool bInited = false; + if (!bInited) { + struct { const char *name; sal_Int32 length; sal_uInt32 id; } aInit[] = { + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.RectangleShape"), OBJ_RECT }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.EllipseShape"), OBJ_CIRC }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ControlShape"), OBJ_UNO }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ConnectorShape"), OBJ_EDGE }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MeasureShape"), OBJ_MEASURE }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.LineShape"), OBJ_LINE }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonShape"), OBJ_POLY }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLineShape"), OBJ_PLIN }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenBezierShape"), OBJ_PATHLINE }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedBezierShape"), OBJ_PATHFILL }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenFreeHandShape"), OBJ_FREELINE }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.ClosedFreeHandShape"), OBJ_FREEFILL }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyPolygonPathShape"), OBJ_PATHPOLY }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PolyLinePathShape"), OBJ_PATHPLIN }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GraphicObjectShape"), OBJ_GRAF }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GroupShape"), OBJ_GRUP }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TextShape"), OBJ_TEXT }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OLE2Shape"), OBJ_OLE2 }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PageShape"), OBJ_PAGE }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CaptionShape"), OBJ_CAPTION }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.FrameShape"), OBJ_FRAME }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.PluginShape"), OBJ_OLE2_PLUGIN }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.AppletShape"), OBJ_OLE2_APPLET }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CustomShape"), OBJ_CUSTOMSHAPE }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape"), OBJ_MEDIA }, + + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSceneObject"), E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DCubeObject"), E3D_CUBEOBJ_ID | E3D_INVENTOR_FLAG }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSphereObject"), E3D_SPHEREOBJ_ID | E3D_INVENTOR_FLAG }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DLatheObject"), E3D_LATHEOBJ_ID | E3D_INVENTOR_FLAG }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG }, + { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DPolygonObject"), E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG }, + }; + for (sal_uInt32 i = 0; i < SAL_N_ELEMENTS(aInit); i++) + aImpl[rtl::OUString( aInit[i].name, aInit[i].length, RTL_TEXTENCODING_ASCII_US ) ] = aInit[i].id; + bInited = true; + } + return aImpl; + } +} + +//---------------------------------------------------------------------- +rtl::OUString UHashMap::getNameFromId(sal_uInt32 nId) { - while( pMap->aIdentifier.getLength() ) - { - OUString aStr( pMap->aIdentifier ); - size_t nHash = aStr.hashCode() & (HASHARRAYSIZE-1); + const UHashMapImpl &rMap = GetUHashImpl(); - m_aHashList[nHash].Insert(pMap); - pMap++; + for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); it++) + { + if (it->second == nId) + return it->first; } + DBG_ERROR("[CL] unknown SdrObjekt identifier"); + return rtl::OUString(); } -// --------------------------------------------------------------------- - -UINT32 UHashMap::getId( const OUString& rCompareString ) +uno::Sequence< OUString > UHashMap::getServiceNames() { - size_t nHash = rCompareString.hashCode() & (HASHARRAYSIZE-1); + const UHashMapImpl &rMap = GetUHashImpl(); - UHashMapEntryList& rList = m_aHashList[nHash]; + int i = 0; + uno::Sequence< OUString > aSeq( rMap.size() ); + OUString* pStrings = aSeq.getArray(); - UHashMapEntry * pMap = rList.First(); + for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); it++) + pStrings[i++] = it->first; - while(pMap) - { - if( rCompareString == pMap->aIdentifier ) - return pMap->nId; - - pMap = rList.Next(); - } + return aSeq; +} - return UHASHMAP_NOTFOUND; +UINT32 UHashMap::getId( const OUString& rCompareString ) +{ + const UHashMapImpl &rMap = GetUHashImpl(); + UHashMapImpl::const_iterator it = rMap.find( rCompareString ); + if( it == rMap.end() ) + return UHASHMAP_NOTFOUND; + else + return it->second; } /*********************************************************************** * class SvxUnoPropertyMapProvider * ***********************************************************************/ +SvxUnoPropertyMapProvider aSvxMapProvider; + EXTERN_C #if defined( PM2 ) && (!defined( CSET ) && !defined ( MTW ) && !defined( WTC )) int _stdcall @@ -1233,7 +1247,7 @@ bool SvxUnoConvertResourceString( int nSourceResIds, int nDestResIds, int nCount return FALSE; } -static USHORT __READONLY_DATA SvxUnoColorNameDefResId[] = +static USHORT const SvxUnoColorNameDefResId[] = { RID_SVXSTR_BLUEGREY_DEF, RID_SVXSTR_BLACK_DEF, @@ -1264,7 +1278,7 @@ static USHORT __READONLY_DATA SvxUnoColorNameDefResId[] = RID_SVXSTR_COLOR_CHART_DEF }; -static USHORT __READONLY_DATA SvxUnoColorNameResId[] = +static USHORT const SvxUnoColorNameResId[] = { RID_SVXSTR_BLUEGREY, RID_SVXSTR_BLACK, @@ -1297,12 +1311,24 @@ static USHORT __READONLY_DATA SvxUnoColorNameResId[] = bool SvxUnoConvertResourceString( USHORT* pSourceResIds, USHORT* pDestResIds, int nCount, String& rString ) throw() { - int i = 0; + //We replace e.g. "Gray 10%" with the translation of Gray, but we shouldn't + //replace "Red Hat 1" with the translation of Red :-) + rtl::OUString sStr(rString); + const sal_Unicode *pStr = sStr.getStr(); + sal_Int32 nLength = sStr.getLength(); + while( nLength > 0 ) + { + const sal_Unicode nChar = pStr[nLength-1]; + if (nChar != '%' && (nChar < '0' || nChar > '9')) + break; + nLength--; + } + sStr = rtl::OUString(pStr, nLength).trim(); - for( i = 0; i < nCount; i++ ) + for(int i = 0; i < nCount; ++i ) { String aStrDefName = SVX_RESSTR( pSourceResIds[i] ); - if( rString.Search( aStrDefName ) == 0 ) + if( sStr.equals( aStrDefName ) ) { String aReplace = SVX_RESSTR( pDestResIds[i] ); rString.Replace( 0, aStrDefName.Len(), aReplace ); @@ -1391,7 +1417,7 @@ void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ) throw() { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( nServiceId > SVXUNO_SERVICEID_LASTID ) { @@ -1426,3 +1452,4 @@ comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nSer comphelper::PropertySetInfo* SvxPropertySetInfoPool::mpInfos[SVXUNO_SERVICEID_LASTID+1] = { NULL }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 5725f5bd2a..e88025811e 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,15 +35,15 @@ #include <com/sun/star/style/VerticalAlignment.hpp> #include <com/sun/star/drawing/TextVerticalAdjust.hpp> #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp> -#include <com/sun/star/awt/TextAlign.hpp> //added by BerryJia for fixing Bug102407 2002-11-4 -#include <com/sun/star/style/ParagraphAdjust.hpp> //added by BerryJia for fixing Bug102407 2002-11-4 +#include <com/sun/star/awt/TextAlign.hpp> +#include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/drawing/PointSequenceSequence.hpp> #include <com/sun/star/drawing/PointSequence.hpp> #include <com/sun/star/graphic/XGraphic.hpp> #include <tools/urlobj.hxx> #include <unotools/localfilehelper.hxx> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <svtools/fltcall.hxx> #include <svtools/filter.hxx> @@ -74,7 +75,6 @@ using ::rtl::OUString; using namespace ::osl; -using namespace ::vos; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -221,7 +221,7 @@ void SAL_CALL SvxShapeGroup::leaveGroup( ) throw(uno::RuntimeException) void SAL_CALL SvxShapeGroup::add( const uno::Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; SvxShape* pShape = SvxShape::getImplementation( xShape ); @@ -248,8 +248,7 @@ void SAL_CALL SvxShapeGroup::add( const uno::Reference< drawing::XShape >& xShap // Establish connection between new SdrObject and its wrapper before // inserting the new shape into the group. There a new wrapper // would be created when this connection would not already exist. - if(pShape) - pShape->Create( pSdrShape, mxPage.get() ); + pShape->Create( pSdrShape, mxPage.get() ); if( mpModel ) mpModel->SetChanged(); @@ -264,7 +263,7 @@ void SAL_CALL SvxShapeGroup::add( const uno::Reference< drawing::XShape >& xShap void SAL_CALL SvxShapeGroup::remove( const uno::Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; SdrObject* pSdrShape = NULL; SvxShape* pShape = SvxShape::getImplementation( xShape ); @@ -318,7 +317,7 @@ void SAL_CALL SvxShapeGroup::remove( const uno::Reference< drawing::XShape >& xS //---------------------------------------------------------------------- sal_Int32 SAL_CALL SvxShapeGroup::getCount() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; sal_Int32 nRetval = 0; @@ -334,7 +333,7 @@ sal_Int32 SAL_CALL SvxShapeGroup::getCount() throw( uno::RuntimeException ) uno::Any SAL_CALL SvxShapeGroup::getByIndex( sal_Int32 Index ) throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( !mpObj.is() || mpObj->GetSubList() == NULL ) throw uno::RuntimeException(); @@ -362,7 +361,7 @@ uno::Type SAL_CALL SvxShapeGroup::getElementType() throw( uno::RuntimeException //---------------------------------------------------------------------- sal_Bool SAL_CALL SvxShapeGroup::hasElements() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; return mpObj.is() && mpObj->GetSubList() && (mpObj->GetSubList()->GetObjCount() > 0); } @@ -480,7 +479,7 @@ void SAL_CALL SvxShapeConnector::setSize( const awt::Size& rSize ) void SAL_CALL SvxShapeConnector::connectStart( const uno::Reference< drawing::XConnectableShape >& xShape, drawing::ConnectionType ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; Reference< drawing::XShape > xRef( xShape, UNO_QUERY ); SvxShape* pShape = SvxShape::getImplementation( xRef ); @@ -496,7 +495,7 @@ void SAL_CALL SvxShapeConnector::connectStart( const uno::Reference< drawing::XC void SAL_CALL SvxShapeConnector::connectEnd( const uno::Reference< drawing::XConnectableShape >& xShape, drawing::ConnectionType ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; Reference< drawing::XShape > xRef( xShape, UNO_QUERY ); SvxShape* pShape = SvxShape::getImplementation( xRef ); @@ -512,7 +511,7 @@ void SAL_CALL SvxShapeConnector::connectEnd( const uno::Reference< drawing::XCon void SAL_CALL SvxShapeConnector::disconnectBegin( const uno::Reference< drawing::XConnectableShape >& ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if(mpObj.is()) mpObj->DisconnectFromNode( sal_True ); @@ -525,7 +524,7 @@ void SAL_CALL SvxShapeConnector::disconnectBegin( const uno::Reference< drawing: void SAL_CALL SvxShapeConnector::disconnectEnd( const uno::Reference< drawing::XConnectableShape >& ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if(mpObj.is()) mpObj->DisconnectFromNode( sal_False ); @@ -648,7 +647,7 @@ void SAL_CALL SvxShapeControl::setSize( const awt::Size& rSize ) Reference< awt::XControlModel > SAL_CALL SvxShapeControl::getControl() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; Reference< awt::XControlModel > xModel; @@ -663,7 +662,7 @@ Reference< awt::XControlModel > SAL_CALL SvxShapeControl::getControl() void SAL_CALL SvxShapeControl::setControl( const Reference< awt::XControlModel >& xControl ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; SdrUnoObj* pUnoObj = dynamic_cast< SdrUnoObj * >(mpObj.get()); if( pUnoObj ) @@ -844,18 +843,18 @@ void SAL_CALL SvxShapeControl::setPropertyValue( const OUString& aPropertyName, if( xInfo.is() && xInfo->hasPropertyByName( aFormsName ) ) { uno::Any aConvertedValue( aValue ); - if ( aFormsName.equalsAscii( "FontSlant" ) ) + if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FontSlant" ) ) ) { awt::FontSlant nSlant; if( !(aValue >>= nSlant ) ) throw lang::IllegalArgumentException(); aConvertedValue <<= (sal_Int16)nSlant; } - else if ( aFormsName.equalsAscii( "Align" ) ) + else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Align" ) ) ) { lcl_convertParaAdjustmentToTextAlignment( aConvertedValue ); } - else if ( aFormsName.equalsAscii( "VerticalAlign" ) ) + else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VerticalAlign" ) ) ) { convertVerticalAdjustToVerticalAlign( aConvertedValue ); } @@ -885,7 +884,7 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyValue( const OUString& aPropertyNa if( xInfo.is() && xInfo->hasPropertyByName( aFormsName ) ) { aValue = xControl->getPropertyValue( aFormsName ); - if ( aFormsName.equalsAscii( "FontSlant" ) ) + if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FontSlant" ) ) ) { awt::FontSlant eSlant = awt::FontSlant_NONE; sal_Int16 nSlant = sal_Int16(); @@ -899,11 +898,11 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyValue( const OUString& aPropertyNa } aValue <<= eSlant; } - else if ( aFormsName.equalsAscii( "Align" ) ) + else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Align" ) ) ) { lcl_convertTextAlignmentToParaAdjustment( aValue ); } - else if ( aFormsName.equalsAscii( "VerticalAlign" ) ) + else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VerticalAlign" ) ) ) { convertVerticalAlignToVerticalAdjust( aValue ); } @@ -979,17 +978,17 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyDefault( const ::rtl::OUString& aP if( xControl.is() ) { Any aDefault( xControl->getPropertyDefault( aFormsName ) ); - if ( aFormsName.equalsAscii( "FontSlant" ) ) + if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FontSlant" ) ) ) { sal_Int16 nSlant( 0 ); aDefault >>= nSlant; aDefault <<= (awt::FontSlant)nSlant; } - else if ( aFormsName.equalsAscii( "Align" ) ) + else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Align" ) ) ) { lcl_convertTextAlignmentToParaAdjustment( aDefault ); } - else if ( aFormsName.equalsAscii( "VerticalAlign" ) ) + else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VerticalAlign" ) ) ) { convertVerticalAlignToVerticalAdjust( aDefault ); } @@ -1290,7 +1289,7 @@ drawing::PolygonKind SvxShapePolyPolygon::GetPolygonKind() const throw() //---------------------------------------------------------------------- void SvxShapePolyPolygon::SetPolygon(const basegfx::B2DPolyPolygon& rNew) throw() { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if(mpObj.is()) ((SdrPathObj*)mpObj.get())->SetPathPoly(rNew); @@ -1299,7 +1298,7 @@ void SvxShapePolyPolygon::SetPolygon(const basegfx::B2DPolyPolygon& rNew) throw( //---------------------------------------------------------------------- basegfx::B2DPolyPolygon SvxShapePolyPolygon::GetPolygon() const throw() { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if(mpObj.is()) { @@ -1586,7 +1585,7 @@ drawing::PolygonKind SvxShapePolyPolygonBezier::GetPolygonKind() const throw() //---------------------------------------------------------------------- void SvxShapePolyPolygonBezier::SetPolygon(const basegfx::B2DPolyPolygon& rNew) throw() { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if(mpObj.is()) static_cast<SdrPathObj*>(mpObj.get())->SetPathPoly(rNew); @@ -1595,7 +1594,7 @@ void SvxShapePolyPolygonBezier::SetPolygon(const basegfx::B2DPolyPolygon& rNew) //---------------------------------------------------------------------- basegfx::B2DPolyPolygon SvxShapePolyPolygonBezier::GetPolygon() const throw() { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if(mpObj.is()) { @@ -1621,9 +1620,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygonBezier::getSupportedServic #include <vcl/cvtgrf.hxx> #include <svx/svdograf.hxx> #ifndef SVX_LIGHT -#ifndef _SFXDOCFILE_HXX #include <sfx2/docfile.hxx> -#endif #include <sfx2/app.hxx> #include <sfx2/fcontnr.hxx> #endif @@ -1968,7 +1965,7 @@ OUString SAL_CALL SvxCustomShape::getShapeType() //------------------------------------------------------------------1---- awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if ( mpModel && mpObj.is() ) { SdrAShapeObjGeoData aCustomShapeGeoData; @@ -2073,7 +2070,7 @@ void SAL_CALL SvxCustomShape::setSize( const awt::Size& rSize ) void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, const uno::Any& aValue ) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; SdrObject* pObject = mpObj.get(); sal_Bool bCustomShapeGeometry = pObject && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CustomShapeGeometry" ) ); @@ -2155,3 +2152,5 @@ void SvxCustomShape::createCustomShapeDefaults( const rtl::OUString& rValueType { ((SdrObjCustomShape*)mpObj.get())->MergeDefaultAttributes( &rValueType ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index 439458eabc..1b22519d6d 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,7 +60,6 @@ #include <basegfx/polygon/b2dpolypolygontools.hxx> using ::rtl::OUString; -using namespace ::vos; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -150,7 +150,7 @@ uno::Sequence< sal_Int8 > SAL_CALL Svx3DSceneObject::getImplementationId() void SAL_CALL Svx3DSceneObject::add( const Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxShape* pShape = SvxShape::getImplementation( xShape ); @@ -179,7 +179,7 @@ void SAL_CALL Svx3DSceneObject::add( const Reference< drawing::XShape >& xShape void SAL_CALL Svx3DSceneObject::remove( const Reference< drawing::XShape >& xShape ) throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; SvxShape* pShape = SvxShape::getImplementation( xShape ); @@ -220,7 +220,7 @@ void SAL_CALL Svx3DSceneObject::remove( const Reference< drawing::XShape >& xSha sal_Int32 SAL_CALL Svx3DSceneObject::getCount() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; sal_Int32 nRetval = 0; @@ -234,7 +234,7 @@ sal_Int32 SAL_CALL Svx3DSceneObject::getCount() uno::Any SAL_CALL Svx3DSceneObject::getByIndex( sal_Int32 Index ) throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( !mpObj.is() || mpObj->GetSubList() == NULL ) throw uno::RuntimeException(); @@ -265,7 +265,7 @@ uno::Type SAL_CALL Svx3DSceneObject::getElementType() sal_Bool SAL_CALL Svx3DSceneObject::hasElements() throw( uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; return mpObj.is() && mpObj->GetSubList() && (mpObj->GetSubList()->GetObjCount() > 0); } @@ -514,7 +514,7 @@ Svx3DCubeObject::~Svx3DCubeObject() throw() //---------------------------------------------------------------------- bool Svx3DCubeObject::setPropertyValueImpl( const ::rtl::OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; switch( pProperty->nWID ) { @@ -1208,3 +1208,5 @@ uno::Sequence< OUString > SAL_CALL Svx3DPolygonObject::getSupportedServiceNames( } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 39652b74ef..be5281656d 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,13 +40,11 @@ #include <svx/svdomedia.hxx> #include <svx/svdpool.hxx> #ifndef SVX_LIGHT -#ifndef _SOT_CLSIDS_HXX #include <sot/clsids.hxx> -#endif #include <sfx2/frmdescr.hxx> #endif #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <sfx2/objsh.hxx> @@ -73,7 +72,6 @@ extern sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rT /////////////////////////////////////////////////////////////////////// using namespace ::osl; -using namespace ::vos; using namespace ::rtl; using namespace ::cppu; using namespace ::com::sun::star; @@ -125,7 +123,7 @@ bool SvxOle2Shape::setPropertyValueImpl( const ::rtl::OUString& rName, const Sfx { SfxObjectShell* pPersist = mpModel->GetPersist(); ::rtl::OUString aPersistName; - Any aAny( getPropertyValue( OUString::createFromAscii( UNO_NAME_OLE2_PERSISTNAME ) ) ); + Any aAny( getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_OLE2_PERSISTNAME )) ) ); aAny >>= aPersistName; //TODO/LATER: how to cope with creation failure?! @@ -133,7 +131,7 @@ bool SvxOle2Shape::setPropertyValueImpl( const ::rtl::OUString& rName, const Sfx if( xObj.is() ) { aAny <<= aPersistName; - setPropertyValue( OUString::createFromAscii( UNO_NAME_OLE2_PERSISTNAME ), aAny ); + setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_OLE2_PERSISTNAME )), aAny ); pOle2->SetObjRef( xObj ); Rectangle aRect = pOle2->GetLogicRect(); @@ -471,7 +469,7 @@ sal_Bool SvxOle2Shape::createObject( const SvGlobalName &aClassName ) ::comphelper::IEmbeddedHelper* pPersist = mpModel->GetPersist(); ::rtl::OUString aPersistName; OUString aTmpStr; - if( getPropertyValue( OUString::createFromAscii( UNO_NAME_OLE2_PERSISTNAME ) ) >>= aTmpStr ) + if( getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_OLE2_PERSISTNAME )) ) >>= aTmpStr ) aPersistName = aTmpStr; //TODO/LATER: how to cope with creation failure?! @@ -502,7 +500,7 @@ sal_Bool SvxOle2Shape::createObject( const SvGlobalName &aClassName ) } // connect the object after the visual area is set - setPropertyValue( OUString::createFromAscii( UNO_NAME_OLE2_PERSISTNAME ), Any( aTmpStr = aPersistName ) ); + setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_OLE2_PERSISTNAME )), Any( aTmpStr = aPersistName ) ); // the object is inserted during setting of PersistName property usually if( pOle2Obj->IsEmpty() ) @@ -525,7 +523,7 @@ sal_Bool SvxOle2Shape::createLink( const ::rtl::OUString& aLinkURL ) ::comphelper::IEmbeddedHelper* pPersist = mpModel->GetPersist(); uno::Sequence< beans::PropertyValue > aMediaDescr( 1 ); - aMediaDescr[0].Name = ::rtl::OUString::createFromAscii( "URL" ); + aMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")); aMediaDescr[0].Value <<= aLinkURL; uno::Reference< task::XInteractionHandler > xInteraction = pPersist->getInteractionHandler(); @@ -565,7 +563,7 @@ sal_Bool SvxOle2Shape::createLink( const ::rtl::OUString& aLinkURL ) } // connect the object after the visual area is set - setPropertyValue( OUString::createFromAscii( UNO_NAME_OLE2_PERSISTNAME ), uno::makeAny( aPersistName ) ); + setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_OLE2_PERSISTNAME )), uno::makeAny( aPersistName ) ); // the object is inserted during setting of PersistName property usually if ( pOle2Obj->IsEmpty() ) @@ -994,3 +992,5 @@ bool SvxMediaShape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sf return SvxShape::getPropertyValueImpl( rName, pProperty, rValue ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 6e97a82b34..d9c0c9d0f0 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -109,7 +110,6 @@ using ::rtl::OUString; using namespace ::osl; -using namespace ::vos; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -252,7 +252,7 @@ SvxShape::SvxShape() throw() //---------------------------------------------------------------------- SvxShape::~SvxShape() throw() { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; DBG_ASSERT( mnLockCount == 0, "Locked shape was disposed!" ); @@ -471,14 +471,12 @@ void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* /*pNewPage*/ ) OSL_ENSURE( ( mpImpl->mpCreatedObj == NULL ) || ( mpImpl->mpCreatedObj == pNewObj ), "SvxShape::Create: the same shape used for two different objects?! Strange ..." ); - // --> CL, OD 2005-07-19 #i52126# - correct condition + // Correct condition (#i52126#) if ( mpImpl->mpCreatedObj != pNewObj ) - // <-- { DBG_ASSERT( pNewObj->GetModel(), "no model for SdrObject?" ); - // --> CL, OD 2005-07-19 #i52126# + // Correct condition (#i52126#) mpImpl->mpCreatedObj = pNewObj; - // <-- if( mpObj.is() && mpObj->GetModel() ) { @@ -527,12 +525,11 @@ void SvxShape::ChangeModel( SdrModel* pNewModel ) } } - // --> CL, OD 2005-07-19 #i52126# - always listen to new model + // Always listen to new model (#i52126#) if( pNewModel ) { StartListening( *pNewModel ); } - // <-- // HACK #i53696# ChangeModel should be virtual, but it isn't. can't change that for 2.0.1 SvxShapeText* pShapeText = dynamic_cast< SvxShapeText* >( this ); @@ -576,6 +573,35 @@ void SvxShape::ForceMetricToItemPoolMetric(Pair& rPoint) const throw() } } +// Reintroduction of fix for issue i59051 (#i108851#) +void SvxShape::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw() +{ + DBG_TESTSOLARMUTEX(); + if(mpModel) + { + SfxMapUnit eMapUnit = mpModel->GetItemPool().GetMetric(0); + if(eMapUnit != SFX_MAPUNIT_100TH_MM) + { + switch(eMapUnit) + { + case SFX_MAPUNIT_TWIP : + { + basegfx::B2DHomMatrix aTransform; + const double fMMToTWIPS(72.0 / 127.0); + + aTransform.scale(fMMToTWIPS, fMMToTWIPS); + rPolyPolygon.transform(aTransform); + break; + } + default: + { + DBG_ERROR("Missing unit translation to PoolMetric!"); + } + } + } + } +} + //---------------------------------------------------------------------- // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 void SvxShape::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw() @@ -634,6 +660,35 @@ void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw() } } +// Reintroduction of fix for issue i59051 (#i108851#) +void SvxShape::ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw() +{ + DBG_TESTSOLARMUTEX(); + SfxMapUnit eMapUnit = SFX_MAPUNIT_100TH_MM; + if(mpModel) + { + eMapUnit = mpModel->GetItemPool().GetMetric(0); + if(eMapUnit != SFX_MAPUNIT_100TH_MM) + { + switch(eMapUnit) + { + case SFX_MAPUNIT_TWIP : + { + basegfx::B2DHomMatrix aTransform; + const double fTWIPSToMM(127.0 / 72.0); + aTransform.scale(fTWIPSToMM, fTWIPSToMM); + rPolyPolygon.transform(aTransform); + break; + } + default: + { + DBG_ERROR("Missing unit translation to 100th mm!"); + } + } + } + } +} + //---------------------------------------------------------------------- // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 void SvxShape::ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw() @@ -833,7 +888,6 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes() *pTypes++ = ::getCppuType((const uno::Reference< lang::XComponent >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XMultiPropertySet >*)0); -// *pTypes++ = ::getCppuType((const uno::Reference< beans::XTolerantMultiPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0); *pTypes++ = beans::XMultiPropertyStates::static_type(); *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0); @@ -866,7 +920,6 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes() *pTypes++ = ::getCppuType((const uno::Reference< lang::XComponent >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XMultiPropertySet >*)0); -// *pTypes++ = ::getCppuType((const uno::Reference< beans::XTolerantMultiPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0); *pTypes++ = beans::XMultiPropertyStates::static_type(); *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0); @@ -901,7 +954,6 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes() *pTypes++ = ::getCppuType((const uno::Reference< lang::XComponent >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XMultiPropertySet >*)0); -// *pTypes++ = ::getCppuType((const uno::Reference< beans::XTolerantMultiPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0); *pTypes++ = beans::XMultiPropertyStates::static_type(); *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0); @@ -940,7 +992,6 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes() *pTypes++ = ::getCppuType((const uno::Reference< lang::XComponent >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XMultiPropertySet >*)0); -// *pTypes++ = ::getCppuType((const uno::Reference< beans::XTolerantMultiPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0); *pTypes++ = beans::XMultiPropertyStates::static_type(); *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0); @@ -974,7 +1025,6 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes() *pTypes++ = ::getCppuType((const uno::Reference< lang::XComponent >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XMultiPropertySet >*)0); -// *pTypes++ = ::getCppuType((const uno::Reference< beans::XTolerantMultiPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0); *pTypes++ = beans::XMultiPropertyStates::static_type(); *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0); @@ -1007,7 +1057,6 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes() *pTypes++ = ::getCppuType((const uno::Reference< lang::XComponent >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XMultiPropertySet >*)0); -// *pTypes++ = ::getCppuType((const uno::Reference< beans::XTolerantMultiPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0); *pTypes++ = beans::XMultiPropertyStates::static_type(); *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0); @@ -1061,7 +1110,6 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes() *pTypes++ = ::getCppuType((const uno::Reference< lang::XComponent >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XMultiPropertySet >*)0); -// *pTypes++ = ::getCppuType((const uno::Reference< beans::XTolerantMultiPropertySet >*)0); *pTypes++ = ::getCppuType((const uno::Reference< beans::XPropertyState >*)0); *pTypes++ = beans::XMultiPropertyStates::static_type(); *pTypes++ = ::getCppuType((const uno::Reference< drawing::XGluePointsSupplier >*)0); @@ -1115,13 +1163,6 @@ Reference< uno::XInterface > SvxShape_NewInstance() } //---------------------------------------------------------------------- - -void SvxShape::onUserCall(SdrUserCallType /*_eUserCall*/, const Rectangle& /*_rNewBoundRect*/ ) -{ - // obsolete, not called anymore -} - -//---------------------------------------------------------------------- // SfxListener //---------------------------------------------------------------------- @@ -1241,7 +1282,7 @@ static void svx_setLogicRectHack( SdrObject* pObj, const Rectangle& rRect ) awt::Point SAL_CALL SvxShape::getPosition() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mpObj.is() && mpModel) { @@ -1264,7 +1305,7 @@ awt::Point SAL_CALL SvxShape::getPosition() throw(uno::RuntimeException) //---------------------------------------------------------------------- void SAL_CALL SvxShape::setPosition( const awt::Point& Position ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mpObj.is() && mpModel ) { @@ -1294,7 +1335,7 @@ void SAL_CALL SvxShape::setPosition( const awt::Point& Position ) throw(uno::Run //---------------------------------------------------------------------- awt::Size SAL_CALL SvxShape::getSize() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mpObj.is() && mpModel) { @@ -1311,7 +1352,7 @@ awt::Size SAL_CALL SvxShape::getSize() throw(uno::RuntimeException) void SAL_CALL SvxShape::setSize( const awt::Size& rSize ) throw(beans::PropertyVetoException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mpObj.is() && mpModel) { @@ -1355,7 +1396,7 @@ void SAL_CALL SvxShape::setSize( const awt::Size& rSize ) // XNamed OUString SAL_CALL SvxShape::getName( ) throw(::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mpObj.is() ) { return mpObj->GetName(); @@ -1370,7 +1411,7 @@ OUString SAL_CALL SvxShape::getName( ) throw(::com::sun::star::uno::RuntimeExce void SAL_CALL SvxShape::setName( const ::rtl::OUString& aName ) throw(::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mpObj.is() ) { mpObj->SetName( aName ); @@ -1386,23 +1427,10 @@ void SAL_CALL SvxShape::setName( const ::rtl::OUString& aName ) throw(::com::sun //---------------------------------------------------------------------- OUString SAL_CALL SvxShape::getShapeType() throw(uno::RuntimeException) { - if( 0 == maShapeType.getLength() ) - { - UHashMapEntry* pMap = pSdrShapeIdentifierMap; - while ( ( pMap->nId != mpImpl->mnObjId ) && pMap->aIdentifier.getLength() ) - ++pMap; - - if ( pMap->aIdentifier.getLength() ) - { - return pMap->aIdentifier; - } - else - { - DBG_ERROR("[CL] unknown SdrObjekt identifier"); - } - } - - return maShapeType; + if( !maShapeType.getLength() ) + return UHashMap::getNameFromId( mpImpl->mnObjId ); + else + return maShapeType; } // XComponent @@ -1410,7 +1438,7 @@ OUString SAL_CALL SvxShape::getShapeType() throw(uno::RuntimeException) //---------------------------------------------------------------------- void SAL_CALL SvxShape::dispose() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mpImpl->mbDisposing ) return; // caught a recursion @@ -1943,7 +1971,7 @@ void SAL_CALL SvxShape::setPropertyValue( const OUString& rPropertyName, const u void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const uno::Any& rVal ) throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName); @@ -2068,7 +2096,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName ) uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName ) throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); @@ -2127,7 +2155,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName ) // XMultiPropertySet void SAL_CALL SvxShape::setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) { - OGuard aSolarGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aSolarGuard; const sal_Int32 nCount = aPropertyNames.getLength(); const OUString* pNames = aPropertyNames.getConstArray(); @@ -2353,7 +2381,7 @@ beans::PropertyState SAL_CALL SvxShape::getPropertyState( const OUString& Proper beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& PropertyName ) throw(beans::UnknownPropertyException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName); @@ -2374,9 +2402,6 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope case SFX_ITEM_DEFAULT: eState = beans::PropertyState_DEFAULT_VALUE; break; -// case SFX_ITEM_UNKNOWN: -// case SFX_ITEM_DONTCARE: -// case SFX_ITEM_DISABLED: default: eState = beans::PropertyState_AMBIGUOUS_VALUE; break; @@ -2856,13 +2881,6 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper { switch( pProperty->nWID ) { -/* - case OWN_ATTR_HASLEVELS: - { - rValue <<= SvxTextEditSource::hasLevels( mpObj.get() ); - break; - } -*/ case OWN_ATTR_CAPTION_POINT: { Point aVclPoint = ((SdrCaptionObj*)mpObj.get())->GetTailPos(); @@ -3350,7 +3368,7 @@ void SAL_CALL SvxShape::setPropertyToDefault( const OUString& PropertyName ) void SAL_CALL SvxShape::_setPropertyToDefault( const OUString& PropertyName ) throw(beans::UnknownPropertyException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; const SfxItemPropertySimpleEntry* pProperty = mpPropSet->getPropertyMapEntry(PropertyName); @@ -3383,7 +3401,7 @@ uno::Any SAL_CALL SvxShape::getPropertyDefault( const OUString& aPropertyName ) uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName ) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName); @@ -3409,7 +3427,7 @@ uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName ) // XMultiPropertyStates void SvxShape::setAllPropertiesToDefault() throw (uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( !mpObj.is() ) throw lang::DisposedException(); @@ -3529,7 +3547,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::getSupportedServiceNames() uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mpObj.is() && mpObj->GetObjInventor() == SdrInventor) { @@ -3542,9 +3560,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_GroupServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_GroupServices, 2, @@ -3552,7 +3567,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_Shape ); pSeq = &SvxShape_GroupServices; - } } return *pSeq; @@ -3562,9 +3576,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_CustomShapeServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_CustomShapeServices, 13, @@ -3584,7 +3595,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_ShadowProperties, sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_CustomShapeServices; - } } return *pSeq; } @@ -3593,9 +3603,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_LineServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_LineServices,14, @@ -3618,7 +3625,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_LineServices; - } } return *pSeq; } @@ -3628,9 +3634,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_RectServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_RectServices,14, @@ -3651,8 +3654,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_ShadowProperties, sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_RectServices; - } - } return *pSeq; } @@ -3665,9 +3666,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_CircServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_CircServices,14, @@ -3690,7 +3688,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_CircServices; - } } return *pSeq; @@ -3702,9 +3699,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_PathServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_PathServices,14, sUNO_service_drawing_PolyLineShape, @@ -3726,7 +3720,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_ShadowProperties, sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_PathServices; - } } return *pSeq; } @@ -3737,9 +3730,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_PolyServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_PolyServices,15, sUNO_service_drawing_PolyPolygonShape, @@ -3763,7 +3753,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_PolyServices; - } } return *pSeq; } @@ -3774,9 +3763,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_FreeLineServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_FreeLineServices,15, @@ -3801,7 +3787,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_FreeLineServices; - } } return *pSeq; @@ -3813,9 +3798,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_FreeFillServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_FreeFillServices,15, sUNO_service_drawing_ClosedBezierShape, @@ -3839,7 +3821,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_FreeFillServices; - } } return *pSeq; } @@ -3851,9 +3832,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_TextServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_TextServices,14, sUNO_service_drawing_TextShape, @@ -3875,7 +3853,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_TextServices; - } } return *pSeq; } @@ -3885,9 +3862,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_GrafServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_GrafServices, 12, sUNO_service_drawing_GraphicObjectShape, @@ -3907,7 +3881,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_GrafServices; - } } return *pSeq; } @@ -3917,9 +3890,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_Ole2Services; comphelper::ServiceInfoHelper::addToSequence( SvxShape_Ole2Services, 2, @@ -3927,7 +3897,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_Shape); pSeq = &SvxShape_Ole2Services; - } } return *pSeq; } @@ -3937,9 +3906,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_CaptionServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_CaptionServices,14, @@ -3962,7 +3928,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_CaptionServices; - } } return *pSeq; @@ -3973,9 +3938,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_PageServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_PageServices, 2, @@ -3983,7 +3945,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_Shape ); pSeq = &SvxShape_PageServices; - } } return *pSeq; @@ -3994,9 +3955,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_MeasureServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_MeasureServices,15, sUNO_service_drawing_MeasureShape, @@ -4020,7 +3978,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_MeasureServices; - } } return *pSeq; @@ -4031,9 +3988,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_FrameServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_FrameServices, 2, @@ -4041,7 +3995,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_Shape ); pSeq = &SvxShape_FrameServices; - } } return *pSeq; @@ -4052,16 +4005,12 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard _aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_UnoServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_UnoServices, 2, sUNO_service_drawing_ControlShape, sUNO_service_drawing_Shape ); pSeq = &SvxShape_UnoServices; - } } return *pSeq; } @@ -4071,9 +4020,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_EdgeServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_EdgeServices,15, @@ -4097,7 +4043,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_RotationDescriptor); pSeq = &SvxShape_EdgeServices; - } } return *pSeq; } @@ -4106,9 +4051,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_MediaServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_MediaServices, 2, @@ -4116,7 +4058,6 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() sUNO_service_drawing_Shape); pSeq = &SvxShape_MediaServices; - } } return *pSeq; } @@ -4131,16 +4072,12 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() static uno::Sequence< OUString > *pSeq = 0; if( 0 == pSeq ) { -// OGuard aGuard( Application::GetSolarMutex() ); -// if( 0 == pSeq ) - { static uno::Sequence< OUString > SvxShape_UnoServices; comphelper::ServiceInfoHelper::addToSequence( SvxShape_UnoServices, 2, sUNO_service_drawing_ControlShape, sUNO_service_drawing_Shape ); pSeq = &SvxShape_UnoServices; - } } return *pSeq; } @@ -4168,7 +4105,7 @@ sal_Bool SAL_CALL SvxShape::supportsService( const OUString& ServiceName ) throw uno::Reference< container::XIndexContainer > SAL_CALL SvxShape::getGluePoints() throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; uno::Reference< container::XIndexContainer > xGluePoints( mxGluePoints ); if( mpObj.is() && !xGluePoints.is() ) @@ -4186,7 +4123,7 @@ uno::Reference< container::XIndexContainer > SAL_CALL SvxShape::getGluePoints() uno::Reference< uno::XInterface > SAL_CALL SvxShape::getParent( ) throw(uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mpObj.is() && mpObj->GetObjList() ) { @@ -4240,7 +4177,7 @@ void SvxShape::unlock() // XActionLockable sal_Bool SAL_CALL SvxShape::isActionLocked( ) throw (::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; return mnLockCount != 0; } @@ -4249,7 +4186,7 @@ sal_Bool SAL_CALL SvxShape::isActionLocked( ) throw (::com::sun::star::uno::Run void SAL_CALL SvxShape::addActionLock( ) throw (::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; DBG_ASSERT( mnLockCount < 0xffff, "lock overflow in SvxShape!" ); mnLockCount++; @@ -4262,7 +4199,7 @@ void SAL_CALL SvxShape::addActionLock( ) throw (::com::sun::star::uno::RuntimeE void SAL_CALL SvxShape::removeActionLock( ) throw (::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; DBG_ASSERT( mnLockCount > 0, "lock underflow in SvxShape!" ); mnLockCount--; @@ -4275,7 +4212,7 @@ void SAL_CALL SvxShape::removeActionLock( ) throw (::com::sun::star::uno::Runti void SAL_CALL SvxShape::setActionLocks( sal_Int16 nLock ) throw (::com::sun::star::uno::RuntimeException ) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( (mnLockCount == 0) && (nLock != 0) ) unlock(); @@ -4290,7 +4227,7 @@ void SAL_CALL SvxShape::setActionLocks( sal_Int16 nLock ) throw (::com::sun::sta sal_Int16 SAL_CALL SvxShape::resetActionLocks( ) throw (::com::sun::star::uno::RuntimeException) { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; if( mnLockCount != 0 ) unlock(); @@ -4491,7 +4428,7 @@ void SvxShapeText::unlock() // ::com::sun::star::text::XTextRange uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getStart() throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) ::GetSelection( maSelection, pForwarder ); @@ -4501,7 +4438,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getStart() throw(uno:: uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getEnd() throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) ::GetSelection( maSelection, pForwarder ); @@ -4510,7 +4447,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getEnd() throw(uno::Ru OUString SAL_CALL SvxShapeText::getString() throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) ::GetSelection( maSelection, pForwarder ); @@ -4520,7 +4457,7 @@ OUString SAL_CALL SvxShapeText::getString() throw(uno::RuntimeException) void SAL_CALL SvxShapeText::setString( const OUString& aString ) throw(uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; if( pForwarder ) ::GetSelection( maSelection, pForwarder ); diff --git a/svx/source/unodraw/unoshcol.cxx b/svx/source/unodraw/unoshcol.cxx index 1000952486..6d82c989b0 100644 --- a/svx/source/unodraw/unoshcol.cxx +++ b/svx/source/unodraw/unoshcol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -256,3 +257,5 @@ Reference< XInterface > SAL_CALL SvxShapeCollection_createInstance( const Refere { return *( new SvxShapeCollection() ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 53735c5548..f58efe22e0 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,7 +59,6 @@ #include <svx/sdrpaintwindow.hxx> using namespace ::osl; -using namespace ::vos; using namespace ::rtl; using ::com::sun::star::uno::XInterface; @@ -1054,7 +1054,7 @@ SvxTextEditSource::SvxTextEditSource( SvxTextEditSourceImpl* pImpl ) //------------------------------------------------------------------------ SvxTextEditSource::~SvxTextEditSource() { - OGuard aGuard( Application::GetSolarMutex() ); + ::SolarMutexGuard aGuard; mpImpl->release(); } diff --git a/svx/source/unodraw/unottabl.cxx b/svx/source/unodraw/unottabl.cxx index a14862693a..463ed92d27 100644 --- a/svx/source/unodraw/unottabl.cxx +++ b/svx/source/unodraw/unottabl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,3 +106,4 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoTransGradientTable_createInstan +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx index f35250a9d6..2de8825f93 100644 --- a/svx/source/unogallery/unogalitem.cxx +++ b/svx/source/unogallery/unogalitem.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,12 +42,8 @@ #include <svl/itempool.hxx> #include "galobj.hxx" -#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HDL_ #include <com/sun/star/beans/PropertyState.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HDL_ #include <com/sun/star/beans/PropertyAttribute.hpp> -#endif #include <com/sun/star/gallery/GalleryItemType.hpp> #define UNOGALLERY_GALLERYITEMTYPE 1 @@ -211,7 +208,7 @@ uno::Sequence< uno::Type > SAL_CALL GalleryItem::getTypes() uno::Sequence< sal_Int8 > SAL_CALL GalleryItem::getImplementationId() throw(uno::RuntimeException) { - const vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; static uno::Sequence< sal_Int8 > aId; if( aId.getLength() == 0 ) @@ -228,7 +225,7 @@ uno::Sequence< sal_Int8 > SAL_CALL GalleryItem::getImplementationId() sal_Int8 SAL_CALL GalleryItem::getType() throw (uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; sal_Int8 nRet = gallery::GalleryItemType::EMPTY; if( isValid() ) @@ -257,7 +254,7 @@ sal_Int8 SAL_CALL GalleryItem::getType() ::comphelper::PropertySetInfo* GalleryItem::createPropertySetInfo() { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ::comphelper::PropertySetInfo* pRet = new ::comphelper::PropertySetInfo(); static ::comphelper::PropertyMapEntry aEntries[] = @@ -297,7 +294,7 @@ void GalleryItem::_setPropertyValues( const comphelper::PropertyMapEntry** ppEnt lang::IllegalArgumentException, lang::WrappedTargetException ) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; while( *ppEntries ) { @@ -342,7 +339,7 @@ void GalleryItem::_getPropertyValues( const comphelper::PropertyMapEntry** ppEnt throw( beans::UnknownPropertyException, lang::WrappedTargetException ) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; while( *ppEntries ) { @@ -483,3 +480,5 @@ GalleryDrawingModel::~GalleryDrawingModel() UNO3_GETIMPLEMENTATION_IMPL( GalleryDrawingModel ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unogallery/unogalitem.hxx b/svx/source/unogallery/unogalitem.hxx index 5df3bbcc36..71e6b6ea94 100644 --- a/svx/source/unogallery/unogalitem.hxx +++ b/svx/source/unogallery/unogalitem.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/gallery/XGalleryItem.hpp> #include <comphelper/propertysethelper.hxx> -#ifndef _COMPHELPER_PROPERTYSETINFO_HXX_ #include <comphelper/propertysetinfo.hxx> -#endif class GalleryTheme; struct GalleryObject; @@ -124,3 +123,5 @@ public: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unogallery/unogaltheme.cxx b/svx/source/unogallery/unogaltheme.cxx index 26d4b19490..b269389917 100644 --- a/svx/source/unogallery/unogaltheme.cxx +++ b/svx/source/unogallery/unogaltheme.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -152,7 +153,7 @@ uno::Sequence< uno::Type > SAL_CALL GalleryTheme::getTypes() uno::Sequence< sal_Int8 > SAL_CALL GalleryTheme::getImplementationId() throw(uno::RuntimeException) { - const vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; static uno::Sequence< sal_Int8 > aId; if( aId.getLength() == 0 ) @@ -197,7 +198,7 @@ sal_Int32 SAL_CALL GalleryTheme::getCount() uno::Any SAL_CALL GalleryTheme::getByIndex( ::sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; uno::Any aRet; if( mpTheme ) @@ -223,7 +224,7 @@ uno::Any SAL_CALL GalleryTheme::getByIndex( ::sal_Int32 nIndex ) ::rtl::OUString SAL_CALL GalleryTheme::getName( ) throw (uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; ::rtl::OUString aRet; if( mpTheme ) @@ -252,7 +253,7 @@ void SAL_CALL GalleryTheme::update( ) const ::rtl::OUString& rURL, ::sal_Int32 nIndex ) throw (lang::WrappedTargetException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; sal_Int32 nRet = -1; if( mpTheme ) @@ -285,7 +286,7 @@ void SAL_CALL GalleryTheme::update( ) const uno::Reference< graphic::XGraphic >& rxGraphic, sal_Int32 nIndex ) throw (lang::WrappedTargetException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; sal_Int32 nRet = -1; if( mpTheme ) @@ -313,8 +314,8 @@ void SAL_CALL GalleryTheme::update( ) const uno::Reference< lang::XComponent >& Drawing, sal_Int32 nIndex ) throw (lang::WrappedTargetException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); - sal_Int32 nRet = -1; + const SolarMutexGuard aGuard; + sal_Int32 nRet = -1; if( mpTheme ) { @@ -322,11 +323,43 @@ void SAL_CALL GalleryTheme::update( ) if( pModel && pModel->GetDoc() && pModel->GetDoc()->ISA( FmFormModel ) ) { + //Here we're inserting something that's already a gallery theme drawing + nIndex = ::std::max( ::std::min( nIndex, getCount() ), sal_Int32( 0 ) ); if( mpTheme->InsertModel( *static_cast< FmFormModel* >( pModel->GetDoc() ), nIndex ) ) nRet = nIndex; } + else if (!pModel) + { + //#i80184# Try to do the right thing and make a Gallery drawing out of an ordinary + //Drawing if possible. + try + { + uno::Reference< drawing::XDrawPagesSupplier > xDrawPagesSupplier( Drawing, uno::UNO_QUERY_THROW ); + uno::Reference< drawing::XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), uno::UNO_QUERY_THROW ); + uno::Reference< drawing::XDrawPage > xPage( xDrawPages->getByIndex( 0 ), uno::UNO_QUERY_THROW ); + SvxDrawPage* pUnoPage = xPage.is() ? SvxDrawPage::getImplementation( xPage ) : NULL; + SdrModel* pOrigModel = pUnoPage ? pUnoPage->GetSdrPage()->GetModel() : NULL; + SdrPage* pOrigPage = pUnoPage ? pUnoPage->GetSdrPage() : NULL; + + if (pOrigPage && pOrigModel) + { + FmFormModel* pTmpModel = new FmFormModel(&pOrigModel->GetItemPool()); + SdrPage* pNewPage = pOrigPage->Clone(); + pTmpModel->InsertPage(pNewPage, 0); + + uno::Reference< lang::XComponent > xDrawing( new GalleryDrawingModel( pTmpModel ) ); + pTmpModel->setUnoModel( uno::Reference< uno::XInterface >::query( xDrawing ) ); + + nRet = insertDrawingByIndex( xDrawing, nIndex ); + return nRet; + } + } + catch (...) + { + } + } } return nRet; @@ -352,7 +385,7 @@ void SAL_CALL GalleryTheme::removeByIndex( sal_Int32 nIndex ) void GalleryTheme::Notify( SfxBroadcaster&, const SfxHint& rHint ) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; const GalleryHint& rGalleryHint = static_cast< const GalleryHint& >( rHint ); switch( rGalleryHint.GetType() ) @@ -431,3 +464,5 @@ void GalleryTheme::implDeregisterGalleryItem( ::unogallery::GalleryItem& rItem ) } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unogallery/unogaltheme.hxx b/svx/source/unogallery/unogaltheme.hxx index 481facbbf3..8c9f1de670 100644 --- a/svx/source/unogallery/unogaltheme.hxx +++ b/svx/source/unogallery/unogaltheme.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -108,3 +109,5 @@ private: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx index 52674b015c..94ec5ac595 100644 --- a/svx/source/unogallery/unogalthemeprovider.cxx +++ b/svx/source/unogallery/unogalthemeprovider.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -161,7 +162,7 @@ uno::Sequence< uno::Type > SAL_CALL GalleryThemeProvider::getTypes() uno::Sequence< sal_Int8 > SAL_CALL GalleryThemeProvider::getImplementationId() throw(uno::RuntimeException) { - const vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; static uno::Sequence< sal_Int8 > aId; if( aId.getLength() == 0 ) @@ -219,7 +220,7 @@ sal_Bool SAL_CALL GalleryThemeProvider::hasElements() uno::Any SAL_CALL GalleryThemeProvider::getByName( const ::rtl::OUString& rName ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; uno::Any aRet; if( !mpGallery || !mpGallery->HasTheme( rName ) ) @@ -239,7 +240,7 @@ uno::Any SAL_CALL GalleryThemeProvider::getByName( const ::rtl::OUString& rName uno::Sequence< ::rtl::OUString > SAL_CALL GalleryThemeProvider::getElementNames() throw (uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; sal_uInt32 i = 0, nCount = ( mpGallery ? mpGallery->GetThemeCount() : 0 ), nRealCount = 0; uno::Sequence< ::rtl::OUString > aSeq( nCount ); @@ -276,7 +277,7 @@ sal_Bool SAL_CALL GalleryThemeProvider::hasByName( const ::rtl::OUString& rName uno::Reference< gallery::XGalleryTheme > SAL_CALL GalleryThemeProvider::insertNewByName( const ::rtl::OUString& rThemeName ) throw (container::ElementExistException, uno::RuntimeException) { - const ::vos::OGuard aGuard( Application::GetSolarMutex() ); + const SolarMutexGuard aGuard; uno::Reference< gallery::XGalleryTheme > xRet; if( mpGallery ) @@ -314,3 +315,5 @@ void SAL_CALL GalleryThemeProvider::removeByName( const ::rtl::OUString& rName ) } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index d3863f70ae..1675a81a19 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,9 +36,7 @@ #include <com/sun/star/embed/XEmbedObjectFactory.hpp> #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/embed/XEmbeddedObject.hpp> -#ifndef _COM_SUN_STAR_EMBED_XEMBED_PERSIST_HPP_ #include <com/sun/star/embed/XEmbedPersist.hpp> -#endif #include <com/sun/star/embed/EntryInitModes.hpp> #include <com/sun/star/embed/EmbedStates.hpp> #include <com/sun/star/embed/Aspects.hpp> @@ -52,9 +51,7 @@ #include <comphelper/storagehelper.hxx> #include <comphelper/embeddedobjectcontainer.hxx> -#ifndef _SO_CLSIDS_HXX #include <sot/clsids.hxx> -#endif #include <map> #include "svx/xmleohlp.hxx" @@ -193,7 +190,7 @@ SvXMLEmbeddedObjectHelper::~SvXMLEmbeddedObjectHelper() { SvXMLEmbeddedObjectHelper_Impl::iterator aIter = mpStreamMap->begin(); SvXMLEmbeddedObjectHelper_Impl::iterator aEnd = mpStreamMap->end(); - for( ; aIter != aEnd; aIter++ ) + for( ; aIter != aEnd; ++aIter ) { if( aIter->second ) { @@ -817,3 +814,4 @@ sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasElements() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xml/xmlexport.cxx b/svx/source/xml/xmlexport.cxx index a90338c9bd..c73b888975 100644 --- a/svx/source/xml/xmlexport.cxx +++ b/svx/source/xml/xmlexport.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -138,7 +139,7 @@ sal_Bool SvxDrawingLayerExport( SdrModel* pModel, const uno::Reference<io::XOutp } } } - catch(uno::Exception e) + catch(uno::Exception const& e) { DBG_UNHANDLED_EXCEPTION(); bDocRet = sal_False; @@ -227,7 +228,7 @@ sal_Bool SvxDrawingLayerImport( SdrModel* pModel, const uno::Reference<io::XInpu aParserInput.aInputStream = xInputStream; // get parser - Reference< xml::sax::XParser > xParser( xServiceFactory->createInstance( OUString::createFromAscii("com.sun.star.xml.sax.Parser") ), UNO_QUERY ); + Reference< xml::sax::XParser > xParser( xServiceFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ), UNO_QUERY ); DBG_ASSERT( xParser.is(), "Can't create parser" ); // prepare filter arguments @@ -281,3 +282,5 @@ sal_Bool SvxDrawingLayerImport( SdrModel* pModel, const uno::Reference<io::XInpu Reference< lang::XComponent > xComponent; return SvxDrawingLayerImport( pModel, xInputStream, xComponent ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 84cb1135e1..95df12fcf2 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,10 +28,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" +#include <sal/macros.h> #include <com/sun/star/embed/XTransactedObject.hpp> -#ifndef _COM_SUN_STAR_EMBED_ElementModes_HPP_ #include <com/sun/star/embed/ElementModes.hpp> -#endif #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -552,7 +552,7 @@ String SvXMLGraphicHelper::ImplGetGraphicMimeType( const String& rFileName ) con { const ByteString aExt( rFileName.Copy( rFileName.Len() - 3 ), RTL_TEXTENCODING_ASCII_US ); - for( long i = 0, nCount = sizeof( aMapper ) / sizeof( aMapper[ 0 ] ); ( i < nCount ) && !aMimeType.Len(); i++ ) + for( long i = 0, nCount = SAL_N_ELEMENTS( aMapper ); ( i < nCount ) && !aMimeType.Len(); i++ ) if( aExt == aMapper[ i ].pExt ) aMimeType = String( aMapper[ i ].pMimeType, RTL_TEXTENCODING_ASCII_US ); } @@ -605,7 +605,7 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt xProps->setPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ), aAny ); } - const sal_Bool bCompressed = ( ( 0 == aMimeType.getLength() ) || ( aMimeType == ::rtl::OUString::createFromAscii( "image/tiff" ) ) ); + const sal_Bool bCompressed = ( ( 0 == aMimeType.getLength() ) || ( aMimeType == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("image/tiff")) ) ); aAny <<= bCompressed; xProps->setPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "Compressed" ) ), aAny ); @@ -955,7 +955,7 @@ Reference< XOutputStream > SAL_CALL SvXMLGraphicHelper::createOutputStream() if( aId.getLength() ) { - aRet = ::rtl::OUString::createFromAscii( XML_GRAPHICOBJECT_URL_BASE ); + aRet = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_GRAPHICOBJECT_URL_BASE )); aRet += aId; } } @@ -1161,3 +1161,4 @@ Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServic } // namespace svx +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index b7fbea30f6..0571a8e94b 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -367,7 +368,7 @@ sal_Bool SvxXMLXTableExportComponent::exportTable() throw() GetDocHandler()->endDocument(); } - catch( Exception e ) + catch( Exception const& ) { bRet = sal_False; } @@ -490,3 +491,5 @@ void SvxXMLBitmapEntryExporter::exportEntry( const OUString& rStrName, const Any { maImageStyle.exportXML( rStrName, rValue, mrExport ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index 2e407b5674..e61a00084e 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,9 +42,7 @@ #include <com/sun/star/awt/Gradient.hpp> #include <com/sun/star/drawing/Hatch.hpp> #include <com/sun/star/io/XOutputStream.hpp> -#ifndef _COM_SUN_STAR_IO_XSEEKABLE_HDL_ #include <com/sun/star/io/XSeekable.hdl> -#endif #include <comphelper/processfactory.hxx> #include <unotools/streamwrap.hxx> #include <rtl/ustrbuf.hxx> @@ -76,12 +75,12 @@ using namespace ::rtl; using namespace ::xmloff::token; using namespace cppu; -sal_Char __READONLY_DATA sXML_np__office[] = "__office"; -sal_Char __READONLY_DATA sXML_np__office_ooo[] = "___office"; -sal_Char __READONLY_DATA sXML_np__draw[] = "__draw"; -sal_Char __READONLY_DATA sXML_np__draw_ooo[] = "___draw"; -sal_Char __READONLY_DATA sXML_np__ooo[] = "__ooo"; -sal_Char __READONLY_DATA sXML_np__xlink[] = "__xlink"; +sal_Char const sXML_np__office[] = "__office"; +sal_Char const sXML_np__office_ooo[] = "___office"; +sal_Char const sXML_np__draw[] = "__draw"; +sal_Char const sXML_np__draw_ooo[] = "___draw"; +sal_Char const sXML_np__ooo[] = "__ooo"; +sal_Char const sXML_np__xlink[] = "__xlink"; /////////////////////////////////////////////////////////////////////// @@ -486,3 +485,4 @@ SvXMLImportContext *SvxXMLXTableImport::CreateContext( sal_uInt16 nPrefix, const return new SvXMLImportContext( *this, nPrefix, rLocalName ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index 6862f33fb7..5ad4aff8e1 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -766,3 +767,5 @@ BOOL DitherBitmap( Bitmap& rBitmap ) return bRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index db8d644fd0..d8eeca127d 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,10 +52,6 @@ DBG_NAME(XPolyPolygon); |* |* ImpXPolygon::ImpXPolygon() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 12.01.95 ESO -|* *************************************************************************/ ImpXPolygon::ImpXPolygon( USHORT nInitSize, USHORT _nResize ) @@ -74,10 +71,6 @@ ImpXPolygon::ImpXPolygon( USHORT nInitSize, USHORT _nResize ) |* |* ImpXPolygon::ImpXPolygon() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 12.01.95 ESO -|* *************************************************************************/ ImpXPolygon::ImpXPolygon( const ImpXPolygon& rImpXPoly ) @@ -104,10 +97,6 @@ ImpXPolygon::ImpXPolygon( const ImpXPolygon& rImpXPoly ) |* |* ImpXPolygon::~ImpXPolygon() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 12.01.95 ESO -|* *************************************************************************/ ImpXPolygon::~ImpXPolygon() @@ -122,9 +111,6 @@ ImpXPolygon::~ImpXPolygon() |* |* ImpXPolygon::operator==() |* -|* Ersterstellung Joe 26-09-95 -|* Letzte Aenderung -|* *************************************************************************/ @@ -147,8 +133,6 @@ bool ImpXPolygon::operator==(const ImpXPolygon& rImpXPoly) const |* Damit wird verhindert, dass bei XPoly[n] = XPoly[0] durch ein |* Resize der fuer den rechten Ausdruck verwendete Point-Array |* vorzeitig geloescht wird. -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 12.01.95 ESO |* *************************************************************************/ @@ -207,10 +191,6 @@ void ImpXPolygon::Resize( USHORT nNewSize, BOOL bDeletePoints ) |* |* ImpXPolygon::InsertSpace() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 29.03.95 ESO -|* *************************************************************************/ void ImpXPolygon::InsertSpace( USHORT nPos, USHORT nCount ) @@ -244,10 +224,6 @@ void ImpXPolygon::InsertSpace( USHORT nPos, USHORT nCount ) |* |* ImpXPolygon::Remove() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 12.01.94 ESO -|* *************************************************************************/ void ImpXPolygon::Remove( USHORT nPos, USHORT nCount ) @@ -275,10 +251,6 @@ void ImpXPolygon::Remove( USHORT nPos, USHORT nCount ) |* |* XPolygon::XPolygon() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 08.11.94 -|* *************************************************************************/ XPolygon::XPolygon( USHORT nSize, USHORT nResize ) @@ -291,10 +263,6 @@ XPolygon::XPolygon( USHORT nSize, USHORT nResize ) |* |* XPolygon::XPolygon() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 08.11.94 -|* *************************************************************************/ XPolygon::XPolygon( const XPolygon& rXPoly ) @@ -309,8 +277,6 @@ XPolygon::XPolygon( const XPolygon& rXPoly ) |* XPolygon::XPolygon() |* |* XPolygon aus einem Standardpolygon erstellen -|* Ersterstellung 18.01.95 ESO -|* Letzte Aenderung 18.01.95 ESO |* *************************************************************************/ @@ -334,8 +300,6 @@ XPolygon::XPolygon( const Polygon& rPoly ) |* XPolygon::XPolygon() |* |* Rechteck (auch mit abgerundeten Ecken) als Bezierpolygon erzeugen -|* Ersterstellung 09.01.95 ESO -|* Letzte Aenderung 09.01.95 ESO |* *************************************************************************/ @@ -404,8 +368,6 @@ XPolygon::XPolygon(const Rectangle& rRect, long nRx, long nRy) |* XPolygon::XPolygon() |* |* Ellipsen(bogen) als Bezierpolygon erzeugen -|* Ersterstellung 09.01.95 -|* Letzte Aenderung 09.01.95 |* *************************************************************************/ @@ -454,10 +416,6 @@ XPolygon::XPolygon(const Point& rCenter, long nRx, long nRy, |* |* XPolygon::~XPolygon() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 08.11.94 -|* *************************************************************************/ XPolygon::~XPolygon() @@ -474,8 +432,6 @@ XPolygon::~XPolygon() |* XPolygon::CheckReference() |* |* Referenzzaehler desImpXPoly pruefen und ggf. von diesem abkoppeln -|* Ersterstellung 17.01.95 ESO -|* Letzte Aenderung 17.01.95 ESO |* *************************************************************************/ @@ -492,10 +448,6 @@ void XPolygon::CheckReference() |* |* XPolygon::SetSize() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 08.11.94 -|* *************************************************************************/ void XPolygon::SetSize( USHORT nNewSize ) @@ -508,10 +460,6 @@ void XPolygon::SetSize( USHORT nNewSize ) |* |* XPolygon::GetSize() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 12.01.95 ESO -|* *************************************************************************/ USHORT XPolygon::GetSize() const @@ -524,10 +472,6 @@ USHORT XPolygon::GetSize() const |* |* XPolygon::SetPointCount() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 12.01.95 ESO -|* *************************************************************************/ void XPolygon::SetPointCount( USHORT nPoints ) @@ -551,10 +495,6 @@ void XPolygon::SetPointCount( USHORT nPoints ) |* |* XPolygon::GetPointCount() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 12.01.95 ESO -|* *************************************************************************/ USHORT XPolygon::GetPointCount() const @@ -567,10 +507,6 @@ USHORT XPolygon::GetPointCount() const |* |* XPolygon::Insert() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 08.11.94 -|* *************************************************************************/ void XPolygon::Insert( USHORT nPos, const Point& rPt, XPolyFlags eFlags ) @@ -586,10 +522,6 @@ void XPolygon::Insert( USHORT nPos, const Point& rPt, XPolyFlags eFlags ) |* |* XPolygon::Insert() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 08.11.94 -|* *************************************************************************/ void XPolygon::Insert( USHORT nPos, const XPolygon& rXPoly ) @@ -613,10 +545,6 @@ void XPolygon::Insert( USHORT nPos, const XPolygon& rXPoly ) |* |* XPolygon::Insert() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 08.11.94 -|* *************************************************************************/ void XPolygon::Insert( USHORT nPos, const Polygon& rPoly ) @@ -639,10 +567,6 @@ void XPolygon::Insert( USHORT nPos, const Polygon& rPoly ) |* |* XPolygon::Remove() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 08.11.94 -|* *************************************************************************/ void XPolygon::Remove( USHORT nPos, USHORT nCount ) @@ -655,10 +579,6 @@ void XPolygon::Remove( USHORT nPos, USHORT nCount ) |* |* XPolygon::Move() |* -|* Beschreibung -|* Ersterstellung 09.11.94 -|* Letzte Aenderung 09.11.94 -|* *************************************************************************/ void XPolygon::Move( long nHorzMove, long nVertMove ) @@ -682,10 +602,6 @@ void XPolygon::Move( long nHorzMove, long nVertMove ) |* |* XPolygon::GetBoundRect() |* -|* Beschreibung -|* Ersterstellung 09.11.94 -|* Letzte Aenderung 12.01.95 ESO -|* *************************************************************************/ Rectangle XPolygon::GetBoundRect() const @@ -714,10 +630,6 @@ Rectangle XPolygon::GetBoundRect() const |* |* XPolygon::operator[]() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 12.01.95 -|* *************************************************************************/ const Point& XPolygon::operator[]( USHORT nPos ) const @@ -732,10 +644,6 @@ const Point& XPolygon::operator[]( USHORT nPos ) const |* |* XPolygon::operator[]() |* -|* Beschreibung -|* Ersterstellung 08.11.94 -|* Letzte Aenderung 12.01.95 ESO -|* *************************************************************************/ Point& XPolygon::operator[]( USHORT nPos ) @@ -759,8 +667,6 @@ Point& XPolygon::operator[]( USHORT nPos ) |* XPolygon::operator=() |* |* Beschreibung Zuweisungsoperator -|* Ersterstellung ESO 22.11.94 -|* Letzte Aenderung ESO 12.01.95 |* *************************************************************************/ @@ -784,8 +690,6 @@ XPolygon& XPolygon::operator=( const XPolygon& rXPoly ) |* XPolygon::operator==() |* |* Beschreibung Gleichheitsoperator -|* Ersterstellung ESO 22.11.94 -|* Letzte Aenderung Joe 26.09.95 |* *************************************************************************/ @@ -801,8 +705,6 @@ BOOL XPolygon::operator==( const XPolygon& rXPoly ) const |* XPolygon::operator!=() |* |* Beschreibung Ungleichheitsoperator -|* Ersterstellung ESO 22.11.94 -|* Letzte Aenderung Joe 26.09.95 |* *************************************************************************/ @@ -818,8 +720,6 @@ BOOL XPolygon::operator!=( const XPolygon& rXPoly ) const |* XPolygon::GetFlags() |* |* Flags fuer den Punkt an der Position nPos zurueckgeben -|* Ersterstellung ESO 11.11.94 -|* Letzte Aenderung ESO 12.01.95 |* *************************************************************************/ @@ -834,8 +734,6 @@ XPolyFlags XPolygon::GetFlags( USHORT nPos ) const |* XPolygon::SetFlags() |* |* Flags fuer den Punkt an der Position nPos setzen -|* Ersterstellung ESO 11.11.94 -|* Letzte Aenderung ESO 12.01.95 |* *************************************************************************/ @@ -851,8 +749,6 @@ void XPolygon::SetFlags( USHORT nPos, XPolyFlags eFlags ) |* XPolygon::IsControl() |* |* Kurzform zur Abfrage des CONTROL-Flags -|* Ersterstellung ESO 09.01.95 -|* Letzte Aenderung ESO 12.01.95 |* *************************************************************************/ @@ -866,8 +762,6 @@ BOOL XPolygon::IsControl(USHORT nPos) const |* XPolygon::IsSmooth() |* |* Kurzform zur Abfrage von SMOOTH- und SYMMTR-Flag -|* Ersterstellung ESO 18.04.95 -|* Letzte Aenderung ESO 18.04.95 |* *************************************************************************/ @@ -882,8 +776,6 @@ BOOL XPolygon::IsSmooth(USHORT nPos) const |* XPolygon::CalcDistance() |* |* Abstand zwischen zwei Punkten berechnen -|* Ersterstellung ESO 09.01.95 -|* Letzte Aenderung ESO 09.01.95 |* *************************************************************************/ @@ -901,8 +793,6 @@ double XPolygon::CalcDistance(USHORT nP1, USHORT nP2) |* XPolygon::SubdivideBezier() |* |* Bezierkurve unterteilen -|* Ersterstellung ESO 09.01.95 -|* Letzte Aenderung ESO 09.01.95 |* *************************************************************************/ @@ -1029,8 +919,6 @@ BOOL XPolygon::CheckAngles(USHORT& nStart, USHORT nEnd, USHORT& nA1, USHORT& nA2 |* Pnt = der zu modifizierende Punkt |* Wenn Center am Anfang bzw. Ende des Polygons liegt, wird Pnt |* auf die entgegengesetzte Seite verlegt -|* Ersterstellung ESO 09.01.95 -|* Letzte Aenderung ESO 18.04.95 |* \************************************************************************/ @@ -1076,8 +964,6 @@ void XPolygon::CalcSmoothJoin(USHORT nCenter, USHORT nDrag, USHORT nPnt) |* Center = End- bzw. Anfangspunkt der Bezierkurven |* Prev = vorheriger Zugpunkt |* Next = naechster Zugpunkt -|* Ersterstellung ESO 09.01.95 -|* Letzte Aenderung ESO 18.04.95 |* \************************************************************************/ @@ -1114,8 +1000,6 @@ void XPolygon::CalcTangent(USHORT nCenter, USHORT nPrev, USHORT nNext) |* XPolygon::PointsToBezier() |* |* wandelt vier Polygonpunkte in eine Bezierkurve durch diese Punkte um -|* Ersterstellung ESO 09.01.95 -|* Letzte Aenderung ESO 09.01.95 |* \************************************************************************/ @@ -1192,8 +1076,6 @@ void XPolygon::PointsToBezier(USHORT nFirst) |* XPolygon::Translate() |* |* Polygon auf den uebergebenen Punkt verschieben -|* Ersterstellung ESO 17.01.95 -|* Letzte Aenderung ESO 17.01.95 |* *************************************************************************/ @@ -1214,8 +1096,6 @@ void XPolygon::Translate(const Point& rTrans) |* |* Alle Punkte um den Punkt rCenter drehen, Sinus und Cosinus |* muessen uebergeben werden -|* Ersterstellung ESO 09.01.95 -|* Letzte Aenderung ESO 17.01.95 |* *************************************************************************/ @@ -1265,8 +1145,6 @@ void XPolygon::Rotate(const Point& rCenter, double fSin, double fCos) |* |* Alle Punkte um den Punkt rCenter mit dem Winkel nAngle drehen |* Winkel in 10tel Grad, Wertebereich 0 - 3600 -|* Ersterstellung ESO 17.01.95 -|* Letzte Aenderung ESO 17.01.95 |* *************************************************************************/ @@ -1288,8 +1166,6 @@ void XPolygon::Rotate(const Point& rCenter, USHORT nAngle) |* XPolygon::Scale() |* |* XPolygon in X- und/oder Y-Richtung skalieren -|* Ersterstellung ESO 01.02.95 -|* Letzte Aenderung ESO 01.02.95 |* *************************************************************************/ @@ -1314,8 +1190,6 @@ void XPolygon::Scale(double fSx, double fSy) |* |* XPolygon in X-Richtung um einen beliebigen Winkel kippen, |* bezogen auf eine Referenz-Y-Koordinate -|* Ersterstellung ESO 01.02.95 -|* Letzte Aenderung ESO 01.02.95 |* *************************************************************************/ @@ -1341,8 +1215,6 @@ void XPolygon::SlantX(long nYRef, double fSin, double fCos) |* |* XPolygon in Y-Richtung um einen beliebigen Winkel kippen, |* bezogen auf eine Referenz-X-Koordinate -|* Ersterstellung ESO 01.02.95 -|* Letzte Aenderung ESO 01.02.95 |* *************************************************************************/ @@ -1373,8 +1245,6 @@ void XPolygon::SlantY(long nXRef, double fSin, double fCos) |* 1: rechts oben | | |* 2: rechts unten 3----2 |* 3: links unten -|* Ersterstellung ESO 07.07.95 -|* Letzte Aenderung ESO 07.07.95 |* *************************************************************************/ @@ -1384,9 +1254,8 @@ void XPolygon::Distort(const Rectangle& rRefRect, pImpXPolygon->CheckPointDelete(); CheckReference(); - long Xr, Wr, X1, X2, X3, X4; - long Yr, Hr, Y1, Y2, Y3, Y4; - double fTx, fTy, fUx, fUy; + long Xr, Wr; + long Yr, Hr; Xr = rRefRect.Left(); Yr = rRefRect.Top(); @@ -1395,6 +1264,8 @@ void XPolygon::Distort(const Rectangle& rRefRect, if ( Wr && Hr ) { + long X1, X2, X3, X4; + long Y1, Y2, Y3, Y4; DBG_ASSERT(rDistortedRect.pImpXPolygon->nPoints >= 4, "Distort-Rechteck zu klein"); @@ -1411,6 +1282,7 @@ void XPolygon::Distort(const Rectangle& rRefRect, for (USHORT i = 0; i < nPntCnt; i++) { + double fTx, fTy, fUx, fUy; Point& rPnt = pImpXPolygon->pPointAry[i]; fTx = (double)(rPnt.X() - Xr) / Wr; @@ -1443,17 +1315,14 @@ void XPolygon::Rotate20() long nPntCnt = pImpXPolygon->nPoints; long nIndex0 = 0; - for (long nPoints = 1; - nPoints < nPntCnt; - nPoints ++) + for (long nPoints = 1; nPoints < nPntCnt; ++nPoints) { - Point &rPnt = pImpXPolygon->pPointAry[nPoints]; + const Point &rPnt = pImpXPolygon->pPointAry[nPoints]; - if ((rPnt.X () < fMinX) || (fMinX == rPnt.X ()) && - (fMinY >= rPnt.Y ())) + if ( (rPnt.X() < fMinX) || (fMinX == rPnt.X() && fMinY >= rPnt.Y()) ) { - fMinX = rPnt.X (); - fMinY = rPnt.Y (); + fMinX = rPnt.X(); + fMinY = rPnt.Y(); nIndex0 = nPoints; } } @@ -1475,7 +1344,7 @@ basegfx::B2DPolygon XPolygon::getB2DPolygon() const // the long run DBG_ASSERT(pImpXPolygon != 0, "XPolygon::getB2DPolygon(): XPolygon has no implementation incarnated (!)"); const Polygon aSource(GetPointCount(), pImpXPolygon->pPointAry, pImpXPolygon->pFlagAry); - + return aSource.getB2DPolygon(); } @@ -1507,8 +1376,6 @@ XPolygon::XPolygon(const basegfx::B2DPolygon& rPolygon) |* ImpXPolyPolygon::ImpXPolyPolygon() |* |* Beschreibung Erzeugt das XPolygon-Array -|* Ersterstellung CL 09.11.94 -|* Letzte Aenderung MM 09.11.94 |* *************************************************************************/ @@ -1518,12 +1385,8 @@ ImpXPolyPolygon::ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ) : nRefCount = 1; // Einzelne Elemente duplizieren - XPolygon* pXPoly = aXPolyList.First(); - while ( pXPoly ) - { - aXPolyList.Replace( new XPolygon( *(aXPolyList.GetCurObject()) ) ); - pXPoly = aXPolyList.Next(); - } + for ( size_t i = 0, n = aXPolyList.size(); i < n; ++i ) + aXPolyList[ i ] = new XPolygon( *aXPolyList[ i ] ); } @@ -1532,40 +1395,32 @@ ImpXPolyPolygon::ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ) : |* ImpXPolyPolygon::~ImpXPolyPolygon() |* |* Beschreibung Loescht das Polygon-Array -|* Ersterstellung CL 09.06.93 -|* Letzte Aenderung CL 09.06.93 |* *************************************************************************/ ImpXPolyPolygon::~ImpXPolyPolygon() { - XPolygon* pXPoly = aXPolyList.First(); - while( pXPoly ) - { - delete pXPoly; - pXPoly = aXPolyList.Next(); - } + for ( size_t i = 0, n = aXPolyList.size(); i < n; ++i ) + delete aXPolyList[ i ]; + aXPolyList.clear(); } /************************************************************************* |* |* ImpXPolyPolygon::operator==() |* -|* Ersterstellung Joe 26-09-95 -|* Letzte Aenderung -|* *************************************************************************/ - bool ImpXPolyPolygon::operator==(const ImpXPolyPolygon& rImpXPolyPoly) const { - USHORT nAnz=(USHORT)aXPolyList.Count(); - const XPolygonList& rCmpList=rImpXPolyPoly.aXPolyList; - if (nAnz!=(USHORT)rCmpList.Count()) return FALSE; + size_t nAnz = aXPolyList.size(); + const XPolygonList& rCmpList = rImpXPolyPoly.aXPolyList; + if ( nAnz != rCmpList.size() ) return FALSE; bool bEq=true; - for (USHORT i=nAnz; i>0 && bEq;) { + for ( size_t i = nAnz; i > 0 && bEq; ) + { i--; - bEq= *aXPolyList.GetObject(i) == *rCmpList.GetObject(i); + bEq = ( *aXPolyList[ i ] == *rCmpList[ i ] ); } return bEq; } @@ -1574,16 +1429,12 @@ bool ImpXPolyPolygon::operator==(const ImpXPolyPolygon& rImpXPolyPoly) const |* |* XPolyPolygon::XPolyPolygon() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung CL 27.01.93 -|* *************************************************************************/ -XPolyPolygon::XPolyPolygon( USHORT nInitSize, USHORT nResize ) +XPolyPolygon::XPolyPolygon( USHORT /* nInitSize */, USHORT /* nResize */ ) { DBG_CTOR(XPolyPolygon,NULL); - pImpXPolyPolygon = new ImpXPolyPolygon( nInitSize, nResize ); + pImpXPolyPolygon = new ImpXPolyPolygon(); } @@ -1591,27 +1442,19 @@ XPolyPolygon::XPolyPolygon( USHORT nInitSize, USHORT nResize ) |* |* XPolyPolygon::XPolyPolygon() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung CL 27.01.93 -|* *************************************************************************/ XPolyPolygon::XPolyPolygon( const XPolygon& rXPoly ) { DBG_CTOR(XPolyPolygon,NULL); - pImpXPolyPolygon = new ImpXPolyPolygon; - pImpXPolyPolygon->aXPolyList.Insert( new XPolygon( rXPoly ) ); + pImpXPolyPolygon = new ImpXPolyPolygon(); + pImpXPolyPolygon->aXPolyList.push_back( new XPolygon( rXPoly ) ); } /************************************************************************* |* |* XPolyPolygon::XPolyPolygon() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung CL 27.01.93 -|* *************************************************************************/ XPolyPolygon::XPolyPolygon( const XPolyPolygon& rXPolyPoly ) @@ -1626,8 +1469,6 @@ XPolyPolygon::XPolyPolygon( const XPolyPolygon& rXPolyPoly ) |* XPolyPolygon::XPolyPolygon() |* |* XPolyPolygon aus einen Standard-PolyPolygon erzeugen -|* Ersterstellung 18.01.95 ESO -|* Letzte Aenderung 18.01.95 ESO |* *************************************************************************/ @@ -1637,7 +1478,7 @@ XPolyPolygon::XPolyPolygon( const PolyPolygon& rPolyPoly ) pImpXPolyPolygon = new ImpXPolyPolygon; for (USHORT i = 0; i < rPolyPoly.Count(); i++) - pImpXPolyPolygon->aXPolyList.Insert( + pImpXPolyPolygon->aXPolyList.push_back( new XPolygon(rPolyPoly.GetObject(i)) ); } @@ -1645,10 +1486,6 @@ XPolyPolygon::XPolyPolygon( const PolyPolygon& rPolyPoly ) |* |* XPolyPolygon::~XPolyPolygon() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung CL 27.01.93 -|* *************************************************************************/ XPolyPolygon::~XPolyPolygon() @@ -1665,8 +1502,6 @@ XPolyPolygon::~XPolyPolygon() |* XPolygon::CheckReference() |* |* Referenzzaehler desImpXPolyPoly pruefen und ggf. von diesem abkoppeln -|* Ersterstellung 18.01.95 ESO -|* Letzte Aenderung 18.01.95 ESO |* *************************************************************************/ @@ -1683,17 +1518,20 @@ void XPolyPolygon::CheckReference() |* |* XPolyPolygon::Insert() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung CL 27.01.93 -|* *************************************************************************/ void XPolyPolygon::Insert( const XPolygon& rXPoly, USHORT nPos ) { CheckReference(); XPolygon* pXPoly = new XPolygon( rXPoly ); - pImpXPolyPolygon->aXPolyList.Insert( pXPoly, nPos ); + if ( nPos < pImpXPolyPolygon->aXPolyList.size() ) + { + XPolygonList::iterator it = pImpXPolyPolygon->aXPolyList.begin(); + ::std::advance( it, nPos ); + pImpXPolyPolygon->aXPolyList.insert( it, pXPoly ); + } + else + pImpXPolyPolygon->aXPolyList.push_back( pXPoly ); } /************************************************************************* @@ -1701,8 +1539,6 @@ void XPolyPolygon::Insert( const XPolygon& rXPoly, USHORT nPos ) |* XPolyPolygon::Insert() |* |* saemtliche XPolygone aus einem XPolyPolygon einfuegen -|* Ersterstellung 18.01.95 ESO -|* Letzte Aenderung 18.01.95 ESO |* *************************************************************************/ @@ -1710,12 +1546,19 @@ void XPolyPolygon::Insert( const XPolyPolygon& rXPolyPoly, USHORT nPos ) { CheckReference(); - for (USHORT i = 0; i < rXPolyPoly.Count(); i++) + for ( size_t i = 0; i < rXPolyPoly.Count(); i++) { - XPolygon* pXPoly = new XPolygon(rXPolyPoly[i]); - pImpXPolyPolygon->aXPolyList.Insert(pXPoly, nPos); - if ( nPos != XPOLYPOLY_APPEND ) + XPolygon* pXPoly = new XPolygon( rXPolyPoly[i] ); + + if ( nPos < pImpXPolyPolygon->aXPolyList.size() ) + { + XPolygonList::iterator it = pImpXPolyPolygon->aXPolyList.begin(); + ::std::advance( it, nPos ); + pImpXPolyPolygon->aXPolyList.insert( it, pXPoly ); nPos++; + } + else + pImpXPolyPolygon->aXPolyList.push_back( pXPoly ); } } @@ -1723,16 +1566,15 @@ void XPolyPolygon::Insert( const XPolyPolygon& rXPolyPoly, USHORT nPos ) |* |* XPolyPolygon::Remove() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung CL 27.01.93 -|* *************************************************************************/ XPolygon XPolyPolygon::Remove( USHORT nPos ) { CheckReference(); - XPolygon* pTmpXPoly = pImpXPolyPolygon->aXPolyList.Remove( nPos ); + XPolygonList::iterator it = pImpXPolyPolygon->aXPolyList.begin(); + ::std::advance( it, nPos ); + XPolygon* pTmpXPoly = *it; + pImpXPolyPolygon->aXPolyList.erase( it ); XPolygon aXPoly( *pTmpXPoly ); delete pTmpXPoly; return aXPoly; @@ -1743,17 +1585,14 @@ XPolygon XPolyPolygon::Remove( USHORT nPos ) |* |* XPolyPolygon::Replace() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung CL 27.01.93 -|* *************************************************************************/ XPolygon XPolyPolygon::Replace( const XPolygon& rXPoly, USHORT nPos ) { CheckReference(); XPolygon* pXPoly = new XPolygon( rXPoly ); - XPolygon* pTmpXPoly = pImpXPolyPolygon->aXPolyList.Replace( pXPoly, nPos ); + XPolygon* pTmpXPoly = pImpXPolyPolygon->aXPolyList[ nPos ]; + pImpXPolyPolygon->aXPolyList[ nPos ] = pXPoly; XPolygon aXPoly( *pTmpXPoly ); delete pTmpXPoly; return aXPoly; @@ -1764,15 +1603,11 @@ XPolygon XPolyPolygon::Replace( const XPolygon& rXPoly, USHORT nPos ) |* |* XPolyPolygon::GetObject() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung CL 27.01.93 -|* *************************************************************************/ const XPolygon& XPolyPolygon::GetObject( USHORT nPos ) const { - return *(pImpXPolyPolygon->aXPolyList.GetObject( nPos )); + return *(pImpXPolyPolygon->aXPolyList[ nPos ]); } @@ -1780,10 +1615,6 @@ const XPolygon& XPolyPolygon::GetObject( USHORT nPos ) const |* |* XPolyPolygon::Clear() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung TH 17.10.94 -|* *************************************************************************/ void XPolyPolygon::Clear() @@ -1795,13 +1626,9 @@ void XPolyPolygon::Clear() } else { - XPolygon* pXPoly = pImpXPolyPolygon->aXPolyList.First(); - while( pXPoly ) - { - delete pXPoly; - pXPoly = pImpXPolyPolygon->aXPolyList.Next(); - } - pImpXPolyPolygon->aXPolyList.Clear(); + for( size_t i = 0, n = pImpXPolyPolygon->aXPolyList.size(); i < n; ++i ) + delete pImpXPolyPolygon->aXPolyList[ i ]; + pImpXPolyPolygon->aXPolyList.clear(); } } @@ -1810,15 +1637,11 @@ void XPolyPolygon::Clear() |* |* XPolyPolygon::Count() |* -|* Beschreibung -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung CL 27.01.93 -|* *************************************************************************/ USHORT XPolyPolygon::Count() const { - return (USHORT)(pImpXPolyPolygon->aXPolyList.Count()); + return (USHORT)( pImpXPolyPolygon->aXPolyList.size() ); } @@ -1826,10 +1649,6 @@ USHORT XPolyPolygon::Count() const |* |* XPolyPolygon::Move() |* -|* Beschreibung POLY.SDW -|* Ersterstellung TH 04.10.94 -|* Letzte Aenderung TH 04.10.94 -|* *************************************************************************/ void XPolyPolygon::Move( long nHorzMove, long nVertMove ) @@ -1842,11 +1661,10 @@ void XPolyPolygon::Move( long nHorzMove, long nVertMove ) CheckReference(); // Punkte verschieben - XPolygon* pXPoly = pImpXPolyPolygon->aXPolyList.First(); - while( pXPoly ) + for ( size_t i = 0, n = pImpXPolyPolygon->aXPolyList.size(); i < n; ++i ) { + XPolygon* pXPoly = pImpXPolyPolygon->aXPolyList[ i ]; pXPoly->Move( nHorzMove, nVertMove ); - pXPoly = pImpXPolyPolygon->aXPolyList.Next(); } } @@ -1854,20 +1672,16 @@ void XPolyPolygon::Move( long nHorzMove, long nVertMove ) |* |* XPolyPolygon::GetBoundRect() |* -|* Beschreibung POLY.SDW -|* Ersterstellung TH 04.10.94 -|* Letzte Aenderung TH 04.10.94 -|* *************************************************************************/ Rectangle XPolyPolygon::GetBoundRect() const { - USHORT nXPoly = (USHORT)pImpXPolyPolygon->aXPolyList.Count(); + size_t nXPoly = pImpXPolyPolygon->aXPolyList.size(); Rectangle aRect; - for ( USHORT n = 0; n < nXPoly; n++ ) + for ( size_t n = 0; n < nXPoly; n++ ) { - const XPolygon* pXPoly = pImpXPolyPolygon->aXPolyList.GetObject( n ); + const XPolygon* pXPoly = pImpXPolyPolygon->aXPolyList[ n ]; aRect.Union( pXPoly->GetBoundRect() ); } @@ -1879,26 +1693,18 @@ Rectangle XPolyPolygon::GetBoundRect() const |* |* XPolyPolygon::operator[]() |* -|* Beschreibung POLY.SDW -|* Ersterstellung TH 28.10.94 -|* Letzte Aenderung TH 28.10.94 -|* *************************************************************************/ XPolygon& XPolyPolygon::operator[]( USHORT nPos ) { CheckReference(); - return *(pImpXPolyPolygon->aXPolyList.GetObject( nPos )); + return *( pImpXPolyPolygon->aXPolyList[ nPos ] ); } /************************************************************************* |* |* XPolyPolygon::operator=() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung CL 27.01.93 -|* *************************************************************************/ XPolyPolygon& XPolyPolygon::operator=( const XPolyPolygon& rXPolyPoly ) @@ -1919,10 +1725,6 @@ XPolyPolygon& XPolyPolygon::operator=( const XPolyPolygon& rXPolyPoly ) |* |* XPolyPolygon::operator==() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung Joe 27.01.93 -|* *************************************************************************/ BOOL XPolyPolygon::operator==( const XPolyPolygon& rXPolyPoly ) const @@ -1936,10 +1738,6 @@ BOOL XPolyPolygon::operator==( const XPolyPolygon& rXPolyPoly ) const |* |* XPolyPolygon::operator!=() |* -|* Beschreibung POLY.SDW -|* Ersterstellung CL 27.01.93 -|* Letzte Aenderung Joe 27.01.93 -|* *************************************************************************/ BOOL XPolyPolygon::operator!=( const XPolyPolygon& rXPolyPoly ) const @@ -1953,8 +1751,6 @@ BOOL XPolyPolygon::operator!=( const XPolyPolygon& rXPolyPoly ) const |* XPolyPolygon::Translate() |* |* Alle Polygone auf den uebergebenen Punkt verschieben -|* Ersterstellung ESO 25.01.95 -|* Letzte Aenderung ESO 25.01.95 |* *************************************************************************/ @@ -1962,8 +1758,8 @@ void XPolyPolygon::Translate(const Point& rTrans) { CheckReference(); - for (USHORT i = 0; i < Count(); i++) - pImpXPolyPolygon->aXPolyList.GetObject(i)->Translate(rTrans); + for (size_t i = 0; i < Count(); i++) + pImpXPolyPolygon->aXPolyList[ i ]->Translate(rTrans); } /************************************************************************* @@ -1972,8 +1768,6 @@ void XPolyPolygon::Translate(const Point& rTrans) |* |* Alle Polygone um den Punkt rCenter drehen, Sinus und Cosinus |* muessen uebergeben werden -|* Ersterstellung ESO 25.01.95 -|* Letzte Aenderung ESO 25.01.95 |* *************************************************************************/ @@ -1981,8 +1775,8 @@ void XPolyPolygon::Rotate(const Point& rCenter, double fSin, double fCos) { CheckReference(); - for (USHORT i = 0; i < Count(); i++) - pImpXPolyPolygon->aXPolyList.GetObject(i)->Rotate(rCenter, fSin, fCos); + for (size_t i = 0; i < Count(); i++) + pImpXPolyPolygon->aXPolyList[ i ]->Rotate(rCenter, fSin, fCos); } /************************************************************************* @@ -1996,8 +1790,8 @@ void XPolyPolygon::Rotate20() { CheckReference(); - for (USHORT i = 0; i < Count(); i++) - pImpXPolyPolygon->aXPolyList.GetObject(i)->Rotate20(); + for (size_t i = 0; i < Count(); i++) + pImpXPolyPolygon->aXPolyList[ i ]->Rotate20(); } /************************************************************************* @@ -2006,8 +1800,6 @@ void XPolyPolygon::Rotate20() |* |* Alle Poylgone um den Punkt rCenter mit dem Winkel nAngle drehen |* Winkel in 10tel Grad, Wertebereich 0 - 3600 -|* Ersterstellung ESO 25.01.95 -|* Letzte Aenderung ESO 25.01.95 |* *************************************************************************/ @@ -2029,8 +1821,6 @@ void XPolyPolygon::Rotate(const Point& rCenter, USHORT nAngle) |* XPolyPolygon::Scale() |* |* Alle Polygone in X- und/oder Y-Richtung skalieren -|* Ersterstellung ESO 01.02.95 -|* Letzte Aenderung ESO 01.02.95 |* *************************************************************************/ @@ -2038,8 +1828,8 @@ void XPolyPolygon::Scale(double fSx, double fSy) { CheckReference(); - for (USHORT i = 0; i < Count(); i++) - pImpXPolyPolygon->aXPolyList.GetObject(i)->Scale(fSx, fSy); + for (size_t i = 0; i < Count(); i++) + pImpXPolyPolygon->aXPolyList[ i ]->Scale(fSx, fSy); } /************************************************************************* @@ -2048,8 +1838,6 @@ void XPolyPolygon::Scale(double fSx, double fSy) |* |* Alle Polygone in X-Richtung um einen beliebigen Winkel kippen, |* bezogen auf eine Referenz-Y-Koordinate -|* Ersterstellung ESO 01.02.95 -|* Letzte Aenderung ESO 01.02.95 |* *************************************************************************/ @@ -2057,8 +1845,8 @@ void XPolyPolygon::SlantX(long nYRef, double fSin, double fCos) { CheckReference(); - for (USHORT i = 0; i < Count(); i++) - pImpXPolyPolygon->aXPolyList.GetObject(i)->SlantX(nYRef, fSin, fCos); + for (size_t i = 0; i < Count(); i++) + pImpXPolyPolygon->aXPolyList[ i ]->SlantX(nYRef, fSin, fCos); } /************************************************************************* @@ -2067,8 +1855,6 @@ void XPolyPolygon::SlantX(long nYRef, double fSin, double fCos) |* |* Alle Polygone in Y-Richtung um einen beliebigen Winkel kippen, |* bezogen auf eine Referenz-X-Koordinate -|* Ersterstellung ESO 01.02.95 -|* Letzte Aenderung ESO 01.02.95 |* *************************************************************************/ @@ -2076,8 +1862,8 @@ void XPolyPolygon::SlantY(long nXRef, double fSin, double fCos) { CheckReference(); - for (USHORT i = 0; i < Count(); i++) - pImpXPolyPolygon->aXPolyList.GetObject(i)->SlantY(nXRef, fSin, fCos); + for (size_t i = 0; i < Count(); i++) + pImpXPolyPolygon->aXPolyList[ i ]->SlantY(nXRef, fSin, fCos); } /************************************************************************* @@ -2091,8 +1877,6 @@ void XPolyPolygon::SlantY(long nXRef, double fSin, double fCos) |* 1: rechts oben | | |* 2: rechts unten 3----2 |* 3: links unten -|* Ersterstellung ESO 07.07.95 -|* Letzte Aenderung ESO 07.07.95 |* *************************************************************************/ @@ -2101,9 +1885,8 @@ void XPolyPolygon::Distort(const Rectangle& rRefRect, { CheckReference(); - for (USHORT i = 0; i < Count(); i++) - pImpXPolyPolygon->aXPolyList.GetObject(i)->Distort(rRefRect, - rDistortedRect); + for (size_t i = 0; i < Count(); i++) + pImpXPolyPolygon->aXPolyList[ i ]->Distort(rRefRect, rDistortedRect); } basegfx::B2DPolyPolygon XPolyPolygon::getB2DPolyPolygon() const @@ -2122,7 +1905,7 @@ basegfx::B2DPolyPolygon XPolyPolygon::getB2DPolyPolygon() const XPolyPolygon::XPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon) { DBG_CTOR(XPolyPolygon,NULL); - pImpXPolyPolygon = new ImpXPolyPolygon( 16, 16 ); + pImpXPolyPolygon = new ImpXPolyPolygon(); for(sal_uInt32 a(0L); a < rPolyPolygon.count(); a++) { @@ -2133,3 +1916,5 @@ XPolyPolygon::XPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index c8629bc834..31c455088a 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -109,10 +110,6 @@ long ScaleMetricValue( long nVal, long nMul, long nDiv ) |* |* NameOrIndex::NameOrIndex(USHORT nWhich, INT32 nIndex) |* -|* Beschreibung -|* Ersterstellung 14.11.94 -|* Letzte Aenderung 14.11.94 -|* *************************************************************************/ NameOrIndex::NameOrIndex(USHORT _nWhich, INT32 nIndex) : @@ -125,10 +122,6 @@ NameOrIndex::NameOrIndex(USHORT _nWhich, INT32 nIndex) : |* |* NameOrIndex::NameOrIndex(USHORT nWhich, const String& rName) |* -|* Beschreibung -|* Ersterstellung 14.11.94 -|* Letzte Aenderung 14.11.94 -|* *************************************************************************/ NameOrIndex::NameOrIndex(USHORT _nWhich, const XubString& rName) : @@ -141,10 +134,6 @@ NameOrIndex::NameOrIndex(USHORT _nWhich, const XubString& rName) : |* |* NameOrIndex::NameOrIndex(USHORT nWhich, SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 14.11.94 -|* Letzte Aenderung 14.11.94 -|* *************************************************************************/ NameOrIndex::NameOrIndex(USHORT _nWhich, SvStream& rIn) : @@ -157,10 +146,6 @@ NameOrIndex::NameOrIndex(USHORT _nWhich, SvStream& rIn) : |* |* NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex) |* -|* Beschreibung -|* Ersterstellung 14.11.94 -|* Letzte Aenderung 14.11.94 -|* *************************************************************************/ NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex) : @@ -173,10 +158,6 @@ NameOrIndex::NameOrIndex(const NameOrIndex& rNameOrIndex) : |* |* int NameOrIndex::operator==(const SfxPoolItem& rItem) const |* -|* Beschreibung -|* Ersterstellung 14.11.94 -|* Letzte Aenderung 14.11.94 -|* *************************************************************************/ int NameOrIndex::operator==(const SfxPoolItem& rItem) const @@ -189,10 +170,6 @@ int NameOrIndex::operator==(const SfxPoolItem& rItem) const |* |* SfxPoolItem* NameOrIndex::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 14.11.94 -|* Letzte Aenderung 14.11.94 -|* *************************************************************************/ SfxPoolItem* NameOrIndex::Clone(SfxItemPool* /*pPool*/) const @@ -205,10 +182,6 @@ SfxPoolItem* NameOrIndex::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* NameOrIndex::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 14.11.94 -|* Letzte Aenderung 14.11.94 -|* *************************************************************************/ SfxPoolItem* NameOrIndex::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -220,10 +193,6 @@ SfxPoolItem* NameOrIndex::Create(SvStream& rIn, USHORT /*nVer*/) const |* |* SvStream* NameOrIndex::Store(SvStream& rIn) const |* -|* Beschreibung -|* Ersterstellung 14.11.94 -|* Letzte Aenderung 14.11.94 -|* *************************************************************************/ SvStream& NameOrIndex::Store( SvStream& rOut, USHORT nItemVersion ) const @@ -484,19 +453,19 @@ const Color& XColorItem::GetColorValue(const XColorTable* pTable) const } -sal_Bool XColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const +bool XColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetColorValue().GetRGBColor(); - return sal_True; + return true; } -sal_Bool XColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) +bool XColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; rVal >>= nValue; SetColorValue( nValue ); - return sal_True; + return true; } @@ -513,10 +482,6 @@ TYPEINIT1_AUTOFACTORY(XLineStyleItem, SfxEnumItem); |* |* XLineStyleItem::XLineStyleItem(XLineStyle eTheLineStyle) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ XLineStyleItem::XLineStyleItem(XLineStyle eTheLineStyle) : @@ -528,10 +493,6 @@ XLineStyleItem::XLineStyleItem(XLineStyle eTheLineStyle) : |* |* XLineStyleItem::XLineStyleItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineStyleItem::XLineStyleItem(SvStream& rIn) : @@ -543,10 +504,6 @@ XLineStyleItem::XLineStyleItem(SvStream& rIn) : |* |* XLineStyleItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 09.11.94 -|* Letzte Aenderung 09.11.94 -|* *************************************************************************/ SfxPoolItem* XLineStyleItem::Clone(SfxItemPool* /*pPool*/) const @@ -558,10 +515,6 @@ SfxPoolItem* XLineStyleItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineStyleItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -609,14 +562,14 @@ SfxItemPresentation XLineStyleItem::GetPresentation } } -sal_Bool XLineStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const +bool XLineStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const { ::com::sun::star::drawing::LineStyle eLS = (::com::sun::star::drawing::LineStyle)GetValue(); rVal <<= eLS; - return sal_True; + return true; } -sal_Bool XLineStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) +bool XLineStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) { ::com::sun::star::drawing::LineStyle eLS; if(!(rVal >>= eLS )) @@ -624,12 +577,12 @@ sal_Bool XLineStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE // also try an int (for Basic) sal_Int32 nLS = 0; if(!(rVal >>= nLS)) - return sal_False; + return false; eLS = (::com::sun::star::drawing::LineStyle)nLS; } SetValue( sal::static_int_cast< USHORT >( eLS ) ); - return sal_True; + return true; } //------------------------------------------------------------------------ @@ -647,10 +600,6 @@ USHORT XLineStyleItem::GetValueCount() const |* |* XDash::XDash(XDashStyle, USHORT, ULONG, USHORT, ULONG, ULONG) |* -|* Beschreibung -|* Ersterstellung 21.11.94 -|* Letzte Aenderung 21.11.94 -|* *************************************************************************/ XDash::XDash(XDashStyle eTheDash, USHORT nTheDots, ULONG nTheDotLen, @@ -668,10 +617,6 @@ XDash::XDash(XDashStyle eTheDash, USHORT nTheDots, ULONG nTheDotLen, |* |* int XDash::operator==(const SfxPoolItem& rItem) const |* -|* Beschreibung -|* Ersterstellung 29.11.94 -|* Letzte Aenderung 29.11.94 -|* *************************************************************************/ bool XDash::operator==(const XDash& rDash) const @@ -885,10 +830,6 @@ TYPEINIT1_AUTOFACTORY(XLineDashItem, NameOrIndex); |* |* XLineDashItem::XLineDashItem(INT32 nIndex, const XDash& rTheDash) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineDashItem::XLineDashItem(INT32 nIndex, const XDash& rTheDash) : @@ -901,10 +842,6 @@ XLineDashItem::XLineDashItem(INT32 nIndex, const XDash& rTheDash) : |* |* XLineDashItem::XLineDashItem(const String& rName, const XDash& rTheDash) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineDashItem::XLineDashItem(const XubString& rName, const XDash& rTheDash) : @@ -917,10 +854,6 @@ XLineDashItem::XLineDashItem(const XubString& rName, const XDash& rTheDash) : |* |* XLineDashItem::XLineDashItem(const XLineDashItem& rItem) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineDashItem::XLineDashItem(const XLineDashItem& rItem) : @@ -933,10 +866,6 @@ XLineDashItem::XLineDashItem(const XLineDashItem& rItem) : |* |* XLineDashItem::XLineDashItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineDashItem::XLineDashItem(SvStream& rIn) : @@ -976,10 +905,6 @@ XLineDashItem::XLineDashItem(SfxItemPool* /*pPool*/) |* |* XLineDashItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineDashItem::Clone(SfxItemPool* /*pPool*/) const @@ -991,10 +916,6 @@ SfxPoolItem* XLineDashItem::Clone(SfxItemPool* /*pPool*/) const |* |* int XLineDashItem::operator==(const SfxPoolItem& rItem) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ int XLineDashItem::operator==(const SfxPoolItem& rItem) const @@ -1007,10 +928,6 @@ int XLineDashItem::operator==(const SfxPoolItem& rItem) const |* |* SfxPoolItem* XLineDashItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineDashItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -1022,10 +939,6 @@ SfxPoolItem* XLineDashItem::Create(SvStream& rIn, USHORT /*nVer*/) const |* |* SfxPoolItem* XLineDashItem::Store(SvStream& rOut) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SvStream& XLineDashItem::Store( SvStream& rOut, USHORT nItemVersion ) const @@ -1049,10 +962,6 @@ SvStream& XLineDashItem::Store( SvStream& rOut, USHORT nItemVersion ) const |* |* const XDash& XLineDashItem::GetValue(const XDashTable* pTable) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ const XDash& XLineDashItem::GetDashValue(const XDashTable* pTable) const // GetValue -> GetDashValue @@ -1089,22 +998,22 @@ SfxItemPresentation XLineDashItem::GetPresentation //------------------------------------------------------------------------ -FASTBOOL XLineDashItem::HasMetrics() const +bool XLineDashItem::HasMetrics() const { - return TRUE; + return true; } //------------------------------------------------------------------------ -FASTBOOL XLineDashItem::ScaleMetrics(long nMul, long nDiv) +bool XLineDashItem::ScaleMetrics(long nMul, long nDiv) { aDash.SetDotLen( ScaleMetricValue( aDash.GetDotLen(), nMul, nDiv ) ); aDash.SetDashLen( ScaleMetricValue( aDash.GetDashLen(), nMul, nDiv ) ); aDash.SetDistance( ScaleMetricValue( aDash.GetDistance(), nMul, nDiv ) ); - return TRUE; + return true; } -sal_Bool XLineDashItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool XLineDashItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1202,13 +1111,13 @@ sal_Bool XLineDashItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemb break; } - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: DBG_ERROR("Wrong MemberId!"); return false; } - - return sal_True; + + return true; } -sal_Bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1231,7 +1140,7 @@ sal_Bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE n else if ( aPropSeq[n].Name.equalsAsciiL( "LineDash", 8 )) { if ( aPropSeq[n].Value >>= aLineDash ) - bLineDash = sal_True; + bLineDash = true; } } @@ -1253,17 +1162,17 @@ sal_Bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE n SetDashValue( aXDash ); } - return sal_True; + return true; } - return sal_False; + return false; } case MID_NAME: { rtl::OUString aName; if (!(rVal >>= aName)) - return sal_False; + return false; SetName( aName ); break; } @@ -1272,7 +1181,7 @@ sal_Bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE n { ::com::sun::star::drawing::LineDash aLineDash; if(!(rVal >>= aLineDash)) - return sal_False; + return false; XDash aXDash; @@ -1294,7 +1203,7 @@ sal_Bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE n { sal_Int16 nVal = sal_Int16(); if(!(rVal >>= nVal)) - return sal_False; + return false; XDash aXDash = GetDashValue(); aXDash.SetDashStyle((XDashStyle)((UINT16)(nVal))); @@ -1312,7 +1221,7 @@ sal_Bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE n { sal_Int16 nVal = sal_Int16(); if(!(rVal >>= nVal)) - return sal_False; + return false; XDash aXDash = GetDashValue(); if ( nMemberId == MID_LINEDASH_DOTS ) @@ -1333,7 +1242,7 @@ sal_Bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE n { sal_Int32 nVal = 0; if(!(rVal >>= nVal)) - return sal_False; + return false; XDash aXDash = GetDashValue(); if ( nMemberId == MID_LINEDASH_DOTLEN ) @@ -1351,7 +1260,7 @@ sal_Bool XLineDashItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE n } } - return sal_True; + return true; } BOOL XLineDashItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ) @@ -1390,10 +1299,6 @@ TYPEINIT1_AUTOFACTORY(XLineWidthItem, SfxMetricItem); |* |* XLineWidthItem::XLineWidthItem(long nWidth) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ XLineWidthItem::XLineWidthItem(long nWidth) : @@ -1405,10 +1310,6 @@ XLineWidthItem::XLineWidthItem(long nWidth) : |* |* XLineWidthItem::XLineWidthItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineWidthItem::XLineWidthItem(SvStream& rIn) : @@ -1420,10 +1321,6 @@ XLineWidthItem::XLineWidthItem(SvStream& rIn) : |* |* XLineWidthItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineWidthItem::Clone(SfxItemPool* /*pPool*/) const @@ -1435,10 +1332,6 @@ SfxPoolItem* XLineWidthItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineWidthItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -1472,17 +1365,17 @@ SfxItemPresentation XLineWidthItem::GetPresentation } } -sal_Bool XLineWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool XLineWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { sal_Int32 nValue = GetValue(); if( 0 != (nMemberId&CONVERT_TWIPS) ) nValue = TWIP_TO_MM100(nValue); rVal <<= nValue; - return sal_True; + return true; } -sal_Bool XLineWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool XLineWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) { sal_Int32 nValue = 0; rVal >>= nValue; @@ -1490,7 +1383,7 @@ sal_Bool XLineWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nValue = MM100_TO_TWIP(nValue); SetValue( nValue ); - return sal_True; + return true; } // ------------------- @@ -1502,10 +1395,6 @@ TYPEINIT1_AUTOFACTORY(XLineColorItem, XColorItem); |* |* XLineColorItem::XLineColorItem(INT32 nIndex, const Color& rTheColor) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineColorItem::XLineColorItem(INT32 nIndex, const Color& rTheColor) : @@ -1517,10 +1406,6 @@ XLineColorItem::XLineColorItem(INT32 nIndex, const Color& rTheColor) : |* |* XLineColorItem::XLineColorItem(const XubString& rName, const Color& rTheColor) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineColorItem::XLineColorItem(const XubString& rName, const Color& rTheColor) : @@ -1532,10 +1417,6 @@ XLineColorItem::XLineColorItem(const XubString& rName, const Color& rTheColor) : |* |* XLineColorItem::XLineColorItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineColorItem::XLineColorItem(SvStream& rIn) : @@ -1547,10 +1428,6 @@ XLineColorItem::XLineColorItem(SvStream& rIn) : |* |* XLineColorItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineColorItem::Clone(SfxItemPool* /*pPool*/) const @@ -1562,10 +1439,6 @@ SfxPoolItem* XLineColorItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XLineColorItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineColorItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -1597,20 +1470,20 @@ SfxItemPresentation XLineColorItem::GetPresentation } } -sal_Bool XLineColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const +bool XLineColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetColorValue().GetRGBColor(); - return sal_True; + return true; } -sal_Bool XLineColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) +bool XLineColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; if(!(rVal >>= nValue)) - return sal_False; + return false; SetColorValue( nValue ); - return sal_True; + return true; } ////////////////////////////////////////////////////////////////////////////// @@ -1721,10 +1594,6 @@ TYPEINIT1_AUTOFACTORY(XLineStartItem, NameOrIndex); |* |* XLineStartItem::XLineStartItem(INT32 nIndex) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ XLineStartItem::XLineStartItem(INT32 nIndex) @@ -1737,10 +1606,6 @@ XLineStartItem::XLineStartItem(INT32 nIndex) |* XLineStartItem::XLineStartItem(const XubString& rName, |* const basegfx::B2DPolyPolygon& rXPolygon) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ XLineStartItem::XLineStartItem(const XubString& rName, const basegfx::B2DPolyPolygon& rPolyPolygon) @@ -1753,10 +1618,6 @@ XLineStartItem::XLineStartItem(const XubString& rName, const basegfx::B2DPolyPol |* |* XLineStartItem::XLineStartItem(const XLineStartItem& rItem) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 17.11.94 -|* *************************************************************************/ XLineStartItem::XLineStartItem(const XLineStartItem& rItem) @@ -1769,10 +1630,6 @@ XLineStartItem::XLineStartItem(const XLineStartItem& rItem) |* |* XLineStartItem::XLineStartItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 17.11.94 -|* *************************************************************************/ XLineStartItem::XLineStartItem(SvStream& rIn) : @@ -1803,10 +1660,6 @@ XLineStartItem::XLineStartItem(SfxItemPool* /*pPool*/) |* |* XLineStartItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineStartItem::Clone(SfxItemPool* /*pPool*/) const @@ -1818,10 +1671,6 @@ SfxPoolItem* XLineStartItem::Clone(SfxItemPool* /*pPool*/) const |* |* int XLineStartItem::operator==(const SfxPoolItem& rItem) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ int XLineStartItem::operator==(const SfxPoolItem& rItem) const @@ -1833,10 +1682,6 @@ int XLineStartItem::operator==(const SfxPoolItem& rItem) const |* |* SfxPoolItem* XLineStartItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineStartItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -1848,10 +1693,6 @@ SfxPoolItem* XLineStartItem::Create(SvStream& rIn, USHORT /*nVer*/) const |* |* SfxPoolItem* XLineStartItem::Store(SvStream& rOut) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ SvStream& XLineStartItem::Store( SvStream& rOut, USHORT nItemVersion ) const @@ -1871,10 +1712,6 @@ SvStream& XLineStartItem::Store( SvStream& rOut, USHORT nItemVersion ) const |* const basegfx::B2DPolyPolygon& XLineStartItem::GetValue(const XLineEndTable* pTable) |* const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ basegfx::B2DPolyPolygon XLineStartItem::GetLineStartValue(const XLineEndTable* pTable) const @@ -1913,7 +1750,7 @@ SfxItemPresentation XLineStartItem::GetPresentation } } -sal_Bool XLineStartItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool XLineStartItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -1930,16 +1767,16 @@ sal_Bool XLineStartItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMem rVal <<= aBezier; } - return sal_True; + return true; } -sal_Bool XLineStartItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool XLineStartItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; if( nMemberId == MID_NAME ) { - return sal_False; + return false; } else { @@ -1948,7 +1785,7 @@ sal_Bool XLineStartItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE if( rVal.hasValue() && rVal.getValue() ) { if( rVal.getValueType() != ::getCppuType((const com::sun::star::drawing::PolyPolygonBezierCoords*)0) ) - return sal_False; + return false; com::sun::star::drawing::PolyPolygonBezierCoords* pCoords = (com::sun::star::drawing::PolyPolygonBezierCoords*)rVal.getValue(); if( pCoords->Coordinates.getLength() > 0 ) @@ -1960,7 +1797,7 @@ sal_Bool XLineStartItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE } } - return sal_True; + return true; } /** this function searches in both the models pool and the styles pool for XLineStartItem @@ -2193,10 +2030,6 @@ TYPEINIT1_AUTOFACTORY(XLineEndItem, NameOrIndex); |* |* XLineEndItem::XLineEndItem(INT32 nIndex) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ XLineEndItem::XLineEndItem(INT32 nIndex) @@ -2209,10 +2042,6 @@ XLineEndItem::XLineEndItem(INT32 nIndex) |* XLineEndItem::XLineEndItem(const XubString& rName, |* const basegfx::B2DPolyPolygon& rXPolygon) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ XLineEndItem::XLineEndItem(const XubString& rName, const basegfx::B2DPolyPolygon& rPolyPolygon) @@ -2225,10 +2054,6 @@ XLineEndItem::XLineEndItem(const XubString& rName, const basegfx::B2DPolyPolygon |* |* XLineEndItem::XLineEndItem(const XLineEndItem& rItem) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ XLineEndItem::XLineEndItem(const XLineEndItem& rItem) @@ -2241,10 +2066,6 @@ XLineEndItem::XLineEndItem(const XLineEndItem& rItem) |* |* XLineEndItem::XLineEndItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 17.11.94 -|* *************************************************************************/ XLineEndItem::XLineEndItem(SvStream& rIn) : @@ -2275,10 +2096,6 @@ XLineEndItem::XLineEndItem(SfxItemPool* /*pPool*/) |* |* XLineEndItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineEndItem::Clone(SfxItemPool* /*pPool*/) const @@ -2290,10 +2107,6 @@ SfxPoolItem* XLineEndItem::Clone(SfxItemPool* /*pPool*/) const |* |* int XLineEndItem::operator==(const SfxPoolItem& rItem) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 17.11.94 -|* *************************************************************************/ int XLineEndItem::operator==(const SfxPoolItem& rItem) const @@ -2305,10 +2118,6 @@ int XLineEndItem::operator==(const SfxPoolItem& rItem) const |* |* SfxPoolItem* XLineEndItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineEndItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -2320,10 +2129,6 @@ SfxPoolItem* XLineEndItem::Create(SvStream& rIn, USHORT /*nVer*/) const |* |* SfxPoolItem* XLineEndItem::Store(SvStream& rOut) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 17.11.94 -|* *************************************************************************/ SvStream& XLineEndItem::Store( SvStream& rOut, USHORT nItemVersion ) const @@ -2342,10 +2147,6 @@ SvStream& XLineEndItem::Store( SvStream& rOut, USHORT nItemVersion ) const |* |* const basegfx::B2DPolyPolygon& XLineEndItem::GetValue(const XLineEndTable* pTable) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ basegfx::B2DPolyPolygon XLineEndItem::GetLineEndValue(const XLineEndTable* pTable) const @@ -2607,7 +2408,7 @@ SfxItemPresentation XLineEndItem::GetPresentation } } -sal_Bool XLineEndItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool XLineEndItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -2623,16 +2424,16 @@ sal_Bool XLineEndItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMembe SvxConvertB2DPolyPolygonToPolyPolygonBezier( maPolyPolygon, aBezier ); rVal <<= aBezier; } - return sal_True; + return true; } -sal_Bool XLineEndItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool XLineEndItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; if( nMemberId == MID_NAME ) { - return sal_False; + return false; } else { @@ -2641,7 +2442,7 @@ sal_Bool XLineEndItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nM if( rVal.hasValue() && rVal.getValue() ) { if( rVal.getValueType() != ::getCppuType((const com::sun::star::drawing::PolyPolygonBezierCoords*)0) ) - return sal_False; + return false; com::sun::star::drawing::PolyPolygonBezierCoords* pCoords = (com::sun::star::drawing::PolyPolygonBezierCoords*)rVal.getValue(); if( pCoords->Coordinates.getLength() > 0 ) @@ -2653,7 +2454,7 @@ sal_Bool XLineEndItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nM } } - return sal_True; + return true; } // ---------------------------- @@ -2665,10 +2466,6 @@ TYPEINIT1_AUTOFACTORY(XLineStartWidthItem, SfxMetricItem); |* |* XLineStartWidthItem::XLineStartWidthItem(INT32 nWidth) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ XLineStartWidthItem::XLineStartWidthItem(long nWidth) : @@ -2680,10 +2477,6 @@ XLineStartWidthItem::XLineStartWidthItem(long nWidth) : |* |* XLineStartWidthItem::XLineStartWidthItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineStartWidthItem::XLineStartWidthItem(SvStream& rIn) : @@ -2695,10 +2488,6 @@ XLineStartWidthItem::XLineStartWidthItem(SvStream& rIn) : |* |* XLineStartWidthItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineStartWidthItem::Clone(SfxItemPool* /*pPool*/) const @@ -2711,10 +2500,6 @@ SfxPoolItem* XLineStartWidthItem::Clone(SfxItemPool* /*pPool*/) const |* SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, USHORT nVer) |* const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineStartWidthItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -2748,18 +2533,18 @@ SfxItemPresentation XLineStartWidthItem::GetPresentation } } -sal_Bool XLineStartWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const +bool XLineStartWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } -sal_Bool XLineStartWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) +bool XLineStartWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; rVal >>= nValue; SetValue( nValue ); - return sal_True; + return true; } @@ -2773,10 +2558,6 @@ TYPEINIT1_AUTOFACTORY(XLineEndWidthItem, SfxMetricItem); |* |* XLineEndWidthItem::XLineEndWidthItem(long nWidth) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineEndWidthItem::XLineEndWidthItem(long nWidth) : @@ -2788,10 +2569,6 @@ XLineEndWidthItem::XLineEndWidthItem(long nWidth) : |* |* XLineEndWidthItem::XLineEndWidthItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineEndWidthItem::XLineEndWidthItem(SvStream& rIn) : @@ -2803,10 +2580,6 @@ XLineEndWidthItem::XLineEndWidthItem(SvStream& rIn) : |* |* XLineEndWidthItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineEndWidthItem::Clone(SfxItemPool* /*pPool*/) const @@ -2818,10 +2591,6 @@ SfxPoolItem* XLineEndWidthItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineEndWidthItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -2855,18 +2624,18 @@ SfxItemPresentation XLineEndWidthItem::GetPresentation } } -sal_Bool XLineEndWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const +bool XLineEndWidthItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } -sal_Bool XLineEndWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) +bool XLineEndWidthItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; rVal >>= nValue; SetValue( nValue ); - return sal_True; + return true; } @@ -2879,10 +2648,6 @@ TYPEINIT1_AUTOFACTORY(XLineStartCenterItem, SfxBoolItem); |* |* XLineStartCenterItem::XLineStartCenterItem(BOOL bStartCenter) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineStartCenterItem::XLineStartCenterItem(BOOL bStartCenter) : @@ -2894,10 +2659,6 @@ XLineStartCenterItem::XLineStartCenterItem(BOOL bStartCenter) : |* |* XLineStartCenterItem::XLineStartCenterItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineStartCenterItem::XLineStartCenterItem(SvStream& rIn) : @@ -2909,10 +2670,6 @@ XLineStartCenterItem::XLineStartCenterItem(SvStream& rIn) : |* |* XLineStartCenterItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineStartCenterItem::Clone(SfxItemPool* /*pPool*/) const @@ -2925,10 +2682,6 @@ SfxPoolItem* XLineStartCenterItem::Clone(SfxItemPool* /*pPool*/) const |* SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, USHORT nVer) |* const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineStartCenterItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -2961,20 +2714,20 @@ SfxItemPresentation XLineStartCenterItem::GetPresentation } } -sal_Bool XLineStartCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const +bool XLineStartCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const { sal_Bool bValue = GetValue(); rVal.setValue( &bValue, ::getCppuBooleanType() ); - return sal_True; + return true; } -sal_Bool XLineStartCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) +bool XLineStartCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) { if( !rVal.hasValue() || rVal.getValueType() != ::getCppuBooleanType() ) - return sal_False; + return false; SetValue( *(sal_Bool*)rVal.getValue() ); - return sal_True; + return true; } @@ -2987,10 +2740,6 @@ TYPEINIT1_AUTOFACTORY(XLineEndCenterItem, SfxBoolItem); |* |* XLineEndCenterItem::XLineEndCenterItem(BOOL bEndCenter) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineEndCenterItem::XLineEndCenterItem(BOOL bEndCenter) : @@ -3002,10 +2751,6 @@ XLineEndCenterItem::XLineEndCenterItem(BOOL bEndCenter) : |* |* XLineEndCenterItem::XLineEndCenterItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XLineEndCenterItem::XLineEndCenterItem(SvStream& rIn) : @@ -3017,10 +2762,6 @@ XLineEndCenterItem::XLineEndCenterItem(SvStream& rIn) : |* |* XLineEndCenterItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineEndCenterItem::Clone(SfxItemPool* /*pPool*/) const @@ -3033,10 +2774,6 @@ SfxPoolItem* XLineEndCenterItem::Clone(SfxItemPool* /*pPool*/) const |* SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, USHORT nVer) |* const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XLineEndCenterItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -3069,20 +2806,20 @@ SfxItemPresentation XLineEndCenterItem::GetPresentation } } -sal_Bool XLineEndCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const +bool XLineEndCenterItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const { sal_Bool bValue = GetValue(); rVal.setValue( &bValue, ::getCppuBooleanType() ); - return sal_True; + return true; } -BOOL XLineEndCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) +bool XLineEndCenterItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) { if( !rVal.hasValue() || rVal.getValueType() != ::getCppuBooleanType() ) - return sal_False; + return false; SetValue( *(sal_Bool*)rVal.getValue() ); - return sal_True; + return true; } @@ -3099,10 +2836,6 @@ TYPEINIT1_AUTOFACTORY(XFillStyleItem, SfxEnumItem); |* |* XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle) : @@ -3114,10 +2847,6 @@ XFillStyleItem::XFillStyleItem(XFillStyle eFillStyle) : |* |* XFillStyleItem::XFillStyleItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillStyleItem::XFillStyleItem(SvStream& rIn) : @@ -3129,10 +2858,6 @@ XFillStyleItem::XFillStyleItem(SvStream& rIn) : |* |* XFillStyleItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 09.11.94 -|* Letzte Aenderung 09.11.94 -|* *************************************************************************/ SfxPoolItem* XFillStyleItem::Clone(SfxItemPool* /*pPool*/) const @@ -3144,10 +2869,6 @@ SfxPoolItem* XFillStyleItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XFillStyleItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -3213,17 +2934,17 @@ USHORT XFillStyleItem::GetValueCount() const } // ----------------------------------------------------------------------- -sal_Bool XFillStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const +bool XFillStyleItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const { ::com::sun::star::drawing::FillStyle eFS = (::com::sun::star::drawing::FillStyle)GetValue(); rVal <<= eFS; - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool XFillStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) +bool XFillStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) { ::com::sun::star::drawing::FillStyle eFS; if(!(rVal >>= eFS)) @@ -3231,13 +2952,13 @@ sal_Bool XFillStyleItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE // also try an int (for Basic) sal_Int32 nFS = 0; if(!(rVal >>= nFS)) - return sal_False; + return false; eFS = (::com::sun::star::drawing::FillStyle)nFS; } SetValue( sal::static_int_cast< USHORT >( eFS ) ); - return sal_True; + return true; } @@ -3250,10 +2971,6 @@ TYPEINIT1_AUTOFACTORY(XFillColorItem, XColorItem); |* |* XFillColorItem::XFillColorItem(INT32 nIndex, const Color& rTheColor) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillColorItem::XFillColorItem(INT32 nIndex, const Color& rTheColor) : @@ -3265,10 +2982,6 @@ XFillColorItem::XFillColorItem(INT32 nIndex, const Color& rTheColor) : |* |* XFillColorItem::XFillColorItem(const XubString& rName, const Color& rTheColor) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillColorItem::XFillColorItem(const XubString& rName, const Color& rTheColor) : @@ -3280,10 +2993,6 @@ XFillColorItem::XFillColorItem(const XubString& rName, const Color& rTheColor) : |* |* XFillColorItem::XFillColorItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillColorItem::XFillColorItem(SvStream& rIn) : @@ -3295,10 +3004,6 @@ XFillColorItem::XFillColorItem(SvStream& rIn) : |* |* XFillColorItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XFillColorItem::Clone(SfxItemPool* /*pPool*/) const @@ -3310,10 +3015,6 @@ SfxPoolItem* XFillColorItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFillColorItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XFillColorItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -3347,23 +3048,23 @@ SfxItemPresentation XFillColorItem::GetPresentation // ----------------------------------------------------------------------- -sal_Bool XFillColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const +bool XFillColorItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetColorValue().GetRGBColor(); - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool XFillColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) +bool XFillColorItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; if(!(rVal >>= nValue )) - return sal_False; + return false; SetColorValue( nValue ); - return sal_True; + return true; } // ----------------------------- @@ -3453,10 +3154,6 @@ XGradient::XGradient() : |* XGradient::XGradient(XGradientStyle, const Color&, const Color&, |* long, USHORT, USHORT, USHORT) |* -|* Beschreibung -|* Ersterstellung 21.11.94 -|* Letzte Aenderung 21.11.94 -|* *************************************************************************/ XGradient::XGradient(const Color& rStart, const Color& rEnd, @@ -3481,10 +3178,6 @@ XGradient::XGradient(const Color& rStart, const Color& rEnd, |* |* int XGradient::operator==(const SfxPoolItem& rItem) const |* -|* Beschreibung -|* Ersterstellung 29.11.94 -|* Letzte Aenderung 29.11.94 -|* *************************************************************************/ bool XGradient::operator==(const XGradient& rGradient) const @@ -3512,10 +3205,6 @@ TYPEINIT1_AUTOFACTORY(XFillGradientItem, NameOrIndex); |* XFillGradientItem::XFillGradientItem(INT32 nIndex, |* const XGradient& rTheGradient) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillGradientItem::XFillGradientItem(INT32 nIndex, @@ -3530,10 +3219,6 @@ XFillGradientItem::XFillGradientItem(INT32 nIndex, |* XFillGradientItem::XFillGradientItem(const XubString& rName, |* const XGradient& rTheGradient) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillGradientItem::XFillGradientItem(const XubString& rName, @@ -3547,10 +3232,6 @@ XFillGradientItem::XFillGradientItem(const XubString& rName, |* |* XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem) : @@ -3563,10 +3244,6 @@ XFillGradientItem::XFillGradientItem(const XFillGradientItem& rItem) : |* |* XFillGradientItem::XFillGradientItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillGradientItem::XFillGradientItem(SvStream& rIn, USHORT nVer) : @@ -3630,10 +3307,6 @@ XFillGradientItem::XFillGradientItem(SfxItemPool* /*pPool*/) |* |* XFillGradientItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XFillGradientItem::Clone(SfxItemPool* /*pPool*/) const @@ -3645,10 +3318,6 @@ SfxPoolItem* XFillGradientItem::Clone(SfxItemPool* /*pPool*/) const |* |* int XFillGradientItem::operator==(const SfxPoolItem& rItem) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ int XFillGradientItem::operator==(const SfxPoolItem& rItem) const @@ -3661,10 +3330,6 @@ int XFillGradientItem::operator==(const SfxPoolItem& rItem) const |* |* SfxPoolItem* XFillGradientItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XFillGradientItem::Create(SvStream& rIn, USHORT nVer) const @@ -3676,10 +3341,6 @@ SfxPoolItem* XFillGradientItem::Create(SvStream& rIn, USHORT nVer) const |* |* SfxPoolItem* XFillGradientItem::Store(SvStream& rOut) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SvStream& XFillGradientItem::Store( SvStream& rOut, USHORT nItemVersion ) const @@ -3716,10 +3377,6 @@ SvStream& XFillGradientItem::Store( SvStream& rOut, USHORT nItemVersion ) const |* const XGradient& XFillGradientItem::GetValue(const XGradientTable* pTable) |* const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ const XGradient& XFillGradientItem::GetGradientValue(const XGradientTable* pTable) const // GetValue -> GetGradientValue @@ -3735,10 +3392,6 @@ const XGradient& XFillGradientItem::GetGradientValue(const XGradientTable* pTabl |* |* USHORT XFillGradientItem::GetVersion() const |* -|* Beschreibung -|* Ersterstellung 01.11.95 -|* Letzte Aenderung 01.11.95 -|* *************************************************************************/ USHORT XFillGradientItem::GetVersion( USHORT /*nFileFormatVersion*/) const @@ -3774,7 +3427,7 @@ SfxItemPresentation XFillGradientItem::GetPresentation } // ----------------------------------------------------------------------- -sal_Bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { //sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3827,7 +3480,7 @@ sal_Bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE n rVal <<= aGradient2; break; } - + case MID_NAME: { rtl::OUString aApiName; @@ -3835,7 +3488,7 @@ sal_Bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE n rVal <<= aApiName; break; } - + case MID_GRADIENT_STYLE: rVal <<= (sal_Int16)GetGradientValue().GetGradientStyle(); break; case MID_GRADIENT_STARTCOLOR: rVal <<= (sal_Int32)GetGradientValue().GetStartColor().GetColor(); break; case MID_GRADIENT_ENDCOLOR: rVal <<= (sal_Int32)GetGradientValue().GetEndColor().GetColor(); break; @@ -3846,15 +3499,15 @@ sal_Bool XFillGradientItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE n case MID_GRADIENT_STARTINTENSITY: rVal <<= GetGradientValue().GetStartIntens(); break; case MID_GRADIENT_ENDINTENSITY: rVal <<= GetGradientValue().GetEndIntens(); break; case MID_GRADIENT_STEPCOUNT: rVal <<= GetGradientValue().GetSteps(); break; - - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + + default: DBG_ERROR("Wrong MemberId!"); return false; } - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -3900,17 +3553,17 @@ sal_Bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, BY SetGradientValue( aXGradient ); } - return sal_True; + return true; } - return sal_False; + return false; } case MID_NAME: { rtl::OUString aName; if (!(rVal >>= aName )) - return sal_False; + return false; SetName( aName ); break; } @@ -3919,7 +3572,7 @@ sal_Bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, BY { ::com::sun::star::awt::Gradient aGradient2; if(!(rVal >>= aGradient2)) - return sal_False; + return false; XGradient aXGradient; @@ -3943,10 +3596,10 @@ sal_Bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, BY { sal_Int32 nVal = 0; if(!(rVal >>= nVal )) - return sal_False; - + return false; + XGradient aXGradient = GetGradientValue(); - + if ( nMemberId == MID_GRADIENT_STARTCOLOR ) aXGradient.SetStartColor( nVal ); else @@ -3966,10 +3619,10 @@ sal_Bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, BY { sal_Int16 nVal = sal_Int16(); if(!(rVal >>= nVal )) - return sal_False; + return false; XGradient aXGradient = GetGradientValue(); - + switch ( nMemberId ) { case MID_GRADIENT_STYLE: @@ -3989,13 +3642,13 @@ sal_Bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, BY case MID_GRADIENT_YOFFSET: aXGradient.SetYOffset( nVal ); break; } - + SetGradientValue( aXGradient ); break; } } - - return sal_True; + + return true; } BOOL XFillGradientItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ) @@ -4134,14 +3787,14 @@ USHORT XFillFloatTransparenceItem::GetVersion( USHORT nFileFormatVersion ) const //------------------------------------------------------------------------ -sal_Bool XFillFloatTransparenceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool XFillFloatTransparenceItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { return XFillGradientItem::QueryValue( rVal, nMemberId ); } //------------------------------------------------------------------------ -sal_Bool XFillFloatTransparenceItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool XFillFloatTransparenceItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) { return XFillGradientItem::PutValue( rVal, nMemberId ); } @@ -4204,10 +3857,6 @@ XFillFloatTransparenceItem* XFillFloatTransparenceItem::checkForUniqueItem( SdrM |* |* XHatch::XHatch(XHatchStyle, const Color&, long, long) |* -|* Beschreibung -|* Ersterstellung 21.11.94 -|* Letzte Aenderung 21.11.94 -|* *************************************************************************/ XHatch::XHatch(const Color& rCol, XHatchStyle eTheStyle, long nTheDistance, @@ -4223,10 +3872,6 @@ XHatch::XHatch(const Color& rCol, XHatchStyle eTheStyle, long nTheDistance, |* |* int XHatch::operator==(const SfxPoolItem& rItem) const |* -|* Beschreibung -|* Ersterstellung 29.11.94 -|* Letzte Aenderung 29.11.94 -|* *************************************************************************/ bool XHatch::operator==(const XHatch& rHatch) const @@ -4248,10 +3893,6 @@ TYPEINIT1_AUTOFACTORY(XFillHatchItem, NameOrIndex); |* XFillHatchItem::XFillHatchItem(INT32 nIndex, |* const XHatch& rTheHatch) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillHatchItem::XFillHatchItem(INT32 nIndex, @@ -4266,10 +3907,6 @@ XFillHatchItem::XFillHatchItem(INT32 nIndex, |* XFillHatchItem::XFillHatchItem(const XubString& rName, |* const XHatch& rTheHatch) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillHatchItem::XFillHatchItem(const XubString& rName, @@ -4283,10 +3920,6 @@ XFillHatchItem::XFillHatchItem(const XubString& rName, |* |* XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem) : @@ -4299,10 +3932,6 @@ XFillHatchItem::XFillHatchItem(const XFillHatchItem& rItem) : |* |* XFillHatchItem::XFillHatchItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ XFillHatchItem::XFillHatchItem(SvStream& rIn) : @@ -4349,10 +3978,6 @@ XFillHatchItem::XFillHatchItem(SfxItemPool* /*pPool*/) |* |* XFillHatchItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XFillHatchItem::Clone(SfxItemPool* /*pPool*/) const @@ -4364,10 +3989,6 @@ SfxPoolItem* XFillHatchItem::Clone(SfxItemPool* /*pPool*/) const |* |* int XFillHatchItem::operator==(const SfxPoolItem& rItem) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ int XFillHatchItem::operator==(const SfxPoolItem& rItem) const @@ -4380,10 +4001,6 @@ int XFillHatchItem::operator==(const SfxPoolItem& rItem) const |* |* SfxPoolItem* XFillHatchItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SfxPoolItem* XFillHatchItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -4395,10 +4012,6 @@ SfxPoolItem* XFillHatchItem::Create(SvStream& rIn, USHORT /*nVer*/) const |* |* SfxPoolItem* XFillHatchItem::Store(SvStream& rOut) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 15.11.94 -|* *************************************************************************/ SvStream& XFillHatchItem::Store( SvStream& rOut, USHORT nItemVersion ) const @@ -4425,10 +4038,6 @@ SvStream& XFillHatchItem::Store( SvStream& rOut, USHORT nItemVersion ) const |* |* const XHatch& XFillHatchItem::GetValue(const XHatchTable* pTable) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 18.11.94 -|* *************************************************************************/ const XHatch& XFillHatchItem::GetHatchValue(const XHatchTable* pTable) const // GetValue -> GetHatchValue @@ -4465,21 +4074,21 @@ SfxItemPresentation XFillHatchItem::GetPresentation //------------------------------------------------------------------------ -FASTBOOL XFillHatchItem::HasMetrics() const +bool XFillHatchItem::HasMetrics() const { - return TRUE; + return true; } //------------------------------------------------------------------------ -FASTBOOL XFillHatchItem::ScaleMetrics(long nMul, long nDiv) +bool XFillHatchItem::ScaleMetrics(long nMul, long nDiv) { aHatch.SetDistance( ScaleMetricValue( aHatch.GetDistance(), nMul, nDiv ) ); - return TRUE; + return true; } // ----------------------------------------------------------------------- -sal_Bool XFillHatchItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool XFillHatchItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -4536,14 +4145,14 @@ sal_Bool XFillHatchItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMem case MID_HATCH_ANGLE: rVal <<= aHatch.GetAngle(); break; - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + default: DBG_ERROR("Wrong MemberId!"); return false; } - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -4579,17 +4188,17 @@ sal_Bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE aHatch.SetAngle( aUnoHatch.Angle ); } - return sal_True; + return true; } - return sal_False; + return false; } case MID_FILLHATCH: { ::com::sun::star::drawing::Hatch aUnoHatch; if(!(rVal >>= aUnoHatch)) - return sal_False; + return false; aHatch.SetHatchStyle( (XHatchStyle)aUnoHatch.Style ); aHatch.SetColor( aUnoHatch.Color ); @@ -4602,7 +4211,7 @@ sal_Bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE { rtl::OUString aName; if (!(rVal >>= aName )) - return sal_False; + return false; SetName( aName ); break; } @@ -4611,7 +4220,7 @@ sal_Bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE { sal_Int16 nVal = sal_Int16(); if (!(rVal >>= nVal )) - return sal_False; + return false; aHatch.SetHatchStyle( (XHatchStyle)nVal ); break; } @@ -4622,7 +4231,7 @@ sal_Bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE { sal_Int32 nVal = 0; if (!(rVal >>= nVal )) - return sal_False; + return false; if ( nMemberId == MID_HATCH_COLOR ) aHatch.SetColor( nVal ); @@ -4632,11 +4241,11 @@ sal_Bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE aHatch.SetAngle( nVal ); break; } - - default: DBG_ERROR("Wrong MemberId!"); return sal_False; + + default: DBG_ERROR("Wrong MemberId!"); return false; } - return sal_True; + return true; } BOOL XFillHatchItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ) @@ -4679,10 +4288,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextStyleItem, SfxEnumItem); |* |* XFormTextStyleItem::XFormTextStyleItem() |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ XFormTextStyleItem::XFormTextStyleItem(XFormTextStyle eTheStyle) : @@ -4694,10 +4299,6 @@ XFormTextStyleItem::XFormTextStyleItem(XFormTextStyle eTheStyle) : |* |* XFormTextStyleItem::XFormTextStyleItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ XFormTextStyleItem::XFormTextStyleItem(SvStream& rIn) : @@ -4709,10 +4310,6 @@ XFormTextStyleItem::XFormTextStyleItem(SvStream& rIn) : |* |* XFormTextStyleItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextStyleItem::Clone(SfxItemPool* /*pPool*/) const @@ -4724,10 +4321,6 @@ SfxPoolItem* XFormTextStyleItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFormTextStyleItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextStyleItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -4753,10 +4346,10 @@ USHORT XFormTextStyleItem::GetValueCount() const \*************************************************************************/ // #FontWork# -sal_Bool XFormTextStyleItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool XFormTextStyleItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } /************************************************************************* @@ -4766,13 +4359,13 @@ sal_Bool XFormTextStyleItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) con \*************************************************************************/ // #FontWork# -sal_Bool XFormTextStyleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool XFormTextStyleItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; rVal >>= nValue; SetValue(sal::static_int_cast< USHORT >(nValue)); - return sal_True; + return true; } //------------------------- @@ -4784,10 +4377,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextAdjustItem, SfxEnumItem); |* |* XFormTextAdjustItem::XFormTextAdjustItem() |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ XFormTextAdjustItem::XFormTextAdjustItem(XFormTextAdjust eTheAdjust) : @@ -4799,10 +4388,6 @@ XFormTextAdjustItem::XFormTextAdjustItem(XFormTextAdjust eTheAdjust) : |* |* XFormTextAdjustItem::XFormTextAdjustItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ XFormTextAdjustItem::XFormTextAdjustItem(SvStream& rIn) : @@ -4814,10 +4399,6 @@ XFormTextAdjustItem::XFormTextAdjustItem(SvStream& rIn) : |* |* XFormTextAdjustItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextAdjustItem::Clone(SfxItemPool* /*pPool*/) const @@ -4829,10 +4410,6 @@ SfxPoolItem* XFormTextAdjustItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFormTextAdjustItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextAdjustItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -4858,10 +4435,10 @@ USHORT XFormTextAdjustItem::GetValueCount() const \*************************************************************************/ // #FontWork# -sal_Bool XFormTextAdjustItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool XFormTextAdjustItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } /************************************************************************* @@ -4871,13 +4448,13 @@ sal_Bool XFormTextAdjustItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) co \*************************************************************************/ // #FontWork# -sal_Bool XFormTextAdjustItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool XFormTextAdjustItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; rVal >>= nValue; SetValue(sal::static_int_cast< USHORT >(nValue)); - return sal_True; + return true; } //---------------------------- @@ -4889,10 +4466,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextDistanceItem, SfxMetricItem); |* |* XFormTextDistanceItem::XFormTextDistanceItem() |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ XFormTextDistanceItem::XFormTextDistanceItem(long nDist) : @@ -4904,10 +4477,6 @@ XFormTextDistanceItem::XFormTextDistanceItem(long nDist) : |* |* XFormTextDistanceItem::XFormTextDistanceItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ XFormTextDistanceItem::XFormTextDistanceItem(SvStream& rIn) : @@ -4919,10 +4488,6 @@ XFormTextDistanceItem::XFormTextDistanceItem(SvStream& rIn) : |* |* XFormTextDistanceItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextDistanceItem::Clone(SfxItemPool* /*pPool*/) const @@ -4934,10 +4499,6 @@ SfxPoolItem* XFormTextDistanceItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFormTextDistanceItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextDistanceItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -4954,10 +4515,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextStartItem, SfxMetricItem); |* |* XFormTextStartItem::XFormTextStartItem(long nStart) |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ XFormTextStartItem::XFormTextStartItem(long nStart) : @@ -4969,10 +4526,6 @@ XFormTextStartItem::XFormTextStartItem(long nStart) : |* |* XFormTextStartItem::XFormTextStartItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ XFormTextStartItem::XFormTextStartItem(SvStream& rIn) : @@ -4984,10 +4537,6 @@ XFormTextStartItem::XFormTextStartItem(SvStream& rIn) : |* |* XFormTextStartItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextStartItem::Clone(SfxItemPool* /*pPool*/) const @@ -4999,10 +4548,6 @@ SfxPoolItem* XFormTextStartItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFormTextStartItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 02.02.95 ESO -|* Letzte Aenderung 02.02.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextStartItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -5019,9 +4564,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextMirrorItem, SfxBoolItem); |* |* XFormTextMirrorItem::XFormTextMirrorItem(BOOL bMirror) |* -|* Ersterstellung 06.02.95 ESO -|* Letzte Aenderung 06.02.95 ESO -|* *************************************************************************/ XFormTextMirrorItem::XFormTextMirrorItem(BOOL bMirror) : @@ -5033,9 +4575,6 @@ XFormTextMirrorItem::XFormTextMirrorItem(BOOL bMirror) : |* |* XFormTextMirrorItem::XFormTextMirrorItem(SvStream& rIn) |* -|* Ersterstellung 06.02.95 ESO -|* Letzte Aenderung 06.02.95 ESO -|* *************************************************************************/ XFormTextMirrorItem::XFormTextMirrorItem(SvStream& rIn) : @@ -5047,9 +4586,6 @@ XFormTextMirrorItem::XFormTextMirrorItem(SvStream& rIn) : |* |* XFormTextMirrorItem::Clone(SfxItemPool* pPool) const |* -|* Ersterstellung 06.02.95 ESO -|* Letzte Aenderung 06.02.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextMirrorItem::Clone(SfxItemPool* /*pPool*/) const @@ -5062,9 +4598,6 @@ SfxPoolItem* XFormTextMirrorItem::Clone(SfxItemPool* /*pPool*/) const |* SfxPoolItem* XFormTextMirrorItem::Create(SvStream& rIn, USHORT nVer) |* const |* -|* Ersterstellung 06.02.95 ESO -|* Letzte Aenderung 06.02.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextMirrorItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -5082,9 +4615,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextOutlineItem, SfxBoolItem); |* |* XFormTextOutlineItem::XFormTextOutlineItem() |* -|* Ersterstellung 27.06.95 ESO -|* Letzte Aenderung 27.06.95 ESO -|* *************************************************************************/ XFormTextOutlineItem::XFormTextOutlineItem(BOOL bOutline) : @@ -5096,9 +4626,6 @@ XFormTextOutlineItem::XFormTextOutlineItem(BOOL bOutline) : |* |* XFormTextOutlineItem::XFormTextOutlineItem(SvStream& rIn) |* -|* Ersterstellung 27.06.95 ESO -|* Letzte Aenderung 27.06.95 ESO -|* *************************************************************************/ XFormTextOutlineItem::XFormTextOutlineItem(SvStream& rIn) : @@ -5110,9 +4637,6 @@ XFormTextOutlineItem::XFormTextOutlineItem(SvStream& rIn) : |* |* XFormTextOutlineItem::Clone(SfxItemPool* pPool) const |* -|* Ersterstellung 27.06.95 ESO -|* Letzte Aenderung 27.06.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextOutlineItem::Clone(SfxItemPool* /*pPool*/) const @@ -5125,9 +4649,6 @@ SfxPoolItem* XFormTextOutlineItem::Clone(SfxItemPool* /*pPool*/) const |* SfxPoolItem* XFormTextOutlineItem::Create(SvStream& rIn, USHORT nVer) |* const |* -|* Ersterstellung 27.06.95 ESO -|* Letzte Aenderung 27.06.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextOutlineItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -5144,10 +4665,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextShadowItem, SfxEnumItem); |* |* XFormTextShadowItem::XFormTextShadowItem() |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ XFormTextShadowItem::XFormTextShadowItem(XFormTextShadow eFormTextShadow) : @@ -5160,10 +4677,6 @@ XFormTextShadowItem::XFormTextShadowItem(XFormTextShadow eFormTextShadow) : |* |* XFormTextShadowItem::XFormTextShadowItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ XFormTextShadowItem::XFormTextShadowItem(SvStream& rIn) : @@ -5175,10 +4688,6 @@ XFormTextShadowItem::XFormTextShadowItem(SvStream& rIn) : |* |* XFormTextShadowItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ SfxPoolItem* XFormTextShadowItem::Clone(SfxItemPool* /*pPool*/) const @@ -5190,10 +4699,6 @@ SfxPoolItem* XFormTextShadowItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFormTextShadowItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ SfxPoolItem* XFormTextShadowItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -5220,10 +4725,10 @@ USHORT XFormTextShadowItem::GetValueCount() const \*************************************************************************/ // #FontWork# -sal_Bool XFormTextShadowItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool XFormTextShadowItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } /************************************************************************* @@ -5233,13 +4738,13 @@ sal_Bool XFormTextShadowItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) co \*************************************************************************/ // #FontWork# -sal_Bool XFormTextShadowItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool XFormTextShadowItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; rVal >>= nValue; SetValue(sal::static_int_cast< USHORT >(nValue)); - return sal_True; + return true; } // ------------------------------- @@ -5251,10 +4756,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextShadowColorItem, XColorItem); |* |* XFormTextShadowColorItem::XFormTextShadowColorItem() |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ XFormTextShadowColorItem::XFormTextShadowColorItem(INT32 nIndex, @@ -5267,10 +4768,6 @@ XFormTextShadowColorItem::XFormTextShadowColorItem(INT32 nIndex, |* |* XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName, const Color& rTheColor) |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName, @@ -5283,10 +4780,6 @@ XFormTextShadowColorItem::XFormTextShadowColorItem(const XubString& rName, |* |* XFormTextShadowColorItem::XFormTextShadowColorItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ XFormTextShadowColorItem::XFormTextShadowColorItem(SvStream& rIn) : @@ -5298,10 +4791,6 @@ XFormTextShadowColorItem::XFormTextShadowColorItem(SvStream& rIn) : |* |* XFormTextShadowColorItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ SfxPoolItem* XFormTextShadowColorItem::Clone(SfxItemPool* /*pPool*/) const @@ -5313,10 +4802,6 @@ SfxPoolItem* XFormTextShadowColorItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFormTextShadowColorItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ SfxPoolItem* XFormTextShadowColorItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -5333,10 +4818,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextShadowXValItem, SfxMetricItem); |* |* XFormTextShadowXValItem::XFormTextShadowXValItem(long) |* -|* Beschreibung -|* Ersterstellung 28.06.95 ESO -|* Letzte Aenderung 28.06.95 ESO -|* *************************************************************************/ XFormTextShadowXValItem::XFormTextShadowXValItem(long nVal) : @@ -5348,10 +4829,6 @@ XFormTextShadowXValItem::XFormTextShadowXValItem(long nVal) : |* |* XFormTextShadowXValItem::XFormTextShadowXValItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 28.06.95 ESO -|* Letzte Aenderung 28.06.95 ESO -|* *************************************************************************/ XFormTextShadowXValItem::XFormTextShadowXValItem(SvStream& rIn) : @@ -5363,10 +4840,6 @@ XFormTextShadowXValItem::XFormTextShadowXValItem(SvStream& rIn) : |* |* XFormTextShadowXValItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 28.06.95 ESO -|* Letzte Aenderung 28.06.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextShadowXValItem::Clone(SfxItemPool* /*pPool*/) const @@ -5378,10 +4851,6 @@ SfxPoolItem* XFormTextShadowXValItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFormTextShadowXValItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 28.06.95 ESO -|* Letzte Aenderung 28.06.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextShadowXValItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -5398,10 +4867,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextShadowYValItem, SfxMetricItem); |* |* XFormTextShadowYValItem::XFormTextShadowYValItem(long) |* -|* Beschreibung -|* Ersterstellung 28.06.95 ESO -|* Letzte Aenderung 28.06.95 ESO -|* *************************************************************************/ XFormTextShadowYValItem::XFormTextShadowYValItem(long nVal) : @@ -5413,10 +4878,6 @@ XFormTextShadowYValItem::XFormTextShadowYValItem(long nVal) : |* |* XFormTextShadowYValItem::XFormTextShadowYValItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 28.06.95 ESO -|* Letzte Aenderung 28.06.95 ESO -|* *************************************************************************/ XFormTextShadowYValItem::XFormTextShadowYValItem(SvStream& rIn) : @@ -5428,10 +4889,6 @@ XFormTextShadowYValItem::XFormTextShadowYValItem(SvStream& rIn) : |* |* XFormTextShadowYValItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 28.06.95 ESO -|* Letzte Aenderung 28.06.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextShadowYValItem::Clone(SfxItemPool* /*pPool*/) const @@ -5443,10 +4900,6 @@ SfxPoolItem* XFormTextShadowYValItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFormTextShadowYValItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 28.06.95 ESO -|* Letzte Aenderung 28.06.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextShadowYValItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -5463,10 +4916,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextStdFormItem, SfxEnumItem); |* |* XFormTextStdFormItem::XFormTextStdFormItem() |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ XFormTextStdFormItem::XFormTextStdFormItem(XFormTextStdForm eFormTextStdForm) : @@ -5479,10 +4928,6 @@ XFormTextStdFormItem::XFormTextStdFormItem(XFormTextStdForm eFormTextStdForm) : |* |* XFormTextStdFormItem::XFormTextStdFormItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ XFormTextStdFormItem::XFormTextStdFormItem(SvStream& rIn) : @@ -5494,10 +4939,6 @@ XFormTextStdFormItem::XFormTextStdFormItem(SvStream& rIn) : |* |* XFormTextStdFormItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ SfxPoolItem* XFormTextStdFormItem::Clone(SfxItemPool* /*pPool*/) const @@ -5509,10 +4950,6 @@ SfxPoolItem* XFormTextStdFormItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFormTextStdFormItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 27.06.95 -|* Letzte Aenderung 27.06.95 -|* *************************************************************************/ SfxPoolItem* XFormTextStdFormItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -5539,10 +4976,10 @@ USHORT XFormTextStdFormItem::GetValueCount() const \*************************************************************************/ // #FontWork# -sal_Bool XFormTextStdFormItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const +bool XFormTextStdFormItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) const { rVal <<= (sal_Int32)GetValue(); - return sal_True; + return true; } /************************************************************************* @@ -5552,13 +4989,13 @@ sal_Bool XFormTextStdFormItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/) c \*************************************************************************/ // #FontWork# -sal_Bool XFormTextStdFormItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) +bool XFormTextStdFormItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/) { sal_Int32 nValue = 0; rVal >>= nValue; SetValue(sal::static_int_cast< USHORT >(nValue)); - return sal_True; + return true; } // -------------------------- @@ -5570,9 +5007,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextHideFormItem, SfxBoolItem); |* |* XFormTextHideFormItem::XFormTextHideFormItem() |* -|* Ersterstellung 27.06.95 ESO -|* Letzte Aenderung 27.06.95 ESO -|* *************************************************************************/ XFormTextHideFormItem::XFormTextHideFormItem(BOOL bHide) : @@ -5584,9 +5018,6 @@ XFormTextHideFormItem::XFormTextHideFormItem(BOOL bHide) : |* |* XFormTextHideFormItem::XFormTextHideFormItem(SvStream& rIn) |* -|* Ersterstellung 27.06.95 ESO -|* Letzte Aenderung 27.06.95 ESO -|* *************************************************************************/ XFormTextHideFormItem::XFormTextHideFormItem(SvStream& rIn) : @@ -5598,9 +5029,6 @@ XFormTextHideFormItem::XFormTextHideFormItem(SvStream& rIn) : |* |* XFormTextHideFormItem::Clone(SfxItemPool* pPool) const |* -|* Ersterstellung 27.06.95 ESO -|* Letzte Aenderung 27.06.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextHideFormItem::Clone(SfxItemPool* /*pPool*/) const @@ -5613,9 +5041,6 @@ SfxPoolItem* XFormTextHideFormItem::Clone(SfxItemPool* /*pPool*/) const |* SfxPoolItem* XFormTextHideFormItem::Create(SvStream& rIn, USHORT nVer) |* const |* -|* Ersterstellung 27.06.95 ESO -|* Letzte Aenderung 27.06.95 ESO -|* *************************************************************************/ SfxPoolItem* XFormTextHideFormItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -5776,3 +5201,4 @@ SvStream& XFillAttrSetItem::Store( SvStream& rStream, USHORT nItemVersion ) cons // eof +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index 36c42ee191..fe303bed81 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,10 +55,6 @@ TYPEINIT1_AUTOFACTORY(XLineTransparenceItem, SfxUInt16Item); |* |* XLineTransparenceItem::XLineTransparenceItem(USHORT) |* -|* Beschreibung -|* Ersterstellung 07.11.95 KA -|* Letzte Aenderung 07.11.95 KA -|* *************************************************************************/ XLineTransparenceItem::XLineTransparenceItem(USHORT nLineTransparence) : @@ -69,10 +66,6 @@ XLineTransparenceItem::XLineTransparenceItem(USHORT nLineTransparence) : |* |* XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 07.11.95 KA -|* Letzte Aenderung 07.11.95 KA -|* *************************************************************************/ XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn) : @@ -84,10 +77,6 @@ XLineTransparenceItem::XLineTransparenceItem(SvStream& rIn) : |* |* XLineTransparenceItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 07.11.95 KA -|* Letzte Aenderung 07.11.95 KA -|* *************************************************************************/ SfxPoolItem* XLineTransparenceItem::Clone(SfxItemPool* /*pPool*/) const @@ -99,10 +88,6 @@ SfxPoolItem* XLineTransparenceItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XLineTransparenceItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 07.11.95 KA -|* Letzte Aenderung 07.11.95 KA -|* *************************************************************************/ SfxPoolItem* XLineTransparenceItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -238,7 +223,7 @@ SfxItemPresentation XLineJointItem::GetPresentation( SfxItemPresentation ePres, // ----------------------------------------------------------------------------- -sal_Bool XLineJointItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const +bool XLineJointItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) const { ::com::sun::star::drawing::LineJoint eJoint = ::com::sun::star::drawing::LineJoint_NONE; @@ -263,12 +248,12 @@ sal_Bool XLineJointItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE /*nM } rVal <<= eJoint; - return sal_True; + return true; } // ----------------------------------------------------------------------------- -BOOL XLineJointItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) +bool XLineJointItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/) { XLineJoint eJoint = XLINEJOINT_NONE; ::com::sun::star::drawing::LineJoint eUnoJoint; @@ -278,7 +263,7 @@ BOOL XLineJointItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nM // also try an int (for Basic) sal_Int32 nLJ = 0; if(!(rVal >>= nLJ)) - return sal_False; + return false; eUnoJoint = (::com::sun::star::drawing::LineJoint)nLJ; } @@ -302,7 +287,7 @@ BOOL XLineJointItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nM SetValue( sal::static_int_cast< USHORT >( eJoint ) ); - return sal_True; + return true; } // ----------------------------------------------------------------------------- @@ -322,10 +307,6 @@ TYPEINIT1_AUTOFACTORY(XFillTransparenceItem, SfxUInt16Item); |* |* XFillTransparenceItem::XFillTransparenceItem(USHORT) |* -|* Beschreibung -|* Ersterstellung 07.11.95 KA -|* Letzte Aenderung 07.11.95 KA -|* *************************************************************************/ XFillTransparenceItem::XFillTransparenceItem(USHORT nFillTransparence) : @@ -337,10 +318,6 @@ XFillTransparenceItem::XFillTransparenceItem(USHORT nFillTransparence) : |* |* XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 07.11.95 KA -|* Letzte Aenderung 07.11.95 KA -|* *************************************************************************/ XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn) : @@ -352,10 +329,6 @@ XFillTransparenceItem::XFillTransparenceItem(SvStream& rIn) : |* |* XFillTransparenceItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 07.11.95 KA -|* Letzte Aenderung 07.11.95 KA -|* *************************************************************************/ SfxPoolItem* XFillTransparenceItem::Clone(SfxItemPool* /*pPool*/) const @@ -367,10 +340,6 @@ SfxPoolItem* XFillTransparenceItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFillTransparenceItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 07.11.95 KA -|* Letzte Aenderung 07.11.95 KA -|* *************************************************************************/ SfxPoolItem* XFillTransparenceItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -415,10 +384,6 @@ TYPEINIT1_AUTOFACTORY(XFormTextShadowTranspItem, SfxUInt16Item); |* |* XFormTextShadowTranspItem::XFormTextShadowTranspItem(USHORT) |* -|* Beschreibung -|* Ersterstellung 09.11.95 KA -|* Letzte Aenderung 09.11.95 KA -|* *************************************************************************/ XFormTextShadowTranspItem::XFormTextShadowTranspItem(USHORT nShdwTransparence) : @@ -430,10 +395,6 @@ XFormTextShadowTranspItem::XFormTextShadowTranspItem(USHORT nShdwTransparence) : |* |* XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 09.11.95 KA -|* Letzte Aenderung 09.11.95 KA -|* *************************************************************************/ XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn) : @@ -445,10 +406,6 @@ XFormTextShadowTranspItem::XFormTextShadowTranspItem(SvStream& rIn) : |* |* XFormTextShadowTranspItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 09.11.95 KA -|* Letzte Aenderung 09.11.95 KA -|* *************************************************************************/ SfxPoolItem* XFormTextShadowTranspItem::Clone(SfxItemPool* /*pPool*/) const @@ -460,10 +417,6 @@ SfxPoolItem* XFormTextShadowTranspItem::Clone(SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFormTextShadowTranspItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 09.11.95 KA -|* Letzte Aenderung 09.11.95 KA -|* *************************************************************************/ SfxPoolItem* XFormTextShadowTranspItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -481,10 +434,6 @@ TYPEINIT1_AUTOFACTORY(XGradientStepCountItem, SfxUInt16Item); |* |* XGradientStepCountItem::XGradientStepCountItem( USHORT ) |* -|* Beschreibung -|* Ersterstellung 23.01.96 KA -|* Letzte Aenderung 23.01.96 KA -|* *************************************************************************/ XGradientStepCountItem::XGradientStepCountItem( USHORT nStepCount ) : @@ -496,10 +445,6 @@ XGradientStepCountItem::XGradientStepCountItem( USHORT nStepCount ) : |* |* XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn ) |* -|* Beschreibung -|* Ersterstellung 23.01.96 KA -|* Letzte Aenderung 23.01.96 KA -|* *************************************************************************/ XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn ) : @@ -511,10 +456,6 @@ XGradientStepCountItem::XGradientStepCountItem( SvStream& rIn ) : |* |* XGradientStepCountItem::Clone( SfxItemPool* pPool ) const |* -|* Beschreibung -|* Ersterstellung 23.01.96 KA -|* Letzte Aenderung 23.01.96 KA -|* *************************************************************************/ SfxPoolItem* XGradientStepCountItem::Clone( SfxItemPool* /*pPool*/) const @@ -526,10 +467,6 @@ SfxPoolItem* XGradientStepCountItem::Clone( SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 23.01.96 KA -|* Letzte Aenderung 23.01.96 KA -|* *************************************************************************/ SfxPoolItem* XGradientStepCountItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -570,80 +507,26 @@ SfxItemPresentation XGradientStepCountItem::GetPresentation //------------------------------ TYPEINIT1_AUTOFACTORY( XFillBmpTileItem, SfxBoolItem ); -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpTileItem::XFillBmpTileItem( BOOL bTile ) : SfxBoolItem( XATTR_FILLBMP_TILE, bTile ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpTileItem::XFillBmpTileItem( SvStream& rIn ) : SfxBoolItem( XATTR_FILLBMP_TILE, rIn ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpTileItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillBmpTileItem( *this ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpTileItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new XFillBmpTileItem( rIn ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxItemPresentation XFillBmpTileItem::GetPresentation ( SfxItemPresentation ePres, @@ -672,80 +555,26 @@ SfxItemPresentation XFillBmpTileItem::GetPresentation //------------------------------ TYPEINIT1_AUTOFACTORY( XFillBmpPosItem, SfxEnumItem ); -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpPosItem::XFillBmpPosItem( RECT_POINT eRP ) : SfxEnumItem( XATTR_FILLBMP_POS, sal::static_int_cast< USHORT >( eRP ) ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpPosItem::XFillBmpPosItem( SvStream& rIn ) : SfxEnumItem( XATTR_FILLBMP_POS, rIn ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpPosItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillBmpPosItem( *this ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpPosItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new XFillBmpPosItem( rIn ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxItemPresentation XFillBmpPosItem::GetPresentation ( SfxItemPresentation ePres, @@ -768,12 +597,6 @@ SfxItemPresentation XFillBmpPosItem::GetPresentation } } -/****************************************************************************** -|* -|* -|* -\******************************************************************************/ - USHORT XFillBmpPosItem::GetValueCount() const { return 9; @@ -785,80 +608,26 @@ USHORT XFillBmpPosItem::GetValueCount() const //------------------------------ TYPEINIT1_AUTOFACTORY( XFillBmpSizeXItem, SfxMetricItem ); -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpSizeXItem::XFillBmpSizeXItem( long nSizeX ) : SfxMetricItem( XATTR_FILLBMP_SIZEX, nSizeX ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpSizeXItem::XFillBmpSizeXItem( SvStream& rIn ) : SfxMetricItem( XATTR_FILLBMP_SIZEX, rIn ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpSizeXItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillBmpSizeXItem( *this ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpSizeXItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new XFillBmpSizeXItem( rIn ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxItemPresentation XFillBmpSizeXItem::GetPresentation ( SfxItemPresentation ePres, @@ -881,16 +650,7 @@ SfxItemPresentation XFillBmpSizeXItem::GetPresentation } } - -/************************************************************************* -|* -|* Beschreibung -|* Ersterstellung 05.11.96 KA -|* Letzte Aenderung 05.11.96 KA -|* -\*************************************************************************/ - -FASTBOOL XFillBmpSizeXItem::HasMetrics() const +bool XFillBmpSizeXItem::HasMetrics() const { return GetValue() > 0L; } @@ -901,80 +661,26 @@ FASTBOOL XFillBmpSizeXItem::HasMetrics() const //------------------------------ TYPEINIT1_AUTOFACTORY( XFillBmpSizeYItem, SfxMetricItem ); -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpSizeYItem::XFillBmpSizeYItem( long nSizeY ) : SfxMetricItem( XATTR_FILLBMP_SIZEY, nSizeY ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpSizeYItem::XFillBmpSizeYItem( SvStream& rIn ) : SfxMetricItem( XATTR_FILLBMP_SIZEY, rIn ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpSizeYItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillBmpSizeYItem( *this ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpSizeYItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new XFillBmpSizeYItem( rIn ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxItemPresentation XFillBmpSizeYItem::GetPresentation ( SfxItemPresentation ePres, @@ -1000,13 +706,9 @@ SfxItemPresentation XFillBmpSizeYItem::GetPresentation /************************************************************************* |* -|* Beschreibung -|* Ersterstellung 05.11.96 KA -|* Letzte Aenderung 05.11.96 KA -|* \*************************************************************************/ -FASTBOOL XFillBmpSizeYItem::HasMetrics() const +bool XFillBmpSizeYItem::HasMetrics() const { return GetValue() > 0L; } @@ -1017,80 +719,26 @@ FASTBOOL XFillBmpSizeYItem::HasMetrics() const //------------------------------ TYPEINIT1_AUTOFACTORY( XFillBmpSizeLogItem, SfxBoolItem ); -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpSizeLogItem::XFillBmpSizeLogItem( BOOL bLog ) : SfxBoolItem( XATTR_FILLBMP_SIZELOG, bLog ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpSizeLogItem::XFillBmpSizeLogItem( SvStream& rIn ) : SfxBoolItem( XATTR_FILLBMP_SIZELOG, rIn ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpSizeLogItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillBmpSizeLogItem( *this ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpSizeLogItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new XFillBmpSizeLogItem( rIn ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxItemPresentation XFillBmpSizeLogItem::GetPresentation ( SfxItemPresentation ePres, @@ -1119,80 +767,26 @@ SfxItemPresentation XFillBmpSizeLogItem::GetPresentation //------------------------------ TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetXItem, SfxUInt16Item ); -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( USHORT nOffX ) : SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX, nOffX ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpTileOffsetXItem::XFillBmpTileOffsetXItem( SvStream& rIn ) : SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETX, rIn ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpTileOffsetXItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillBmpTileOffsetXItem( *this ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpTileOffsetXItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new XFillBmpTileOffsetXItem( rIn ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxItemPresentation XFillBmpTileOffsetXItem::GetPresentation ( SfxItemPresentation ePres, @@ -1221,80 +815,26 @@ SfxItemPresentation XFillBmpTileOffsetXItem::GetPresentation //------------------------------ TYPEINIT1_AUTOFACTORY( XFillBmpTileOffsetYItem, SfxUInt16Item ); -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( USHORT nOffY ) : SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY, nOffY ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpTileOffsetYItem::XFillBmpTileOffsetYItem( SvStream& rIn ) : SfxUInt16Item( XATTR_FILLBMP_TILEOFFSETY, rIn ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpTileOffsetYItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillBmpTileOffsetYItem( *this ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpTileOffsetYItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new XFillBmpTileOffsetYItem( rIn ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxItemPresentation XFillBmpTileOffsetYItem::GetPresentation ( SfxItemPresentation ePres, @@ -1323,80 +863,26 @@ SfxItemPresentation XFillBmpTileOffsetYItem::GetPresentation //------------------------------ TYPEINIT1_AUTOFACTORY( XFillBmpStretchItem, SfxBoolItem ); -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpStretchItem::XFillBmpStretchItem( BOOL bStretch ) : SfxBoolItem( XATTR_FILLBMP_STRETCH, bStretch ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - XFillBmpStretchItem::XFillBmpStretchItem( SvStream& rIn ) : SfxBoolItem( XATTR_FILLBMP_STRETCH, rIn ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpStretchItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillBmpStretchItem( *this ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxPoolItem* XFillBmpStretchItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new XFillBmpStretchItem( rIn ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung 28.02.96 KA -|* Letzte Aenderung 28.02.96 KA -|* -*************************************************************************/ - SfxItemPresentation XFillBmpStretchItem::GetPresentation ( SfxItemPresentation ePres, @@ -1425,80 +911,26 @@ SfxItemPresentation XFillBmpStretchItem::GetPresentation //------------------------------ TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetXItem, SfxUInt16Item ); -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung KA 29.04.96 -|* Letzte Aenderung KA 29.04.96 -|* -*************************************************************************/ - XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( USHORT nOffPosX ) : SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, nOffPosX ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung KA 29.04.96 -|* Letzte Aenderung KA 29.04.96 -|* -*************************************************************************/ - XFillBmpPosOffsetXItem::XFillBmpPosOffsetXItem( SvStream& rIn ) : SfxUInt16Item( XATTR_FILLBMP_POSOFFSETX, rIn ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung KA 29.04.96 -|* Letzte Aenderung KA 29.04.96 -|* -*************************************************************************/ - SfxPoolItem* XFillBmpPosOffsetXItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillBmpPosOffsetXItem( *this ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung KA 29.04.96 -|* Letzte Aenderung KA 29.04.96 -|* -*************************************************************************/ - SfxPoolItem* XFillBmpPosOffsetXItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new XFillBmpPosOffsetXItem( rIn ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung KA 29.04.96 -|* Letzte Aenderung KA 29.04.96 -|* -*************************************************************************/ - SfxItemPresentation XFillBmpPosOffsetXItem::GetPresentation ( SfxItemPresentation ePres, @@ -1527,80 +959,26 @@ SfxItemPresentation XFillBmpPosOffsetXItem::GetPresentation //------------------------------ TYPEINIT1_AUTOFACTORY( XFillBmpPosOffsetYItem, SfxUInt16Item ); -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung KA 29.04.96 -|* Letzte Aenderung KA 29.04.96 -|* -*************************************************************************/ - XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( USHORT nOffPosY ) : SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, nOffPosY ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung KA 29.04.96 -|* Letzte Aenderung KA 29.04.96 -|* -*************************************************************************/ - XFillBmpPosOffsetYItem::XFillBmpPosOffsetYItem( SvStream& rIn ) : SfxUInt16Item( XATTR_FILLBMP_POSOFFSETY, rIn ) { } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung KA 29.04.96 -|* Letzte Aenderung KA 29.04.96 -|* -*************************************************************************/ - SfxPoolItem* XFillBmpPosOffsetYItem::Clone( SfxItemPool* /*pPool*/) const { return new XFillBmpPosOffsetYItem( *this ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung KA 29.04.96 -|* Letzte Aenderung KA 29.04.96 -|* -*************************************************************************/ - SfxPoolItem* XFillBmpPosOffsetYItem::Create( SvStream& rIn, USHORT /*nVer*/) const { return new XFillBmpPosOffsetYItem( rIn ); } - -/************************************************************************* -|* -|* -|* -|* Beschreibung -|* Ersterstellung KA 29.04.96 -|* Letzte Aenderung KA 29.04.96 -|* -*************************************************************************/ - SfxItemPresentation XFillBmpPosOffsetYItem::GetPresentation ( SfxItemPresentation ePres, @@ -1632,10 +1010,6 @@ TYPEINIT1_AUTOFACTORY(XFillBackgroundItem, SfxBoolItem); |* |* XFillBackgroundItem::XFillBackgroundItem( BOOL ) |* -|* Beschreibung -|* Ersterstellung 19.11.96 KA -|* Letzte Aenderung -|* *************************************************************************/ XFillBackgroundItem::XFillBackgroundItem( BOOL bFill ) : @@ -1647,10 +1021,6 @@ XFillBackgroundItem::XFillBackgroundItem( BOOL bFill ) : |* |* XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn ) |* -|* Beschreibung -|* Ersterstellung 23.01.96 KA -|* Letzte Aenderung 23.01.96 KA -|* *************************************************************************/ XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn ) : @@ -1662,10 +1032,6 @@ XFillBackgroundItem::XFillBackgroundItem( SvStream& rIn ) : |* |* XFillBackgroundItem::Clone( SfxItemPool* pPool ) const |* -|* Beschreibung -|* Ersterstellung 23.01.96 KA -|* Letzte Aenderung 23.01.96 KA -|* *************************************************************************/ SfxPoolItem* XFillBackgroundItem::Clone( SfxItemPool* /*pPool*/) const @@ -1677,10 +1043,6 @@ SfxPoolItem* XFillBackgroundItem::Clone( SfxItemPool* /*pPool*/) const |* |* SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 23.01.96 KA -|* Letzte Aenderung 23.01.96 KA -|* *************************************************************************/ SfxPoolItem* XFillBackgroundItem::Create(SvStream& rIn, USHORT /*nVer*/) const @@ -1710,3 +1072,4 @@ SfxItemPresentation XFillBackgroundItem::GetPresentation( SfxItemPresentation eP +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index a075419bda..0a1f1cc7a0 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60,10 +61,6 @@ using namespace ::com::sun::star; |* |* XOBitmap::XOBitmap() |* -|* Beschreibung -|* Ersterstellung 27.07.95 -|* Letzte Aenderung 27.07.95 -|* *************************************************************************/ XOBitmap::XOBitmap() : @@ -78,10 +75,6 @@ XOBitmap::XOBitmap() : |* |* XOBitmap::XOBitmap( Bitmap aBitmap, XBitmapStyle eStyle = XBITMAP_TILE ) |* -|* Beschreibung -|* Ersterstellung 26.07.95 -|* Letzte Aenderung 26.07.95 -|* *************************************************************************/ XOBitmap::XOBitmap( const Bitmap& rBmp, XBitmapStyle eInStyle ) : @@ -97,10 +90,6 @@ XOBitmap::XOBitmap( const Bitmap& rBmp, XBitmapStyle eInStyle ) : |* |* XOBitmap::XOBitmap( Bitmap aBitmap, XBitmapStyle eStyle = XBITMAP_TILE ) |* -|* Beschreibung -|* Ersterstellung 26.07.95 -|* Letzte Aenderung 26.07.95 -|* *************************************************************************/ XOBitmap::XOBitmap( const GraphicObject& rGraphicObject, XBitmapStyle eInStyle ) : @@ -118,10 +107,6 @@ XOBitmap::XOBitmap( const GraphicObject& rGraphicObject, XBitmapStyle eInStyle ) |* const Color& aBckgrColor, const Size& rSize = Size( 8, 8 ), |* XBitmapStyle eStyle = XBITMAP_TILE ) |* -|* Beschreibung -|* Ersterstellung 26.07.95 -|* Letzte Aenderung 26.07.95 -|* *************************************************************************/ XOBitmap::XOBitmap( const USHORT* pArray, const Color& rPixelColor, @@ -153,10 +138,6 @@ XOBitmap::XOBitmap( const USHORT* pArray, const Color& rPixelColor, |* |* XOBitmap::XOBitmap( const XOBitmap& rXBmp ) |* -|* Beschreibung -|* Ersterstellung 27.07.95 -|* Letzte Aenderung 27.07.95 -|* *************************************************************************/ XOBitmap::XOBitmap( const XOBitmap& rXBmp ) : @@ -186,10 +167,6 @@ XOBitmap::XOBitmap( const XOBitmap& rXBmp ) : |* |* XOBitmap::XOBitmap( Bitmap aBitmap, XBitmapStyle eStyle = XBITMAP_TILE ) |* -|* Beschreibung -|* Ersterstellung 26.07.95 -|* Letzte Aenderung 26.07.95 -|* *************************************************************************/ XOBitmap::~XOBitmap() @@ -202,10 +179,6 @@ XOBitmap::~XOBitmap() |* |* XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp ) |* -|* Beschreibung -|* Ersterstellung 27.07.95 -|* Letzte Aenderung 27.07.95 -|* *************************************************************************/ XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp ) @@ -235,10 +208,6 @@ XOBitmap& XOBitmap::operator=( const XOBitmap& rXBmp ) |* |* int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const |* -|* Beschreibung -|* Ersterstellung 26.07.95 -|* Letzte Aenderung 26.07.95 -|* *************************************************************************/ int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const @@ -270,10 +239,6 @@ int XOBitmap::operator==( const XOBitmap& rXOBitmap ) const |* |* void SetPixelArray( const USHORT* pArray ) |* -|* Beschreibung -|* Ersterstellung 27.07.95 -|* Letzte Aenderung 27.07.95 -|* *************************************************************************/ void XOBitmap::SetPixelArray( const USHORT* pArray ) @@ -300,10 +265,6 @@ void XOBitmap::SetPixelArray( const USHORT* pArray ) |* |* Bitmap XOBitmap::GetBitmap() |* -|* Beschreibung -|* Ersterstellung 26.07.95 -|* Letzte Aenderung 26.07.95 -|* *************************************************************************/ Bitmap XOBitmap::GetBitmap() const @@ -315,10 +276,6 @@ Bitmap XOBitmap::GetBitmap() const |* |* Bitmap XOBitmap::GetGraphicObject() |* -|* Beschreibung -|* Ersterstellung -|* Letzte Aenderung -|* *************************************************************************/ const GraphicObject& XOBitmap::GetGraphicObject() const @@ -335,8 +292,6 @@ const GraphicObject& XOBitmap::GetGraphicObject() const |* |* Beschreibung Umwandlung der Bitmap in Array, Hinter- u. |* Vordergrundfarbe -|* Ersterstellung 27.07.95 -|* Letzte Aenderung 27.07.95 |* *************************************************************************/ @@ -381,8 +336,6 @@ void XOBitmap::Bitmap2Array() |* |* Beschreibung Umwandlung des Arrays, Hinter- u. |* Vordergrundfarbe in eine Bitmap -|* Ersterstellung 27.07.95 -|* Letzte Aenderung 27.07.95 |* *************************************************************************/ @@ -422,10 +375,6 @@ TYPEINIT1_AUTOFACTORY(XFillBitmapItem, NameOrIndex); |* XFillBitmapItem::XFillBitmapItem(long nIndex, |* const Bitmap& rTheBitmap) |* -|* Beschreibung -|* Ersterstellung 17.11.94 -|* Letzte Aenderung 17.11.94 -|* *************************************************************************/ XFillBitmapItem::XFillBitmapItem(long nIndex, @@ -440,10 +389,6 @@ XFillBitmapItem::XFillBitmapItem(long nIndex, |* XFillBitmapItem::XFillBitmapItem(const XubString& rName, |* const Bitmap& rTheBitmap) |* -|* Beschreibung -|* Ersterstellung 17.11.94 -|* Letzte Aenderung 17.11.94 -|* *************************************************************************/ XFillBitmapItem::XFillBitmapItem(const XubString& rName, @@ -457,10 +402,6 @@ XFillBitmapItem::XFillBitmapItem(const XubString& rName, |* |* XFillBitmapItem::XFillBitmapItem(const XFillBitmapItem& rItem) |* -|* Beschreibung -|* Ersterstellung 17.11.94 -|* Letzte Aenderung 17.11.94 -|* *************************************************************************/ XFillBitmapItem::XFillBitmapItem(const XFillBitmapItem& rItem) : @@ -473,10 +414,6 @@ XFillBitmapItem::XFillBitmapItem(const XFillBitmapItem& rItem) : |* |* XFillBitmapItem::XFillBitmapItem(SvStream& rIn) |* -|* Beschreibung -|* Ersterstellung 17.11.94 -|* Letzte Aenderung 26.07.94 -|* *************************************************************************/ XFillBitmapItem::XFillBitmapItem( SvStream& rIn, USHORT nVer ) : @@ -562,10 +499,6 @@ XFillBitmapItem::XFillBitmapItem( SfxItemPool* /*pPool*/) |* |* XFillBitmapItem::Clone(SfxItemPool* pPool) const |* -|* Beschreibung -|* Ersterstellung 17.11.94 -|* Letzte Aenderung 17.11.94 -|* *************************************************************************/ SfxPoolItem* XFillBitmapItem::Clone(SfxItemPool* /*pPool*/) const @@ -577,10 +510,6 @@ SfxPoolItem* XFillBitmapItem::Clone(SfxItemPool* /*pPool*/) const |* |* int XFillBitmapItem::operator==(const SfxPoolItem& rItem) const |* -|* Beschreibung -|* Ersterstellung 17.11.94 -|* Letzte Aenderung 26.07.95 -|* *************************************************************************/ int XFillBitmapItem::operator==(const SfxPoolItem& rItem) const @@ -593,10 +522,6 @@ int XFillBitmapItem::operator==(const SfxPoolItem& rItem) const |* |* SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const |* -|* Beschreibung -|* Ersterstellung 17.11.94 -|* Letzte Aenderung 17.11.94 -|* *************************************************************************/ SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const @@ -608,10 +533,6 @@ SfxPoolItem* XFillBitmapItem::Create(SvStream& rIn, USHORT nVer) const |* |* SfxPoolItem* XFillBitmapItem::Store(SvStream& rOut) const |* -|* Beschreibung -|* Ersterstellung 17.11.94 -|* Letzte Aenderung 26.07.94 -|* *************************************************************************/ SvStream& XFillBitmapItem::Store( SvStream& rOut, USHORT nItemVersion ) const @@ -659,10 +580,6 @@ SvStream& XFillBitmapItem::Store( SvStream& rOut, USHORT nItemVersion ) const |* |* const Bitmap& XFillBitmapItem::GetValue(const XBitmapTable* pTable) const |* -|* Beschreibung -|* Ersterstellung 15.11.94 -|* Letzte Aenderung 26.07.94 -|* *************************************************************************/ const XOBitmap& XFillBitmapItem::GetBitmapValue(const XBitmapTable* pTable) const // GetValue -> GetBitmapValue @@ -678,10 +595,6 @@ const XOBitmap& XFillBitmapItem::GetBitmapValue(const XBitmapTable* pTable) cons |* |* USHORT XFillBitmapItem::GetVersion() const |* -|* Beschreibung -|* Ersterstellung 26.07.95 -|* Letzte Aenderung 26.07.95 -|* *************************************************************************/ USHORT XFillBitmapItem::GetVersion( USHORT /*nFileFormatVersion*/) const @@ -716,7 +629,7 @@ SfxItemPresentation XFillBitmapItem::GetPresentation //------------------------------------------------------------------------ -sal_Bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const +bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) const { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -777,12 +690,12 @@ sal_Bool XFillBitmapItem::QueryValue( ::com::sun::star::uno::Any& rVal, BYTE nMe rVal <<= aPropSeq; } - return sal_True; + return true; } //------------------------------------------------------------------------ -sal_Bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) +bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE nMemberId ) { // sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); nMemberId &= ~CONVERT_TWIPS; @@ -892,3 +805,5 @@ XFillBitmapItem* XFillBitmapItem::checkForUniqueItem( SdrModel* pModel ) const return (XFillBitmapItem*)this; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xexch.cxx b/svx/source/xoutdev/xexch.cxx index 37864850c7..6be2ac1430 100644 --- a/svx/source/xoutdev/xexch.cxx +++ b/svx/source/xoutdev/xexch.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -202,3 +203,5 @@ XFillExchangeData& XFillExchangeData::operator=( const XFillExchangeData& rData return( *this ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx index dc3b6e2ca9..69438a5093 100644 --- a/svx/source/xoutdev/xpool.cxx +++ b/svx/source/xoutdev/xpool.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -233,3 +234,5 @@ XOutdevItemPool::~XOutdevItemPool() } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xtabbtmp.cxx b/svx/source/xoutdev/xtabbtmp.cxx index fb82ea168b..b5ae9e952e 100644 --- a/svx/source/xoutdev/xtabbtmp.cxx +++ b/svx/source/xoutdev/xtabbtmp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -292,3 +293,5 @@ Bitmap* XBitmapList::CreateBitmapForUI( long /*nIndex*/, BOOL /*bDelete*/) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx index 3f3ccc1ccb..e6681161ec 100644 --- a/svx/source/xoutdev/xtabcolr.cxx +++ b/svx/source/xoutdev/xtabcolr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -170,7 +171,7 @@ BOOL XColorTable::Create() xub_StrLen nLen; ResMgr& rRes = DIALOG_MGR(); - static USHORT __READONLY_DATA aResId[] = + static USHORT const aResId[] = { RID_SVXSTR_BLACK, RID_SVXSTR_BLUE, @@ -199,7 +200,7 @@ BOOL XColorTable::Create() // BM: ifndef VCL part removed (deprecated) - static ColorData __READONLY_DATA aColTab[] = + static ColorData const aColTab[] = { COL_BLACK, COL_BLUE, @@ -546,3 +547,5 @@ Bitmap* XColorList::CreateBitmapForUI( long /*nIndex*/, BOOL /*bDelete*/) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx index 0099dd948c..41e0cdb82a 100644 --- a/svx/source/xoutdev/xtabdash.cxx +++ b/svx/source/xoutdev/xtabdash.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -376,3 +377,5 @@ Bitmap* XDashList::CreateBitmapForUI( long nIndex, BOOL bDelete ) ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx index 00d0a75779..b4ce642edb 100644 --- a/svx/source/xoutdev/xtabgrdt.cxx +++ b/svx/source/xoutdev/xtabgrdt.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -370,3 +371,5 @@ Bitmap* XGradientList::CreateBitmapForUI( long nIndex, BOOL bDelete ) ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx index 8d1ddcf59a..d002baea1b 100644 --- a/svx/source/xoutdev/xtabhtch.cxx +++ b/svx/source/xoutdev/xtabhtch.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -372,3 +373,5 @@ Bitmap* XHatchList::CreateBitmapForUI( long nIndex, BOOL bDelete ) ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx index 30d79d5afe..9feadc9e44 100644 --- a/svx/source/xoutdev/xtable.cxx +++ b/svx/source/xoutdev/xtable.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,7 +35,7 @@ #define GLOBALOVERFLOW // Vergleichsstrings -sal_Unicode __FAR_DATA pszStandard[] = { 's', 't', 'a', 'n', 'd', 'a', 'r', 'd', 0 }; +sal_Unicode pszStandard[] = { 's', 't', 'a', 'n', 'd', 'a', 'r', 'd', 0 }; // Konvertiert in echte RGB-Farben, damit in den Listboxen // endlich mal richtig selektiert werden kann. @@ -509,3 +510,4 @@ void XPropertyList::SetName( const String& rString ) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx index f2f21efb08..8bf93e3147 100644 --- a/svx/source/xoutdev/xtablend.cxx +++ b/svx/source/xoutdev/xtablend.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,6 @@ #include <tools/urlobj.hxx> #include <vcl/virdev.hxx> -#ifndef _SV_APP_HXX #include <vcl/svapp.hxx> #endif #include <svl/itemset.hxx> @@ -393,3 +393,5 @@ Bitmap* XLineEndList::CreateBitmapForUI( long nIndex, BOOL bDelete ) ////////////////////////////////////////////////////////////////////////////// // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |