sw/qa/extras/tiledrendering/tiledrendering.cxx | 4 sw/source/core/txtnode/fntcache.cxx | 106 +++++++-------- writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 6 writerfilter/source/dmapper/DomainMapperTableHandler.hxx | 3 4 files changed, 59 insertions(+), 60 deletions(-)
New commits: commit 3e58329130038fe5f53ce645b738b40df7507bfc Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Jan 20 09:35:45 2016 +0100 sw: indentation fixes Change-Id: I8b281b425483fb7fc3cf34e31533c2ddc1b03637 diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 6d5cb78..160f3aa 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -82,8 +82,8 @@ private: SwTiledRenderingTest::SwTiledRenderingTest() : m_bFound(true), - m_nSelectionBeforeSearchResult(0), - m_nSelectionAfterSearchResult(0) + m_nSelectionBeforeSearchResult(0), + m_nSelectionAfterSearchResult(0) { } diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 4f08a87..3f54a17 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -208,61 +208,61 @@ struct CalcLinePosData static void lcl_calcLinePos( const CalcLinePosData &rData, Point &rStart, Point &rEnd, sal_Int32 nStart, sal_Int32 nWrLen ) { - long nBlank = 0; - const sal_Int32 nEnd = nStart + nWrLen; - const long nTmpSpaceAdd = rData.rInf.GetSpace() / SPACING_PRECISION_FACTOR; + long nBlank = 0; + const sal_Int32 nEnd = nStart + nWrLen; + const long nTmpSpaceAdd = rData.rInf.GetSpace() / SPACING_PRECISION_FACTOR; - if ( nEnd < rData.nCnt + if ( nEnd < rData.nCnt && CH_BLANK == rData.rInf.GetText()[ rData.rInf.GetIdx() + nEnd ] ) - { - if( nEnd + 1 == rData.nCnt ) - nBlank -= nTmpSpaceAdd; - else - nBlank -= rData.nHalfSpace; - } - - // determine start, end and length of wave line - sal_Int32 nKernStart = nStart ? rData.pKernArray[ nStart - 1 ] : 0; - sal_Int32 nKernEnd = rData.pKernArray[ nEnd - 1 ]; - - const sal_uInt16 nDir = rData.bBidiPor ? 1800 : - UnMapDirection( rData.rFont.GetOrientation(), rData.bSwitchH2V ); - - switch ( nDir ) - { - case 0 : - rStart.X() += nKernStart; - rEnd.X() = nBlank + rData.rInf.GetPos().X() + nKernEnd; - rEnd.Y() = rData.rInf.GetPos().Y(); - break; - case 900 : - rStart.Y() -= nKernStart; - rEnd.X() = rData.rInf.GetPos().X(); - rEnd.Y() = nBlank + rData.rInf.GetPos().Y() - nKernEnd; - break; - case 1800 : - rStart.X() -= nKernStart; - rEnd.X() = rData.rInf.GetPos().X() - nKernEnd - nBlank; - rEnd.Y() = rData.rInf.GetPos().Y(); - break; - case 2700 : - rStart.Y() += nKernStart; - rEnd.X() = rData.rInf.GetPos().X(); - rEnd.Y() = nBlank + rData.rInf.GetPos().Y() + nKernEnd; - break; - } - - if ( rData.bSwitchL2R ) - { - rData.rInf.GetFrame()->SwitchLTRtoRTL( rStart ); - rData.rInf.GetFrame()->SwitchLTRtoRTL( rEnd ); - } - - if ( rData.bSwitchH2V ) - { - rData.rInf.GetFrame()->SwitchHorizontalToVertical( rStart ); - rData.rInf.GetFrame()->SwitchHorizontalToVertical( rEnd ); - } + { + if( nEnd + 1 == rData.nCnt ) + nBlank -= nTmpSpaceAdd; + else + nBlank -= rData.nHalfSpace; + } + + // determine start, end and length of wave line + sal_Int32 nKernStart = nStart ? rData.pKernArray[ nStart - 1 ] : 0; + sal_Int32 nKernEnd = rData.pKernArray[ nEnd - 1 ]; + + const sal_uInt16 nDir = rData.bBidiPor ? 1800 : + UnMapDirection( rData.rFont.GetOrientation(), rData.bSwitchH2V ); + + switch ( nDir ) + { + case 0 : + rStart.X() += nKernStart; + rEnd.X() = nBlank + rData.rInf.GetPos().X() + nKernEnd; + rEnd.Y() = rData.rInf.GetPos().Y(); + break; + case 900 : + rStart.Y() -= nKernStart; + rEnd.X() = rData.rInf.GetPos().X(); + rEnd.Y() = nBlank + rData.rInf.GetPos().Y() - nKernEnd; + break; + case 1800 : + rStart.X() -= nKernStart; + rEnd.X() = rData.rInf.GetPos().X() - nKernEnd - nBlank; + rEnd.Y() = rData.rInf.GetPos().Y(); + break; + case 2700 : + rStart.Y() += nKernStart; + rEnd.X() = rData.rInf.GetPos().X(); + rEnd.Y() = nBlank + rData.rInf.GetPos().Y() + nKernEnd; + break; + } + + if ( rData.bSwitchL2R ) + { + rData.rInf.GetFrame()->SwitchLTRtoRTL( rStart ); + rData.rInf.GetFrame()->SwitchLTRtoRTL( rEnd ); + } + + if ( rData.bSwitchH2V ) + { + rData.rInf.GetFrame()->SwitchHorizontalToVertical( rStart ); + rData.rInf.GetFrame()->SwitchHorizontalToVertical( rEnd ); + } } // Returns the Ascent of the Font on the given output device; commit 2649b3b16fca0c1a1ab7ea2f39db16916875a616 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Jan 20 09:30:13 2016 +0100 writerfilter: can use a plain instance for the row sequence here Change-Id: Ic9211192310f6a5b36f4ee4637828d96d8f1f7b7 diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 3249a88..0264f1f 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -1151,13 +1151,13 @@ void DomainMapperTableHandler::startRow(unsigned int nCells, pProps->dumpXml(); #endif - m_pRowSeq = RowSequencePointer_t(new RowSequence_t(nCells)); + m_aRowSeq = RowSequence_t(nCells); m_nCellIndex = 0; } void DomainMapperTableHandler::endRow() { - m_aTableSeq[m_nRowIndex] = *m_pRowSeq; + m_aTableSeq[m_nRowIndex] = m_aRowSeq; ++m_nRowIndex; m_nCellIndex = 0; #ifdef DEBUG_WRITERFILTER @@ -1207,7 +1207,7 @@ void DomainMapperTableHandler::endCell(const css::uno::Reference< css::text::XTe if (!end.get()) return; (*m_pCellSeq)[1] = end->getEnd(); - (*m_pRowSeq)[m_nCellIndex] = *m_pCellSeq; + m_aRowSeq[m_nCellIndex] = *m_pCellSeq; ++m_nCellIndex; } diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx index e323ad9..2d9a41e 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx @@ -31,7 +31,6 @@ namespace dmapper { typedef css::uno::Sequence< css::uno::Reference< css::text::XTextRange > > CellSequence_t; typedef std::shared_ptr<CellSequence_t> CellSequencePointer_t; typedef css::uno::Sequence<CellSequence_t> RowSequence_t; -typedef std::shared_ptr<RowSequence_t> RowSequencePointer_t; typedef css::uno::Sequence<RowSequence_t> TableSequence_t; typedef css::uno::Sequence< css::uno::Sequence<css::beans::PropertyValues> > CellPropertyValuesSeq_t; @@ -65,7 +64,7 @@ class DomainMapperTableHandler css::uno::Reference<css::text::XTextAppendAndConvert> m_xText; DomainMapper_Impl& m_rDMapper_Impl; CellSequencePointer_t m_pCellSeq; - RowSequencePointer_t m_pRowSeq; + RowSequence_t m_aRowSeq; TableSequence_t m_aTableSeq; css::uno::Reference< css::text::XTextRange > m_xTableRange; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits