editeng/Library_editeng.mk | 1 editeng/source/outliner/overflowingtxt.cxx | 38 ++++++++++++++++++++++++++++ include/editeng/overflowingtxt.hxx | 7 ++++- svx/source/svdraw/svdotextdecomposition.cxx | 2 - svx/source/svdraw/textchain.cxx | 1 5 files changed, 47 insertions(+), 2 deletions(-)
New commits: commit 5d9277e7b55b7eef512113c63f7c852b583dd282 Author: matteocam <matteo.campane...@gmail.com> Date: Tue Jun 16 13:34:57 2015 -0400 Added overflowingtxt.cxx; merges lines properly in more cases Change-Id: Ibffd65bb53bef7a1fbab87dff93764c4ee1feb3e diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk index 9ffed0a..0d0be08 100644 --- a/editeng/Library_editeng.mk +++ b/editeng/Library_editeng.mk @@ -99,6 +99,7 @@ $(eval $(call gb_Library_add_exception_objects,editeng,\ editeng/source/outliner/outlundo \ editeng/source/outliner/outlvw \ editeng/source/outliner/paralist \ + editeng/source/outliner/overflowingtxt \ editeng/source/rtf/rtfitem \ editeng/source/rtf/svxrtf \ editeng/source/uno/unoedhlp \ diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx new file mode 100644 index 0000000..0f02900 --- /dev/null +++ b/editeng/source/outliner/overflowingtxt.cxx @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * 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 regarding copyright + * ownership. The ASF licenses this file 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 . + */ + +#include <rtl/ustring.hxx> +#include <tools/debug.hxx> + +#include <editeng/overflowingtxt.hxx> + +using namespace ::rtl; + + +OUString OverflowingText::GetEndingLines() const +{ + // Only some lines in the same para overflowing + if (mHeadTxt == "" && mpMidParas == NULL) + return mTailTxt; + + return mHeadTxt; +} + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx index 973729f..a921b2c 100644 --- a/include/editeng/overflowingtxt.hxx +++ b/include/editeng/overflowingtxt.hxx @@ -20,7 +20,10 @@ #ifndef INCLUDED_EDITENG_OVERFLOWINGTXT_HXX #define INCLUDED_EDITENG_OVERFLOWINGTXT_HXX -class OUString; +namespace rtl { + class OUString; +} + class OutlinerParaObject; @@ -40,6 +43,8 @@ class OverflowingText { mpMidParas(pMidParas), mTailTxt(tailTxt) { } + + OUString GetEndingLines() const; }; class NonOverflowingText { diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index a0d6823..1a56f94 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -823,7 +823,7 @@ OutlinerParaObject *SdrTextObj::impGetOverflowingParaObject(SdrOutliner *pOutlin impSetOutlinerToEmptyTxt(pOutliner); pTmpPara0 = pOutliner->GetParagraph(0); - pOutliner->SetText(mpOverflowingText->mTailTxt + aOldPara0Txt, pTmpPara0); + pOutliner->SetText(mpOverflowingText->GetEndingLines() + aOldPara0Txt, pTmpPara0); pJoiningPara = pOutliner->CreateParaObject(); } diff --git a/svx/source/svdraw/textchain.cxx b/svx/source/svdraw/textchain.cxx index 17595c9..28daf86 100644 --- a/svx/source/svdraw/textchain.cxx +++ b/svx/source/svdraw/textchain.cxx @@ -37,3 +37,4 @@ bool TextChain::GetLinksHaveMergeableFirstPara(SdrTextObj *pPrevLink, SdrTextObj { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits