This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 201d50f Fixed typos, removed whitespace
201d50f is described below
commit 201d50ff746b6abb0a3ac7f3daa35ffddeb81623
Author: mseidel <[email protected]>
AuthorDate: Fri Nov 12 17:44:57 2021 +0100
Fixed typos, removed whitespace
---
main/basegfx/inc/basegfx/numeric/ftools.hxx | 218 ++++++++++-----------
main/basegfx/source/numeric/ftools.cxx | 24 +--
.../source/customshapes/EnhancedCustomShape3d.hxx | 11 +-
.../customshapes/EnhancedCustomShapeEngine.hxx | 40 ++--
.../customshapes/EnhancedCustomShapeFontWork.hxx | 8 +-
.../customshapes/EnhancedCustomShapeHandle.cxx | 8 +-
.../customshapes/EnhancedCustomShapeHandle.hxx | 22 +--
main/svx/source/customshapes/tbxcustomshapes.cxx | 95 ++++-----
main/svx/source/toolbars/fontworkbar.src | 10 +-
9 files changed, 213 insertions(+), 223 deletions(-)
diff --git a/main/basegfx/inc/basegfx/numeric/ftools.hxx
b/main/basegfx/inc/basegfx/numeric/ftools.hxx
index 08ed018..c04b492 100644
--- a/main/basegfx/inc/basegfx/numeric/ftools.hxx
+++ b/main/basegfx/inc/basegfx/numeric/ftools.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -27,7 +27,7 @@
#include <rtl/math.hxx>
#include <basegfx/basegfxdllapi.h>
-//////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////
// standard PI defines from solar.h, but we do not want to link against tools
#ifndef F_PI
@@ -52,95 +52,95 @@
#define F_2PI (2.0*M_PI)
#endif
-//////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////
// fTools defines
namespace basegfx
{
/** Round double to nearest integer
- @return the nearest integer
- */
- inline sal_Int32 fround( double fVal )
- {
- return fVal > 0.0 ? static_cast<sal_Int32>( fVal + .5 ) :
-static_cast<sal_Int32>( -fVal + .5 );
- }
+ @return the nearest integer
+ */
+ inline sal_Int32 fround( double fVal )
+ {
+ return fVal > 0.0 ? static_cast<sal_Int32>( fVal + .5 ) :
-static_cast<sal_Int32>( -fVal + .5 );
+ }
/** Round double to nearest integer
-
- @return the nearest 64 bit integer
- */
- inline sal_Int64 fround64( double fVal )
- {
- return fVal > 0.0 ? static_cast<sal_Int64>( fVal + .5 ) :
-static_cast<sal_Int64>( -fVal + .5 );
- }
-
- /** Prune a small epsilon range around zero.
-
- Use this method e.g. for calculating scale values. There, it
- is usually advisable not to set a scaling to 0.0, because that
- yields singular transformation matrices.
-
- @param fVal
- An arbitrary, but finite and valid number
-
- @return either fVal, or a small value slightly above (when
- fVal>0) or below (when fVal<0) zero.
- */
- inline double pruneScaleValue( double fVal )
- {
+
+ @return the nearest 64 bit integer
+ */
+ inline sal_Int64 fround64( double fVal )
+ {
+ return fVal > 0.0 ? static_cast<sal_Int64>( fVal + .5 ) :
-static_cast<sal_Int64>( -fVal + .5 );
+ }
+
+ /** Prune a small epsilon range around zero.
+
+ Use this method e.g. for calculating scale values. There, it
+ is usually advisable not to set a scaling to 0.0, because that
+ yields singular transformation matrices.
+
+ @param fVal
+ An arbitrary, but finite and valid number
+
+ @return either fVal, or a small value slightly above (when
+ fVal>0) or below (when fVal<0) zero.
+ */
+ inline double pruneScaleValue( double fVal )
+ {
// old version used ::std::min/max, but this collides if min is
defined as preprocessor
// macro which is the case e.g with windows.h headers. The
simplest way to avoid this is to
// just use the full comparison. I keep the original here,
maybe there will be a better
// solution some day.
//
- //return fVal < 0.0 ?
- // (::std::min(fVal,-0.00001)) :
- // (::std::max(fVal,0.00001));
+ //return fVal < 0.0 ?
+ // (::std::min(fVal,-0.00001)) :
+ // (::std::max(fVal,0.00001));
if(fVal < 0.0)
return (fVal < -0.00001 ? fVal : -0.00001);
else
return (fVal > 0.00001 ? fVal : 0.00001);
- }
-
- /** clamp given value against given minimum and maximum values
- */
- template <class T> inline const T& clamp(const T& value, const T& minimum,
const T& maximum)
- {
- if(value < minimum)
- {
- return minimum;
- }
- else if(value > maximum)
- {
- return maximum;
- }
- else
- {
- return value;
- }
- }
-
- /** Convert value from degrees to radians
- */
- inline double deg2rad( double v )
- {
- // divide first, to get exact values for v being a multiple of
- // 90 degrees
- return v / 90.0 * M_PI_2;
- }
-
- /** Convert value radians to degrees
- */
- inline double rad2deg( double v )
- {
- // divide first, to get exact values for v being a multiple of
- // pi/2
- return v / M_PI_2 * 90.0;
- }
-
- /** Snap v to nearest multiple of fStep, from negative and
+ }
+
+ /** clamp given value against given minimum and maximum values
+ */
+ template <class T> inline const T& clamp(const T& value, const T&
minimum, const T& maximum)
+ {
+ if(value < minimum)
+ {
+ return minimum;
+ }
+ else if(value > maximum)
+ {
+ return maximum;
+ }
+ else
+ {
+ return value;
+ }
+ }
+
+ /** Convert value from degrees to radians
+ */
+ inline double deg2rad( double v )
+ {
+ // divide first, to get exact values for v being a multiple of
+ // 90 degrees
+ return v / 90.0 * M_PI_2;
+ }
+
+ /** Convert value radians to degrees
+ */
+ inline double rad2deg( double v )
+ {
+ // divide first, to get exact values for v being a multiple of
+ // pi/2
+ return v / M_PI_2 * 90.0;
+ }
+
+ /** Snap v to nearest multiple of fStep, from negative and
positive side.
Examples:
@@ -149,15 +149,15 @@ namespace basegfx
snapToNearestMultiple(0.1, 0.5) = 0.0
snapToNearestMultiple(0.25, 0.5) = 0.0
snapToNearestMultiple(0.26, 0.5) = 0.5
- */
+ */
BASEGFX_DLLPUBLIC double snapToNearestMultiple(double v, const double
fStep);
- /** Snap v to the range [0.0 .. fWidth] using modulo
- */
+ /** Snap v to the range [0.0 .. fWidth] using modulo
+ */
BASEGFX_DLLPUBLIC double snapToZeroRange(double v, double fWidth);
- /** Snap v to the range [fLow .. fHigh] using modulo
- */
+ /** Snap v to the range [fLow .. fHigh] using modulo
+ */
BASEGFX_DLLPUBLIC double snapToRange(double v, double fLow, double
fHigh);
/** return fValue with the sign of fSignCarrier, thus evtl. changed
@@ -173,56 +173,56 @@ namespace basegfx
class BASEGFX_DLLPUBLIC fTools
{
- /// Threshold value for equalZero()
+ // Threshold value for equalZero()
static double
mfSmallValue;
public:
- /// Get threshold value for equalZero and friends
+ // Get threshold value for equalZero and friends
static double getSmallValue() { return mfSmallValue; }
- /// Set threshold value for equalZero and friends
+ // Set threshold value for equalZero and friends
static void setSmallValue(const double& rfNew) { mfSmallValue =
rfNew; }
- /// Compare against small value
- static bool equalZero(const double& rfVal)
- {
- return (fabs(rfVal) <= getSmallValue());
+ // Compare against small value
+ static bool equalZero(const double& rfVal)
+ {
+ return (fabs(rfVal) <= getSmallValue());
}
- /// Compare against given small value
- static bool equalZero(const double& rfVal, const double&
rfSmallValue)
- {
- return (fabs(rfVal) <= rfSmallValue);
+ // Compare against given small value
+ static bool equalZero(const double& rfVal, const double&
rfSmallValue)
+ {
+ return (fabs(rfVal) <= rfSmallValue);
}
- static bool equal(const double& rfValA, const double& rfValB)
- {
+ static bool equal(const double& rfValA, const double& rfValB)
+ {
// changed to approxEqual usage for better numerical
correctness
return rtl::math::approxEqual(rfValA, rfValB);
}
- static bool equal(const double& rfValA, const double& rfValB,
const double& rfSmallValue)
- {
- return (fabs(rfValA - rfValB) <= rfSmallValue);
+ static bool equal(const double& rfValA, const double& rfValB,
const double& rfSmallValue)
+ {
+ return (fabs(rfValA - rfValB) <= rfSmallValue);
}
- static bool less(const double& rfValA, const double& rfValB)
- {
- return (rfValA < rfValB && !equal(rfValA, rfValB));
+ static bool less(const double& rfValA, const double& rfValB)
+ {
+ return (rfValA < rfValB && !equal(rfValA, rfValB));
}
- static bool lessOrEqual(const double& rfValA, const double&
rfValB)
- {
- return (rfValA < rfValB || equal(rfValA, rfValB));
+ static bool lessOrEqual(const double& rfValA, const double&
rfValB)
+ {
+ return (rfValA < rfValB || equal(rfValA, rfValB));
}
- static bool more(const double& rfValA, const double& rfValB)
- {
- return (rfValA > rfValB && !equal(rfValA, rfValB));
+ static bool more(const double& rfValA, const double& rfValB)
+ {
+ return (rfValA > rfValB && !equal(rfValA, rfValB));
}
- static bool moreOrEqual(const double& rfValA, const double&
rfValB)
- {
- return (rfValA > rfValB || equal(rfValA, rfValB));
+ static bool moreOrEqual(const double& rfValA, const double&
rfValB)
+ {
+ return (rfValA > rfValB || equal(rfValA, rfValB));
}
};
} // end of namespace basegfx
diff --git a/main/basegfx/source/numeric/ftools.cxx
b/main/basegfx/source/numeric/ftools.cxx
index 99017a2..31eb457 100644
--- a/main/basegfx/source/numeric/ftools.cxx
+++ b/main/basegfx/source/numeric/ftools.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -43,14 +43,14 @@ namespace basegfx
const double fHalfStep(fStep * 0.5);
const double fChange(fHalfStep - fmod(v + fHalfStep,
fStep));
- if(basegfx::fTools::equal(fabs(v), fabs(fChange)))
- {
- return 0.0;
- }
- else
- {
- return v + fChange;
- }
+ if(basegfx::fTools::equal(fabs(v), fabs(fChange)))
+ {
+ return 0.0;
+ }
+ else
+ {
+ return v + fChange;
+ }
}
}
diff --git a/main/svx/source/customshapes/EnhancedCustomShape3d.hxx
b/main/svx/source/customshapes/EnhancedCustomShape3d.hxx
index 3aa9943..69d9477 100644
--- a/main/svx/source/customshapes/EnhancedCustomShape3d.hxx
+++ b/main/svx/source/customshapes/EnhancedCustomShape3d.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -42,7 +42,7 @@ class EnhancedCustomShape3d
// parallel projection
double fSkewAngle;
- double fSkew; // in percent
+ double fSkew; // in percent
// perspective projection
double fZScreen;
@@ -71,4 +71,3 @@ class EnhancedCustomShape3d
};
#endif
-
diff --git a/main/svx/source/customshapes/EnhancedCustomShapeEngine.hxx
b/main/svx/source/customshapes/EnhancedCustomShapeEngine.hxx
index c233634..5e4dd2b 100644
--- a/main/svx/source/customshapes/EnhancedCustomShapeEngine.hxx
+++ b/main/svx/source/customshapes/EnhancedCustomShapeEngine.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -36,8 +36,8 @@
#include <com/sun/star/lang/XComponent.hpp>
#include <cppuhelper/implbase3.hxx>
#ifndef __com_sun_star_awt_Rectangle_hpp_
-#include <com/sun/star/awt/Rectangle.hpp>
-#endif
+#include <com/sun/star/awt/Rectangle.hpp>
+#endif
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -48,16 +48,16 @@
#define NMSP_IO com::sun::star::io
#define NMSP_UNO com::sun::star::uno
-#define NMSP_BEANS com::sun::star::beans
+#define NMSP_BEANS com::sun::star::beans
#define NMSP_LANG com::sun::star::lang
#define NMSP_UTIL com::sun::star::util
#define NMSP_SAX com::sun::star::xml::sax
#define NMSP_LOGGING NMSP_UTIL::logging
-#define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj >
-#define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj >
-#define B2UCONST( _def_pChar )
(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(_def_pChar )))
+#define REF( _def_Obj ) NMSP_UNO::Reference< _def_Obj >
+#define SEQ( _def_Obj ) NMSP_UNO::Sequence< _def_Obj >
+#define B2UCONST( _def_pChar )
(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(_def_pChar )))
// ---------------------------
// - EnhancedCustomShapeEngine -
@@ -67,7 +67,7 @@
class SdrObject;
class SdrObjCustomShape;
class EnhancedCustomShapeEngine : public cppu::WeakImplHelper3
-<
+<
com::sun::star::lang::XInitialization,
com::sun::star::lang::XServiceInfo,
com::sun::star::drawing::XCustomShapeEngine
@@ -82,21 +82,21 @@ class EnhancedCustomShapeEngine : public
cppu::WeakImplHelper3
public:
EnhancedCustomShapeEngine( const REF( NMSP_LANG::XMultiServiceFactory )& rxMgr
);
virtual ~EnhancedCustomShapeEngine();
-
- // XInterface
- virtual void SAL_CALL acquire() throw();
- virtual void SAL_CALL release() throw();
+
+ // XInterface
+ virtual void SAL_CALL acquire() throw();
+ virtual void SAL_CALL release() throw();
// XInitialization
- virtual void SAL_CALL initialize( const SEQ( NMSP_UNO::Any )& aArguments )
+ virtual void SAL_CALL initialize( const SEQ( NMSP_UNO::Any )&
aArguments )
throw ( NMSP_UNO::Exception, NMSP_UNO::RuntimeException );
// XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName()
+ virtual rtl::OUString SAL_CALL getImplementationName()
throw ( NMSP_UNO::RuntimeException );
- virtual sal_Bool SAL_CALL supportsService( const rtl::OUString&
rServiceName )
+ virtual sal_Bool SAL_CALL supportsService( const rtl::OUString&
rServiceName )
throw ( NMSP_UNO::RuntimeException );
- virtual SEQ( rtl::OUString ) SAL_CALL getSupportedServiceNames()
+ virtual SEQ( rtl::OUString ) SAL_CALL getSupportedServiceNames()
throw ( NMSP_UNO::RuntimeException );
// XCustomShapeEngine
@@ -114,7 +114,7 @@ rtl::OUString
EnhancedCustomShapeEngine_getImplementationName()
throw ( NMSP_UNO::RuntimeException );
sal_Bool SAL_CALL EnhancedCustomShapeEngine_supportsService( const
rtl::OUString& rServiceName )
throw( NMSP_UNO::RuntimeException );
-SEQ( rtl::OUString ) SAL_CALL
EnhancedCustomShapeEngine_getSupportedServiceNames()
+SEQ( rtl::OUString ) SAL_CALL
EnhancedCustomShapeEngine_getSupportedServiceNames()
throw( NMSP_UNO::RuntimeException );
#endif
diff --git a/main/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx
b/main/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx
index 2771150..07111a2 100644
--- a/main/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx
+++ b/main/svx/source/customshapes/EnhancedCustomShapeFontWork.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
diff --git a/main/svx/source/customshapes/EnhancedCustomShapeHandle.cxx
b/main/svx/source/customshapes/EnhancedCustomShapeHandle.cxx
index 6365ac5..d620f83 100644
--- a/main/svx/source/customshapes/EnhancedCustomShapeHandle.cxx
+++ b/main/svx/source/customshapes/EnhancedCustomShapeHandle.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
diff --git a/main/svx/source/customshapes/EnhancedCustomShapeHandle.hxx
b/main/svx/source/customshapes/EnhancedCustomShapeHandle.hxx
index d69d593..283cfb5 100644
--- a/main/svx/source/customshapes/EnhancedCustomShapeHandle.hxx
+++ b/main/svx/source/customshapes/EnhancedCustomShapeHandle.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -34,7 +34,7 @@
#include <cppuhelper/weakref.hxx>
class EnhancedCustomShapeHandle : public cppu::WeakImplHelper2
-<
+<
com::sun::star::drawing::XCustomShapeHandle,
com::sun::star::lang::XInitialization
>
@@ -46,11 +46,11 @@ public:
EnhancedCustomShapeHandle(
com::sun::star::uno::Reference< com::sun::star::drawing::XShape >&
xCustomShape, sal_uInt32 nIndex );
virtual ~EnhancedCustomShapeHandle();
-
- // XInterface
- virtual void SAL_CALL acquire() throw();
- virtual void SAL_CALL release() throw();
-
+
+ // XInterface
+ virtual void SAL_CALL acquire() throw();
+ virtual void SAL_CALL release() throw();
+
// XCustomShapeHandle
virtual com::sun::star::awt::Point SAL_CALL getPosition()
throw ( com::sun::star::uno::RuntimeException );
@@ -58,7 +58,7 @@ public:
throw ( com::sun::star::uno::RuntimeException );
// XInitialization
- virtual void SAL_CALL initialize( const com::sun::star::uno::Sequence<
com::sun::star::uno::Any >& aArguments )
+ virtual void SAL_CALL initialize( const com::sun::star::uno::Sequence<
com::sun::star::uno::Any >& aArguments )
throw ( com::sun::star::uno::Exception,
com::sun::star::uno::RuntimeException );
};
diff --git a/main/svx/source/customshapes/tbxcustomshapes.cxx
b/main/svx/source/customshapes/tbxcustomshapes.cxx
index 6945331..f11c8eb 100644
--- a/main/svx/source/customshapes/tbxcustomshapes.cxx
+++ b/main/svx/source/customshapes/tbxcustomshapes.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -45,8 +45,6 @@ SFX_IMPL_TOOLBOX_CONTROL(SvxTbxCtlCustomShapes, SfxBoolItem);
/*************************************************************************
|*
-|*
-|*
\************************************************************************/
SvxTbxCtlCustomShapes::SvxTbxCtlCustomShapes( sal_uInt16 nSlotId, sal_uInt16
nId, ToolBox& rTbx ) :
@@ -61,21 +59,21 @@ SvxTbxCtlCustomShapes::SvxTbxCtlCustomShapes( sal_uInt16
nSlotId, sal_uInt16 nId
}
case SID_DRAWTBX_CS_BASIC :
{
- m_aCommand = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
".uno:BasicShapes.diamond" ) );
- m_aSubTbName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"basicshapes" ) );
+ m_aCommand = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( ".uno:BasicShapes.diamond" ) );
+ m_aSubTbName = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "basicshapes" ) );
}
break;
case SID_DRAWTBX_CS_SYMBOL :
{
- m_aCommand = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
".uno:SymbolShapes.smiley" ) );
+ m_aCommand = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( ".uno:SymbolShapes.smiley" ) );
m_aSubTbName = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "symbolshapes" ) );
}
break;
case SID_DRAWTBX_CS_ARROW :
{
- m_aCommand = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
".uno:ArrowShapes.left-right-arrow" ) );
+ m_aCommand = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( ".uno:ArrowShapes.left-right-arrow" ) );
m_aSubTbName = rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM( "arrowshapes" ) );
}
break;
@@ -98,27 +96,23 @@ SvxTbxCtlCustomShapes::SvxTbxCtlCustomShapes( sal_uInt16
nSlotId, sal_uInt16 nId
}
break;
}
- m_aSubTbxResName += m_aSubTbName;
+ m_aSubTbxResName += m_aSubTbName;
rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
}
/*************************************************************************
-|*
|* Benachrichtigung, wenn sich der Applikationsstatus geaendert hat
-|*
\************************************************************************/
void SvxTbxCtlCustomShapes::StateChanged( sal_uInt16 nSID, SfxItemState eState,
- const
SfxPoolItem* pState )
+ const
SfxPoolItem* pState )
{
- SfxToolBoxControl::StateChanged( nSID, eState, pState );
+ SfxToolBoxControl::StateChanged( nSID, eState, pState );
}
/*************************************************************************
-|*
|* Wenn man ein PopupWindow erzeugen will
-|*
\************************************************************************/
SfxPopupWindowType SvxTbxCtlCustomShapes::GetPopupWindowType() const
@@ -127,16 +121,14 @@ SfxPopupWindowType
SvxTbxCtlCustomShapes::GetPopupWindowType() const
}
/*************************************************************************
-|*
|* Hier wird das Fenster erzeugt
|* Lage der Toolbox mit GetToolBox() abfragbar
|* rItemRect sind die Screen-Koordinaten
-|*
\************************************************************************/
SfxPopupWindow* SvxTbxCtlCustomShapes::CreatePopupWindow()
{
- createAndPositionSubToolBar( m_aSubTbxResName );
+ createAndPositionSubToolBar( m_aSubTbxResName );
return NULL;
}
@@ -146,7 +138,7 @@ void SvxTbxCtlCustomShapes::Select( sal_Bool /*bMod1*/ )
{
if ( m_aCommand.getLength() > 0 )
{
- com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >
aParamSeq( 0 );
+ com::sun::star::uno::Sequence<
com::sun::star::beans::PropertyValue > aParamSeq( 0 );
Dispatch( m_aCommand, aParamSeq );
}
}
@@ -154,47 +146,46 @@ void SvxTbxCtlCustomShapes::Select( sal_Bool /*bMod1*/ )
::sal_Bool SAL_CALL SvxTbxCtlCustomShapes::opensSubToolbar() throw
(::com::sun::star::uno::RuntimeException)
{
- // We control a sub-toolbar therefor, we have to return true.
- return sal_True;
+ // We control a sub-toolbar therefor, we have to return true.
+ return sal_True;
}
::rtl::OUString SAL_CALL SvxTbxCtlCustomShapes::getSubToolbarName() throw
(::com::sun::star::uno::RuntimeException)
{
- // Provide the controlled sub-toolbar name, so we are notified whenever
- // this toolbar executes a function.
- return m_aSubTbName;
+ // Provide the controlled sub-toolbar name, so we are notified whenever
+ // this toolbar executes a function.
+ return m_aSubTbName;
}
void SAL_CALL SvxTbxCtlCustomShapes::functionSelected( const ::rtl::OUString&
rCommand ) throw (::com::sun::star::uno::RuntimeException)
{
- // remind the new command
- 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() );
- 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() );
- if ( !!aImage )
- GetToolBox().SetItemImage( GetId(), aImage );
- }
- }
+ // remind the new command
+ 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() );
+ 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() );
+ if ( !!aImage )
+ GetToolBox().SetItemImage( GetId(), aImage );
+ }
+ }
}
void SAL_CALL SvxTbxCtlCustomShapes::updateImage( ) throw
(::com::sun::star::uno::RuntimeException)
{
- // 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() );
- 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() );
- if ( !!aImage )
- GetToolBox().SetItemImage( GetId(), aImage );
- }
+ // 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() );
+ 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() );
+ if ( !!aImage )
+ GetToolBox().SetItemImage( GetId(), aImage );
+ }
}
-
diff --git a/main/svx/source/toolbars/fontworkbar.src
b/main/svx/source/toolbars/fontworkbar.src
index cc7d2fb..9141a84 100644
--- a/main/svx/source/toolbars/fontworkbar.src
+++ b/main/svx/source/toolbars/fontworkbar.src
@@ -25,27 +25,27 @@
String RID_SVX_FONTWORK_BAR
{
- Text [ en-US ] = "Fontwork";
+ Text [ en-US ] = "Fontwork" ;
};
String RID_SVXSTR_UNDO_APPLY_FONTWORK_SHAPE
{
- Text [ en-US ] = "Apply Fontwork Shape";
+ Text [ en-US ] = "Apply Fontwork Shape" ;
};
String RID_SVXSTR_UNDO_APPLY_FONTWORK_SAME_LETTER_HEIGHT
{
- Text [ en-US ] = "Apply Fontwork Same Letter Heights";
+ Text [ en-US ] = "Apply Fontwork Same Letter Heights" ;
};
String RID_SVXSTR_UNDO_APPLY_FONTWORK_ALIGNMENT
{
- Text [ en-US ] = "Apply Fontwork Alignment";
+ Text [ en-US ] = "Apply Fontwork Alignment" ;
};
String RID_SVXSTR_UNDO_APPLY_FONTWORK_CHARACTER_SPACING
{
- Text [ en-US ] = "Apply Fontwork Character Spacing";
+ Text [ en-US ] = "Apply Fontwork Character Spacing" ;
};
// ********************************************************************** EOF