This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/AOO42X by this push:
new bbeaded8d2 Fixed typos, cleanup
bbeaded8d2 is described below
commit bbeaded8d24d2f93931688ce43ee626b974aa4c6
Author: mseidel <[email protected]>
AuthorDate: Fri Mar 14 17:28:11 2025 +0100
Fixed typos, cleanup
(cherry picked from commit 85122fc3aed302e23add2a54c7564ef22b646162)
---
.../source/xslt/export/uof/odf2uof_spreadsheet.xsl | 14 +-
.../source/xslt/import/uof/uof2odf_spreadsheet.xsl | 2 +-
main/svx/source/svdraw/svdotextdecomposition.cxx | 589 ++++++++++-----------
main/sw/source/filter/xml/xmltbli.cxx | 273 +++++-----
main/xmloff/source/chart/SchXMLTableContext.cxx | 136 ++---
5 files changed, 505 insertions(+), 509 deletions(-)
diff --git a/main/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl
b/main/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl
index 9b13180d26..2e6538e061 100644
--- a/main/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl
+++ b/main/filter/source/xslt/export/uof/odf2uof_spreadsheet.xsl
@@ -3542,7 +3542,7 @@
<xsl:with-param
name="preceding-cellstylename" select="''"/>
<xsl:with-param name="temp-num"
select="'0'"/>
<xsl:with-param
name="cellstylename" select="$cellstylename"/>
- <xsl:with-param
name="table-collumns" select="$cell/ancestor::table:table//table:table-column
"/>
+ <xsl:with-param
name="table-columns" select="$cell/ancestor::table:table//table:table-column "/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
@@ -3562,13 +3562,13 @@
<xsl:param name="preceding-cellstylename"/>
<xsl:param name="temp-num"/>
<xsl:param name="cellstylename"/>
- <xsl:param name="table-collumns"/>
+ <xsl:param name="table-columns"/>
<xsl:choose>
<xsl:when test="$temp-num<$column-num">
<xsl:variable name="firstcolumn">
<xsl:choose>
- <xsl:when
test="$table-collumns[1]/@table:number-columns-repeated">
- <xsl:value-of
select="$table-collumns[1]/@table:number-columns-repeated"/>
+ <xsl:when
test="$table-columns[1]/@table:number-columns-repeated">
+ <xsl:value-of
select="$table-columns[1]/@table:number-columns-repeated"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="'1'"/>
@@ -3577,8 +3577,8 @@
</xsl:variable>
<xsl:variable
name="preceding-cellstylename-to-param">
<xsl:choose>
- <xsl:when
test="$table-collumns[1]/@table:default-cell-style-name">
- <xsl:value-of
select="$table-collumns[1]/@table:default-cell-style-name"/>
+ <xsl:when
test="$table-columns[1]/@table:default-cell-style-name">
+ <xsl:value-of
select="$table-columns[1]/@table:default-cell-style-name"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="''"/>
@@ -3590,7 +3590,7 @@
<xsl:with-param name="temp-num"
select="$temp-num + $firstcolumn"/>
<xsl:with-param
name="preceding-cellstylename" select="$preceding-cellstylename-to-param"/>
<xsl:with-param name="cellstylename"
select="$cellstylename"/>
- <xsl:with-param name="table-collumns"
select="$table-collumns[position()!=1]"/>
+ <xsl:with-param name="table-columns"
select="$table-columns[position()!=1]"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
diff --git a/main/filter/source/xslt/import/uof/uof2odf_spreadsheet.xsl
b/main/filter/source/xslt/import/uof/uof2odf_spreadsheet.xsl
index 0973c5004f..e55890fdae 100644
--- a/main/filter/source/xslt/import/uof/uof2odf_spreadsheet.xsl
+++ b/main/filter/source/xslt/import/uof/uof2odf_spreadsheet.xsl
@@ -8977,7 +8977,7 @@
<xsl:with-param
name="preceding-cellstylename" select="''"/>
<xsl:with-param name="temp-num"
select="'0'"/>
<xsl:with-param
name="cellstylename" select="$cellstylename"/>
- <xsl:with-param
name="table-collumns" select="$cell/ancestor::表:工作表内容//表:列"/>
+ <xsl:with-param
name="table-columns" select="$cell/ancestor::表:工作表内容//表:列"/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
diff --git a/main/svx/source/svdraw/svdotextdecomposition.cxx
b/main/svx/source/svdraw/svdotextdecomposition.cxx
index 8c6f6f498b..367ffc445c 100644
--- a/main/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/main/svx/source/svdraw/svdotextdecomposition.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,20 +7,18 @@
* 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.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
@@ -59,22 +57,22 @@
namespace
{
- drawinglayer::primitive2d::Primitive2DSequence
impConvertVectorToPrimitive2DSequence(const std::vector<
drawinglayer::primitive2d::BasePrimitive2D* >& rPrimitiveVector)
- {
+ drawinglayer::primitive2d::Primitive2DSequence
impConvertVectorToPrimitive2DSequence(const std::vector<
drawinglayer::primitive2d::BasePrimitive2D* >& rPrimitiveVector)
+ {
const sal_Int32 nCount(rPrimitiveVector.size());
drawinglayer::primitive2d::Primitive2DSequence aRetval(nCount);
- for(sal_Int32 a(0L); a < nCount; a++)
- {
- aRetval[a] =
drawinglayer::primitive2d::Primitive2DReference(rPrimitiveVector[a]);
- }
+ for(sal_Int32 a(0L); a < nCount; a++)
+ {
+ aRetval[a] =
drawinglayer::primitive2d::Primitive2DReference(rPrimitiveVector[a]);
+ }
- return aRetval;
- }
+ return aRetval;
+ }
- class impTextBreakupHandler
+ class impTextBreakupHandler
{
- private:
+ private:
std::vector< drawinglayer::primitive2d::BasePrimitive2D* >
maTextPortionPrimitives;
std::vector< drawinglayer::primitive2d::BasePrimitive2D* >
maLinePrimitives;
std::vector< drawinglayer::primitive2d::BasePrimitive2D* >
maParagraphPrimitives;
@@ -83,14 +81,14 @@ namespace
basegfx::B2DHomMatrix
maNewTransformA;
basegfx::B2DHomMatrix
maNewTransformB;
- // the visible area for contour text decomposition
- basegfx::B2DVector maScale;
+ // the visible area for contour text decomposition
+ basegfx::B2DVector
maScale;
// #SJ# ClipRange for BlockText decomposition; only text
portions completely
// inside are to be accepted, so this is different from
geometric clipping
- // (which would allow e.g. upper parts of portions to remain).
Only used for
+ // (which would allow e.g. upper parts of portions to remain).
Only used for
// BlockText (see there)
- basegfx::B2DRange
maClipRange;
+ basegfx::B2DRange
maClipRange;
DECL_LINK(decomposeContourTextPrimitive, DrawPortionInfo* );
DECL_LINK(decomposeBlockTextPrimitive, DrawPortionInfo* );
@@ -102,9 +100,9 @@ namespace
bool impIsUnderlineAbove(const Font& rFont) const;
void impCreateTextPortionPrimitive(const DrawPortionInfo&
rInfo);
- drawinglayer::primitive2d::BasePrimitive2D*
impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive,
const DrawPortionInfo& rInfo) const;
- void impFlushTextPortionPrimitivesToLinePrimitives();
- void impFlushLinePrimitivesToParagraphPrimitives();
+ drawinglayer::primitive2d::BasePrimitive2D*
impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive,
const DrawPortionInfo& rInfo) const;
+ void impFlushTextPortionPrimitivesToLinePrimitives();
+ void impFlushLinePrimitivesToParagraphPrimitives();
void impHandleDrawPortionInfo(const DrawPortionInfo& rInfo);
void impHandleDrawBulletInfo(const DrawBulletInfo& rInfo);
@@ -123,7 +121,7 @@ namespace
void decomposeContourTextPrimitive(const basegfx::B2DHomMatrix&
rNewTransformA, const basegfx::B2DHomMatrix& rNewTransformB, const
basegfx::B2DVector& rScale)
{
- maScale = rScale;
+ maScale = rScale;
maNewTransformA = rNewTransformA;
maNewTransformB = rNewTransformB;
mrOutliner.SetDrawPortionHdl(LINK(this,
impTextBreakupHandler, decomposeContourTextPrimitive));
@@ -184,18 +182,18 @@ namespace
{
basegfx::B2DVector aFontScaling;
drawinglayer::attribute::FontAttribute aFontAttribute(
- drawinglayer::primitive2d::getFontAttributeFromVclFont(
- aFontScaling,
- rInfo.mrFont,
- rInfo.IsRTL(),
- false));
+
drawinglayer::primitive2d::getFontAttributeFromVclFont(
+ aFontScaling,
+ rInfo.mrFont,
+ rInfo.IsRTL(),
+ false));
basegfx::B2DHomMatrix aNewTransform;
- // add font scale to new transform
+ // add font scale to new transform
aNewTransform.scale(aFontScaling.getX(),
aFontScaling.getY());
// look for proportional font scaling, evtl scale
accordingly
- if(100 != rInfo.mrFont.GetPropr())
+ if(100 != rInfo.mrFont.GetPropr())
{
const double fFactor(rInfo.mrFont.GetPropr() /
100.0);
aNewTransform.scale(fFactor, fFactor);
@@ -252,19 +250,19 @@ namespace
{
aDXArray.reserve(rInfo.mnTextLen);
- for(xub_StrLen a(0); a < rInfo.mnTextLen; a++)
- {
-
aDXArray.push_back((double)rInfo.mpDXArray[a]);
- }
+ for(xub_StrLen a(0); a < rInfo.mnTextLen; a++)
+ {
+
aDXArray.push_back((double)rInfo.mpDXArray[a]);
+ }
}
// create complex text primitive and append
const Color aFontColor(rInfo.mrFont.GetColor());
- const basegfx::BColor aBFontColor(aFontColor.getBColor());
+ const basegfx::BColor
aBFontColor(aFontColor.getBColor());
// prepare wordLineMode (for underline and strikeout)
// NOT for bullet texts. It is set (this may be an
error by itself), but needs to be suppressed to hinder e.g. '1)'
- // to be splitted which would not look like the original
+ // to be split which would not look like the original
const bool bWordLineMode(rInfo.mrFont.IsWordLineMode()
&& !rInfo.mbEndOfBullet);
// prepare new primitive
@@ -276,24 +274,24 @@ namespace
|| EMPHASISMARK_NONE !=
(rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_STYLE)
|| RELIEF_NONE != rInfo.mrFont.GetRelief()
|| rInfo.mrFont.IsShadow()
- || bWordLineMode);
+ || bWordLineMode);
if(bDecoratedIsNeeded)
{
// TextDecoratedPortionPrimitive2D needed,
prepare some more data
// get overline and underline color. If it's on
automatic (0xffffffff) use FontColor instead
- const Color aUnderlineColor(rInfo.maTextLineColor);
- const basegfx::BColor aBUnderlineColor((0xffffffff ==
aUnderlineColor.GetColor()) ? aBFontColor : aUnderlineColor.getBColor());
- const Color aOverlineColor(rInfo.maOverlineColor);
- const basegfx::BColor aBOverlineColor((0xffffffff ==
aOverlineColor.GetColor()) ? aBFontColor : aOverlineColor.getBColor());
+ const Color
aUnderlineColor(rInfo.maTextLineColor);
+ const basegfx::BColor
aBUnderlineColor((0xffffffff == aUnderlineColor.GetColor()) ? aBFontColor :
aUnderlineColor.getBColor());
+ const Color
aOverlineColor(rInfo.maOverlineColor);
+ const basegfx::BColor
aBOverlineColor((0xffffffff == aOverlineColor.GetColor()) ? aBFontColor :
aOverlineColor.getBColor());
- // prepare overline and underline data
- const drawinglayer::primitive2d::TextLine eFontOverline(
+ // prepare overline and underline data
+ const drawinglayer::primitive2d::TextLine
eFontOverline(
drawinglayer::primitive2d::mapFontUnderlineToTextLine(rInfo.mrFont.GetOverline()));
- const drawinglayer::primitive2d::TextLine eFontUnderline(
+ const drawinglayer::primitive2d::TextLine
eFontUnderline(
drawinglayer::primitive2d::mapFontUnderlineToTextLine(rInfo.mrFont.GetUnderline()));
- // check UndelineAbove
+ // check UnderlineAbove
const bool bUnderlineAbove(
drawinglayer::primitive2d::TEXT_LINE_NONE != eFontUnderline &&
impIsUnderlineAbove(rInfo.mrFont));
@@ -329,12 +327,12 @@ namespace
const bool bShadow(rInfo.mrFont.IsShadow());
// TextDecoratedPortionPrimitive2D is needed,
create one
- pNewPrimitive = new
drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D(
-
+ pNewPrimitive = new
drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D(
+
// attributes for
TextSimplePortionPrimitive2D
aNewTransform,
- rInfo.mrText,
- rInfo.mnTextStart,
+ rInfo.mrText,
+ rInfo.mnTextStart,
rInfo.mnTextLen,
aDXArray,
aFontAttribute,
@@ -342,10 +340,10 @@ namespace
aBFontColor,
// attributes for
TextDecoratedPortionPrimitive2D
- aBOverlineColor,
- aBUnderlineColor,
- eFontOverline,
- eFontUnderline,
+ aBOverlineColor,
+ aBUnderlineColor,
+ eFontOverline,
+ eFontUnderline,
bUnderlineAbove,
eTextStrikeout,
bWordLineMode,
@@ -360,8 +358,8 @@ namespace
// TextSimplePortionPrimitive2D is enough
pNewPrimitive = new
drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
aNewTransform,
- rInfo.mrText,
- rInfo.mnTextStart,
+ rInfo.mrText,
+ rInfo.mnTextStart,
rInfo.mnTextLen,
aDXArray,
aFontAttribute,
@@ -369,96 +367,96 @@ namespace
aBFontColor);
}
- if(rInfo.mbEndOfBullet)
- {
- // embed in TextHierarchyBulletPrimitive2D
- const drawinglayer::primitive2d::Primitive2DReference
aNewReference(pNewPrimitive);
- const drawinglayer::primitive2d::Primitive2DSequence
aNewSequence(&aNewReference, 1);
- pNewPrimitive = new
drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence);
- }
-
- if(rInfo.mpFieldData)
- {
- pNewPrimitive = impCheckFieldPrimitive(pNewPrimitive, rInfo);
- }
-
- maTextPortionPrimitives.push_back(pNewPrimitive);
-
- // support for WrongSpellVector. Create WrongSpellPrimitives as
needed
- if(rInfo.mpWrongSpellVector && !aDXArray.empty())
- {
- const sal_uInt32 nSize(rInfo.mpWrongSpellVector->size());
- const sal_uInt32 nDXCount(aDXArray.size());
- const basegfx::BColor aSpellColor(1.0, 0.0, 0.0); // red, hard
coded
-
- for(sal_uInt32 a(0); a < nSize; a++)
- {
- const EEngineData::WrongSpellClass& rCandidate =
(*rInfo.mpWrongSpellVector)[a];
-
- if(rCandidate.nStart >= rInfo.mnTextStart &&
rCandidate.nEnd >= rInfo.mnTextStart && rCandidate.nEnd > rCandidate.nStart)
- {
- const sal_uInt32 nStart(rCandidate.nStart -
rInfo.mnTextStart);
- const sal_uInt32 nEnd(rCandidate.nEnd -
rInfo.mnTextStart);
- double fStart(0.0);
- double fEnd(0.0);
-
- if(nStart > 0 && nStart - 1 < nDXCount)
- {
- fStart = aDXArray[nStart - 1];
- }
-
- if(nEnd > 0 && nEnd - 1 < nDXCount)
- {
- fEnd = aDXArray[nEnd - 1];
- }
-
- if(!basegfx::fTools::equal(fStart, fEnd))
- {
- if(rInfo.IsRTL())
- {
- // #i98523#
- // When the portion is RTL, mirror the
redlining using the
- // full portion width
- const double
fTextWidth(aDXArray[aDXArray.size() - 1]);
-
- fStart = fTextWidth - fStart;
- fEnd = fTextWidth - fEnd;
- }
-
- // need to take FontScaling out of values; it's
already part of
- // aNewTransform and would be double applied
- const double fFontScaleX(aFontScaling.getX());
-
- if(!basegfx::fTools::equal(fFontScaleX, 1.0)
- && !basegfx::fTools::equalZero(fFontScaleX))
- {
- fStart /= fFontScaleX;
- fEnd /= fFontScaleX;
- }
-
- maTextPortionPrimitives.push_back(new
drawinglayer::primitive2d::WrongSpellPrimitive2D(
- aNewTransform,
- fStart,
- fEnd,
- aSpellColor));
- }
- }
- }
- }
+ if(rInfo.mbEndOfBullet)
+ {
+ // embed in TextHierarchyBulletPrimitive2D
+ const
drawinglayer::primitive2d::Primitive2DReference aNewReference(pNewPrimitive);
+ const
drawinglayer::primitive2d::Primitive2DSequence aNewSequence(&aNewReference, 1);
+ pNewPrimitive = new
drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence);
+ }
+
+ if(rInfo.mpFieldData)
+ {
+ pNewPrimitive =
impCheckFieldPrimitive(pNewPrimitive, rInfo);
+ }
+
+ maTextPortionPrimitives.push_back(pNewPrimitive);
+
+ // support for WrongSpellVector. Create
WrongSpellPrimitives as needed
+ if(rInfo.mpWrongSpellVector && !aDXArray.empty())
+ {
+ const sal_uInt32
nSize(rInfo.mpWrongSpellVector->size());
+ const sal_uInt32 nDXCount(aDXArray.size());
+ const basegfx::BColor aSpellColor(1.0, 0.0,
0.0); // red, hard coded
+
+ for(sal_uInt32 a(0); a < nSize; a++)
+ {
+ const EEngineData::WrongSpellClass&
rCandidate = (*rInfo.mpWrongSpellVector)[a];
+
+ if(rCandidate.nStart >=
rInfo.mnTextStart && rCandidate.nEnd >= rInfo.mnTextStart && rCandidate.nEnd >
rCandidate.nStart)
+ {
+ const sal_uInt32
nStart(rCandidate.nStart - rInfo.mnTextStart);
+ const sal_uInt32
nEnd(rCandidate.nEnd - rInfo.mnTextStart);
+ double fStart(0.0);
+ double fEnd(0.0);
+
+ if(nStart > 0 && nStart - 1 <
nDXCount)
+ {
+ fStart =
aDXArray[nStart - 1];
+ }
+
+ if(nEnd > 0 && nEnd - 1 <
nDXCount)
+ {
+ fEnd = aDXArray[nEnd -
1];
+ }
+
+
if(!basegfx::fTools::equal(fStart, fEnd))
+ {
+ if(rInfo.IsRTL())
+ {
+ // #i98523#
+ // When the
portion is RTL, mirror the redlining using the
+ // full portion
width
+ const double
fTextWidth(aDXArray[aDXArray.size() - 1]);
+
+ fStart =
fTextWidth - fStart;
+ fEnd =
fTextWidth - fEnd;
+ }
+
+ // need to take
FontScaling out of values; it's already part of
+ // aNewTransform and
would be double applied
+ const double
fFontScaleX(aFontScaling.getX());
+
+
if(!basegfx::fTools::equal(fFontScaleX, 1.0)
+ &&
!basegfx::fTools::equalZero(fFontScaleX))
+ {
+ fStart /=
fFontScaleX;
+ fEnd /=
fFontScaleX;
+ }
+
+
maTextPortionPrimitives.push_back(new
drawinglayer::primitive2d::WrongSpellPrimitive2D(
+ aNewTransform,
+ fStart,
+ fEnd,
+ aSpellColor));
+ }
+ }
+ }
+ }
}
}
drawinglayer::primitive2d::BasePrimitive2D*
impTextBreakupHandler::impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D*
pPrimitive, const DrawPortionInfo& rInfo) const
- {
- if(rInfo.mpFieldData)
- {
- // Support for FIELD_SEQ_BEGIN, FIELD_SEQ_END. If used, create a
TextHierarchyFieldPrimitive2D
+ {
+ if(rInfo.mpFieldData)
+ {
+ // Support for FIELD_SEQ_BEGIN, FIELD_SEQ_END. If used,
create a TextHierarchyFieldPrimitive2D
// which holds the field type and evtl. the URL
- const SvxURLField* pURLField = dynamic_cast< const SvxURLField*
>(rInfo.mpFieldData);
- const SvxPageField* pPageField = dynamic_cast< const SvxPageField*
>(rInfo.mpFieldData);
+ const SvxURLField* pURLField = dynamic_cast< const
SvxURLField* >(rInfo.mpFieldData);
+ const SvxPageField* pPageField = dynamic_cast< const
SvxPageField* >(rInfo.mpFieldData);
// embed current primitive to a sequence
- drawinglayer::primitive2d::Primitive2DSequence aSequence;
+ drawinglayer::primitive2d::Primitive2DSequence
aSequence;
if(pPrimitive)
{
@@ -478,50 +476,50 @@ namespace
{
pPrimitive = new
drawinglayer::primitive2d::TextHierarchyFieldPrimitive2D(aSequence,
drawinglayer::primitive2d::FIELD_TYPE_COMMON, String());
}
- }
+ }
- return pPrimitive;
- }
+ return pPrimitive;
+ }
- void impTextBreakupHandler::impFlushTextPortionPrimitivesToLinePrimitives()
- {
+ void
impTextBreakupHandler::impFlushTextPortionPrimitivesToLinePrimitives()
+ {
// only create a line primitive when we had content; there is
no need for
// empty line primitives (contrary to paragraphs, see below).
if(!maTextPortionPrimitives.empty())
{
- drawinglayer::primitive2d::Primitive2DSequence
aLineSequence(impConvertVectorToPrimitive2DSequence(maTextPortionPrimitives));
- maTextPortionPrimitives.clear();
+ drawinglayer::primitive2d::Primitive2DSequence
aLineSequence(impConvertVectorToPrimitive2DSequence(maTextPortionPrimitives));
+ maTextPortionPrimitives.clear();
maLinePrimitives.push_back(new
drawinglayer::primitive2d::TextHierarchyLinePrimitive2D(aLineSequence));
}
- }
+ }
- void impTextBreakupHandler::impFlushLinePrimitivesToParagraphPrimitives()
- {
+ void
impTextBreakupHandler::impFlushLinePrimitivesToParagraphPrimitives()
+ {
// ALWAYS create a paragraph primitive, even when no content
was added. This is done to
// have the correct paragraph count even with empty paragraphs.
Those paragraphs will
// have an empty sub-PrimitiveSequence.
- drawinglayer::primitive2d::Primitive2DSequence
aParagraphSequence(impConvertVectorToPrimitive2DSequence(maLinePrimitives));
- maLinePrimitives.clear();
- maParagraphPrimitives.push_back(new
drawinglayer::primitive2d::TextHierarchyParagraphPrimitive2D(aParagraphSequence));
- }
-
- void impTextBreakupHandler::impHandleDrawPortionInfo(const
DrawPortionInfo& rInfo)
- {
- impCreateTextPortionPrimitive(rInfo);
-
- if(rInfo.mbEndOfLine || rInfo.mbEndOfParagraph)
- {
- impFlushTextPortionPrimitivesToLinePrimitives();
- }
-
- if(rInfo.mbEndOfParagraph)
- {
- impFlushLinePrimitivesToParagraphPrimitives();
- }
- }
-
- void impTextBreakupHandler::impHandleDrawBulletInfo(const DrawBulletInfo&
rInfo)
- {
+ drawinglayer::primitive2d::Primitive2DSequence
aParagraphSequence(impConvertVectorToPrimitive2DSequence(maLinePrimitives));
+ maLinePrimitives.clear();
+ maParagraphPrimitives.push_back(new
drawinglayer::primitive2d::TextHierarchyParagraphPrimitive2D(aParagraphSequence));
+ }
+
+ void impTextBreakupHandler::impHandleDrawPortionInfo(const
DrawPortionInfo& rInfo)
+ {
+ impCreateTextPortionPrimitive(rInfo);
+
+ if(rInfo.mbEndOfLine || rInfo.mbEndOfParagraph)
+ {
+ impFlushTextPortionPrimitivesToLinePrimitives();
+ }
+
+ if(rInfo.mbEndOfParagraph)
+ {
+ impFlushLinePrimitivesToParagraphPrimitives();
+ }
+ }
+
+ void impTextBreakupHandler::impHandleDrawBulletInfo(const
DrawBulletInfo& rInfo)
+ {
basegfx::B2DHomMatrix aNewTransform;
// add size to new transform
@@ -536,30 +534,30 @@ namespace
// also apply embedding object's transform
aNewTransform *= maNewTransformB;
- // prepare empty GraphicAttr
- const GraphicAttr aGraphicAttr;
+ // prepare empty GraphicAttr
+ const GraphicAttr aGraphicAttr;
- // create GraphicPrimitive2D
- const drawinglayer::primitive2d::Primitive2DReference
aNewReference(new drawinglayer::primitive2d::GraphicPrimitive2D(
+ // create GraphicPrimitive2D
+ const drawinglayer::primitive2d::Primitive2DReference
aNewReference(new drawinglayer::primitive2d::GraphicPrimitive2D(
aNewTransform,
- rInfo.maBulletGraphicObject,
- aGraphicAttr));
+ rInfo.maBulletGraphicObject,
+ aGraphicAttr));
- // embed in TextHierarchyBulletPrimitive2D
- const drawinglayer::primitive2d::Primitive2DSequence
aNewSequence(&aNewReference, 1);
- drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = new
drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence);
+ // embed in TextHierarchyBulletPrimitive2D
+ const drawinglayer::primitive2d::Primitive2DSequence
aNewSequence(&aNewReference, 1);
+ drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = new
drawinglayer::primitive2d::TextHierarchyBulletPrimitive2D(aNewSequence);
- // add to output
- maTextPortionPrimitives.push_back(pNewPrimitive);
- }
+ // add to output
+ maTextPortionPrimitives.push_back(pNewPrimitive);
+ }
IMPL_LINK(impTextBreakupHandler, decomposeContourTextPrimitive,
DrawPortionInfo*, pInfo)
{
- // for contour text, ignore (clip away) all portions which are below
- // the visible area given by maScale
+ // for contour text, ignore (clip away) all portions which are
below
+ // the visible area given by maScale
if(pInfo && (double)pInfo->mrStartPos.Y() < maScale.getY())
{
- impHandleDrawPortionInfo(*pInfo);
+ impHandleDrawPortionInfo(*pInfo);
}
return 0;
@@ -606,7 +604,7 @@ namespace
// all inside, clip was successful
}
- impHandleDrawPortionInfo(*pInfo);
+ impHandleDrawPortionInfo(*pInfo);
}
return 0;
@@ -616,7 +614,7 @@ namespace
{
if(pInfo)
{
- impHandleDrawPortionInfo(*pInfo);
+ impHandleDrawPortionInfo(*pInfo);
}
return 0;
@@ -626,7 +624,7 @@ namespace
{
if(pInfo)
{
- impHandleDrawBulletInfo(*pInfo);
+ impHandleDrawBulletInfo(*pInfo);
}
return 0;
@@ -636,7 +634,7 @@ namespace
{
if(pInfo)
{
- impHandleDrawBulletInfo(*pInfo);
+ impHandleDrawBulletInfo(*pInfo);
}
return 0;
@@ -646,27 +644,27 @@ namespace
{
if(pInfo)
{
- impHandleDrawBulletInfo(*pInfo);
+ impHandleDrawBulletInfo(*pInfo);
}
return 0;
}
- drawinglayer::primitive2d::Primitive2DSequence
impTextBreakupHandler::getPrimitive2DSequence()
+ drawinglayer::primitive2d::Primitive2DSequence
impTextBreakupHandler::getPrimitive2DSequence()
{
- if(!maTextPortionPrimitives.empty())
- {
- // collect non-closed lines
- impFlushTextPortionPrimitivesToLinePrimitives();
- }
-
- if(!maLinePrimitives.empty())
- {
- // collect non-closed paragraphs
- impFlushLinePrimitivesToParagraphPrimitives();
- }
-
- return impConvertVectorToPrimitive2DSequence(maParagraphPrimitives);
+ if(!maTextPortionPrimitives.empty())
+ {
+ // collect non-closed lines
+ impFlushTextPortionPrimitivesToLinePrimitives();
+ }
+
+ if(!maLinePrimitives.empty())
+ {
+ // collect non-closed paragraphs
+ impFlushLinePrimitivesToParagraphPrimitives();
+ }
+
+ return
impConvertVectorToPrimitive2DSequence(maParagraphPrimitives);
}
} // end of anonymous namespace
@@ -678,7 +676,7 @@ void SdrTextObj::impDecomposeContourTextPrimitive(
const drawinglayer::primitive2d::SdrContourTextPrimitive2D&
rSdrContourTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
{
- // decompose matrix to have position and size of text
+ // decompose matrix to have position and size of text
basegfx::B2DVector aScale, aTranslate;
double fRotate, fShearX;
rSdrContourTextPrimitive.getObjectTransform().decompose(aScale,
aTranslate, fRotate, fShearX);
@@ -728,7 +726,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
const drawinglayer::primitive2d::SdrBlockTextPrimitive2D&
rSdrBlockTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
{
- // decompose matrix to have position and size of text
+ // decompose matrix to have position and size of text
basegfx::B2DVector aScale, aTranslate;
double fRotate, fShearX;
rSdrBlockTextPrimitive.getTextRangeTransform().decompose(aScale,
aTranslate, fRotate, fShearX);
@@ -764,64 +762,64 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
// text, so use a special setup here
rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
- // #i106214# To work with an unchangeable PaperSize (CellSize in
- // this case) Set(Min|Max)AutoPaperSize and SetPaperSize have to be
used.
- // #i106214# This was not completely correct; to still measure the
real
- // text height to allow vertical adjust (and vice versa for
VerticalWritintg)
- // only one aspect has to be set, but the other one to zero
- if(bVerticalWritintg)
- {
- // measure the horizontal text size
- rOutliner.SetMinAutoPaperSize(Size(0,
aAnchorTextSize.Height()));
- }
- else
- {
- // measure the vertical text size
- rOutliner.SetMinAutoPaperSize(Size(aAnchorTextSize.Width(), 0));
- }
-
- rOutliner.SetPaperSize(aAnchorTextSize);
+ // #i106214# To work with an unchangeable PaperSize (CellSize in
+ // this case) Set(Min|Max)AutoPaperSize and SetPaperSize have
to be used.
+ // #i106214# This was not completely correct; to still measure
the real
+ // text height to allow vertical adjust (and vice versa for
VerticalWritintg)
+ // only one aspect has to be set, but the other one to zero
+ if(bVerticalWritintg)
+ {
+ // measure the horizontal text size
+ rOutliner.SetMinAutoPaperSize(Size(0,
aAnchorTextSize.Height()));
+ }
+ else
+ {
+ // measure the vertical text size
+
rOutliner.SetMinAutoPaperSize(Size(aAnchorTextSize.Width(), 0));
+ }
+
+ rOutliner.SetPaperSize(aAnchorTextSize);
rOutliner.SetUpdateMode(true);
rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
}
else
{
- // check if block text is used (only one of them can be true)
- const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj &&
!bVerticalWritintg);
- const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj &&
bVerticalWritintg);
-
- // set minimal paper size hor/ver if needed
- if(bHorizontalIsBlock)
- {
- rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
- }
- else if(bVerticalIsBlock)
- {
- rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight));
- }
-
- if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) &&
!rSdrBlockTextPrimitive.getUnlimitedPage())
+ // check if block text is used (only one of them can be true)
+ const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj
&& !bVerticalWritintg);
+ const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj &&
bVerticalWritintg);
+
+ // set minimal paper size hor/ver if needed
+ if(bHorizontalIsBlock)
+ {
+ rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth,
0));
+ }
+ else if(bVerticalIsBlock)
{
- // #i103454# maximal paper size hor/ver needs to be limited to text
- // frame size. If it's block text, still allow the 'other'
direction
- // to grow to get a correct real text size when using
GetPaperSize().
- // When just using aAnchorTextSize as maximum, GetPaperSize()
- // would just return aAnchorTextSize again: this means, the wanted
- // 'measurement' of the real size of block text would not work
- Size aMaxAutoPaperSize(aAnchorTextSize);
-
- if(bHorizontalIsBlock)
- {
- // allow to grow vertical for horizontal blocks
- aMaxAutoPaperSize.setHeight(1000000);
- }
- else if(bVerticalIsBlock)
- {
- // allow to grow horizontal for vertical blocks
- aMaxAutoPaperSize.setWidth(1000000);
- }
-
- rOutliner.SetMaxAutoPaperSize(aMaxAutoPaperSize);
+ rOutliner.SetMinAutoPaperSize(Size(0,
nAnchorTextHeight));
+ }
+
+ if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) &&
!rSdrBlockTextPrimitive.getUnlimitedPage())
+ {
+ // #i103454# maximal paper size hor/ver needs to be
limited to text
+ // frame size. If it's block text, still allow the
'other' direction
+ // to grow to get a correct real text size when using
GetPaperSize().
+ // When just using aAnchorTextSize as maximum,
GetPaperSize()
+ // would just return aAnchorTextSize again: this means,
the wanted
+ // 'measurement' of the real size of block text would
not work
+ Size aMaxAutoPaperSize(aAnchorTextSize);
+
+ if(bHorizontalIsBlock)
+ {
+ // allow to grow vertical for horizontal blocks
+ aMaxAutoPaperSize.setHeight(1000000);
+ }
+ else if(bVerticalIsBlock)
+ {
+ // allow to grow horizontal for vertical blocks
+ aMaxAutoPaperSize.setWidth(1000000);
+ }
+
+ rOutliner.SetMaxAutoPaperSize(aMaxAutoPaperSize);
}
rOutliner.SetPaperSize(aNullSize);
@@ -829,7 +827,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
}
- rOutliner.SetControlWord(nOriginalControlWord);
+ rOutliner.SetControlWord(nOriginalControlWord);
// now get back the layouted text size from outliner
const Size aOutlinerTextSiz(rOutliner.GetPaperSize());
@@ -887,7 +885,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
{
aAdjustTranslate.setY(fFree / 2.0);
}
-
+
if(SDRTEXTVERTADJUST_BOTTOM == eVAdj)
{
aAdjustTranslate.setY(fFree);
@@ -901,7 +899,7 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
// corner
const double fStartInX(bVerticalWritintg ? aAdjustTranslate.getX() +
aOutlinerScale.getX() : aAdjustTranslate.getX());
const basegfx::B2DTuple aAdjOffset(fStartInX, aAdjustTranslate.getY());
- basegfx::B2DHomMatrix
aNewTransformA(basegfx::tools::createTranslateB2DHomMatrix(aAdjOffset.getX(),
aAdjOffset.getY()));
+ basegfx::B2DHomMatrix
aNewTransformA(basegfx::tools::createTranslateB2DHomMatrix(aAdjOffset.getX(),
aAdjOffset.getY()));
// mirroring. We are now in aAnchorTextRange sizes. When mirroring in X
and Y,
// move the null point which was top left to bottom right.
@@ -935,11 +933,11 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
}
void SdrTextObj::impDecomposeStretchTextPrimitive(
- drawinglayer::primitive2d::Primitive2DSequence& rTarget,
+ drawinglayer::primitive2d::Primitive2DSequence& rTarget,
const drawinglayer::primitive2d::SdrStretchTextPrimitive2D&
rSdrStretchTextPrimitive,
const drawinglayer::geometry::ViewInformation2D& aViewInformation) const
{
- // decompose matrix to have position and size of text
+ // decompose matrix to have position and size of text
basegfx::B2DVector aScale, aTranslate;
double fRotate, fShearX;
rSdrStretchTextPrimitive.getTextRangeTransform().decompose(aScale,
aTranslate, fRotate, fShearX);
@@ -967,23 +965,23 @@ void SdrTextObj::impDecomposeStretchTextPrimitive(
// now get back the layouted text size from outliner
const Size aOutlinerTextSiz(rOutliner.CalcTextSize());
const basegfx::B2DVector aOutlinerScale(
- basegfx::fTools::equalZero(aOutlinerTextSiz.Width()) ? 1.0 :
aOutlinerTextSiz.Width(),
+ basegfx::fTools::equalZero(aOutlinerTextSiz.Width()) ? 1.0 :
aOutlinerTextSiz.Width(),
basegfx::fTools::equalZero(aOutlinerTextSiz.Height()) ? 1.0 :
aOutlinerTextSiz.Height());
// prepare matrices to apply to newly created primitives
basegfx::B2DHomMatrix aNewTransformA;
- // #i101957# Check for vertical text. If used, aNewTransformA
- // needs to translate the text initially around object width to orient
- // it relative to the topper right instead of the topper left
- const bool
bVertical(rSdrStretchTextPrimitive.getOutlinerParaObject().IsVertical());
+ // #i101957# Check for vertical text. If used, aNewTransformA
+ // needs to translate the text initially around object width to orient
+ // it relative to the topper right instead of the topper left
+ const bool
bVertical(rSdrStretchTextPrimitive.getOutlinerParaObject().IsVertical());
- if(bVertical)
- {
- aNewTransformA.translate(aScale.getX(), 0.0);
- }
+ if(bVertical)
+ {
+ aNewTransformA.translate(aScale.getX(), 0.0);
+ }
- // calculate global char stretching scale parameters. Use non-mirrored
sizes
+ // calculate global char stretching scale parameters. Use non-mirrored
sizes
// to layout without mirroring
const double fScaleX(fabs(aScale.getX()) / aOutlinerScale.getX());
const double fScaleY(fabs(aScale.getY()) / aOutlinerScale.getY());
@@ -1036,16 +1034,16 @@ void
SdrTextObj::impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryLi
// prepare loop and add
drawinglayer::animation::AnimationEntryLoop aLoop(nRepeat ?
nRepeat : ENDLESS_LOOP);
- drawinglayer::animation::AnimationEntryFixed aStart(fDelay, 0.0);
+ drawinglayer::animation::AnimationEntryFixed aStart(fDelay,
0.0);
aLoop.append(aStart);
- drawinglayer::animation::AnimationEntryFixed aEnd(fDelay, 1.0);
+ drawinglayer::animation::AnimationEntryFixed aEnd(fDelay, 1.0);
aLoop.append(aEnd);
rAnimList.append(aLoop);
// add stopped state if loop is not endless
if(0L != nRepeat)
{
- drawinglayer::animation::AnimationEntryFixed aStop(ENDLESS_TIME,
bVisisbleWhenStopped ? 0.0 : 1.0);
+ drawinglayer::animation::AnimationEntryFixed
aStop(ENDLESS_TIME, bVisisbleWhenStopped ? 0.0 : 1.0);
rAnimList.append(aStop);
}
}
@@ -1060,7 +1058,7 @@ void impCreateScrollTiming(const SfxItemSet& rSet,
drawinglayer::animation::Anim
if(bVisisbleWhenStarted)
{
// move from center to outside
- drawinglayer::animation::AnimationEntryLinear aInOut(fTimeFullPath *
0.5, fFrequency, 0.5, bForward ? 1.0 : 0.0);
+ drawinglayer::animation::AnimationEntryLinear
aInOut(fTimeFullPath * 0.5, fFrequency, 0.5, bForward ? 1.0 : 0.0);
rAnimList.append(aInOut);
}
@@ -1068,7 +1066,7 @@ void impCreateScrollTiming(const SfxItemSet& rSet,
drawinglayer::animation::Anim
if(nRepeat || 0L == nRepeat)
{
drawinglayer::animation::AnimationEntryLoop aLoop(nRepeat ?
nRepeat : ENDLESS_LOOP);
- drawinglayer::animation::AnimationEntryLinear aThrough(fTimeFullPath,
fFrequency, bForward ? 0.0 : 1.0, bForward ? 1.0 : 0.0);
+ drawinglayer::animation::AnimationEntryLinear
aThrough(fTimeFullPath, fFrequency, bForward ? 0.0 : 1.0, bForward ? 1.0 : 0.0);
aLoop.append(aThrough);
rAnimList.append(aLoop);
}
@@ -1076,11 +1074,11 @@ void impCreateScrollTiming(const SfxItemSet& rSet,
drawinglayer::animation::Anim
if(0L != nRepeat && bVisisbleWhenStopped)
{
// move from outside to center
- drawinglayer::animation::AnimationEntryLinear aOutIn(fTimeFullPath *
0.5, fFrequency, bForward ? 0.0 : 1.0, 0.5);
+ drawinglayer::animation::AnimationEntryLinear
aOutIn(fTimeFullPath * 0.5, fFrequency, bForward ? 0.0 : 1.0, 0.5);
rAnimList.append(aOutIn);
// add timing for staying at the end
- drawinglayer::animation::AnimationEntryFixed aEnd(ENDLESS_TIME, 0.5);
+ drawinglayer::animation::AnimationEntryFixed aEnd(ENDLESS_TIME,
0.5);
rAnimList.append(aEnd);
}
}
@@ -1103,7 +1101,7 @@ void impCreateAlternateTiming(const SfxItemSet& rSet,
drawinglayer::animation::A
if(!bVisisbleWhenStarted)
{
// move from outside to center
- drawinglayer::animation::AnimationEntryLinear aOutIn(fTimeFullPath *
0.5, fFrequency, bForward ? 0.0 : 1.0, 0.5);
+ drawinglayer::animation::AnimationEntryLinear
aOutIn(fTimeFullPath * 0.5, fFrequency, bForward ? 0.0 : 1.0, 0.5);
rAnimList.append(aOutIn);
}
@@ -1118,11 +1116,11 @@ void impCreateAlternateTiming(const SfxItemSet& rSet,
drawinglayer::animation::A
{
// double forth and back loop
drawinglayer::animation::AnimationEntryLoop aLoop(nDoubleRepeat
? nDoubleRepeat : ENDLESS_LOOP);
- drawinglayer::animation::AnimationEntryLinear aTime0(fHalfInnerPath,
fFrequency, 0.5, fEndPosition);
+ drawinglayer::animation::AnimationEntryLinear
aTime0(fHalfInnerPath, fFrequency, 0.5, fEndPosition);
aLoop.append(aTime0);
- drawinglayer::animation::AnimationEntryLinear
aTime1(fTimeForInnerPath, fFrequency, fEndPosition, fStartPosition);
+ drawinglayer::animation::AnimationEntryLinear
aTime1(fTimeForInnerPath, fFrequency, fEndPosition, fStartPosition);
aLoop.append(aTime1);
- drawinglayer::animation::AnimationEntryLinear aTime2(fHalfInnerPath,
fFrequency, fStartPosition, 0.5);
+ drawinglayer::animation::AnimationEntryLinear
aTime2(fHalfInnerPath, fFrequency, fStartPosition, 0.5);
aLoop.append(aTime2);
rAnimList.append(aLoop);
}
@@ -1130,9 +1128,9 @@ void impCreateAlternateTiming(const SfxItemSet& rSet,
drawinglayer::animation::A
if(nRepeat % 2L)
{
// repeat is uneven, so we need one more forth and back to
center
- drawinglayer::animation::AnimationEntryLinear aTime0(fHalfInnerPath,
fFrequency, 0.5, fEndPosition);
+ drawinglayer::animation::AnimationEntryLinear
aTime0(fHalfInnerPath, fFrequency, 0.5, fEndPosition);
rAnimList.append(aTime0);
- drawinglayer::animation::AnimationEntryLinear aTime1(fHalfInnerPath,
fFrequency, fEndPosition, 0.5);
+ drawinglayer::animation::AnimationEntryLinear
aTime1(fHalfInnerPath, fFrequency, fEndPosition, 0.5);
rAnimList.append(aTime1);
}
@@ -1141,13 +1139,13 @@ void impCreateAlternateTiming(const SfxItemSet& rSet,
drawinglayer::animation::A
if(bVisisbleWhenStopped)
{
// add timing for staying at the end
- drawinglayer::animation::AnimationEntryFixed aEnd(ENDLESS_TIME,
0.5);
+ drawinglayer::animation::AnimationEntryFixed
aEnd(ENDLESS_TIME, 0.5);
rAnimList.append(aEnd);
}
else
{
// move from center to outside
- drawinglayer::animation::AnimationEntryLinear aInOut(fTimeFullPath
* 0.5, fFrequency, 0.5, bForward ? 1.0 : 0.0);
+ drawinglayer::animation::AnimationEntryLinear
aInOut(fTimeFullPath * 0.5, fFrequency, 0.5, bForward ? 1.0 : 0.0);
rAnimList.append(aInOut);
}
}
@@ -1160,16 +1158,16 @@ void impCreateSlideTiming(const SfxItemSet& rSet,
drawinglayer::animation::Anima
const sal_uInt32
nRepeat(((SdrTextAniCountItem&)rSet.Get(SDRATTR_TEXT_ANICOUNT)).GetValue());
// move from outside to center
- drawinglayer::animation::AnimationEntryLinear aOutIn(fTimeFullPath * 0.5,
fFrequency, fStartPosition, 0.5);
+ drawinglayer::animation::AnimationEntryLinear aOutIn(fTimeFullPath *
0.5, fFrequency, fStartPosition, 0.5);
rAnimList.append(aOutIn);
// loop. In loop, move out and in again
if(nRepeat > 1L || 0L == nRepeat)
{
drawinglayer::animation::AnimationEntryLoop aLoop(nRepeat ?
nRepeat - 1L : ENDLESS_LOOP);
- drawinglayer::animation::AnimationEntryLinear aTime0(fTimeFullPath *
0.5, fFrequency, 0.5, fStartPosition);
+ drawinglayer::animation::AnimationEntryLinear
aTime0(fTimeFullPath * 0.5, fFrequency, 0.5, fStartPosition);
aLoop.append(aTime0);
- drawinglayer::animation::AnimationEntryLinear aTime1(fTimeFullPath *
0.5, fFrequency, fStartPosition, 0.5);
+ drawinglayer::animation::AnimationEntryLinear
aTime1(fTimeFullPath * 0.5, fFrequency, fStartPosition, 0.5);
aLoop.append(aTime1);
rAnimList.append(aLoop);
}
@@ -1177,7 +1175,7 @@ void impCreateSlideTiming(const SfxItemSet& rSet,
drawinglayer::animation::Anima
// always visible when stopped, so add timing for staying at the end
when not endless
if(0L != nRepeat)
{
- drawinglayer::animation::AnimationEntryFixed aEnd(ENDLESS_TIME, 0.5);
+ drawinglayer::animation::AnimationEntryFixed aEnd(ENDLESS_TIME,
0.5);
rAnimList.append(aEnd);
}
}
@@ -1212,7 +1210,7 @@ void
SdrTextObj::impGetScrollTextTiming(drawinglayer::animation::AnimationEntryL
if(basegfx::fTools::equalZero(fSingleStepWidth))
{
- // default to 1 milimeter
+ // default to 1 millimeter
fSingleStepWidth = 100.0;
}
@@ -1250,5 +1248,4 @@ void
SdrTextObj::impGetScrollTextTiming(drawinglayer::animation::AnimationEntryL
}
}
-//////////////////////////////////////////////////////////////////////////////
-// eof
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/sw/source/filter/xml/xmltbli.cxx
b/main/sw/source/filter/xml/xmltbli.cxx
index 1ed415cf56..94e64c1724 100644
--- a/main/sw/source/filter/xml/xmltbli.cxx
+++ b/main/sw/source/filter/xml/xmltbli.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,24 +7,21 @@
* 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.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include "hintids.hxx"
#include <limits.h>
@@ -55,7 +52,7 @@
#include "cellatr.hxx"
#include "swddetbl.hxx"
#include "ddefld.hxx"
-#include <sfx2/linkmgr.hxx> // for cTokenSeparator
+#include <sfx2/linkmgr.hxx> // for cTokenSeparator
#include "xmlimp.hxx"
#include "xmltbli.hxx"
@@ -89,7 +86,7 @@ enum SwXMLTableElemTokens
enum SwXMLTableCellAttrTokens
{
- XML_TOK_TABLE_XMLID,
+ XML_TOK_TABLE_XMLID,
XML_TOK_TABLE_STYLE_NAME,
XML_TOK_TABLE_NUM_COLS_SPANNED,
XML_TOK_TABLE_NUM_ROWS_SPANNED,
@@ -215,12 +212,12 @@ public:
double GetValue() const { return dValue; }
sal_Bool HasValue() const { return bHasValue; }
sal_Bool IsProtected() const { return bProtected; }
- sal_Bool IsCovered() const { return mbCovered; }
- sal_Bool HasTextValue() const { return mbTextValue; }
+ sal_Bool IsCovered() const { return mbCovered; }
+ sal_Bool HasTextValue() const { return mbTextValue; }
const OUString& GetXmlId() const { return mXmlId; }
const SwStartNode *GetStartNode() const { return pStartNode; }
- inline void SetStartNode( const SwStartNode *pSttNd );
+ inline void SetStartNode( const SwStartNode *pSttNd );
inline SwXMLTableContext *GetSubTable() const;
@@ -246,14 +243,14 @@ inline void SwXMLTableCell_Impl::Set( const OUString&
rStyleName,
xSubTable = pTable;
dValue = dVal;
bHasValue = bHasVal;
- mbCovered = bCov;
+ mbCovered = bCov;
mbTextValue = bTextVal;
bProtected = bProtect;
- if (!mbCovered) // ensure uniqueness
- {
- mXmlId = i_rXmlId;
- }
+ if (!mbCovered) // ensure uniqueness
+ {
+ mXmlId = i_rXmlId;
+ }
// set formula, if valid
if (pFormula != NULL)
@@ -289,31 +286,31 @@ class SwXMLTableRow_Impl
{
OUString aStyleName;
OUString aDfltCellStyleName;
- OUString mXmlId;
+ OUString mXmlId;
SwXMLTableCells_Impl aCells;
- sal_Bool bSplitable;
+ sal_Bool bSplitable;
public:
SwXMLTableRow_Impl( const OUString& rStyleName, sal_uInt32 nCells,
const OUString
*pDfltCellStyleName = 0,
- const OUString& i_rXmlId = OUString() );
+ const OUString& i_rXmlId =
OUString() );
~SwXMLTableRow_Impl() {}
inline SwXMLTableCell_Impl *GetCell( sal_uInt32 nCol ) const;
inline void Set( const OUString& rStyleName,
const OUString& rDfltCellStyleName,
- const OUString& i_rXmlId );
+ const OUString& i_rXmlId );
void Expand( sal_uInt32 nCells, sal_Bool bOneCell );
- void SetSplitable( sal_Bool bSet ) { bSplitable = bSet; }
- sal_Bool IsSplitable() const { return bSplitable; }
+ void SetSplitable( sal_Bool bSet ) { bSplitable = bSet; }
+ sal_Bool IsSplitable() const { return bSplitable; }
- const OUString& GetStyleName() const { return aStyleName; }
+ const OUString& GetStyleName() const { return aStyleName; }
const OUString& GetDefaultCellStyleName() const { return
aDfltCellStyleName; }
const OUString& GetXmlId() const { return mXmlId; }
@@ -328,7 +325,7 @@ SwXMLTableRow_Impl::SwXMLTableRow_Impl( const OUString&
rStyleName,
mXmlId( i_rXmlId ),
bSplitable( sal_False )
{
- if( pDfltCellStyleName )
+ if( pDfltCellStyleName )
aDfltCellStyleName = *pDfltCellStyleName;
ASSERT( nCells <= USHRT_MAX,
"SwXMLTableRow_Impl::SwXMLTableRow_Impl: too many
cells" );
@@ -379,7 +376,7 @@ inline void SwXMLTableRow_Impl::Set( const OUString&
rStyleName,
{
aStyleName = rStyleName;
aDfltCellStyleName = rDfltCellStyleName;
- mXmlId = i_rXmlId;
+ mXmlId = i_rXmlId;
}
void SwXMLTableRow_Impl::Dispose()
@@ -394,8 +391,8 @@ class SwXMLTableCellContext_Impl : public SvXMLImportContext
{
OUString aStyleName;
OUString sFormula;
- OUString sSaveParaDefault;
- OUString mXmlId;
+ OUString sSaveParaDefault;
+ OUString mXmlId;
SvXMLImportContextRef xMyTable;
@@ -453,7 +450,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
bHasTextContent( sal_False ),
bHasTableContent( sal_False )
{
- sSaveParaDefault = GetImport().GetTextImport()->GetCellParaStyleDefault();
+ sSaveParaDefault =
GetImport().GetTextImport()->GetCellParaStyleDefault();
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i=0; i < nAttrCount; i++ )
{
@@ -473,7 +470,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
break;
case XML_TOK_TABLE_STYLE_NAME:
aStyleName = rValue;
- GetImport().GetTextImport()->SetCellParaStyleDefault(rValue);
+
GetImport().GetTextImport()->SetCellParaStyleDefault(rValue);
break;
case XML_TOK_TABLE_NUM_COLS_SPANNED:
nColSpan = (sal_uInt32)rValue.toInt32();
@@ -565,7 +562,7 @@ inline void SwXMLTableCellContext_Impl::_InsertContent()
{
GetTable()->InsertCell( aStyleName, nRowSpan, nColSpan,
GetTable()->InsertTableSection(),
- mXmlId,
+ mXmlId,
NULL, bProtect,
&sFormula, bHasValue, fValue, bHasTextValue );
}
@@ -596,12 +593,12 @@ SvXMLImportContext
*SwXMLTableCellContext_Impl::CreateChildContext(
{
SvXMLImportContext *pContext = 0;
- OUString sXmlId;
+ OUString sXmlId;
sal_Bool bSubTable = sal_False;
if( XML_NAMESPACE_TABLE == nPrefix &&
- IsXMLToken( rLocalName, XML_TABLE ) )
+ IsXMLToken( rLocalName, XML_TABLE ) )
{
- sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
+ sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength()
: 0;
for( sal_Int16 i=0; i < nAttrCount; i++ )
{
const OUString& rAttrName = xAttrList->getNameByIndex(
i );
@@ -636,7 +633,7 @@ SvXMLImportContext
*SwXMLTableCellContext_Impl::CreateChildContext(
if( GetTable()->IsValid() )
InsertContent( pTblContext );
- GetTable()->SetHasSubTables( sal_True );
+ GetTable()->SetHasSubTables( sal_True );
}
}
else
@@ -645,7 +642,7 @@ SvXMLImportContext
*SwXMLTableCellContext_Impl::CreateChildContext(
InsertContentIfNotThere();
pContext = GetImport().GetTextImport()->CreateTextChildContext(
GetImport(), nPrefix,
rLocalName, xAttrList,
- XML_TEXT_TYPE_CELL );
+ XML_TEXT_TYPE_CELL );
}
if( !pContext )
@@ -711,7 +708,7 @@ void SwXMLTableCellContext_Impl::EndElement()
}
}
}
- GetImport().GetTextImport()->SetCellParaStyleDefault(sSaveParaDefault);
+ GetImport().GetTextImport()->SetCellParaStyleDefault(sSaveParaDefault);
}
// ---------------------------------------------------------------------
@@ -767,7 +764,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
IsXMLToken( aLocalName, XML_ID ) )
{
(void) rValue;
-//FIXME where to put this??? columns do not actually exist in writer...
+//FIXME where to put this??? columns do not actually exist in Writer...
}
}
@@ -786,7 +783,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
{
const SwFmtFrmSize *pSize = ((const SwFmtFrmSize
*)pItem);
nWidth = pSize->GetWidth();
- bRelWidth = ATT_VAR_SIZE == pSize->GetHeightSizeType();
+ bRelWidth = ATT_VAR_SIZE == pSize->GetHeightSizeType();
}
}
@@ -830,7 +827,7 @@ public:
SwXMLTableColsContext_Impl::SwXMLTableColsContext_Impl(
SwXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName,
- const Reference< xml::sax::XAttributeList > &,
+ const Reference< xml::sax::XAttributeList > &,
SwXMLTableContext *pTable, sal_Bool bHead ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
xMyTable( pTable ),
@@ -901,7 +898,7 @@ SwXMLTableRowContext_Impl::SwXMLTableRowContext_Impl(
SwXMLImport& rImport,
nRowRepeat( 1 )
{
OUString aStyleName, aDfltCellStyleName;
- OUString sXmlId;
+ OUString sXmlId;
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i=0; i < nAttrCount; i++ )
@@ -997,10 +994,10 @@ class SwXMLTableRowsContext_Impl : public
SvXMLImportContext
public:
SwXMLTableRowsContext_Impl( SwXMLImport& rImport, sal_uInt16 nPrfx,
- const OUString& rLName,
- const Reference< xml::sax::XAttributeList > & xAttrList,
+ const OUString& rLName,
+ const Reference< xml::sax::XAttributeList > & xAttrList,
SwXMLTableContext *pTable,
- sal_Bool bHead );
+ sal_Bool bHead );
virtual ~SwXMLTableRowsContext_Impl();
@@ -1014,7 +1011,7 @@ public:
SwXMLTableRowsContext_Impl::SwXMLTableRowsContext_Impl( SwXMLImport& rImport,
sal_uInt16 nPrfx,
const OUString& rLName,
- const Reference< xml::sax::XAttributeList > &,
+ const Reference< xml::sax::XAttributeList > &,
SwXMLTableContext *pTable,
sal_Bool bHead ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
@@ -1180,12 +1177,12 @@ SwDDEFieldType*
lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
{
// make command string
String sCommand(pContext->GetDDEApplication());
- sCommand += sfx2::cTokenSeperator;
+ sCommand += sfx2::cTokenSeperator;
sCommand += String(pContext->GetDDEItem());
- sCommand += sfx2::cTokenSeperator;
+ sCommand += sfx2::cTokenSeperator;
sCommand += String(pContext->GetDDETopic());
- sal_uInt16 nType = static_cast< sal_uInt16
>(pContext->GetIsAutomaticUpdate() ? sfx2::LINKUPDATE_ALWAYS
+ sal_uInt16 nType = static_cast< sal_uInt16
>(pContext->GetIsAutomaticUpdate() ? sfx2::LINKUPDATE_ALWAYS
:
sfx2::LINKUPDATE_ONCALL);
String sName(pContext->GetConnectionName());
@@ -1296,21 +1293,21 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport&
rImport,
pSttNd1( 0 ),
pBoxFmt( 0 ),
pLineFmt( 0 ),
- pSharedBoxFormats(NULL),
+ pSharedBoxFormats(NULL),
pDDESource(NULL),
bFirstSection( sal_True ),
bRelWidth( sal_True ),
- bHasSubTables( sal_False ),
+ bHasSubTables( sal_False ),
nHeaderRows( 0 ),
nCurRow( 0UL ),
nCurCol( 0UL ),
nWidth( 0UL )
{
OUString aName;
- OUString sXmlId;
+ OUString sXmlId;
- // this method will modify the document directly -> lock SolarMutex
- vos::OGuard aGuard(Application::GetSolarMutex());
+ // this method will modify the document directly -> lock SolarMutex
+ vos::OGuard aGuard(Application::GetSolarMutex());
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i=0; i < nAttrCount; i++ )
@@ -1388,8 +1385,8 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport&
rImport,
if( xTable.is() )
{
//FIXME
- // xml:id for RDF metadata
- GetImport().SetXmlId(xTable, sXmlId);
+ // xml:id for RDF metadata
+ GetImport().SetXmlId(xTable, sXmlId);
Reference<XUnoTunnel> xTableTunnel( xTable, UNO_QUERY);
if( xTableTunnel.is() )
@@ -1428,11 +1425,11 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport&
rImport,
SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
sal_uInt16 nPrfx,
const OUString& rLName,
- const Reference< xml::sax::XAttributeList > &,
+ const Reference< xml::sax::XAttributeList > &,
SwXMLTableContext *pTable,
- OUString const & i_rXmlId ) :
+ OUString const & i_rXmlId ) :
XMLTextTableContext( rImport, nPrfx, rLName ),
- mXmlId( i_rXmlId ),
+ mXmlId( i_rXmlId ),
pColumnDefaultCellStyleNames( 0 ),
pRows( new SwXMLTableRows_Impl ),
pTableNode( pTable->pTableNode ),
@@ -1440,7 +1437,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport&
rImport,
pSttNd1( 0 ),
pBoxFmt( 0 ),
pLineFmt( 0 ),
- pSharedBoxFormats(NULL),
+ pSharedBoxFormats(NULL),
xParentTable( pTable ),
pDDESource(NULL),
bFirstSection( sal_False ),
@@ -1456,11 +1453,11 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport&
rImport,
SwXMLTableContext::~SwXMLTableContext()
{
delete pColumnDefaultCellStyleNames;
- delete pSharedBoxFormats;
- delete pRows;
+ delete pSharedBoxFormats;
+ delete pRows;
- // close redlines on table end nodes
- GetImport().GetTextImport()->RedlineAdjustStartNodeCursor(sal_False);
+ // close redlines on table end nodes
+ GetImport().GetTextImport()->RedlineAdjustStartNodeCursor(sal_False);
}
SvXMLImportContext *SwXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
@@ -1523,7 +1520,7 @@ SvXMLImportContext
*SwXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
}
void SwXMLTableContext::InsertColumn( sal_Int32 nWidth2, sal_Bool bRelWidth2,
- const
OUString *pDfltCellStyleName )
+ const
OUString *pDfltCellStyleName )
{
ASSERT( nCurCol < USHRT_MAX,
"SwXMLTableContext::InsertColumn: no space left" );
@@ -1580,7 +1577,7 @@ OUString
SwXMLTableContext::GetColumnDefaultCellStyleName( sal_uInt32 nCol ) con
void SwXMLTableContext::InsertCell( const OUString& rStyleName,
sal_uInt32 nRowSpan, sal_uInt32 nColSpan,
const
SwStartNode *pStartNode,
- const OUString & i_rXmlId,
+ const
OUString & i_rXmlId,
SwXMLTableContext *pTable,
sal_Bool bProtect,
const
OUString* pFormula,
@@ -1639,9 +1636,9 @@ void SwXMLTableContext::InsertCell( const OUString&
rStyleName,
}
// Add columns (if # required columns greater than # columns):
- // This should never happen, since we require column definitions!
- if ( nColsReq > GetColumnCount() )
- {
+ // This should never happen, since we require column definitions!
+ if ( nColsReq > GetColumnCount() )
+ {
for( i=GetColumnCount(); i<nColsReq; i++ )
{
aColumnWidths.Insert( MINLAY, aColumnWidths.Count() );
@@ -1650,7 +1647,7 @@ void SwXMLTableContext::InsertCell( const OUString&
rStyleName,
// adjust columns in *all* rows, if columns must be inserted
for( i=0; i<pRows->Count(); i++ )
(*pRows)[(sal_uInt16)i]->Expand( nColsReq, i<nCurRow );
- }
+ }
// Add rows
if( pRows->Count() < nRowsReq )
@@ -1675,11 +1672,11 @@ void SwXMLTableContext::InsertCell( const OUString&
rStyleName,
// Fill the cells
for( i=nColSpan; i>0UL; i-- )
- {
+ {
for( j=nRowSpan; j>0UL; j-- )
- {
- const bool bCovered = i != nColSpan || j != nRowSpan;
- GetCell( nRowsReq-j, nColsReq-i )
+ {
+ const bool bCovered = i != nColSpan || j != nRowSpan;
+ GetCell( nRowsReq-j, nColsReq-i )
->Set( sStyleName, j, i, pStartNode,
pTable, bProtect, pFormula, bHasValue, bCovered, fValue,
bTextValue, i_rXmlId );
@@ -1703,7 +1700,7 @@ void SwXMLTableContext::InsertRow( const OUString&
rStyleName,
return;
// Make sure there is at least one column.
- if( 0==nCurRow && 0UL == GetColumnCount() )
+ if( 0==nCurRow && 0UL == GetColumnCount() )
InsertColumn( USHRT_MAX, sal_True );
if( nCurRow < pRows->Count() )
@@ -1915,7 +1912,7 @@ SwTableBoxFmt* SwXMLTableContext::GetSharedBoxFormat(
pBoxFmt2->ResetAllFmtAttr();
// <--
pBoxFmt2->SetFmtAttr( aFillOrder );
- bNew = sal_True; // it's a new format now
+ bNew = sal_True; // it's a new format now
// share this format, if allowed
if ( bMayShare )
@@ -1926,7 +1923,7 @@ SwTableBoxFmt* SwXMLTableContext::GetSharedBoxFormat(
// set the shared format
pBoxFmt2 = aIter->second;
pBox->ChgFrmFmt( pBoxFmt2 );
- bNew = sal_False; // copied from an existing format
+ bNew = sal_False; // copied from an existing format
// claim it, if we are not allowed to share
if ( !bMayShare )
@@ -1975,7 +1972,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( SwTableLine
*pUpper,
for( i = nTopRow; i < nBottomRow; i++ )
{
- // Could the table be splitted behind the current row?
+ // Could the table be split behind the current row?
sal_Bool bSplit = sal_True;
SwXMLTableRow_Impl *pRow = (*pRows)[(sal_uInt16)i];
for( sal_uInt32 j=nLeftCol; j<nRightCol; j++ )
@@ -2037,10 +2034,10 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
SwTableLine *pUpper,
}
}
// und jetzt nochmal von vorne ...
- }
- }
+ }
+ }
- return pBox;
+ return pBox;
}
SwTableBox *SwXMLTableContext::MakeTableBox(
@@ -2051,7 +2048,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
//FIXME: here would be a great place to handle XmlId for cell
SwTableBox *pBox;
sal_uInt32 nColSpan = nRightCol - nLeftCol;
- sal_Int32 nColWidth = GetColumnWidth( nLeftCol, nColSpan );
+ sal_Int32 nColWidth = GetColumnWidth( nLeftCol, nColSpan );
if( pCell->GetStartNode() )
{
@@ -2067,14 +2064,14 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
}
// Share formats!
- OUString sStyleName = pCell->GetStyleName();
- sal_Bool bModifyLocked;
- sal_Bool bNew;
+ OUString sStyleName = pCell->GetStyleName();
+ sal_Bool bModifyLocked;
+ sal_Bool bNew;
SwTableBoxFmt *pBoxFmt2 = GetSharedBoxFormat(
pBox, sStyleName, nColWidth, pCell->IsProtected(),
pCell->GetStartNode() && pCell->GetFormula().getLength() == 0 &&
! pCell->HasValue(),
- bNew, &bModifyLocked );
+ bNew, &bModifyLocked );
// if a new format was created, then we need to set the style
if ( bNew )
@@ -2190,16 +2187,16 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
// table cell protection
if( pCell->IsProtected() )
{
- SvxProtectItem aProtectItem( RES_PROTECT );
+ SvxProtectItem aProtectItem( RES_PROTECT );
aProtectItem.SetCntntProtect( sal_True );
- pBoxFmt2->SetFmtAttr( aProtectItem );
+ pBoxFmt2->SetFmtAttr( aProtectItem );
}
// restore old modify-lock state
if (! bModifyLocked)
pBoxFmt2->UnlockModify();
- pBoxFmt2->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nColWidth ) );
+ pBoxFmt2->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nColWidth ) );
return pBox;
}
@@ -2224,20 +2221,20 @@ SwTableLine *SwXMLTableContext::MakeTableLine(
SwTableBox *pUpper,
// TODO: Share formats!
SwFrmFmt *pFrmFmt = pLine->ClaimFrmFmt();
SwFmtFillOrder aFillOrder( pFrmFmt->GetFillOrder() );
- // --> OD 2007-01-25 #i73790# - method renamed
- pFrmFmt->ResetAllFmtAttr();
- // <--
- pFrmFmt->SetFmtAttr( aFillOrder );
+ // --> OD 2007-01-25 #i73790# - method renamed
+ pFrmFmt->ResetAllFmtAttr();
+ // <--
+ pFrmFmt->SetFmtAttr( aFillOrder );
const SfxItemSet *pAutoItemSet = 0;
const OUString& rStyleName =
(*pRows)[(sal_uInt16)nTopRow]->GetStyleName();
- if( 1UL == (nBottomRow - nTopRow) &&
- rStyleName.getLength() &&
+ if( 1UL == (nBottomRow - nTopRow) &&
+ rStyleName.getLength() &&
GetSwImport().FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_ROW, rStyleName, &pAutoItemSet )
)
{
if( pAutoItemSet )
- pFrmFmt->SetFmtAttr( *pAutoItemSet );
+ pFrmFmt->SetFmtAttr( *pAutoItemSet );
}
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
@@ -2256,8 +2253,8 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox
*pUpper,
ASSERT( nCol < nRightCol, "Zu weit gelaufen" );
// Kann hinter der aktuellen HTML-Tabellen-Spalte gesplittet
- // werden? Wenn ja, koennte der enstehende Bereich auch noch
- // in Zeilen zerlegt werden, wenn man die naechste Spalte
+ // werden? Wenn ja, könnte der enstehende Bereich auch noch
+ // in Zeilen zerlegt werden, wenn man die nächste Spalte
// hinzunimmt?
sal_Bool bSplit = sal_True;
sal_Bool bHoriSplitMayContinue = sal_False;
@@ -2276,15 +2273,15 @@ SwTableLine *SwXMLTableContext::MakeTableLine(
SwTableBox *pUpper,
1UL == pCell->GetRowSpan();
(*pRows)[(sal_uInt16)nRow]->SetSplitable( bHoriSplit );
- // Could the table fragment be splitted vertically behind
the
- // current column (uptp the current line?
+ // Could the table fragment be split vertically behind the
+ // current column up to the current line?
bSplit &= ( 1UL == pCell->GetColSpan() );
if( bSplit )
{
bHoriSplitPossible |= bHoriSplit;
- // Could the current table fragment be splitted
- // horizontally behind the next collumn, too?
+ // Could the current table fragment be split
+ // horizontally behind the next column, too?
bHoriSplit &= (nCol+1UL < nRightCol &&
1UL ==
GetCell(nRow,nCol+1UL)->GetRowSpan());
bHoriSplitMayContinue |= bHoriSplit;
@@ -2293,7 +2290,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox
*pUpper,
}
else
{
- // No subtabels: We use the new table model.
+ // No subtables: We use the new table model.
SwXMLTableCell_Impl *pCell = GetCell(nTopRow,nCol);
// --> OD 2009-03-19 #i95726# - some fault tolerance
@@ -2304,8 +2301,8 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox
*pUpper,
}
// <--
- // Could the table fragment be splitted vertically behind the
- // current column (uptp the current line?
+ // Could the table fragment be split vertically behind the
+ // current column up to the current line?
bSplit = 1UL == pCell->GetColSpan();
}
@@ -2364,11 +2361,11 @@ SwTableLine *SwXMLTableContext::MakeTableLine(
SwTableBox *pUpper,
}
else if( bHasSubTables && bHoriSplitPossible &&
bHoriSplitMayContinue )
{
- // The table fragment could be splitted behind the current
+ // The table fragment could be split behind the current
// column, and the remaining fragment could be divided
// into lines. Anyway, it could be that this applies to
// the next column, too. That for, we check the next
- // column but rememeber the current one as a good place to
+ // column but remember the current one as a good place to
// split.
nSplitCol = nCol + 1UL;
}
@@ -2376,10 +2373,10 @@ SwTableLine *SwXMLTableContext::MakeTableLine(
SwTableBox *pUpper,
{
// If the table resulting table fragment could be divided
// into lines if splitting behind the current column, but
- // this doesn't apply for thr next column, we split behind
+ // this doesn't apply for the next column, we split behind
// the current column. This applies for the last column,
// too.
- // If the resulting box cannot be splitted into rows,
+ // If the resulting box cannot be split into rows,
// the split at the last split position we remembered.
if( bHoriSplitPossible || nSplitCol > nCol+1 )
{
@@ -2439,7 +2436,7 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
InsertCell( aStyleName2, 1U, nCols, InsertTableSection() );
}
- // TODO: Do we have to keep both values, the realtive and the absolute
+ // TODO: Do we have to keep both values, the relative and the absolute
// width?
sal_Int32 nAbsWidth = 0L;
sal_Int32 nMinAbsColWidth = 0L;
@@ -2496,8 +2493,8 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
{
// This happens only for percentage values for the
table itself.
// In this case, the columns get the correct width even
if the
- // the sum of the relative withs is smaller than the
available
- // width in TWIP. Therfore, we can use the relative
width.
+ // the sum of the relative width is smaller than the
available
+ // width in TWIP. Therefore, we can use the relative
width.
//
nWidth = nRelWidth > USHRT_MAX ? USHRT_MAX : nRelWidth;
}
@@ -2550,14 +2547,14 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
else if( nAbsForRelWidth <= (nRelWidth * MINLAY) /
nMinRelColWidth )
{
- // If there is enougth space for all columns to
get the
+ // If there is enough space for all columns to
get the
// minimum width, but not to get a width that
takes the
// relative width into account, each column
gets the minimum
// width plus some extra space that is based on
the additional
// space that is available.
bMinExtra = sal_True;
}
- // Otherwise, if there is enouth space for every
column, every
+ // Otherwise, if there is enough space for every
column, every
// column gets this space.
for( i=0UL; nRelCols > 0UL && i < nCols; i++ )
@@ -2582,7 +2579,7 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
sal_Int32 nExtraRelCol =
aColumnWidths[(sal_uInt16)i] - nMinRelColWidth;
nAbsCol = MINLAY +
(nExtraRelCol * nExtraAbs) /
-
nExtraRel;
+
nExtraRel;
}
else
{
@@ -2643,8 +2640,8 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
pBox ? pBox->GetTabLines()
: pTableNode->GetTable().GetTabLines();
- sal_uInt32 nStartRow = 0UL;
- sal_uInt32 nRows = pRows->Count();
+ sal_uInt32 nStartRow = 0UL;
+ sal_uInt32 nRows = pRows->Count();
for( i=0UL; i<nRows; i++ )
{
// Could we split the table behind the current line?
@@ -2693,13 +2690,13 @@ void SwXMLTableContext::MakeTable()
SwFrmFmt *pFrmFmt = pTableNode->GetTable().GetFrmFmt();
- sal_Int16 eHoriOrient = text::HoriOrientation::FULL;
+ sal_Int16 eHoriOrient = text::HoriOrientation::FULL;
sal_Bool bSetHoriOrient = sal_False;
sal_uInt16 nPrcWidth = 0U;
- pTableNode->GetTable().SetRowsToRepeat( nHeaderRows );
- pTableNode->GetTable().SetTableModel( !bHasSubTables );
+ pTableNode->GetTable().SetRowsToRepeat( nHeaderRows );
+ pTableNode->GetTable().SetTableModel( !bHasSubTables );
const SfxItemSet *pAutoItemSet = 0;
if( aStyleName.getLength() &&
@@ -2719,14 +2716,14 @@ void SwXMLTableContext::MakeTable()
eHoriOrient = ((const SwFmtHoriOrient
*)pItem)->GetHoriOrient();
switch( eHoriOrient )
{
- case text::HoriOrientation::FULL:
+ case text::HoriOrientation::FULL:
if( pLRSpace )
{
eHoriOrient = text::HoriOrientation::NONE;
bSetHoriOrient = sal_True;
}
break;
- case text::HoriOrientation::LEFT:
+ case text::HoriOrientation::LEFT:
if( pLRSpace )
{
eHoriOrient = text::HoriOrientation::LEFT_AND_WIDTH;
@@ -2749,9 +2746,9 @@ void SwXMLTableContext::MakeTable()
switch( eHoriOrient )
{
- case text::HoriOrientation::FULL:
- case text::HoriOrientation::NONE:
- // #78246#: For text::HoriOrientation::NONE we would prefere to
use the sum
+ case text::HoriOrientation::FULL:
+ case text::HoriOrientation::NONE:
+ // #78246#: For text::HoriOrientation::NONE we would
prefer to use the sum
// of the relative column widths as reference width.
// Unfortunately this works only if this sum
interpreted as
// twip value is larger than the space that is
available.
@@ -2791,7 +2788,7 @@ void SwXMLTableContext::MakeTable()
break;
}
- pFrmFmt->SetFmtAttr( *pAutoItemSet );
+ pFrmFmt->SetFmtAttr( *pAutoItemSet );
}
else
{
@@ -2808,17 +2805,17 @@ void SwXMLTableContext::MakeTable()
pLineFmt = (SwTableLineFmt*)pLine1->GetFrmFmt();
pBoxFmt = (SwTableBoxFmt*)pBox1->GetFrmFmt();
- _MakeTable( 0 );
+ _MakeTable( 0 );
if( bSetHoriOrient )
- pFrmFmt->SetFmtAttr( SwFmtHoriOrient( 0, eHoriOrient ) );
+ pFrmFmt->SetFmtAttr( SwFmtHoriOrient( 0, eHoriOrient ) );
// This must be after the call to _MakeTable, because nWidth might be
// changed there.
pFrmFmt->LockModify();
SwFmtFrmSize aSize( ATT_VAR_SIZE, nWidth );
aSize.SetWidthPercent( (sal_Int8)nPrcWidth );
- pFrmFmt->SetFmtAttr( aSize );
+ pFrmFmt->SetFmtAttr( aSize );
pFrmFmt->UnlockModify();
@@ -2844,7 +2841,7 @@ void SwXMLTableContext::MakeTable()
pTableNode->SetNewTable(pDDETable, sal_False);
}
- // ??? this is always false: root frame is only created in ViewShell::Init
+ // ??? this is always false: root frame is only created in
ViewShell::Init
if( pTableNode->GetDoc()->GetCurrentViewShell() ) //swmod
071108//swmod 071225
{
pTableNode->DelFrms();
@@ -2862,7 +2859,7 @@ void SwXMLTableContext::MakeTable( SwTableBox *pBox,
sal_Int32 nW )
bRelWidth = GetParentTable()->bRelWidth;
_MakeTable( pBox );
-
+
for( sal_uInt16 i=0; i<pRows->Count(); i++ ) // i113600, to break the
cyclic reference to SwXMLTableContext object
(*pRows)[i]->Dispose();
}
@@ -2912,19 +2909,19 @@ const SwStartNode
*SwXMLTableContext::InsertTableSection(
pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false );
pStNd = pDoc->GetNodes().MakeTextSection( aIdx,
SwTableBoxStartNode,
pColl );
- // --> FLR 2005-08-30 #125369#
- // Consider the case that a table is defined without a row.
- if( !pPrevSttNd && pBox1 != NULL )
- // <--
- {
+ // --> FLR 2005-08-30 #125369#
+ // Consider the case that a table is defined without a row.
+ if( !pPrevSttNd && pBox1 != NULL )
+ // <--
+ {
pBox1->pSttNd = pStNd;
SwCntntNode *pCNd = pDoc->GetNodes()[ pStNd->GetIndex()
+ 1 ]
->GetCntntNode();
SwPosition aPos( *pCNd );
aPos.nContent.Assign( pCNd, 0U );
- const uno::Reference< text::XTextRange > xTextRange =
- SwXTextRange::CreateXTextRange( *pDoc, aPos, 0 );
+ const uno::Reference< text::XTextRange > xTextRange =
+ SwXTextRange::CreateXTextRange( *pDoc, aPos, 0
);
Reference < XText > xText = xTextRange->getText();
Reference < XTextCursor > xTextCursor =
xText->createTextCursorByRange( xTextRange );
@@ -2948,3 +2945,5 @@ Reference < XTextContent >
SwXMLTableContext::GetXTextContent() const
{
return xTextContent;
}
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/xmloff/source/chart/SchXMLTableContext.cxx
b/main/xmloff/source/chart/SchXMLTableContext.cxx
index b93d418a93..143e2174fb 100644
--- a/main/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/main/xmloff/source/chart/SchXMLTableContext.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,20 +7,18 @@
* 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.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_xmloff.hxx"
@@ -69,34 +67,34 @@ const OUString lcl_aLabelPrefix(
RTL_CONSTASCII_USTRINGPARAM("label "));
const OUString lcl_aCategoriesRange(
RTL_CONSTASCII_USTRINGPARAM("categories"));
typedef ::std::multimap< ::rtl::OUString, ::rtl::OUString >
- lcl_tOriginalRangeToInternalRangeMap;
+ lcl_tOriginalRangeToInternalRangeMap;
Sequence< OUString > lcl_getCategoriesFromTable( const SchXMLTable & rTable,
bool bHasLabels )
{
- sal_Int32 nNumRows( static_cast< sal_Int32 >( rTable.aData.size()));
- OSL_ENSURE( static_cast< size_t >( nNumRows ) == rTable.aData.size(),
"Table too big" );
+ sal_Int32 nNumRows( static_cast< sal_Int32 >( rTable.aData.size()));
+ OSL_ENSURE( static_cast< size_t >( nNumRows ) == rTable.aData.size(),
"Table too big" );
- sal_Int32 nOffset(bHasLabels ? 1 : 0);
- Sequence< OUString > aResult( nNumRows - nOffset );
- sal_Int32 i=nOffset;
- for( ; i<nNumRows; ++i )
- {
- if( !rTable.aData[i].empty() && (rTable.aData[i].front().eType ==
SCH_CELL_TYPE_STRING ))
- aResult[i - nOffset] = rTable.aData[i].front().aString;
- }
- return aResult;
+ sal_Int32 nOffset(bHasLabels ? 1 : 0);
+ Sequence< OUString > aResult( nNumRows - nOffset );
+ sal_Int32 i=nOffset;
+ for( ; i<nNumRows; ++i )
+ {
+ if( !rTable.aData[i].empty() && (rTable.aData[i].front().eType
== SCH_CELL_TYPE_STRING ))
+ aResult[i - nOffset] = rTable.aData[i].front().aString;
+ }
+ return aResult;
}
std::vector< Reference< chart2::XAxis > >
lcl_getAxesHoldingCategoriesFromDiagram(
- const Reference< chart2::XDiagram > & xDiagram )
+ const Reference< chart2::XDiagram > & xDiagram )
{
- std::vector< Reference< chart2::XAxis > > aRet;
+ std::vector< Reference< chart2::XAxis > > aRet;
- Reference< chart2::XAxis > xResult;
- // return first x-axis as fall-back
- Reference< chart2::XAxis > xFallBack;
- try
- {
+ Reference< chart2::XAxis > xResult;
+ // return first x-axis as fall-back
+ Reference< chart2::XAxis > xFallBack;
+ try
+ {
Reference< chart2::XCoordinateSystemContainer > xCooSysCnt(
xDiagram, uno::UNO_QUERY_THROW );
Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq(
@@ -711,7 +709,7 @@ public:
const ::rtl::OUString&
rLocalName,
::rtl::OUString&
rRangeString );
virtual ~SchXMLRangeSomewhereContext();
-
+
virtual SvXMLImportContext* CreateChildContext(
sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
@@ -750,8 +748,8 @@ void SchXMLTableCellContext::StartElement( const
uno::Reference< xml::sax::XAttr
sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
rtl::OUString aValue;
rtl::OUString aLocalName;
- rtl::OUString aCellContent;
- SchXMLCellType eValueType = SCH_CELL_TYPE_UNKNOWN;
+ rtl::OUString aCellContent;
+ SchXMLCellType eValueType = SCH_CELL_TYPE_UNKNOWN;
const SvXMLTokenMap& rAttrTokenMap =
mrImportHelper.GetCellAttrTokenMap();
for( sal_Int16 i = 0; i < nAttrCount; i++ )
@@ -803,26 +801,26 @@ SvXMLImportContext*
SchXMLTableCellContext::CreateChildContext(
{
SvXMLImportContext* pContext = 0;
- // <text:list> element
- if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_LIST ) &&
mbReadText )
+ // <text:list> element
+ if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_LIST )
&& mbReadText )
{
- SchXMLCell& rCell = mrTable.aData[ mrTable.nRowIndex ][
mrTable.nColumnIndex ];
- rCell.pComplexString = new Sequence< OUString >();
- rCell.eType = SCH_CELL_TYPE_COMPLEX_STRING;
- pContext = new SchXMLTextListContext( GetImport(), rLocalName,
*rCell.pComplexString );
- mbReadText = sal_False;//don't apply text from <text:p>
+ SchXMLCell& rCell = mrTable.aData[ mrTable.nRowIndex ][
mrTable.nColumnIndex ];
+ rCell.pComplexString = new Sequence< OUString >();
+ rCell.eType = SCH_CELL_TYPE_COMPLEX_STRING;
+ pContext = new SchXMLTextListContext( GetImport(), rLocalName,
*rCell.pComplexString );
+ mbReadText = sal_False;//don't apply text from <text:p>
}
// <text:p> element - read text (and range from text:id old version)
else if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_P
) )
{
- pContext = new SchXMLParagraphContext( GetImport(), rLocalName,
maCellContent, &maRangeId );
+ pContext = new SchXMLParagraphContext( GetImport(), rLocalName,
maCellContent, &maRangeId );
}
- // <draw:g> element - read range
- else if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_G ) )
+ // <draw:g> element - read range
+ else if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_G
) )
{
- //#i113950# previously the range was exported to attribute text:id,
but that attribute does not allow arbitrary strings anymore
- //so we need to find an alternative to save that range info for
copy/paste scenario ... -> use description at an empty group element for now
- pContext = new SchXMLRangeSomewhereContext( GetImport(), nPrefix,
rLocalName, maRangeId );
+ //#i113950# previously the range was exported to attribute
text:id, but that attribute does not allow arbitrary strings anymore
+ //so we need to find an alternative to save that range info for
copy/paste scenario ... -> use description at an empty group element for now
+ pContext = new SchXMLRangeSomewhereContext( GetImport(),
nPrefix, rLocalName, maRangeId );
}
else
{
@@ -835,17 +833,17 @@ SvXMLImportContext*
SchXMLTableCellContext::CreateChildContext(
void SchXMLTableCellContext::EndElement()
{
if( mbReadText && maCellContent.getLength() ) //apply text from
<text:p> element
- mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex ].aString =
maCellContent;
- if( maRangeId.getLength())
- mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex ].aRangeId =
maRangeId;
+ mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex
].aString = maCellContent;
+ if( maRangeId.getLength())
+ mrTable.aData[ mrTable.nRowIndex ][ mrTable.nColumnIndex
].aRangeId = maRangeId;
}
// ========================================
void lcl_ApplyCellToComplexLabel( const SchXMLCell& rCell, Sequence< uno::Any
>& rComplexLabel )
{
- if( rCell.eType == SCH_CELL_TYPE_STRING )
- {
+ if( rCell.eType == SCH_CELL_TYPE_STRING )
+ {
rComplexLabel.realloc(1);
rComplexLabel[0] = uno::makeAny( rCell.aString );
}
@@ -873,8 +871,8 @@ void SchXMLTableHelper::applyTableToInternalDataProvider(
Reference< chart2::data::XDataProvider > xDataProv(
xChartDoc->getDataProvider() );
if( !xDataProv.is() )
return;
-
- //prepare the read local table data
+
+ // prepare the read local table data
sal_Int32 nNumRows( static_cast< sal_Int32 >( rTable.aData.size()));
sal_Int32 nRowOffset = 0;
if( rTable.bHasHeaderRow )
@@ -889,7 +887,7 @@ void SchXMLTableHelper::applyTableToInternalDataProvider(
--nNumColumns;
nColOffset = 1;
}
-
+
Sequence< Sequence< double > > aDataInRows( nNumRows );
Sequence< Sequence< uno::Any > > aComplexRowDescriptions( nNumRows );
Sequence< Sequence< uno::Any > > aComplexColumnDescriptions( nNumColumns );
@@ -898,7 +896,7 @@ void SchXMLTableHelper::applyTableToInternalDataProvider(
if( rTable.aData.begin() != rTable.aData.end())
{
- //apply column labels
+ // apply column labels
if( rTable.bHasHeaderRow )
{
const ::std::vector< SchXMLCell >& rFirstRow =
rTable.aData.front();
@@ -919,7 +917,7 @@ void SchXMLTableHelper::applyTableToInternalDataProvider(
// row label
if( rTable.bHasHeaderColumn )
lcl_ApplyCellToComplexLabel( rRow.front(),
aComplexRowDescriptions[nRow] );
-
+
// values
Sequence< double >& rTargetRow = aDataInRows[nRow];
lcl_ApplyCellToData aApplyCellToData = ::std::for_each(
rRow.begin() + nColOffset, rRow.end(), lcl_ApplyCellToData( rTargetRow ) );
@@ -931,7 +929,7 @@ void SchXMLTableHelper::applyTableToInternalDataProvider(
}
}
- //apply the collected data to the chart
+ // apply the collected data to the chart
Reference< chart2::XAnyDescriptionAccess > xDataAccess( xDataProv,
uno::UNO_QUERY );
if( !xDataAccess.is() )
return;
@@ -1102,7 +1100,7 @@ void
SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
continue;
Sequence< Reference< chart2::XDataSeries > > aSeriesSeq(
xSeriesContainer->getDataSeries() );
std::vector< Reference< chart2::XDataSeries > >
aRemainingSeries;
-
+
for( sal_Int32 nS = 0; nS < aSeriesSeq.getLength(); nS++ )
{
Reference< chart2::data::XDataSource > xDataSource(
aSeriesSeq[nS], uno::UNO_QUERY );
@@ -1139,7 +1137,7 @@ void
SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
if( bHasUnhiddenColumns )
aRemainingSeries.push_back( aSeriesSeq[nS] );
}
- }
+ }
if( static_cast<sal_Int32>(aRemainingSeries.size()) !=
aSeriesSeq.getLength() )
{
@@ -1152,7 +1150,7 @@ void
SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
Reference< chart2::data::XDataSource > xDataSource(
xChartDoc, uno::UNO_QUERY );
if( xDataSource.is() )
{
- //first detect which collumns are really used
+ //first detect which columns are really used
std::map< sal_Int32, bool > aUsageMap;
rtl::OUString aRange;
Sequence< Reference<
chart2::data::XLabeledDataSequence > > aUsedSequences(
xDataSource->getDataSequences() );
@@ -1189,7 +1187,7 @@ void
SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
continue;
aSequenceIndexesToDelete.push_back(nSequenceIndex);
}
-
+
// delete unnecessary sequences of the internal
data
// iterate using greatest index first, so that
deletion does not
// shift other sequences that will be deleted later
@@ -1204,18 +1202,18 @@ void
SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
}
}
}
- }
- catch( uno::Exception & ex )
- {
- (void)ex; // avoid warning for pro build
- }
- }
+ }
+ catch( uno::Exception & ex )
+ {
+ (void)ex; // avoid warning for pro build
+ }
+ }
}
//---------------------------------------------------------------------------------------------------
SchXMLRangeSomewhereContext::SchXMLRangeSomewhereContext( SvXMLImport& rImport,
- sal_uInt16 nPrefix,
+
sal_uInt16 nPrefix,
const OUString& rLocalName,
OUString& rRangeString ) :
SvXMLImportContext( rImport, nPrefix, rLocalName ),
@@ -1228,11 +1226,11 @@
SchXMLRangeSomewhereContext::~SchXMLRangeSomewhereContext()
}
SvXMLImportContext* SchXMLRangeSomewhereContext::CreateChildContext(
- sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const uno::Reference< xml::sax::XAttributeList >& )
+ sal_uInt16 nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& )
{
- if( XML_NAMESPACE_SVG == nPrefix && IsXMLToken( rLocalName, XML_DESC ) )
+ if( XML_NAMESPACE_SVG == nPrefix && IsXMLToken( rLocalName, XML_DESC ) )
{
return new XMLStringBufferImportContext(
GetImport(), nPrefix, rLocalName, maRangeStringBuffer );
@@ -1242,5 +1240,7 @@ SvXMLImportContext*
SchXMLRangeSomewhereContext::CreateChildContext(
void SchXMLRangeSomewhereContext::EndElement()
{
- mrRangeString = maRangeStringBuffer.makeStringAndClear();
+ mrRangeString = maRangeStringBuffer.makeStringAndClear();
}
+
+/* vim: set noet sw=4 ts=4: */