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 de57a71 Fixed typos, removed whitespace
de57a71 is described below
commit de57a71b4c7763dcb58c39badd7e2d67d1e608b9
Author: mseidel <[email protected]>
AuthorDate: Tue Nov 3 11:05:43 2020 +0100
Fixed typos, removed whitespace
---
.../source/geometry/viewinformation2d.cxx | 236 ++++-----
.../source/geometry/viewinformation3d.cxx | 120 ++---
.../source/primitive2d/metafileprimitive2d.cxx | 542 ++++++++++-----------
.../source/spellcheck/spell/sspellimp.cxx | 224 ++++-----
4 files changed, 561 insertions(+), 561 deletions(-)
diff --git a/main/drawinglayer/source/geometry/viewinformation2d.cxx
b/main/drawinglayer/source/geometry/viewinformation2d.cxx
index 641ef19..03edaf4 100644
--- a/main/drawinglayer/source/geometry/viewinformation2d.cxx
+++ b/main/drawinglayer/source/geometry/viewinformation2d.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.
- *
+ *
*************************************************************/
@@ -53,33 +53,33 @@ namespace drawinglayer
sal_uInt32
mnRefCount;
protected:
- // the object transformation
+ // the object transformation
basegfx::B2DHomMatrix
maObjectTransformation;
- // the view transformation
+ // the view transformation
basegfx::B2DHomMatrix
maViewTransformation;
- // the ObjectToView and it's inverse, both on demand from
ObjectTransformation
- // and ViewTransformation
+ // the ObjectToView and its inverse, both on demand
from ObjectTransformation
+ // and ViewTransformation
basegfx::B2DHomMatrix
maObjectToViewTransformation;
basegfx::B2DHomMatrix
maInverseObjectToViewTransformation;
- // the visible range and the on-demand one in ViewCoordinates
+ // the visible range and the on-demand one in
ViewCoordinates
basegfx::B2DRange
maViewport;
basegfx::B2DRange
maDiscreteViewport;
// the DrawPage which is target of visualisation. This
is needed e.g. for
// the view-dependent decomposition of PageNumber
TextFields.
- // This parameter is buffered here, but mainly resides in
mxExtendedInformation,
- // so it will be interpreted, but held there. It will also not be
added
- // to mxExtendedInformation in impFillViewInformationFromContent
(it's there already)
+ // This parameter is buffered here, but mainly resides
in mxExtendedInformation,
+ // so it will be interpreted, but held there. It will
also not be added
+ // to mxExtendedInformation in
impFillViewInformationFromContent (it's there already)
uno::Reference< drawing::XDrawPage >
mxVisualizedPage;
// the point in time
double
mfViewTime;
- // bitfield
- bool
mbReducedDisplayQuality : 1;
+ // bitfield
+ bool
mbReducedDisplayQuality : 1;
// the complete PropertyValue representation (if
already created)
uno::Sequence< beans::PropertyValue >
mxViewInformation;
@@ -94,19 +94,19 @@ namespace drawinglayer
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("ObjectTransformation"));
return s_sNameProperty;
}
-
+
const ::rtl::OUString&
getNamePropertyViewTransformation()
{
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("ViewTransformation"));
return s_sNameProperty;
}
-
+
const ::rtl::OUString& getNamePropertyViewport()
{
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("Viewport"));
return s_sNameProperty;
}
-
+
const ::rtl::OUString& getNamePropertyTime()
{
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("Time"));
@@ -141,13 +141,13 @@ namespace drawinglayer
if(rProp.Name ==
getNamePropertyReducedDisplayQuality())
{
- // extra information; add to filtered information
+ // extra information;
add to filtered information
mxExtendedInformation[nExtendedInsert++] = rProp;
- // for performance reasons, also cache content
locally
- sal_Bool bSalBool(false);
+ // for performance
reasons, also cache content locally
+ sal_Bool
bSalBool(false);
rProp.Value >>=
bSalBool;
- mbReducedDisplayQuality = bSalBool;
+ mbReducedDisplayQuality
= bSalBool;
}
else if(rProp.Name ==
getNamePropertyObjectTransformation())
{
@@ -195,16 +195,16 @@ namespace drawinglayer
const bool bViewportUsed(!maViewport.isEmpty());
const bool bTimeUsed(0.0 < mfViewTime);
const bool
bVisualizedPageUsed(mxVisualizedPage.is());
- const bool bReducedDisplayQualityUsed(true ==
mbReducedDisplayQuality);
+ const bool bReducedDisplayQualityUsed(true ==
mbReducedDisplayQuality);
const bool
bExtraInformation(mxExtendedInformation.hasElements());
sal_uInt32 nIndex(0);
const sal_uInt32 nCount(
(bObjectTransformationUsed ? 1 : 0) +
(bViewTransformationUsed ? 1 : 0) +
(bViewportUsed ? 1 : 0) +
- (bTimeUsed ? 1 : 0) +
+ (bTimeUsed ? 1 : 0) +
(bVisualizedPageUsed ? 1 : 0) +
- (bReducedDisplayQualityUsed ? 1 : 0) +
+ (bReducedDisplayQualityUsed ? 1 : 0) +
(bExtraInformation ?
mxExtendedInformation.getLength() : 0));
mxViewInformation.realloc(nCount);
@@ -262,22 +262,22 @@ namespace drawinglayer
public:
ImpViewInformation2D(
- const basegfx::B2DHomMatrix&
rObjectTransformation,
- const basegfx::B2DHomMatrix&
rViewTransformation,
- const basegfx::B2DRange& rViewport,
+ const basegfx::B2DHomMatrix&
rObjectTransformation,
+ const basegfx::B2DHomMatrix&
rViewTransformation,
+ const basegfx::B2DRange& rViewport,
const uno::Reference< drawing::XDrawPage >&
rxDrawPage,
double fViewTime,
const uno::Sequence< beans::PropertyValue >&
rExtendedParameters)
: mnRefCount(0),
maObjectTransformation(rObjectTransformation),
maViewTransformation(rViewTransformation),
- maObjectToViewTransformation(),
- maInverseObjectToViewTransformation(),
+ maObjectToViewTransformation(),
+ maInverseObjectToViewTransformation(),
maViewport(rViewport),
maDiscreteViewport(),
mxVisualizedPage(rxDrawPage),
mfViewTime(fViewTime),
- mbReducedDisplayQuality(false),
+ mbReducedDisplayQuality(false),
mxViewInformation(),
mxExtendedInformation()
{
@@ -288,13 +288,13 @@ namespace drawinglayer
: mnRefCount(0),
maObjectTransformation(),
maViewTransformation(),
- maObjectToViewTransformation(),
- maInverseObjectToViewTransformation(),
+ maObjectToViewTransformation(),
+ maInverseObjectToViewTransformation(),
maViewport(),
maDiscreteViewport(),
mxVisualizedPage(),
mfViewTime(),
- mbReducedDisplayQuality(false),
+ mbReducedDisplayQuality(false),
mxViewInformation(rViewParameters),
mxExtendedInformation()
{
@@ -305,36 +305,36 @@ namespace drawinglayer
: mnRefCount(0),
maObjectTransformation(),
maViewTransformation(),
- maObjectToViewTransformation(),
- maInverseObjectToViewTransformation(),
+ maObjectToViewTransformation(),
+ maInverseObjectToViewTransformation(),
maViewport(),
maDiscreteViewport(),
mxVisualizedPage(),
mfViewTime(),
- mbReducedDisplayQuality(false),
+ mbReducedDisplayQuality(false),
mxViewInformation(),
mxExtendedInformation()
{
}
- const basegfx::B2DHomMatrix& getObjectTransformation()
const
- {
- return maObjectTransformation;
- }
-
- const basegfx::B2DHomMatrix& getViewTransformation()
const
- {
- return maViewTransformation;
- }
-
- const basegfx::B2DRange& getViewport() const
- {
- return maViewport;
- }
-
- const basegfx::B2DRange& getDiscreteViewport() const
- {
- ::osl::Mutex m_mutex;
+ const basegfx::B2DHomMatrix& getObjectTransformation()
const
+ {
+ return maObjectTransformation;
+ }
+
+ const basegfx::B2DHomMatrix& getViewTransformation()
const
+ {
+ return maViewTransformation;
+ }
+
+ const basegfx::B2DRange& getViewport() const
+ {
+ return maViewport;
+ }
+
+ const basegfx::B2DRange& getDiscreteViewport() const
+ {
+ ::osl::Mutex m_mutex;
if(maDiscreteViewport.isEmpty() &&
!maViewport.isEmpty())
{
@@ -346,49 +346,49 @@ namespace drawinglayer
return maDiscreteViewport;
}
- const basegfx::B2DHomMatrix& getObjectToViewTransformation()
const
- {
- ::osl::Mutex m_mutex;
+ const basegfx::B2DHomMatrix&
getObjectToViewTransformation() const
+ {
+ ::osl::Mutex m_mutex;
- if(maObjectToViewTransformation.isIdentity() &&
- (!maObjectTransformation.isIdentity() ||
!maViewTransformation.isIdentity()))
+ if(maObjectToViewTransformation.isIdentity() &&
+ (!maObjectTransformation.isIdentity()
|| !maViewTransformation.isIdentity()))
{
- basegfx::B2DHomMatrix
aObjectToView(maViewTransformation * maObjectTransformation);
+ basegfx::B2DHomMatrix
aObjectToView(maViewTransformation * maObjectTransformation);
const_cast< ImpViewInformation2D*
>(this)->maObjectToViewTransformation = aObjectToView;
}
return maObjectToViewTransformation;
- }
+ }
- const basegfx::B2DHomMatrix&
getInverseObjectToViewTransformation() const
- {
- ::osl::Mutex m_mutex;
+ const basegfx::B2DHomMatrix&
getInverseObjectToViewTransformation() const
+ {
+ ::osl::Mutex m_mutex;
-
if(maInverseObjectToViewTransformation.isIdentity() &&
- (!maObjectTransformation.isIdentity() ||
!maViewTransformation.isIdentity()))
+
if(maInverseObjectToViewTransformation.isIdentity() &&
+ (!maObjectTransformation.isIdentity()
|| !maViewTransformation.isIdentity()))
{
- basegfx::B2DHomMatrix
aInverseObjectToView(maViewTransformation * maObjectTransformation);
- aInverseObjectToView.invert();
+ basegfx::B2DHomMatrix
aInverseObjectToView(maViewTransformation * maObjectTransformation);
+ aInverseObjectToView.invert();
const_cast< ImpViewInformation2D*
>(this)->maInverseObjectToViewTransformation = aInverseObjectToView;
}
return maInverseObjectToViewTransformation;
- }
+ }
- double getViewTime() const
- {
- return mfViewTime;
- }
+ double getViewTime() const
+ {
+ return mfViewTime;
+ }
const uno::Reference< drawing::XDrawPage >&
getVisualizedPage() const
{
return mxVisualizedPage;
}
- bool getReducedDisplayQuality() const
- {
- return mbReducedDisplayQuality;
- }
+ bool getReducedDisplayQuality() const
+ {
+ return mbReducedDisplayQuality;
+ }
const uno::Sequence< beans::PropertyValue >&
getViewInformationSequence() const
{
@@ -408,7 +408,7 @@ namespace drawinglayer
bool operator==(const ImpViewInformation2D& rCandidate)
const
{
return (maObjectTransformation ==
rCandidate.maObjectTransformation
- && maViewTransformation == rCandidate.maViewTransformation
+ && maViewTransformation ==
rCandidate.maViewTransformation
&& maViewport == rCandidate.maViewport
&& mxVisualizedPage ==
rCandidate.mxVisualizedPage
&& mfViewTime == rCandidate.mfViewTime
@@ -416,19 +416,19 @@ namespace drawinglayer
}
static ImpViewInformation2D* get_global_default()
- {
- static ImpViewInformation2D* pDefault = 0;
+ {
+ static ImpViewInformation2D* pDefault = 0;
- if(!pDefault)
- {
- pDefault = new ImpViewInformation2D();
+ if(!pDefault)
+ {
+ pDefault = new ImpViewInformation2D();
- // never delete; start with RefCount 1, not 0
- pDefault->mnRefCount++;
- }
+ // never delete; start with RefCount 1,
not 0
+ pDefault->mnRefCount++;
+ }
- return pDefault;
- }
+ return pDefault;
+ }
};
} // end of anonymous namespace
} // end of namespace drawinglayer
@@ -440,19 +440,19 @@ namespace drawinglayer
namespace geometry
{
ViewInformation2D::ViewInformation2D(
- const basegfx::B2DHomMatrix& rObjectTransformation,
- const basegfx::B2DHomMatrix& rViewTransformation,
- const basegfx::B2DRange& rViewport,
+ const basegfx::B2DHomMatrix& rObjectTransformation,
+ const basegfx::B2DHomMatrix& rViewTransformation,
+ const basegfx::B2DRange& rViewport,
const uno::Reference< drawing::XDrawPage >& rxDrawPage,
double fViewTime,
const uno::Sequence< beans::PropertyValue >&
rExtendedParameters)
: mpViewInformation2D(new ImpViewInformation2D(
- rObjectTransformation,
- rViewTransformation,
- rViewport,
- rxDrawPage,
- fViewTime,
- rExtendedParameters))
+ rObjectTransformation,
+ rViewTransformation,
+ rViewport,
+ rxDrawPage,
+ fViewTime,
+ rExtendedParameters))
{
}
@@ -462,7 +462,7 @@ namespace drawinglayer
}
ViewInformation2D::ViewInformation2D()
- : mpViewInformation2D(ImpViewInformation2D::get_global_default())
+ :
mpViewInformation2D(ImpViewInformation2D::get_global_default())
{
mpViewInformation2D->mnRefCount++;
}
@@ -470,13 +470,13 @@ namespace drawinglayer
ViewInformation2D::ViewInformation2D(const ViewInformation2D&
rCandidate)
: mpViewInformation2D(rCandidate.mpViewInformation2D)
{
- ::osl::Mutex m_mutex;
+ ::osl::Mutex m_mutex;
mpViewInformation2D->mnRefCount++;
}
ViewInformation2D::~ViewInformation2D()
{
- ::osl::Mutex m_mutex;
+ ::osl::Mutex m_mutex;
if(mpViewInformation2D->mnRefCount)
{
@@ -488,14 +488,14 @@ namespace drawinglayer
}
}
- bool ViewInformation2D::isDefault() const
- {
- return mpViewInformation2D ==
ImpViewInformation2D::get_global_default();
- }
+ bool ViewInformation2D::isDefault() const
+ {
+ return mpViewInformation2D ==
ImpViewInformation2D::get_global_default();
+ }
ViewInformation2D& ViewInformation2D::operator=(const
ViewInformation2D& rCandidate)
{
- ::osl::Mutex m_mutex;
+ ::osl::Mutex m_mutex;
if(mpViewInformation2D->mnRefCount)
{
@@ -505,7 +505,7 @@ namespace drawinglayer
{
delete mpViewInformation2D;
}
-
+
mpViewInformation2D = rCandidate.mpViewInformation2D;
mpViewInformation2D->mnRefCount++;
@@ -528,9 +528,9 @@ namespace drawinglayer
}
const basegfx::B2DHomMatrix&
ViewInformation2D::getObjectTransformation() const
- {
+ {
return mpViewInformation2D->getObjectTransformation();
- }
+ }
const basegfx::B2DHomMatrix&
ViewInformation2D::getViewTransformation() const
{
@@ -553,24 +553,24 @@ namespace drawinglayer
}
const basegfx::B2DHomMatrix&
ViewInformation2D::getObjectToViewTransformation() const
- {
+ {
return
mpViewInformation2D->getObjectToViewTransformation();
- }
+ }
const basegfx::B2DHomMatrix&
ViewInformation2D::getInverseObjectToViewTransformation() const
- {
+ {
return
mpViewInformation2D->getInverseObjectToViewTransformation();
- }
-
- const basegfx::B2DRange& ViewInformation2D::getDiscreteViewport() const
+ }
+
+ const basegfx::B2DRange&
ViewInformation2D::getDiscreteViewport() const
{
return mpViewInformation2D->getDiscreteViewport();
}
- bool ViewInformation2D::getReducedDisplayQuality() const
- {
- return mpViewInformation2D->getReducedDisplayQuality();
- }
+ bool ViewInformation2D::getReducedDisplayQuality() const
+ {
+ return mpViewInformation2D->getReducedDisplayQuality();
+ }
const uno::Sequence< beans::PropertyValue >&
ViewInformation2D::getViewInformationSequence() const
{
diff --git a/main/drawinglayer/source/geometry/viewinformation3d.cxx
b/main/drawinglayer/source/geometry/viewinformation3d.cxx
index c9055ce..577e90e 100644
--- a/main/drawinglayer/source/geometry/viewinformation3d.cxx
+++ b/main/drawinglayer/source/geometry/viewinformation3d.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.
- *
+ *
*************************************************************/
@@ -41,8 +41,8 @@ namespace drawinglayer
{
namespace geometry
{
- /** Implementation class for ViewInformation3D
- */
+ /** Implementation class for ViewInformation3D
+ */
class ImpViewInformation3D
{
private:
@@ -56,21 +56,21 @@ namespace drawinglayer
// the 3D transformations
// Object to World. This may change and being adapted
when entering 3D transformation
// groups
- basegfx::B3DHomMatrix
maObjectTransformation;
+ basegfx::B3DHomMatrix
maObjectTransformation;
// World to Camera. This includes VRP, VPN and VUV
camera coordinate system
- basegfx::B3DHomMatrix
maOrientation;
+ basegfx::B3DHomMatrix
maOrientation;
// Camera to Device with X,Y and Z [-1.0 .. 1.0]. This
is the
// 3D to 2D projection which may be parallel or
perspective. When it is perspective,
// the last line of the homogen matrix will NOT be
unused
- basegfx::B3DHomMatrix
maProjection;
-
+ basegfx::B3DHomMatrix
maProjection;
+
// Device to View with X,Y and Z [0.0 .. 1.0]. This
converts from -1 to 1 coordinates
// in camera coordinate system to 0 to 1 in unit 2D
coordinates. This way it stays
// view-independent. To get discrete coordinates, the
2D transformation of a scene
// as 2D object needs to be involved
- basegfx::B3DHomMatrix
maDeviceToView;
+ basegfx::B3DHomMatrix
maDeviceToView;
// Object to View is the linear combination of all four
transformations. It's
// buffered to avoid too much matrix multiplying and
created on demand
@@ -91,57 +91,57 @@ namespace drawinglayer
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("ObjectTransformation"));
return s_sNameProperty;
}
-
+
const ::rtl::OUString& getNamePropertyOrientation()
{
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("Orientation"));
return s_sNameProperty;
}
-
+
const ::rtl::OUString& getNamePropertyProjection()
{
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("Projection"));
return s_sNameProperty;
}
-
+
const ::rtl::OUString& getNamePropertyProjection_30()
{
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("Projection30"));
return s_sNameProperty;
}
-
+
const ::rtl::OUString& getNamePropertyProjection_31()
{
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("Projection31"));
return s_sNameProperty;
}
-
+
const ::rtl::OUString& getNamePropertyProjection_32()
{
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("Projection32"));
return s_sNameProperty;
}
-
+
const ::rtl::OUString& getNamePropertyProjection_33()
{
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("Projection33"));
return s_sNameProperty;
}
-
+
const ::rtl::OUString& getNamePropertyDeviceToView()
{
static ::rtl::OUString
s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("DeviceToView"));
return s_sNameProperty;
}
-
+
const ::rtl::OUString& getNamePropertyTime()
{
static ::rtl::OUString
s_sNamePropertyTime(RTL_CONSTASCII_USTRINGPARAM("Time"));
return s_sNamePropertyTime;
}
- // a central PropertyValue parsing method to allow transportatin of
- // all ViewParameters using UNO API
+ // a central PropertyValue parsing method to allow
transportation of
+ // all ViewParameters using UNO API
void impInterpretPropertyValues(const uno::Sequence<
beans::PropertyValue >& rViewParameters)
{
if(rViewParameters.hasElements())
@@ -155,7 +155,7 @@ namespace drawinglayer
for(sal_Int32 a(0); a < nCount; a++)
{
const beans::PropertyValue&
rProp = rViewParameters[a];
-
+
if(rProp.Name ==
getNamePropertyObjectTransformation())
{
com::sun::star::geometry::AffineMatrix3D aAffineMatrix3D;
@@ -177,7 +177,7 @@ namespace drawinglayer
const double
f_31(maProjection.get(3, 1));
const double
f_32(maProjection.get(3, 2));
const double
f_33(maProjection.get(3, 3));
-
+
com::sun::star::geometry::AffineMatrix3D aAffineMatrix3D;
rProp.Value >>=
aAffineMatrix3D;
maProjection =
basegfx::unotools::homMatrixFromAffineMatrix3D(aAffineMatrix3D);
@@ -233,8 +233,8 @@ namespace drawinglayer
}
}
- // central method to create a Sequence of PropertyValues
containing he complete
- // data set
+ // central method to create a Sequence of
PropertyValues containing the complete
+ // data set
void impFillViewInformationFromContent()
{
uno::Sequence< beans::PropertyValue > xRetval;
@@ -244,7 +244,7 @@ namespace drawinglayer
const bool
bDeviceToViewUsed(!maDeviceToView.isIdentity());
const bool bTimeUsed(0.0 < mfViewTime);
const bool
bExtraInformation(mxExtendedInformation.hasElements());
-
+
// projection may be defined using a frustum in
which case the last line of
// the 4x4 matrix is not (0,0,0,1). Since
AffineMatrix3D does not support that,
// these four values need to be treated extra
@@ -252,7 +252,7 @@ namespace drawinglayer
const bool bProjectionUsed_31(bProjectionUsed
&& !basegfx::fTools::equalZero(maProjection.get(3, 1)));
const bool bProjectionUsed_32(bProjectionUsed
&& !basegfx::fTools::equalZero(maProjection.get(3, 2)));
const bool bProjectionUsed_33(bProjectionUsed
&& !basegfx::fTools::equal(maProjection.get(3, 3), 1.0));
-
+
sal_uInt32 nIndex(0);
const sal_uInt32 nCount(
(bObjectTransformationUsed ? 1 : 0) +
@@ -263,7 +263,7 @@ namespace drawinglayer
(bProjectionUsed_32 ? 1 : 0) +
(bProjectionUsed_33 ? 1 : 0) +
(bDeviceToViewUsed ? 1 : 0) +
- (bTimeUsed ? 1 : 0) +
+ (bTimeUsed ? 1 : 0) +
(bExtraInformation ?
mxExtendedInformation.getLength() : 0));
mxViewInformation.realloc(nCount);
@@ -352,10 +352,10 @@ namespace drawinglayer
public:
ImpViewInformation3D(
- const basegfx::B3DHomMatrix&
rObjectTransformation,
- const basegfx::B3DHomMatrix& rOrientation,
- const basegfx::B3DHomMatrix& rProjection,
- const basegfx::B3DHomMatrix& rDeviceToView,
+ const basegfx::B3DHomMatrix&
rObjectTransformation,
+ const basegfx::B3DHomMatrix& rOrientation,
+ const basegfx::B3DHomMatrix& rProjection,
+ const basegfx::B3DHomMatrix& rDeviceToView,
double fViewTime,
const uno::Sequence< beans::PropertyValue >&
rExtendedParameters)
: mnRefCount(0),
@@ -404,21 +404,21 @@ namespace drawinglayer
const basegfx::B3DHomMatrix& getObjectToView() const
{
// on demand WorldToView creation
- ::osl::Mutex m_mutex;
+ ::osl::Mutex m_mutex;
if(maObjectToView.isIdentity())
{
const_cast< ImpViewInformation3D*
>(this)->maObjectToView = maDeviceToView * maProjection * maOrientation *
maObjectTransformation;
}
- return maObjectToView;
+ return maObjectToView;
}
const uno::Sequence< beans::PropertyValue >&
getViewInformationSequence() const
{
- ::osl::Mutex m_mutex;
+ ::osl::Mutex m_mutex;
- if(!mxViewInformation.hasElements())
+ if(!mxViewInformation.hasElements())
{
const_cast< ImpViewInformation3D*
>(this)->impFillViewInformationFromContent();
}
@@ -442,19 +442,19 @@ namespace drawinglayer
}
static ImpViewInformation3D* get_global_default()
- {
- static ImpViewInformation3D* pDefault = 0;
+ {
+ static ImpViewInformation3D* pDefault = 0;
- if(!pDefault)
- {
- pDefault = new ImpViewInformation3D();
+ if(!pDefault)
+ {
+ pDefault = new ImpViewInformation3D();
- // never delete; start with RefCount 1, not 0
- pDefault->mnRefCount++;
- }
+ // never delete; start with RefCount 1,
not 0
+ pDefault->mnRefCount++;
+ }
- return pDefault;
- }
+ return pDefault;
+ }
};
} // end of anonymous namespace
} // end of namespace drawinglayer
@@ -466,14 +466,14 @@ namespace drawinglayer
namespace geometry
{
ViewInformation3D::ViewInformation3D(
- const basegfx::B3DHomMatrix&
rObjectObjectTransformation,
- const basegfx::B3DHomMatrix& rOrientation,
- const basegfx::B3DHomMatrix& rProjection,
- const basegfx::B3DHomMatrix& rDeviceToView,
+ const basegfx::B3DHomMatrix&
rObjectObjectTransformation,
+ const basegfx::B3DHomMatrix& rOrientation,
+ const basegfx::B3DHomMatrix& rProjection,
+ const basegfx::B3DHomMatrix& rDeviceToView,
double fViewTime,
const uno::Sequence< beans::PropertyValue >&
rExtendedParameters)
: mpViewInformation3D(new ImpViewInformation3D(
- rObjectObjectTransformation, rOrientation,
rProjection,
+ rObjectObjectTransformation, rOrientation,
rProjection,
rDeviceToView, fViewTime, rExtendedParameters))
{
}
@@ -484,7 +484,7 @@ namespace drawinglayer
}
ViewInformation3D::ViewInformation3D()
- : mpViewInformation3D(ImpViewInformation3D::get_global_default())
+ :
mpViewInformation3D(ImpViewInformation3D::get_global_default())
{
mpViewInformation3D->mnRefCount++;
}
@@ -492,13 +492,13 @@ namespace drawinglayer
ViewInformation3D::ViewInformation3D(const ViewInformation3D&
rCandidate)
: mpViewInformation3D(rCandidate.mpViewInformation3D)
{
- ::osl::Mutex m_mutex;
+ ::osl::Mutex m_mutex;
mpViewInformation3D->mnRefCount++;
}
ViewInformation3D::~ViewInformation3D()
{
- ::osl::Mutex m_mutex;
+ ::osl::Mutex m_mutex;
if(mpViewInformation3D->mnRefCount)
{
@@ -510,14 +510,14 @@ namespace drawinglayer
}
}
- bool ViewInformation3D::isDefault() const
- {
- return mpViewInformation3D ==
ImpViewInformation3D::get_global_default();
- }
+ bool ViewInformation3D::isDefault() const
+ {
+ return mpViewInformation3D ==
ImpViewInformation3D::get_global_default();
+ }
ViewInformation3D& ViewInformation3D::operator=(const
ViewInformation3D& rCandidate)
{
- ::osl::Mutex m_mutex;
+ ::osl::Mutex m_mutex;
if(mpViewInformation3D->mnRefCount)
{
@@ -527,7 +527,7 @@ namespace drawinglayer
{
delete mpViewInformation3D;
}
-
+
mpViewInformation3D = rCandidate.mpViewInformation3D;
mpViewInformation3D->mnRefCount++;
diff --git a/main/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
b/main/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index f7830da..dfc8a3a 100644
--- a/main/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/main/drawinglayer/source/primitive2d/metafileprimitive2d.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.
- *
+ *
*************************************************************/
@@ -75,70 +75,70 @@ namespace
VCL OutputDevice stati. This data is needed for correct
interpretation of the MetaFile action flow.
*/
- class PropertyHolder
- {
- private:
+ class PropertyHolder
+ {
+ private:
/// current transformation (aka MapMode)
basegfx::B2DHomMatrix maTransformation;
MapUnit maMapUnit;
/// current colors
- basegfx::BColor maLineColor;
- basegfx::BColor maFillColor;
- basegfx::BColor maTextColor;
- basegfx::BColor maTextFillColor;
- basegfx::BColor maTextLineColor;
- basegfx::BColor maOverlineColor;
+ basegfx::BColor maLineColor;
+ basegfx::BColor maFillColor;
+ basegfx::BColor maTextColor;
+ basegfx::BColor maTextFillColor;
+ basegfx::BColor maTextLineColor;
+ basegfx::BColor maOverlineColor;
/// clipping
- basegfx::B2DPolyPolygon maClipPolyPoygon;
+ basegfx::B2DPolyPolygon maClipPolyPoygon;
- /// font, etc.
- Font maFont;
- RasterOp maRasterOp;
- sal_uInt32 mnLayoutMode;
- LanguageType maLanguageType;
- sal_uInt16 mnPushFlags;
+ /// font, etc.
+ Font maFont;
+ RasterOp maRasterOp;
+ sal_uInt32 mnLayoutMode;
+ LanguageType maLanguageType;
+ sal_uInt16 mnPushFlags;
- /// bitfield
+ /// bitfield
/// contains all active markers
- bool mbLineColor : 1;
- bool mbFillColor : 1;
- bool mbTextColor : 1;
- bool mbTextFillColor : 1;
- bool mbTextLineColor : 1;
- bool mbOverlineColor : 1;
- bool mbClipPolyPolygonActive : 1;
-
- public:
- PropertyHolder()
- : maTransformation(),
+ bool mbLineColor : 1;
+ bool mbFillColor : 1;
+ bool mbTextColor : 1;
+ bool mbTextFillColor : 1;
+ bool mbTextLineColor : 1;
+ bool mbOverlineColor : 1;
+ bool mbClipPolyPolygonActive
: 1;
+
+ public:
+ PropertyHolder()
+ : maTransformation(),
maMapUnit(MAP_100TH_MM),
maLineColor(),
- maFillColor(),
- maTextColor(COL_BLACK),
- maTextFillColor(),
- maTextLineColor(),
- maOverlineColor(),
- maClipPolyPoygon(),
- maFont(),
- maRasterOp(ROP_OVERPAINT),
- mnLayoutMode(0),
- maLanguageType(0),
- mnPushFlags(0),
- mbLineColor(false),
- mbFillColor(false),
- mbTextColor(true),
- mbTextFillColor(false),
- mbTextLineColor(false),
- mbOverlineColor(false),
- mbClipPolyPolygonActive(false)
- {
- }
+ maFillColor(),
+ maTextColor(COL_BLACK),
+ maTextFillColor(),
+ maTextLineColor(),
+ maOverlineColor(),
+ maClipPolyPoygon(),
+ maFont(),
+ maRasterOp(ROP_OVERPAINT),
+ mnLayoutMode(0),
+ maLanguageType(0),
+ mnPushFlags(0),
+ mbLineColor(false),
+ mbFillColor(false),
+ mbTextColor(true),
+ mbTextFillColor(false),
+ mbTextLineColor(false),
+ mbOverlineColor(false),
+ mbClipPolyPolygonActive(false)
+ {
+ }
- ~PropertyHolder()
- {
- }
+ ~PropertyHolder()
+ {
+ }
/// read/write accesses
const basegfx::B2DHomMatrix& getTransformation() const { return
maTransformation; }
@@ -148,67 +148,67 @@ namespace
void setMapUnit(MapUnit eNew) { if(eNew != maMapUnit) maMapUnit
= eNew; }
const basegfx::BColor& getLineColor() const { return
maLineColor; }
- void setLineColor(const basegfx::BColor& rNew) { if(rNew !=
maLineColor) maLineColor = rNew; }
- bool getLineColorActive() const { return mbLineColor; }
- void setLineColorActive(bool bNew) { if(bNew != mbLineColor)
mbLineColor = bNew; }
-
- const basegfx::BColor& getFillColor() const { return maFillColor; }
- void setFillColor(const basegfx::BColor& rNew) { if(rNew !=
maFillColor) maFillColor = rNew; }
- bool getFillColorActive() const { return mbFillColor; }
- void setFillColorActive(bool bNew) { if(bNew != mbFillColor)
mbFillColor = bNew; }
-
- const basegfx::BColor& getTextColor() const { return maTextColor; }
- void setTextColor(const basegfx::BColor& rNew) { if(rNew !=
maTextColor) maTextColor = rNew; }
- bool getTextColorActive() const { return mbTextColor; }
- void setTextColorActive(bool bNew) { if(bNew != mbTextColor)
mbTextColor = bNew; }
-
- const basegfx::BColor& getTextFillColor() const { return
maTextFillColor; }
- void setTextFillColor(const basegfx::BColor& rNew) { if(rNew !=
maTextFillColor) maTextFillColor = rNew; }
- bool getTextFillColorActive() const { return mbTextFillColor; }
- void setTextFillColorActive(bool bNew) { if(bNew != mbTextFillColor)
mbTextFillColor = bNew; }
-
- const basegfx::BColor& getTextLineColor() const { return
maTextLineColor; }
- void setTextLineColor(const basegfx::BColor& rNew) { if(rNew !=
maTextLineColor) maTextLineColor = rNew; }
- bool getTextLineColorActive() const { return mbTextLineColor; }
- void setTextLineColorActive(bool bNew) { if(bNew != mbTextLineColor)
mbTextLineColor = bNew; }
-
- const basegfx::BColor& getOverlineColor() const { return
maOverlineColor; }
- void setOverlineColor(const basegfx::BColor& rNew) { if(rNew !=
maOverlineColor) maOverlineColor = rNew; }
- bool getOverlineColorActive() const { return mbOverlineColor; }
- void setOverlineColorActive(bool bNew) { if(bNew != mbOverlineColor)
mbOverlineColor = bNew; }
-
- const basegfx::B2DPolyPolygon& getClipPolyPolygon() const { return
maClipPolyPoygon; }
- void setClipPolyPolygon(const basegfx::B2DPolyPolygon& rNew) { if(rNew
!= maClipPolyPoygon) maClipPolyPoygon = rNew; }
- bool getClipPolyPolygonActive() const { return
mbClipPolyPolygonActive; }
- void setClipPolyPolygonActive(bool bNew) { if(bNew !=
mbClipPolyPolygonActive) mbClipPolyPolygonActive = bNew; }
-
- const Font& getFont() const { return maFont; }
- void setFont(const Font& rFont) { if(rFont != maFont) maFont = rFont; }
-
- const RasterOp& getRasterOp() const { return maRasterOp; }
- void setRasterOp(const RasterOp& rRasterOp) { if(rRasterOp !=
maRasterOp) maRasterOp = rRasterOp; }
- bool isRasterOpInvert() const { return (ROP_XOR == maRasterOp ||
ROP_INVERT == maRasterOp); }
- bool isRasterOpForceBlack() const { return ROP_0 == maRasterOp; }
- bool isRasterOpActive() const { return isRasterOpInvert() ||
isRasterOpForceBlack(); }
-
- sal_uInt32 getLayoutMode() const { return mnLayoutMode; }
- void setLayoutMode(sal_uInt32 nNew) { if(nNew != mnLayoutMode)
mnLayoutMode = nNew; }
-
- LanguageType getLanguageType() const { return maLanguageType; }
- void setLanguageType(LanguageType aNew) { if(aNew != maLanguageType)
maLanguageType = aNew; }
-
- sal_uInt16 getPushFlags() const { return mnPushFlags; }
- void setPushFlags(sal_uInt16 nNew) { if(nNew != mnPushFlags)
mnPushFlags = nNew; }
-
- bool getLineOrFillActive() const { return (mbLineColor ||
mbFillColor); }
- };
+ void setLineColor(const basegfx::BColor& rNew) { if(rNew !=
maLineColor) maLineColor = rNew; }
+ bool getLineColorActive() const { return mbLineColor; }
+ void setLineColorActive(bool bNew) { if(bNew != mbLineColor)
mbLineColor = bNew; }
+
+ const basegfx::BColor& getFillColor() const { return
maFillColor; }
+ void setFillColor(const basegfx::BColor& rNew) { if(rNew !=
maFillColor) maFillColor = rNew; }
+ bool getFillColorActive() const { return mbFillColor; }
+ void setFillColorActive(bool bNew) { if(bNew != mbFillColor)
mbFillColor = bNew; }
+
+ const basegfx::BColor& getTextColor() const { return
maTextColor; }
+ void setTextColor(const basegfx::BColor& rNew) { if(rNew !=
maTextColor) maTextColor = rNew; }
+ bool getTextColorActive() const { return mbTextColor; }
+ void setTextColorActive(bool bNew) { if(bNew != mbTextColor)
mbTextColor = bNew; }
+
+ const basegfx::BColor& getTextFillColor() const { return
maTextFillColor; }
+ void setTextFillColor(const basegfx::BColor& rNew) { if(rNew !=
maTextFillColor) maTextFillColor = rNew; }
+ bool getTextFillColorActive() const { return mbTextFillColor; }
+ void setTextFillColorActive(bool bNew) { if(bNew !=
mbTextFillColor) mbTextFillColor = bNew; }
+
+ const basegfx::BColor& getTextLineColor() const { return
maTextLineColor; }
+ void setTextLineColor(const basegfx::BColor& rNew) { if(rNew !=
maTextLineColor) maTextLineColor = rNew; }
+ bool getTextLineColorActive() const { return mbTextLineColor; }
+ void setTextLineColorActive(bool bNew) { if(bNew !=
mbTextLineColor) mbTextLineColor = bNew; }
+
+ const basegfx::BColor& getOverlineColor() const { return
maOverlineColor; }
+ void setOverlineColor(const basegfx::BColor& rNew) { if(rNew !=
maOverlineColor) maOverlineColor = rNew; }
+ bool getOverlineColorActive() const { return mbOverlineColor; }
+ void setOverlineColorActive(bool bNew) { if(bNew !=
mbOverlineColor) mbOverlineColor = bNew; }
+
+ const basegfx::B2DPolyPolygon& getClipPolyPolygon() const {
return maClipPolyPoygon; }
+ void setClipPolyPolygon(const basegfx::B2DPolyPolygon& rNew) {
if(rNew != maClipPolyPoygon) maClipPolyPoygon = rNew; }
+ bool getClipPolyPolygonActive() const { return
mbClipPolyPolygonActive; }
+ void setClipPolyPolygonActive(bool bNew) { if(bNew !=
mbClipPolyPolygonActive) mbClipPolyPolygonActive = bNew; }
+
+ const Font& getFont() const { return maFont; }
+ void setFont(const Font& rFont) { if(rFont != maFont) maFont =
rFont; }
+
+ const RasterOp& getRasterOp() const { return maRasterOp; }
+ void setRasterOp(const RasterOp& rRasterOp) { if(rRasterOp !=
maRasterOp) maRasterOp = rRasterOp; }
+ bool isRasterOpInvert() const { return (ROP_XOR == maRasterOp
|| ROP_INVERT == maRasterOp); }
+ bool isRasterOpForceBlack() const { return ROP_0 == maRasterOp;
}
+ bool isRasterOpActive() const { return isRasterOpInvert() ||
isRasterOpForceBlack(); }
+
+ sal_uInt32 getLayoutMode() const { return mnLayoutMode; }
+ void setLayoutMode(sal_uInt32 nNew) { if(nNew != mnLayoutMode)
mnLayoutMode = nNew; }
+
+ LanguageType getLanguageType() const { return maLanguageType; }
+ void setLanguageType(LanguageType aNew) { if(aNew !=
maLanguageType) maLanguageType = aNew; }
+
+ sal_uInt16 getPushFlags() const { return mnPushFlags; }
+ void setPushFlags(sal_uInt16 nNew) { if(nNew != mnPushFlags)
mnPushFlags = nNew; }
+
+ bool getLineOrFillActive() const { return (mbLineColor ||
mbFillColor); }
+ };
} // end of anonymous namespace
//////////////////////////////////////////////////////////////////////////////
namespace
{
- /** stack for properites
+ /** stack for properties
This class builds a stack based on the PropertyHolder
class. It encapsulates the pointer/new/delete usage to
@@ -217,51 +217,51 @@ namespace
flag values VCL OutputDevice uses here; not all stuff is
pushed and thus needs to be copied at pop.
*/
- class PropertyHolders
- {
- private:
- std::vector< PropertyHolder* > maPropertyHolders;
+ class PropertyHolders
+ {
+ private:
+ std::vector< PropertyHolder* > maPropertyHolders;
- public:
- PropertyHolders()
- {
- maPropertyHolders.push_back(new PropertyHolder());
- }
+ public:
+ PropertyHolders()
+ {
+ maPropertyHolders.push_back(new PropertyHolder());
+ }
- sal_uInt32 size()
- {
- return maPropertyHolders.size();
- }
+ sal_uInt32 size()
+ {
+ return maPropertyHolders.size();
+ }
void PushDefault()
{
- PropertyHolder* pNew = new PropertyHolder();
- maPropertyHolders.push_back(pNew);
+ PropertyHolder* pNew = new PropertyHolder();
+ maPropertyHolders.push_back(pNew);
}
- void Push(sal_uInt16 nPushFlags)
- {
- if(nPushFlags)
- {
- OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: PUSH
with no property holders (!)");
+ void Push(sal_uInt16 nPushFlags)
+ {
+ if(nPushFlags)
+ {
+ OSL_ENSURE(maPropertyHolders.size(),
"PropertyHolders: PUSH with no property holders (!)");
if ( !maPropertyHolders.empty() )
{
PropertyHolder* pNew = new
PropertyHolder(*maPropertyHolders.back());
pNew->setPushFlags(nPushFlags);
maPropertyHolders.push_back(pNew);
}
- }
- }
+ }
+ }
- void Pop()
- {
- OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: POP with no
property holders (!)");
- const sal_uInt32 nSize(maPropertyHolders.size());
+ void Pop()
+ {
+ OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders:
POP with no property holders (!)");
+ const sal_uInt32 nSize(maPropertyHolders.size());
- if(nSize)
- {
- const PropertyHolder* pTip = maPropertyHolders.back();
- const sal_uInt16 nPushFlags(pTip->getPushFlags());
+ if(nSize)
+ {
+ const PropertyHolder* pTip =
maPropertyHolders.back();
+ const sal_uInt16
nPushFlags(pTip->getPushFlags());
if(nPushFlags)
{
@@ -272,45 +272,45 @@ namespace
if(PUSH_ALL != nPushFlags)
{
- if(!(nPushFlags & PUSH_LINECOLOR ))
+ if(!(nPushFlags & PUSH_LINECOLOR ))
{
pLast->setLineColor(pTip->getLineColor());
pLast->setLineColorActive(pTip->getLineColorActive());
}
- if(!(nPushFlags & PUSH_FILLCOLOR ))
+ if(!(nPushFlags & PUSH_FILLCOLOR ))
{
pLast->setFillColor(pTip->getFillColor());
pLast->setFillColorActive(pTip->getFillColorActive());
}
- if(!(nPushFlags & PUSH_FONT ))
+ if(!(nPushFlags & PUSH_FONT ))
{
pLast->setFont(pTip->getFont());
}
- if(!(nPushFlags & PUSH_TEXTCOLOR ))
+ if(!(nPushFlags & PUSH_TEXTCOLOR ))
{
pLast->setTextColor(pTip->getTextColor());
pLast->setTextColorActive(pTip->getTextColorActive());
}
- if(!(nPushFlags & PUSH_MAPMODE ))
+ if(!(nPushFlags & PUSH_MAPMODE ))
{
pLast->setTransformation(pTip->getTransformation());
pLast->setMapUnit(pTip->getMapUnit());
}
- if(!(nPushFlags & PUSH_CLIPREGION ))
+ if(!(nPushFlags & PUSH_CLIPREGION ))
{
pLast->setClipPolyPolygon(pTip->getClipPolyPolygon());
pLast->setClipPolyPolygonActive(pTip->getClipPolyPolygonActive());
}
- if(!(nPushFlags & PUSH_RASTEROP ))
+ if(!(nPushFlags & PUSH_RASTEROP ))
{
pLast->setRasterOp(pTip->getRasterOp());
}
- if(!(nPushFlags & PUSH_TEXTFILLCOLOR ))
+ if(!(nPushFlags & PUSH_TEXTFILLCOLOR ))
{
pLast->setTextFillColor(pTip->getTextFillColor());
pLast->setTextFillColorActive(pTip->getTextFillColorActive());
}
- if(!(nPushFlags & PUSH_TEXTALIGN ))
+ if(!(nPushFlags & PUSH_TEXTALIGN ))
{
if(pLast->getFont().GetAlign() !=
pTip->getFont().GetAlign())
{
@@ -319,11 +319,11 @@ namespace
pLast->setFont(aFont);
}
}
- if(!(nPushFlags & PUSH_REFPOINT ))
+ if(!(nPushFlags & PUSH_REFPOINT ))
{
// not supported
}
- if(!(nPushFlags & PUSH_TEXTLINECOLOR ))
+ if(!(nPushFlags & PUSH_TEXTLINECOLOR ))
{
pLast->setTextLineColor(pTip->getTextLineColor());
pLast->setTextLineColorActive(pTip->getTextLineColorActive());
@@ -332,11 +332,11 @@ namespace
{
pLast->setLayoutMode(pTip->getLayoutMode());
}
- if(!(nPushFlags & PUSH_TEXTLANGUAGE ))
+ if(!(nPushFlags & PUSH_TEXTLANGUAGE ))
{
pLast->setLanguageType(pTip->getLanguageType());
}
- if(!(nPushFlags & PUSH_OVERLINECOLOR ))
+ if(!(nPushFlags & PUSH_OVERLINECOLOR ))
{
pLast->setOverlineColor(pTip->getOverlineColor());
pLast->setOverlineColorActive(pTip->getOverlineColorActive());
@@ -345,28 +345,28 @@ namespace
}
}
- // execute the pop
- delete maPropertyHolders.back();
- maPropertyHolders.pop_back();
- }
- }
+ // execute the pop
+ delete maPropertyHolders.back();
+ maPropertyHolders.pop_back();
+ }
+ }
- PropertyHolder& Current()
- {
+ PropertyHolder& Current()
+ {
static PropertyHolder aDummy;
- OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: CURRENT
with no property holders (!)");
+ OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders:
CURRENT with no property holders (!)");
return maPropertyHolders.empty() ? aDummy :
*maPropertyHolders.back();
- }
+ }
- ~PropertyHolders()
- {
- while(maPropertyHolders.size())
- {
- delete maPropertyHolders.back();
- maPropertyHolders.pop_back();
- }
- }
- };
+ ~PropertyHolders()
+ {
+ while(maPropertyHolders.size())
+ {
+ delete maPropertyHolders.back();
+ maPropertyHolders.pop_back();
+ }
+ }
+ };
} // end of anonymous namespace
//////////////////////////////////////////////////////////////////////////////
@@ -380,37 +380,37 @@ namespace
the spans of regions to a single, already merged
PolyPolygon.
*/
- basegfx::B2DPolyPolygon getB2DPolyPolygonFromRegion(const Region& rRegion)
- {
- basegfx::B2DPolyPolygon aRetval;
+ basegfx::B2DPolyPolygon getB2DPolyPolygonFromRegion(const Region&
rRegion)
+ {
+ basegfx::B2DPolyPolygon aRetval;
- if(!rRegion.IsEmpty())
- {
- Region aRegion(rRegion);
+ if(!rRegion.IsEmpty())
+ {
+ Region aRegion(rRegion);
- aRetval = aRegion.GetAsB2DPolyPolygon();
- }
+ aRetval = aRegion.GetAsB2DPolyPolygon();
+ }
- return aRetval;
- }
+ return aRetval;
+ }
} // end of anonymous namespace
//////////////////////////////////////////////////////////////////////////////
namespace
{
- /** Helper class to buffer and hold a Primive target vector. It
- encapsulates the new/delete functionality and aloows to work
+ /** Helper class to buffer and hold a Primitive target vector. It
+ encapsulates the new/delete functionality and allows to work
on pointers of the implementation classes. All data will
be converted to uno sequences of uno references when accessing
the
data.
*/
- class TargetHolder
- {
- private:
- std::vector< drawinglayer::primitive2d::BasePrimitive2D* > aTargets;
+ class TargetHolder
+ {
+ private:
+ std::vector< drawinglayer::primitive2d::BasePrimitive2D* >
aTargets;
- public:
+ public:
TargetHolder()
: aTargets()
{
@@ -581,7 +581,7 @@ namespace drawinglayer
namespace
{
/** helper to convert a MapMode to a transformation */
- basegfx::B2DHomMatrix getTransformFromMapMode(const MapMode& rMapMode)
+ basegfx::B2DHomMatrix getTransformFromMapMode(const MapMode& rMapMode)
{
basegfx::B2DHomMatrix aMapping;
const Fraction aNoScale(1, 1);
@@ -603,12 +603,12 @@ namespace
}
/** helper to create a PointArrayPrimitive2D based on current context */
- void createPointArrayPrimitive(
- const std::vector< basegfx::B2DPoint >& rPositions,
- TargetHolder& rTarget,
+ void createPointArrayPrimitive(
+ const std::vector< basegfx::B2DPoint >& rPositions,
+ TargetHolder& rTarget,
PropertyHolder& rProperties,
- basegfx::BColor aBColor)
- {
+ basegfx::BColor aBColor)
+ {
if(rPositions.size())
{
if(rProperties.getTransformation().isIdentity())
@@ -633,7 +633,7 @@ namespace
aBColor));
}
}
- }
+ }
/** helper to create a PolygonHairlinePrimitive2D based on current
context */
void createHairlinePrimitive(
@@ -734,13 +734,13 @@ namespace
createHairlinePrimitive(rLinePolygon, rTarget,
rProperties);
}
}
- }
+ }
/** helper to create needed line and fill primitives based on current
context */
void createHairlineAndFillPrimitive(
- const basegfx::B2DPolygon& rPolygon,
- TargetHolder& rTarget,
- PropertyHolder& rProperties)
+ const basegfx::B2DPolygon& rPolygon,
+ TargetHolder& rTarget,
+ PropertyHolder& rProperties)
{
if(rProperties.getFillColorActive())
{
@@ -824,7 +824,7 @@ namespace
}
/** helper to create a regular BotmapEx from a MaskAction (definitions
- which use a bitmap without transparence but define one of the
colors as
+ which use a bitmap without transparency but define one of the
colors as
transparent)
*/
BitmapEx createMaskBmpEx(const Bitmap& rBitmap, const Color& rMaskColor)
@@ -953,22 +953,22 @@ namespace
/** helper to take needed action on ClipRegion change. This method
needs to be called
on any Region change, e.g. at the obvious actions doing this,
but also at pop-calls
which change the Region of the current context. It takes care
of creating the
- current embeddec context, set the new Region at the context and
eventually prepare
+ current embedded context, set the new Region at the context and
eventually prepare
a new target for embracing new geometry to the current region
*/
- void HandleNewClipRegion(
- const basegfx::B2DPolyPolygon& rClipPolyPolygon,
- TargetHolders& rTargetHolders,
- PropertyHolders& rPropertyHolders)
- {
- const bool bNewActive(rClipPolyPolygon.count());
+ void HandleNewClipRegion(
+ const basegfx::B2DPolyPolygon& rClipPolyPolygon,
+ TargetHolders& rTargetHolders,
+ PropertyHolders& rPropertyHolders)
+ {
+ const bool bNewActive(rClipPolyPolygon.count());
// #i108636# The handlig of new ClipPolyPolygons was not done
as good as possible
// in the first version of this interpreter; e.g. when a
ClipPolyPolygon was set
// initially and then using a lot of push/pop actions, the pop
always leads
// to setting a 'new' ClipPolyPolygon which indeed is the
return to the ClipPolyPolygon
// of the properties next on the stack.
- //
+ //
// This ClipPolyPolygon is identical to the current one, so
there is no need to
// create a MaskPrimitive2D containing the up-to-now created
primitives, but
// this was done before. While this does not lead to wrong
primitive
@@ -998,9 +998,9 @@ namespace
// Handle deletion of old ClipPolyPolygon. The process evtl.
created primitives which
// belong to this active ClipPolyPolygon. These need to be
embedded to a
// MaskPrimitive2D accordingly.
- if(rPropertyHolders.Current().getClipPolyPolygonActive() &&
rTargetHolders.size() > 1)
- {
- drawinglayer::primitive2d::Primitive2DSequence aSubContent;
+ if(rPropertyHolders.Current().getClipPolyPolygonActive() &&
rTargetHolders.size() > 1)
+ {
+ drawinglayer::primitive2d::Primitive2DSequence
aSubContent;
if(rPropertyHolders.Current().getClipPolyPolygon().count()
&& rTargetHolders.Current().size())
@@ -1035,7 +1035,7 @@ namespace
/** helper to handle the change of RasterOp. It takes care of
encapsulating all current
geometry to the current RasterOp (if changed) and needs to be
called on any RasterOp
change. It will also start a new geometry target to embrace to
the new RasterOp if
- a changuing RasterOp is used. Currently, ROP_XOR and ROP_INVERT
are supported using
+ a changing RasterOp is used. Currently, ROP_XOR and ROP_INVERT
are supported using
InvertPrimitive2D, and ROP_0 by using a
ModifiedColorPrimitive2D to force to black paint
*/
void HandleNewRasterOp(
@@ -1285,7 +1285,7 @@ namespace
{
drawinglayer::primitive2d::BasePrimitive2D* pResult = 0;
const Font& rFont = rProperty.getFont();
- basegfx::B2DVector aAlignmentOffset(0.0, 0.0);
+ basegfx::B2DVector aAlignmentOffset(0.0, 0.0);
if(nTextLength)
{
@@ -1318,12 +1318,12 @@ namespace
if(bDecoratedIsNeeded)
{
- // prepare overline, underline and srikeout data
+ // prepare overline, underline and strikeout data
const drawinglayer::primitive2d::TextLine
eFontOverline(drawinglayer::primitive2d::mapFontUnderlineToTextLine(rFont.GetOverline()));
const drawinglayer::primitive2d::TextLine
eFontUnderline(drawinglayer::primitive2d::mapFontUnderlineToTextLine(rFont.GetUnderline()));
const drawinglayer::primitive2d::TextStrikeout
eTextStrikeout(drawinglayer::primitive2d::mapFontStrikeoutToTextStrikeout(rFont.GetStrikeout()));
- // check UndelineAbove
+ // check UnderlineAbove
const bool
bUnderlineAbove(drawinglayer::primitive2d::TEXT_LINE_NONE != eFontUnderline &&
isUnderlineAbove(rFont));
// prepare emphasis mark data
@@ -1624,7 +1624,7 @@ namespace
I have marked the single MetaActions with:
SIMPLE, DONE:
- Simple, e.g nothing to do or value setting in the context
+ Simple, e.g. nothing to do or value setting in the context
CHECKED, WORKS WELL:
Thoroughly tested with extra written test code which created a
replacement
@@ -1635,19 +1635,19 @@ namespace
creations, nor in EMF/WMF imports (checked with a whole bunch
of critical EMF/WMF
bugdocs)
- For more commens, see the single action implementations.
+ For more comments, see the single action implementations.
*/
- void interpretMetafile(
- const GDIMetaFile& rMetaFile,
- TargetHolders& rTargetHolders,
- PropertyHolders& rPropertyHolders,
+ void interpretMetafile(
+ const GDIMetaFile& rMetaFile,
+ TargetHolders& rTargetHolders,
+ PropertyHolders& rPropertyHolders,
const drawinglayer::geometry::ViewInformation2D&
rViewInformation)
- {
- const sal_uInt32 nCount(rMetaFile.GetActionCount());
+ {
+ const sal_uInt32 nCount(rMetaFile.GetActionCount());
- for(sal_uInt32 nAction(0); nAction < nCount; nAction++)
- {
- MetaAction* pAction = rMetaFile.GetAction(nAction);
+ for(sal_uInt32 nAction(0); nAction < nCount; nAction++)
+ {
+ MetaAction* pAction = rMetaFile.GetAction(nAction);
switch(pAction->GetType())
{
@@ -2004,7 +2004,7 @@ namespace
if(nTextLength &&
rPropertyHolders.Current().getTextColorActive())
{
- // preapare DXArray (if used)
+ // prepare DXArray (if used)
std::vector< double > aDXArray;
sal_Int32* pDXArray =
pA->GetDXArray();
@@ -2071,7 +2071,7 @@ namespace
if(fabs(fRelative - 1.0) >= 0.035)
{
- // when derivation is more than 3,5% from
default text size,
+ // when derivation is more than 3.5% from
default text size,
// scale the DXArray
for(sal_uInt32 a(0); a <
aTextArray.size(); a++)
{
@@ -2113,7 +2113,7 @@ namespace
// VCL AFAP.
// Since AddTextRectActions is
the only way as long as we do not have
// a simple text layouter
available, i will try to add it to the
- // TextLayouterDevice isloation.
+ // TextLayouterDevice isolation.
drawinglayer::primitive2d::TextLayouterDevice aTextLayouterDevice;
aTextLayouterDevice.setFont(rPropertyHolders.Current().getFont());
GDIMetaFile aGDIMetaFile;
@@ -2128,7 +2128,7 @@ namespace
{
rTargetHolders.Push();
- // for sub-Mteafile contents, do start with
new, default render state
+ // for sub-Metafile contents, do start with
new, default render state
// #124686# ...but copy font, this is already
set accordingly
const Font& rTargetFont =
rPropertyHolders.Current().getFont();
rPropertyHolders.PushDefault();
@@ -2311,7 +2311,7 @@ namespace
if(rPropertyHolders.Current().isRasterOpInvert())
{
// use a special version of
FillGradientPrimitive2D which creates
- // non-overlapping geometry on
decomposition to makethe old XOR
+ // non-overlapping geometry on
decomposition to make the old XOR
// paint 'trick' work.
xGradient[0] =
drawinglayer::primitive2d::Primitive2DReference(
new
drawinglayer::primitive2d::NonOverlappingFillGradientPrimitive2D(
@@ -2741,7 +2741,7 @@ namespace
if(0 == aFontSize.Height())
{
- // this should not happen but i got Metafiles where
this was the
+ // this should not happen but I got Metafiles where
this was the
// case. A height needs to be guessed (similar to
OutputDevice::ImplNewFont())
Font aCorrectedFont(pA->GetFont());
@@ -2766,7 +2766,7 @@ namespace
rPropertyHolders.Current().setTextColor(rFontColor.getBColor());
}
- // caution: do NOT decativate here on transparet, see
+ // caution: do NOT deactivate here on transparent, see
// OutputDevice::SetFont(..) for more info
//
rPropertyHolders.Current().setTextColorActive(bActivate);
@@ -2961,9 +2961,9 @@ namespace
/** CHECKED, WORKS WELL */
const MetaFloatTransparentAction* pA = (const
MetaFloatTransparentAction*)pAction;
const basegfx::B2DRange aTargetRange(
- pA->GetPoint().X(),
- pA->GetPoint().Y(),
- pA->GetPoint().X() + pA->GetSize().Width(),
+ pA->GetPoint().X(),
+ pA->GetPoint().Y(),
+ pA->GetPoint().X() + pA->GetSize().Width(),
pA->GetPoint().Y() + pA->GetSize().Height());
if(!aTargetRange.isEmpty())
@@ -2977,7 +2977,7 @@ namespace
drawinglayer::primitive2d::Primitive2DSequence xSubContent;
{
rTargetHolders.Push();
- // #i# for
sub-Mteafile contents, do start with new, default render state
+ // #i# for
sub-Metafile contents, do start with new, default render state
rPropertyHolders.PushDefault();
interpretMetafile(rContent, rTargetHolders, rPropertyHolders, rViewInformation);
xSubContent =
rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current());
@@ -3010,7 +3010,7 @@ namespace
// apply general current transformation
aSubTransform =
rPropertyHolders.Current().getTransformation() * aSubTransform;
- // evtl. embed sub-content to it's
transformation
+ // evtl. embed sub-content to its
transformation
if(!aSubTransform.isIdentity())
{
const
drawinglayer::primitive2d::Primitive2DReference aEmbeddedTransform(
@@ -3045,7 +3045,7 @@ namespace
aRange,
aAttribute));
- //
create transparence primitive
+ //
create transparent primitive
rTargetHolders.Current().append(
new drawinglayer::primitive2d::TransparencePrimitive2D(
xSubContent,
@@ -3105,7 +3105,7 @@ namespace
{
// XGRAD_SEQ_BEGIN, XGRAD_SEQ_END should be supported
since the
// pure recorded paint of the gradients uses the XOR
paint functionality
- // ('trick'). This is (and will be) broblematic with
AntAliasing, so it's
+ // ('trick'). This is (and will be) problematic with
AntAliasing, so it's
// better to use this info
const MetaGradientExAction*
pMetaGradientExAction = 0;
bool bDone(false);
@@ -3166,15 +3166,15 @@ namespace
}
break;
- }
- default:
- {
- OSL_ENSURE(false, "Unknown MetaFile Action (!)");
- break;
- }
- }
- }
- }
+ }
+ default:
+ {
+ OSL_ENSURE(false, "Unknown MetaFile
Action (!)");
+ break;
+ }
+ }
+ }
+ }
} // end of anonymous namespace
//////////////////////////////////////////////////////////////////////////////
@@ -3184,37 +3184,37 @@ namespace drawinglayer
namespace primitive2d
{
Primitive2DSequence
MetafilePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D&
rViewInformation) const
- {
- // prepare target and porperties; each will have one
default entry
- TargetHolders aTargetHolders;
- PropertyHolders aPropertyHolders;
+ {
+ // prepare target and properties; each will have one
default entry
+ TargetHolders aTargetHolders;
+ PropertyHolders aPropertyHolders;
// set target MapUnit at Properties
aPropertyHolders.Current().setMapUnit(getMetaFile().GetPrefMapMode().GetMapUnit());
// interpret the Metafile
- interpretMetafile(getMetaFile(), aTargetHolders, aPropertyHolders,
rViewInformation);
+ interpretMetafile(getMetaFile(), aTargetHolders,
aPropertyHolders, rViewInformation);
- // get the content. There should be ony one target, as
in the start condition,
- // but iterating will be the right thing to do when some push/pop
is not closed
+ // get the content. There should be only one target, as
in the start condition,
+ // but iterating will be the right thing to do when
some push/pop is not closed
Primitive2DSequence xRetval;
- while(aTargetHolders.size() > 1)
- {
- appendPrimitive2DSequenceToPrimitive2DSequence(xRetval,
-
aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current()));
- aTargetHolders.Pop();
- }
+ while(aTargetHolders.size() > 1)
+ {
+
appendPrimitive2DSequenceToPrimitive2DSequence(xRetval,
+
aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current()));
+ aTargetHolders.Pop();
+ }
- appendPrimitive2DSequenceToPrimitive2DSequence(xRetval,
-
aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current()));
+ appendPrimitive2DSequenceToPrimitive2DSequence(xRetval,
+
aTargetHolders.Current().getPrimitive2DSequence(aPropertyHolders.Current()));
if(xRetval.hasElements())
{
// get target size
const Rectangle
aMtfTarget(getMetaFile().GetPrefMapMode().GetOrigin(),
getMetaFile().GetPrefSize());
- // create transformation
+ // create transformation
basegfx::B2DHomMatrix aAdaptedTransform;
aAdaptedTransform.translate(-aMtfTarget.Left(),
-aMtfTarget.Top());
@@ -3232,8 +3232,8 @@ namespace drawinglayer
xRetval =
Primitive2DSequence(&aEmbeddedTransform, 1);
}
- return xRetval;
- }
+ return xRetval;
+ }
MetafilePrimitive2D::MetafilePrimitive2D(
const basegfx::B2DHomMatrix& rMetaFileTransform,
@@ -3260,13 +3260,13 @@ namespace drawinglayer
basegfx::B2DRange MetafilePrimitive2D::getB2DRange(const
geometry::ViewInformation2D& /*rViewInformation*/) const
{
// use own implementation to quickly answer the
getB2DRange question. The
- // MetafilePrimitive2D assumes that all geometry is inside of the
shape. If
- // this is not the case (i have already seen some wrong Metafiles)
it should
- // be embedded to a MaskPrimitive2D
+ // MetafilePrimitive2D assumes that all geometry is
inside of the shape. If
+ // this is not the case (i have already seen some wrong
Metafiles) it should
+ // be embedded to a MaskPrimitive2D
basegfx::B2DRange aRetval(0.0, 0.0, 1.0, 1.0);
aRetval.transform(getTransform());
- return aRetval;
+ return aRetval;
}
// provide unique ID
diff --git a/main/lingucomponent/source/spellcheck/spell/sspellimp.cxx
b/main/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 9eabb61..2ea7672 100644
--- a/main/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/main/lingucomponent/source/spellcheck/spell/sspellimp.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.
- *
+ *
*************************************************************/
@@ -71,21 +71,21 @@ using namespace linguistic;
SpellChecker::SpellChecker() :
aEvtListeners ( GetLinguMutex() )
{
- aDicts = NULL;
+ aDicts = NULL;
aDEncs = NULL;
aDLocs = NULL;
aDNames = NULL;
bDisposing = sal_False;
pPropHelper = NULL;
- numdict = 0;
+ numdict = 0;
}
SpellChecker::~SpellChecker()
{
- if (aDicts)
+ if (aDicts)
{
- for (int i = 0; i < numdict; i++)
+ for (int i = 0; i < numdict; i++)
{
if (aDicts[i]) delete aDicts[i];
aDicts[i] = NULL;
@@ -122,49 +122,49 @@ PropertyHelper_Spelling &
SpellChecker::GetPropHelper_Impl()
Sequence< Locale > SAL_CALL SpellChecker::getLocales()
throw(RuntimeException)
{
- MutexGuard aGuard( GetLinguMutex() );
+ MutexGuard aGuard( GetLinguMutex() );
- // this routine should return the locales supported by the installed
- // dictionaries.
+ // this routine should return the locales supported by the installed
+ // dictionaries.
- if (!numdict)
- {
- SvtLinguConfig aLinguCfg;
+ if (!numdict)
+ {
+ SvtLinguConfig aLinguCfg;
- // get list of extension dictionaries-to-use
+ // get list of extension dictionaries-to-use
// (or better speaking: the list of dictionaries using the
// new configuration entries).
- std::list< SvtLinguConfigDictionaryEntry > aDics;
- uno::Sequence< rtl::OUString > aFormatList;
- aLinguCfg.GetSupportedDictionaryFormatsFor( A2OU("SpellCheckers"),
- A2OU("org.openoffice.lingu.MySpellSpellChecker"), aFormatList
);
- sal_Int32 nLen = aFormatList.getLength();
- for (sal_Int32 i = 0; i < nLen; ++i)
- {
- std::vector< SvtLinguConfigDictionaryEntry > aTmpDic(
- aLinguCfg.GetActiveDictionariesByFormat( aFormatList[i] )
);
- aDics.insert( aDics.end(), aTmpDic.begin(), aTmpDic.end() );
- }
+ std::list< SvtLinguConfigDictionaryEntry > aDics;
+ uno::Sequence< rtl::OUString > aFormatList;
+ aLinguCfg.GetSupportedDictionaryFormatsFor(
A2OU("SpellCheckers"),
+
A2OU("org.openoffice.lingu.MySpellSpellChecker"), aFormatList );
+ sal_Int32 nLen = aFormatList.getLength();
+ for (sal_Int32 i = 0; i < nLen; ++i)
+ {
+ std::vector< SvtLinguConfigDictionaryEntry > aTmpDic(
+
aLinguCfg.GetActiveDictionariesByFormat( aFormatList[i] ) );
+ aDics.insert( aDics.end(), aTmpDic.begin(),
aTmpDic.end() );
+ }
- //!! for compatibility with old dictionaries (the ones not using
extensions
- //!! or new configuration entries, but still using the dictionary.lst
file)
+ //!! for compatibility with old dictionaries (the ones not
using extensions
+ //!! or new configuration entries, but still using the
dictionary.lst file)
//!! Get the list of old style spell checking dictionaries to
use...
- std::vector< SvtLinguConfigDictionaryEntry > aOldStyleDics(
+ std::vector< SvtLinguConfigDictionaryEntry > aOldStyleDics(
GetOldStyleDics( "DICT" ) );
// to prefer dictionaries with configuration entries we will
only
// use those old style dictionaries that add a language that
- // is not yet supported by the list od new style dictionaries
+ // is not yet supported by the list of new style dictionaries
MergeNewStyleDicsAndOldStyleDics( aDics, aOldStyleDics );
- numdict = aDics.size();
- if (numdict)
- {
+ numdict = aDics.size();
+ if (numdict)
+ {
uno::Reference< lang::XMultiServiceFactory > xServiceFactory(
utl::getProcessServiceFactory() );
uno::Reference< ucb::XSimpleFileAccess > xAccess;
try
{
- xAccess.set( xServiceFactory->createInstance(
+ xAccess.set( xServiceFactory->createInstance(
A2OU( "com.sun.star.ucb.SimpleFileAccess" ) ),
uno::UNO_QUERY_THROW );
}
catch (uno::Exception & e)
@@ -176,7 +176,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
sal_Int32 k = 0;
std::set< rtl::OUString, lt_rtl_OUString > aLocaleNamesSet;
std::list< SvtLinguConfigDictionaryEntry >::const_iterator aDictIt;
- for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt)
+ for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt)
{
uno::Sequence< rtl::OUString > aLocations( aDictIt->aLocations
);
if ( xAccess.is() && aLocations.getLength() )
@@ -191,7 +191,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
{
uno::Sequence< rtl::OUString > aLocaleNames(
aDictIt->aLocaleNames );
sal_Int32 nLen2 = aLocaleNames.getLength();
- for (k = 0; k < nLen2; ++k)
+ for (k = 0; k < nLen2; ++k)
{
aLocaleNamesSet.insert( aLocaleNames[k] );
}
@@ -202,7 +202,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
aSuppLocales.realloc( aLocaleNamesSet.size() );
std::set< rtl::OUString, lt_rtl_OUString >::const_iterator aItB;
k = 0;
- for (aItB = aLocaleNamesSet.begin(); aItB !=
aLocaleNamesSet.end(); ++aItB)
+ for (aItB = aLocaleNamesSet.begin(); aItB !=
aLocaleNamesSet.end(); ++aItB)
{
Locale aTmp( MsLangId::convertLanguageToLocale(
MsLangId::convertIsoStringToLanguage( *aItB )));
@@ -215,7 +215,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
//! In the future the implementation should support
using several dictionaries
//! for one locale.
numdict = 0;
- for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt)
+ for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt)
numdict = numdict +
aDictIt->aLocaleNames.getLength();
// add dictionary information
@@ -224,7 +224,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
aDLocs = new Locale [numdict];
aDNames = new OUString [numdict];
k = 0;
- for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt)
+ for (aDictIt = aDics.begin(); aDictIt != aDics.end(); ++aDictIt)
{
if (aDictIt->aLocaleNames.getLength() > 0 &&
aDictIt->aLocations.getLength() > 0)
@@ -234,8 +234,8 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
// currently only one language per dictionary is supported
in the actual implementation...
// Thus here we work-around this by adding the same
dictionary several times.
- // Once for each of it's supported locales.
- for (sal_Int32 i = 0; i < nLocales; ++i)
+ // Once for each of its supported locales.
+ for (sal_Int32 i = 0; i < nLocales; ++i)
{
aDicts[k] = NULL;
aDEncs[k] = RTL_TEXTENCODING_DONTKNOW;
@@ -264,8 +264,8 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
aDLocs = NULL;
aDNames = NULL;
aSuppLocales.realloc(0);
- }
- }
+ }
+ }
return aSuppLocales;
}
@@ -281,7 +281,7 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale&
rLocale)
getLocales();
sal_Int32 nLen = aSuppLocales.getLength();
- for (sal_Int32 i = 0; i < nLen; ++i)
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
const Locale *pLocale = aSuppLocales.getConstArray();
if (rLocale == pLocale[i])
@@ -296,34 +296,34 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale&
rLocale)
sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale
&rLocale )
{
- Hunspell * pMS = NULL;
- rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+ Hunspell * pMS = NULL;
+ rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
// initialize a myspell object for each dictionary once
- // (note: mutex is held higher up in isValid)
+ // (note: mutex is held higher up in isValid)
sal_Int16 nRes = -1;
- // first handle smart quotes both single and double
+ // first handle smart quotes both single and double
OUStringBuffer rBuf(rWord);
- sal_Int32 n = rBuf.getLength();
- sal_Unicode c;
- for (sal_Int32 ix=0; ix < n; ix++)
- {
- c = rBuf.charAt(ix);
- if ((c == 0x201C) || (c == 0x201D))
- rBuf.setCharAt(ix,(sal_Unicode)0x0022);
- if ((c == 0x2018) || (c == 0x2019))
- rBuf.setCharAt(ix,(sal_Unicode)0x0027);
- }
- OUString nWord(rBuf.makeStringAndClear());
+ sal_Int32 n = rBuf.getLength();
+ sal_Unicode c;
+ for (sal_Int32 ix=0; ix < n; ix++)
+ {
+ c = rBuf.charAt(ix);
+ if ((c == 0x201C) || (c == 0x201D))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0022);
+ if ((c == 0x2018) || (c == 0x2019))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0027);
+ }
+ OUString nWord(rBuf.makeStringAndClear());
if (n)
{
- for (sal_Int32 i = 0; i < numdict; ++i)
- {
- pMS = NULL;
- eEnc = RTL_TEXTENCODING_DONTKNOW;
+ for (sal_Int32 i = 0; i < numdict; ++i)
+ {
+ pMS = NULL;
+ eEnc = RTL_TEXTENCODING_DONTKNOW;
if (rLocale == aDLocs[i])
{
@@ -339,9 +339,9 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString
&rWord, const Locale &rL
OString aTmpdict(OU2ENC(dict,osl_getThreadTextEncoding()));
#if defined(WNT)
- // workaround for Windows specifc problem that the
- // path length in calls to 'fopen' is limted to somewhat
- // about 120+ characters which will usually be exceed when
+ // workaround for Windows specific problem that the
+ // path length in calls to 'fopen' is limited to somewhat
+ // about 120+ characters which will usually be exceeded
when
// using dictionaries as extensions.
aTmpaff = Win_GetShortPathName( aff );
aTmpdict = Win_GetShortPathName( dict );
@@ -349,13 +349,13 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString
&rWord, const Locale &rL
aDicts[i] = new
Hunspell(aTmpaff.getStr(),aTmpdict.getStr());
aDEncs[i] = RTL_TEXTENCODING_DONTKNOW;
- if (aDicts[i])
+ if (aDicts[i])
aDEncs[i] =
getTextEncodingFromCharset(aDicts[i]->get_dic_encoding());
}
pMS = aDicts[i];
eEnc = aDEncs[i];
}
-
+
if (pMS)
{
// we don't want to work with a default text encoding since
following incorrect
@@ -370,7 +370,7 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString
&rWord, const Locale &rL
int rVal = pMS->spell((char*)aWrd.getStr());
if (rVal != 1)
nRes = SpellFailure::SPELLING_ERROR;
- else
+ else
return -1;
pMS = NULL;
}
@@ -415,7 +415,7 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString&
rWord, const Locale& rL
{
sal_Int16 nLang = LocaleToLanguage( rLocale );
// postprocess result for errors that should be ignored
- const bool bIgnoreError =
+ const bool bIgnoreError =
(!rHelper.IsSpellUpperCase() && IsUpper( rWord, nLang )) ||
(!rHelper.IsSpellWithDigits() && HasDigits( rWord )) ||
(!rHelper.IsSpellCapitalization() && nFailure ==
SpellFailure::CAPTION_ERROR);
@@ -435,34 +435,34 @@ Reference< XSpellAlternatives >
// Especially it may give a list of suggested (correct) words:
Reference< XSpellAlternatives > xRes;
- // note: mutex is held by higher up by spell which covers both
+ // note: mutex is held by higher up by spell which covers both
- Hunspell* pMS = NULL;
- rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
- int count = 0;
- int numsug = 0;
+ Hunspell* pMS = NULL;
+ rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+ int count = 0;
+ int numsug = 0;
- // first handle smart quotes (single and double)
+ // first handle smart quotes (single and double)
OUStringBuffer rBuf(rWord);
- sal_Int32 n = rBuf.getLength();
- sal_Unicode c;
- for (sal_Int32 ix=0; ix < n; ix++)
- {
- c = rBuf.charAt(ix);
- if ((c == 0x201C) || (c == 0x201D))
- rBuf.setCharAt(ix,(sal_Unicode)0x0022);
- if ((c == 0x2018) || (c == 0x2019))
- rBuf.setCharAt(ix,(sal_Unicode)0x0027);
- }
- OUString nWord(rBuf.makeStringAndClear());
+ sal_Int32 n = rBuf.getLength();
+ sal_Unicode c;
+ for (sal_Int32 ix=0; ix < n; ix++)
+ {
+ c = rBuf.charAt(ix);
+ if ((c == 0x201C) || (c == 0x201D))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0022);
+ if ((c == 0x2018) || (c == 0x2019))
+ rBuf.setCharAt(ix,(sal_Unicode)0x0027);
+ }
+ OUString nWord(rBuf.makeStringAndClear());
if (n)
{
- sal_Int16 nLang = LocaleToLanguage( rLocale );
+ sal_Int16 nLang = LocaleToLanguage( rLocale );
- Sequence< OUString > aStr( 0 );
+ Sequence< OUString > aStr( 0 );
- for (int i =0; i < numdict; i++)
+ for (int i =0; i < numdict; i++)
{
pMS = NULL;
eEnc = RTL_TEXTENCODING_DONTKNOW;
@@ -480,7 +480,7 @@ Reference< XSpellAlternatives >
OString aWrd(OU2ENC(nWord,eEnc));
count = pMS->suggest(&suglst, (const char *) aWrd.getStr());
- if (count)
+ if (count)
{
aStr.realloc( numsug + count );
OUString *pStr = aStr.getArray();
@@ -493,20 +493,20 @@ Reference< XSpellAlternatives >
numsug += count;
}
}
- }
+ }
- // now return an empty alternative for no suggestions or the list of
alternatives if some found
- String aTmp(rWord);
- xRes = SpellAlternatives::CreateSpellAlternatives( aTmp, nLang,
SpellFailure::SPELLING_ERROR, aStr );
- return xRes;
+ // now return an empty alternative for no suggestions or the
list of alternatives if some found
+ String aTmp(rWord);
+ xRes = SpellAlternatives::CreateSpellAlternatives( aTmp, nLang,
SpellFailure::SPELLING_ERROR, aStr );
+ return xRes;
}
- return xRes;
+ return xRes;
}
-Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell(
- const OUString& rWord, const Locale& rLocale,
- const PropertyValues& rProperties )
+Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell(
+ const OUString& rWord, const Locale& rLocale,
+ const PropertyValues& rProperties )
throw(IllegalArgumentException, RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -524,15 +524,15 @@ Reference< XSpellAlternatives > SAL_CALL
SpellChecker::spell(
Reference< XSpellAlternatives > xAlt;
if (!isValid( rWord, rLocale, rProperties ))
{
- xAlt = GetProposals( rWord, rLocale );
+ xAlt = GetProposals( rWord, rLocale );
}
return xAlt;
}
Reference< XInterface > SAL_CALL SpellChecker_CreateInstance(
- const Reference< XMultiServiceFactory > & /*rSMgr*/ )
- throw(Exception)
+ const Reference< XMultiServiceFactory > & /*rSMgr*/ )
+ throw(Exception)
{
Reference< XInterface > xService = (cppu::OWeakObject*) new
SpellChecker;
@@ -541,8 +541,8 @@ Reference< XInterface > SAL_CALL
SpellChecker_CreateInstance(
sal_Bool SAL_CALL SpellChecker::addLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
- throw(RuntimeException)
+ const Reference< XLinguServiceEventListener >& rxLstnr )
+ throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -556,8 +556,8 @@ sal_Bool SAL_CALL
SpellChecker::addLinguServiceEventListener(
sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
- const Reference< XLinguServiceEventListener >& rxLstnr )
- throw(RuntimeException)
+ const Reference< XLinguServiceEventListener >& rxLstnr )
+ throw(RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -599,10 +599,10 @@ void SAL_CALL SpellChecker::initialize( const Sequence<
Any >& rArguments )
pPropHelper = new PropertyHelper_Spelling(
(XSpellChecker *) this, xPropSet );
pPropHelper->AddAsPropListener(); //! after a
reference is established
}
- else
- {
+ else
+ {
DBG_ERROR( "wrong number of arguments in sequence" );
- }
+ }
}
}
@@ -682,13 +682,13 @@ Sequence< OUString >
SpellChecker::getSupportedServiceNames_Static()
{
MutexGuard aGuard( GetLinguMutex() );
- Sequence< OUString > aSNS( 1 ); // auch mehr als 1 Service moeglich
+ Sequence< OUString > aSNS( 1 ); // also more than 1 Service possible
aSNS.getArray()[0] = A2OU( SN_SPELLCHECKER );
return aSNS;
}
void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName,
- XMultiServiceFactory * pServiceManager, void * )
+ XMultiServiceFactory * pServiceManager, void * )
{
void * pRet = 0;
if ( !SpellChecker::getImplementationName_Static().compareToAscii(
pImplName ) )