[Libreoffice-commits] core.git: Branch 'private/tml/iculess' - 60 commits - basctl/source basegfx/source chart2/source configure.ac connectivity/inc connectivity/source cui/source dbaccess/source drawinglayer/source filter/source include/drawinglayer include/filter include/oox include/svtools include/tools include/vcl offapi/com oox/source sal/osl sc/source sd/source sfx2/inc sfx2/source svtools/source sw/inc sw/qa sw/source sw/uiconfig toolkit/source ucb/source vcl/inc vcl/source vcl/unx writerfilter/source writerperfect/source
Tor Lillqvist
tml at collabora.com
Mon Jan 13 12:06:00 PST 2014
basctl/source/basicide/baside2b.cxx | 2
basctl/source/basicide/bastype2.cxx | 2
basctl/source/basicide/bastype2.hxx | 2
basegfx/source/polygon/b2dtrapezoid.cxx | 3
chart2/source/tools/DiagramHelper.cxx | 6
configure.ac | 3
connectivity/inc/pch/precompiled_file.hxx | 1
connectivity/source/drivers/calc/CDatabaseMetaData.cxx | 1
connectivity/source/drivers/dbase/DDatabaseMetaData.cxx | 1
connectivity/source/drivers/dbase/DIndexIter.cxx | 1
connectivity/source/drivers/file/FDatabaseMetaData.cxx | 1
connectivity/source/inc/file/FStatement.hxx | 1
cui/source/dialogs/scriptdlg.cxx | 4
cui/source/inc/scriptdlg.hxx | 2
dbaccess/source/ui/dlg/directsql.cxx | 6
dbaccess/source/ui/querydesign/LimitBox.cxx | 2
dbaccess/source/ui/querydesign/limitboxcontroller.cxx | 2
drawinglayer/source/primitive2d/textbreakuphelper.cxx | 4
drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx | 17
drawinglayer/source/primitive2d/textprimitive2d.cxx | 8
drawinglayer/source/processor2d/vclprocessor2d.cxx | 6
filter/source/msfilter/escherex.cxx | 5
filter/source/msfilter/eschesdo.cxx | 24
include/drawinglayer/primitive2d/textbreakuphelper.hxx | 2
include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx | 9
include/drawinglayer/primitive2d/textprimitive2d.hxx | 12
include/filter/msfilter/escherex.hxx | 4
include/oox/drawingml/customshapeproperties.hxx | 3
include/oox/export/vmlexport.hxx | 2
include/oox/vml/vmlshape.hxx | 2
include/svtools/treelistbox.hxx | 2
include/tools/stream.hxx | 10
include/vcl/cmdevt.hxx | 40
include/vcl/combobox.hxx | 3
include/vcl/edit.hxx | 7
include/vcl/lstbox.hxx | 2
include/vcl/metaact.hxx | 74
include/vcl/pdfwriter.hxx | 9
include/vcl/spinfld.hxx | 2
include/vcl/vclmedit.hxx | 3
offapi/com/sun/star/awt/XMouseMotionListener.idl | 2
oox/source/drawingml/customshapeproperties.cxx | 1
oox/source/drawingml/shape.cxx | 35
oox/source/export/vmlexport.cxx | 18
oox/source/shape/WpsContext.cxx | 1
oox/source/vml/vmlshape.cxx | 22
oox/source/vml/vmlshapecontext.cxx | 2
sal/osl/unx/process.cxx | 9
sc/source/core/data/drwlayer.cxx | 8
sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx | 3
sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx | 3
sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx | 3
sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx | 3
sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx | 3
sc/source/ui/StatisticsDialogs/TTestDialog.cxx | 3
sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx | 11
sc/source/ui/inc/TableFillingAndNavigationTools.hxx | 8
sc/source/ui/src/condformatdlg.src | 18
sd/source/ui/accessibility/AccessiblePresentationShape.cxx | 1
sd/source/ui/unoidl/unomodel.cxx | 4
sfx2/inc/pch/precompiled_sfx.hxx | 1
sfx2/source/bastyp/sfxhtml.cxx | 8
sfx2/source/dialog/templdlg.cxx | 6
svtools/source/config/test/test.cxx | 12
svtools/source/contnr/treelistbox.cxx | 4
svtools/source/uno/unoiface.cxx | 2
sw/inc/IDocumentRedlineAccess.hxx | 10
sw/inc/crsrsh.hxx | 12
sw/inc/doc.hxx | 10
sw/inc/docary.hxx | 18
sw/inc/editsh.hxx | 6
sw/inc/redline.hxx | 32
sw/inc/tox.hxx | 20
sw/inc/unomap.hxx | 3
sw/inc/unoprnms.hxx | 3
sw/inc/unoredline.hxx | 8
sw/inc/unoredlines.hxx | 4
sw/qa/extras/ooxmlexport/data/PreserveWfieldTOC.docx |binary
sw/qa/extras/ooxmlexport/data/PreserveXfieldTOC.docx |binary
sw/qa/extras/ooxmlexport/data/TOC_field_b.docx |binary
sw/qa/extras/ooxmlexport/data/comments-nested.odt |binary
sw/qa/extras/ooxmlexport/data/fdo65833.docx |binary
sw/qa/extras/ooxmlexport/data/fdo70942.docx |binary
sw/qa/extras/ooxmlexport/data/fdo73247.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 72
sw/source/core/access/acccell.cxx | 3
sw/source/core/access/accpara.cxx | 6
sw/source/core/access/accpara.hxx | 4
sw/source/core/access/parachangetrackinginfo.cxx | 2
sw/source/core/crsr/crstrvl.cxx | 20
sw/source/core/crsr/swcrsr.cxx | 2
sw/source/core/doc/doc.cxx | 6
sw/source/core/doc/docbm.cxx | 4
sw/source/core/doc/doccomp.cxx | 22
sw/source/core/doc/doccorr.cxx | 2
sw/source/core/doc/docedt.cxx | 32
sw/source/core/doc/docfmt.cxx | 12
sw/source/core/doc/docnum.cxx | 12
sw/source/core/doc/docredln.cxx | 216
sw/source/core/doc/docsort.cxx | 6
sw/source/core/docnode/ndcopy.cxx | 4
sw/source/core/docnode/ndsect.cxx | 2
sw/source/core/docnode/ndtbl.cxx | 2
sw/source/core/docnode/nodedump.cxx | 2
sw/source/core/edit/edlingu.cxx | 2
sw/source/core/edit/edredln.cxx | 4
sw/source/core/fields/postithelper.cxx | 2
sw/source/core/inc/UndoRedline.hxx | 4
sw/source/core/inc/unoport.hxx | 10
sw/source/core/table/swtable.cxx | 2
sw/source/core/text/porlay.cxx | 2
sw/source/core/text/redlnitr.cxx | 2
sw/source/core/tox/tox.cxx | 7
sw/source/core/txtnode/ndtxt.cxx | 6
sw/source/core/txtnode/txtedt.cxx | 60
sw/source/core/undo/unattr.cxx | 4
sw/source/core/undo/undobj.cxx | 10
sw/source/core/undo/unins.cxx | 6
sw/source/core/undo/unredln.cxx | 8
sw/source/core/undo/unsect.cxx | 2
sw/source/core/undo/unspnd.cxx | 2
sw/source/core/undo/untbl.cxx | 6
sw/source/core/undo/untblk.cxx | 2
sw/source/core/unocore/unocrsrhelper.cxx | 2
sw/source/core/unocore/unoidx.cxx | 31
sw/source/core/unocore/unomap.cxx | 6
sw/source/core/unocore/unoportenum.cxx | 6
sw/source/core/unocore/unoredline.cxx | 10
sw/source/core/unocore/unoredlines.cxx | 2
sw/source/core/unocore/unosect.cxx | 2
sw/source/core/unocore/unotbl.cxx | 2
sw/source/core/unocore/unotext.cxx | 2
sw/source/filter/basflt/shellio.cxx | 2
sw/source/filter/ww1/fltshell.cxx | 4
sw/source/filter/ww1/w1sprm.cxx | 123
sw/source/filter/ww8/docxattributeoutput.cxx | 78
sw/source/filter/ww8/docxattributeoutput.hxx | 4
sw/source/filter/ww8/rtfexport.cxx | 2
sw/source/filter/ww8/writerhelper.cxx | 4
sw/source/filter/ww8/wrtw8nds.cxx | 8
sw/source/filter/ww8/wrtww8.hxx | 3
sw/source/filter/ww8/ww8atr.cxx | 19
sw/source/filter/xml/XMLRedlineImportHelper.cxx | 8
sw/source/ui/docvw/edtwin2.cxx | 2
sw/source/ui/inc/content.hxx | 8
sw/source/ui/inc/redlndlg.hxx | 6
sw/source/ui/inc/wrtsh.hxx | 2
sw/source/ui/index/cntex.cxx | 3
sw/source/ui/misc/redlndlg.cxx | 28
sw/source/ui/shells/textfld.cxx | 16
sw/source/ui/uiview/view2.cxx | 8
sw/source/ui/wrtsh/move.cxx | 4
sw/uiconfig/swriter/ui/insertbookmark.ui | 2
toolkit/source/awt/vclxwindows.cxx | 4
ucb/source/ucp/cmis/cmis_content.cxx | 4
ucb/source/ucp/cmis/cmis_repo_content.cxx | 6
ucb/source/ucp/gio/gio_mount.cxx | 7
vcl/inc/ilstbox.hxx | 2
vcl/inc/salwtype.hxx | 4
vcl/inc/unx/desktops.hxx | 4
vcl/inc/unx/gtk/gtkdata.hxx | 11
vcl/inc/unx/saldisp.hxx | 4
vcl/inc/unx/salobj.h | 2
vcl/source/control/combobox.cxx | 4
vcl/source/control/edit.cxx | 56
vcl/source/control/field2.cxx | 20
vcl/source/control/fixed.cxx | 2
vcl/source/control/ilstbox.cxx | 3
vcl/source/control/lstbox.cxx | 4
vcl/source/control/spinfld.cxx | 2
vcl/source/edit/textdoc.cxx | 8
vcl/source/edit/texteng.cxx | 153
vcl/source/edit/vclmedit.cxx | 10
vcl/source/filter/wmf/emfwr.cxx | 6
vcl/source/filter/wmf/winmtf.cxx | 2
vcl/source/gdi/cvtsvm.cxx | 65
vcl/source/gdi/metaact.cxx | 46
vcl/source/gdi/outdev3.cxx | 22
vcl/source/gdi/pdfwriter.cxx | 10
vcl/source/gdi/pdfwriter_impl.cxx | 22
vcl/source/gdi/pdfwriter_impl.hxx | 6
vcl/source/window/cmdevt.cxx | 11
vcl/source/window/winproc.cxx | 2
vcl/unx/generic/app/saldisp.cxx | 12
vcl/unx/generic/window/salobj.cxx | 16
vcl/unx/gtk/app/gtkdata.cxx | 4
vcl/unx/gtk/window/gloactiongroup.cxx | 14
vcl/unx/gtk/window/glomenu.cxx | 7
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 2
vcl/unx/kde4/VCLKDEApplication.cxx | 2
writerfilter/source/dmapper/DomainMapper.cxx | 109
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 40
writerfilter/source/dmapper/PropertyIds.cxx | 3
writerfilter/source/dmapper/PropertyIds.hxx | 3
writerfilter/source/doctok/resources.xmi | 5599 ----------
writerperfect/source/common/WPXSvStream.cxx | 436
writerperfect/source/common/WPXSvStream.hxx | 12
197 files changed, 1651 insertions(+), 6686 deletions(-)
New commits:
commit 26c7505734384e8574a729138a26193f500c6b90
Author: Tor Lillqvist <tml at collabora.com>
Date: Mon Jan 13 21:28:10 2014 +0200
WaE: implicit conversion of NULL constant to 'boost::detail::sp_nullptr_t'
Change-Id: I4dc6267003e12c960b82efa54ed3af4a3c6376c4
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index eff9ad4..c368363 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -621,7 +621,7 @@ Reference< XShape > Shape::createAndInsert(
{
if (aServiceName == "com.sun.star.text.TextFrame")
{
- if (mpCustomShapePropertiesPtr != NULL && mpCustomShapePropertiesPtr->getShapeTypeOverride())
+ if (mpCustomShapePropertiesPtr && mpCustomShapePropertiesPtr->getShapeTypeOverride())
{
uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag;
commit 21eef54846868881d6d9dc6826a6b1d3f0541c46
Author: David Tardon <dtardon at redhat.com>
Date: Mon Jan 13 12:27:38 2014 +0100
prepare WPXSvInputStream for librevenge
Change-Id: Iefcfe00c2febbb00bcf093acf252291409929f1a
diff --git a/writerperfect/source/common/WPXSvStream.cxx b/writerperfect/source/common/WPXSvStream.cxx
index beaf702..bc9354b 100644
--- a/writerperfect/source/common/WPXSvStream.cxx
+++ b/writerperfect/source/common/WPXSvStream.cxx
@@ -8,21 +8,51 @@
*/
#include "WPXSvStream.hxx"
+
+#include <rtl/string.hxx>
#include <tools/stream.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/ucbstreamhelper.hxx>
+
#include <limits>
#include <vector>
+#include <boost/scoped_ptr.hpp>
+#include <boost/unordered_map.hpp>
+
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
namespace
{
-static void splitPath( std::vector<OUString> &rElems, const OUString &rPath )
+
+class PositionHolder
+{
+ // disable copying
+ PositionHolder(const PositionHolder &);
+ PositionHolder &operator=(const PositionHolder &);
+
+public:
+ explicit PositionHolder(const Reference<XSeekable> &rxSeekable);
+ ~PositionHolder();
+
+private:
+ const Reference<XSeekable> mxSeekable;
+ const sal_uInt64 mnPosition;
+};
+
+PositionHolder::PositionHolder(const Reference<XSeekable> &rxSeekable)
+ : mxSeekable(rxSeekable)
+ , mnPosition(rxSeekable->getPosition())
+{
+}
+
+PositionHolder::~PositionHolder() try
+{
+ mxSeekable->seek(mnPosition);
+}
+catch (...)
{
- for (sal_Int32 i = 0; i >= 0;)
- rElems.push_back( rPath.getToken( 0, '/', i ) );
}
} // anonymous namespace
@@ -37,6 +67,154 @@ typedef struct
SotStorageStreamRef ref;
} SotStorageStreamRefWrapper;
+namespace
+{
+
+const rtl::OUString concatPath(const rtl::OUString &lhs, const rtl::OUString &rhs)
+{
+ if (lhs.isEmpty())
+ return rhs;
+ return lhs + "/" + rhs;
+}
+
+struct StreamData
+{
+ explicit StreamData(const rtl::OString &rName);
+
+ SotStorageStreamRefWrapper stream;
+ rtl::OString name;
+};
+
+typedef boost::unordered_map<rtl::OUString, std::size_t, rtl::OUStringHash> NameMap_t;
+typedef boost::unordered_map<rtl::OUString, SotStorageRefWrapper, rtl::OUStringHash> OLEStorageMap_t;
+
+struct OLEStorageImpl
+{
+ OLEStorageImpl();
+
+ void initialize(SvStream *pStream);
+
+ SotStorageStreamRef getStream(const rtl::OUString &rPath);
+ SotStorageStreamRef getStream(std::size_t nId);
+
+private:
+ void traverse(const SotStorageRef &rStorage, const rtl::OUString &rPath);
+
+ SotStorageStreamRef createStream(const rtl::OUString &rPath);
+
+public:
+ boost::scoped_ptr<SvStream> mpStream;
+ SotStorageRefWrapper mxRootStorage;
+ OLEStorageMap_t maStorageMap;
+ ::std::vector< StreamData > maStreams;
+ NameMap_t maNameMap;
+ bool mbInitialized;
+};
+
+StreamData::StreamData(const rtl::OString &rName)
+ : stream()
+ , name(rName)
+{
+}
+
+OLEStorageImpl::OLEStorageImpl()
+ : mpStream()
+ , mxRootStorage()
+ , maStorageMap()
+ , maStreams()
+ , maNameMap()
+ , mbInitialized(false)
+{
+}
+
+void OLEStorageImpl::initialize(SvStream *const pStream)
+{
+ if (!pStream)
+ return;
+
+ mpStream.reset(pStream);
+ mxRootStorage.ref = new SotStorage( pStream, sal_True );
+
+ traverse(mxRootStorage.ref, "");
+
+ mbInitialized = true;
+}
+
+SotStorageStreamRef OLEStorageImpl::getStream(const rtl::OUString &rPath)
+{
+ NameMap_t::iterator aIt = maNameMap.find(rPath);
+
+ // For the while don't return stream in this situation.
+ // Later, given how libcdr's zip stream implementation behaves,
+ // return the first stream in the storage if there is one.
+ if (maNameMap.end() == aIt)
+ return SotStorageStreamRef();
+
+ if (!maStreams[aIt->second].stream.ref.Is())
+ maStreams[aIt->second].stream.ref = createStream(rPath);
+
+ return maStreams[aIt->second].stream.ref;
+}
+
+SotStorageStreamRef OLEStorageImpl::getStream(const std::size_t nId)
+{
+ if (!maStreams[nId].stream.ref.Is())
+ maStreams[nId].stream.ref = createStream(rtl::OStringToOUString(maStreams[nId].name, RTL_TEXTENCODING_UTF8));
+
+ return maStreams[nId].stream.ref;
+}
+
+void OLEStorageImpl::traverse(const SotStorageRef &rStorage, const rtl::OUString &rPath)
+{
+ SvStorageInfoList infos;
+
+ rStorage->FillInfoList(&infos);
+
+ for (SvStorageInfoList::const_iterator aIt = infos.begin(); infos.end() != aIt; ++aIt)
+ {
+ if (aIt->IsStream())
+ {
+ maStreams.push_back(StreamData(rtl::OUStringToOString(aIt->GetName(), RTL_TEXTENCODING_UTF8)));
+ maNameMap[concatPath(rPath, aIt->GetName())] = maStreams.size() - 1;
+ }
+ else if (aIt->IsStorage())
+ {
+ const rtl::OUString aPath = concatPath(rPath, aIt->GetName());
+ SotStorageRefWrapper xStorage;
+ xStorage.ref = rStorage->OpenSotStorage(aIt->GetName(), STREAM_STD_READ);
+ maStorageMap[aPath] = xStorage;
+
+ // deep-first traversal
+ traverse(xStorage.ref, aPath);
+ }
+ else
+ {
+ assert(0);
+ }
+ }
+}
+
+SotStorageStreamRef OLEStorageImpl::createStream(const rtl::OUString &rPath)
+{
+ const sal_Int32 nDelim = rPath.lastIndexOf(sal_Unicode('/'));
+
+ if (-1 == nDelim)
+ return mxRootStorage.ref->OpenSotStream(rPath, STREAM_STD_READ);
+
+ const rtl::OUString aDir = rPath.copy(0, nDelim);
+ const rtl::OUString aName = rPath.copy(nDelim + 1);
+
+ const OLEStorageMap_t::const_iterator aIt = maStorageMap.find(aDir);
+
+ // We can only get there for paths that are present in the OLE.
+ // Which means the storage must exist.
+ assert(maStorageMap.end() != aIt);
+
+ return aIt->second.ref->OpenSotStream(aName, STREAM_STD_READ);
+}
+
+}
+
class WPXSvInputStreamImpl
{
public :
@@ -44,22 +222,32 @@ public :
::com::sun::star::io::XInputStream > xStream );
~WPXSvInputStreamImpl();
- bool isOLEStream();
- WPXInputStream * getDocumentOLEStream(const char *name);
+ bool isStructured();
+ unsigned subStreamCount();
+ const char * subStreamName(unsigned id);
+ bool existsSubStream(const char *name);
+ WPXInputStream * getSubStreamByName(const char *name);
+ WPXInputStream * getSubStreamById(unsigned id);
const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
int seek(long offset);
long tell();
- bool atEOS();
+ bool isEnd();
+
void invalidateReadBuffer();
+
private:
- ::std::vector< SotStorageRefWrapper > mxChildrenStorages;
- ::std::vector< SotStorageStreamRefWrapper > mxChildrenStreams;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::io::XInputStream > mxStream;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::io::XSeekable > mxSeekable;
+ bool isOLE();
+ void ensureOLEIsInitialized();
+
+ WPXInputStream *createWPXStream(const SotStorageStreamRef &rxStorage);
+
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > mxStream;
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XSeekable > mxSeekable;
::com::sun::star::uno::Sequence< sal_Int8 > maData;
+ boost::scoped_ptr< OLEStorageImpl > mpOLEStorage;
+ bool mbCheckedOLE;
public:
sal_Int64 mnLength;
unsigned char *mpReadBuffer;
@@ -68,8 +256,6 @@ public:
};
WPXSvInputStreamImpl::WPXSvInputStreamImpl( Reference< XInputStream > xStream ) :
- mxChildrenStorages(),
- mxChildrenStreams(),
mxStream(xStream),
mxSeekable(xStream, UNO_QUERY),
maData(0),
@@ -107,7 +293,7 @@ const unsigned char *WPXSvInputStreamImpl::read(unsigned long numBytes, unsigned
{
numBytesRead = 0;
- if (numBytes == 0 || atEOS())
+ if (numBytes == 0 || isEnd())
return 0;
numBytesRead = mxStream->readSomeBytes (maData, numBytes);
@@ -151,99 +337,127 @@ int WPXSvInputStreamImpl::seek(long offset)
}
}
-bool WPXSvInputStreamImpl::atEOS()
+bool WPXSvInputStreamImpl::isEnd()
{
if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
return true;
return (mxSeekable->getPosition() >= mnLength);
}
-bool WPXSvInputStreamImpl::isOLEStream()
+bool WPXSvInputStreamImpl::isStructured()
{
if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
return false;
- sal_Int64 tmpPosition = mxSeekable->getPosition();
+ PositionHolder pos(mxSeekable);
mxSeekable->seek(0);
- SvStream *pStream = utl::UcbStreamHelper::CreateStream( mxStream );
- bool bAns = pStream && SotStorage::IsOLEStorage( pStream );
- if (pStream)
- delete pStream;
-
- mxSeekable->seek(tmpPosition);
-
- return bAns;
+ return isOLE();
}
-WPXInputStream *WPXSvInputStreamImpl::getDocumentOLEStream(const char *name)
+unsigned WPXSvInputStreamImpl::subStreamCount()
{
- if (!name)
- return 0;
- OUString rPath(name,strlen(name),RTL_TEXTENCODING_UTF8);
- std::vector<OUString> aElems;
- splitPath( aElems, rPath );
-
if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
return 0;
- sal_Int64 tmpPosition = mxSeekable->getPosition();
+ PositionHolder pos(mxSeekable);
mxSeekable->seek(0);
- SvStream *pStream = utl::UcbStreamHelper::CreateStream( mxStream );
-
- if (!pStream || !SotStorage::IsOLEStorage( pStream ))
+ if (isOLE())
{
- mxSeekable->seek(tmpPosition);
- return 0;
+ ensureOLEIsInitialized();
+
+ return mpOLEStorage->maStreams.size();
}
- SotStorageRefWrapper storageRefWrapper;
- storageRefWrapper.ref = new SotStorage( pStream, sal_True );
- mxChildrenStorages.push_back( storageRefWrapper );
+ return 0;
+}
+
+const char *WPXSvInputStreamImpl::subStreamName(const unsigned id)
+{
+ if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
+ return 0;
+
+ PositionHolder pos(mxSeekable);
+ mxSeekable->seek(0);
- unsigned i = 0;
- while (i < aElems.size())
+ if (isOLE())
{
- if( mxChildrenStorages.back().ref->IsStream(aElems[i]))
- break;
- else if (mxChildrenStorages.back().ref->IsStorage(aElems[i]))
- {
- SotStorageRef tmpParent(mxChildrenStorages.back().ref);
- storageRefWrapper.ref = tmpParent->OpenSotStorage(aElems[i++], STREAM_STD_READ);
- mxChildrenStorages.push_back(storageRefWrapper);
- }
- else
- // should not happen
+ ensureOLEIsInitialized();
+
+ if (mpOLEStorage->maStreams.size() <= id)
return 0;
+
+ return mpOLEStorage->maStreams[id].name.getStr();
}
- // For the while don't return stream in this situation.
- // Later, given how libcdr's zip stream implementation behaves,
- // return the first stream in the storage if there is one.
- if (i >= aElems.size())
+ return 0;
+}
+
+bool WPXSvInputStreamImpl::existsSubStream(const char *const name)
+{
+ if (!name)
return 0;
- SotStorageStreamRefWrapper storageStreamRefWrapper;
- storageStreamRefWrapper.ref = mxChildrenStorages.back().ref->OpenSotStream( aElems[i], STREAM_STD_READ );
- mxChildrenStreams.push_back( storageStreamRefWrapper );
+ if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
+ return false;
- mxSeekable->seek(tmpPosition);
+ PositionHolder pos(mxSeekable);
+ mxSeekable->seek(0);
- if ( !mxChildrenStreams.back().ref.Is() || mxChildrenStreams.back().ref->GetError() )
+ if (isOLE())
{
- mxSeekable->seek(tmpPosition);
- return 0;
+ ensureOLEIsInitialized();
+
+ const rtl::OUString aName(rtl::OStringToOUString(rtl::OString(name), RTL_TEXTENCODING_UTF8));
+ return mpOLEStorage->maNameMap.end() != mpOLEStorage->maNameMap.find(aName);
}
- Reference < XInputStream > xContents(new utl::OSeekableInputStreamWrapper( mxChildrenStreams.back().ref ));
- mxSeekable->seek(tmpPosition);
- if (xContents.is())
- return new WPXSvInputStream( xContents );
- else
+ return false;
+}
+
+WPXInputStream *WPXSvInputStreamImpl::getSubStreamByName(const char *const name)
+{
+ if (!name)
return 0;
+
+ if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
+ return 0;
+
+ PositionHolder pos(mxSeekable);
+ mxSeekable->seek(0);
+
+ if (isOLE())
+ {
+ ensureOLEIsInitialized();
+
+ const rtl::OUString aName(rtl::OStringToOUString(rtl::OString(name), RTL_TEXTENCODING_UTF8));
+ return createWPXStream(mpOLEStorage->getStream(aName));
+ }
+
+ return 0;
}
+WPXInputStream *WPXSvInputStreamImpl::getSubStreamById(const unsigned id)
+{
+ if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
+ return 0;
+
+ PositionHolder pos(mxSeekable);
+ mxSeekable->seek(0);
+
+ if (isOLE())
+ {
+ ensureOLEIsInitialized();
+
+ if (mpOLEStorage->maStreams.size() <= id)
+ return 0;
+
+ return createWPXStream(mpOLEStorage->getStream(id));
+ }
+
+ return 0;
+}
void WPXSvInputStreamImpl::invalidateReadBuffer()
{
@@ -256,6 +470,39 @@ void WPXSvInputStreamImpl::invalidateReadBuffer()
}
}
+WPXInputStream *WPXSvInputStreamImpl::createWPXStream(const SotStorageStreamRef &rxStorage)
+{
+ Reference < XInputStream > xContents(new utl::OSeekableInputStreamWrapper( rxStorage ));
+ if (xContents.is())
+ return new WPXSvInputStream( xContents );
+ else
+ return 0;
+}
+
+bool WPXSvInputStreamImpl::isOLE()
+{
+ if (!mbCheckedOLE)
+ {
+ assert(0 == mxSeekable->getPosition());
+
+ boost::scoped_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( mxStream ));
+ if (pStream && SotStorage::IsOLEStorage(pStream.get()))
+ mpOLEStorage.reset(new OLEStorageImpl());
+
+ mbCheckedOLE = true;
+ }
+
+ return bool(mpOLEStorage);
+}
+
+void WPXSvInputStreamImpl::ensureOLEIsInitialized()
+{
+ assert(mpOLEStorage);
+
+ if (!mpOLEStorage->mbInitialized)
+ mpOLEStorage->initialize(utl::UcbStreamHelper::CreateStream( mxStream ));
+}
+
WPXSvInputStream::WPXSvInputStream( Reference< XInputStream > xStream ) :
mpImpl(new WPXSvInputStreamImpl(xStream))
{
@@ -363,21 +610,60 @@ int WPXSvInputStream::seek(long offset, WPX_SEEK_TYPE seekType)
return retVal;
}
+bool WPXSvInputStream::isEnd()
+{
+ return mpImpl->isEnd() && mpImpl->mnReadBufferPos == mpImpl->mnReadBufferLength;
+}
+
+bool WPXSvInputStream::isStructured()
+{
+ mpImpl->invalidateReadBuffer();
+ return mpImpl->isStructured();
+}
+
+unsigned WPXSvInputStream::subStreamCount()
+{
+ mpImpl->invalidateReadBuffer();
+ return mpImpl->subStreamCount();
+}
+
+const char *WPXSvInputStream::subStreamName(const unsigned id)
+{
+ mpImpl->invalidateReadBuffer();
+ return mpImpl->subStreamName(id);
+}
+
+bool WPXSvInputStream::existsSubStream(const char *const name)
+{
+ mpImpl->invalidateReadBuffer();
+ return mpImpl->existsSubStream(name);
+}
+
+WPXInputStream *WPXSvInputStream::getSubStreamByName(const char *name)
+{
+ mpImpl->invalidateReadBuffer();
+ return mpImpl->getSubStreamByName(name);
+}
+
+WPXInputStream *WPXSvInputStream::getSubStreamById(const unsigned id)
+{
+ mpImpl->invalidateReadBuffer();
+ return mpImpl->getSubStreamById(id);
+}
+
bool WPXSvInputStream::atEOS()
{
- return mpImpl->atEOS() && mpImpl->mnReadBufferPos == mpImpl->mnReadBufferLength;
+ return isEnd();
}
bool WPXSvInputStream::isOLEStream()
{
- mpImpl->invalidateReadBuffer();
- return mpImpl->isOLEStream();
+ return isStructured();
}
WPXInputStream *WPXSvInputStream::getDocumentOLEStream(const char *name)
{
- mpImpl->invalidateReadBuffer();
- return mpImpl->getDocumentOLEStream(name);
+ return getSubStreamByName(name);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/common/WPXSvStream.hxx b/writerperfect/source/common/WPXSvStream.hxx
index d104c4b..efb627a 100644
--- a/writerperfect/source/common/WPXSvStream.hxx
+++ b/writerperfect/source/common/WPXSvStream.hxx
@@ -25,12 +25,20 @@ public:
::com::sun::star::io::XInputStream > xStream );
virtual ~WPXSvInputStream();
- virtual bool isOLEStream();
- virtual WPXInputStream * getDocumentOLEStream(const char *name);
+ virtual bool isStructured();
+ virtual unsigned subStreamCount();
+ virtual const char * subStreamName(unsigned id);
+ virtual bool existsSubStream(const char *name);
+ virtual WPXInputStream * getSubStreamByName(const char *name);
+ virtual WPXInputStream * getSubStreamById(unsigned id);
virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
virtual int seek(long offset, WPX_SEEK_TYPE seekType);
virtual long tell();
+ virtual bool isEnd();
+
+ virtual bool isOLEStream();
+ virtual WPXInputStream * getDocumentOLEStream(const char *name);
virtual bool atEOS();
private:
commit 9c8662eb7709f22c59352349a378f9dacb296dc0
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jan 13 19:16:02 2014 +0100
SwTxtNode::RstTxtAttr(): remove special case "continue"
The newly inserted hints will always be inserted "behind" the existing
pHt, since their start position is truly greater than pHt's, so no need
for "continue" with same i (...and why not i-1 since 2 hints could be
inserted?).
Change-Id: I3c796e7084dc84a360020dfa0ed362fb3305141a
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 343cfdf..b26e6ad 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -612,10 +612,6 @@ void SwTxtNode::RstTxtAttr(
InsertHint( pNew,
nsSetAttrMode::SETATTR_NOHINTADJUST );
}
-
- // don't increment, the inserted attribute has pushed
- // another onto position i!
- continue;
}
// this case appears to rely on InsertHint not re-sorting
commit c9ec8df9629ef5babd1374719da32680258fbecf
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jan 13 19:09:16 2014 +0100
SwTxtNode::RstTxtAttr(): translate german comments
Change-Id: Ie54ff6147ded6cfe88ac86ec02625fbb4a19b364
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index f885990..343cfdf 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -488,23 +488,21 @@ void SwTxtNode::RstTxtAttr(
continue;
}
- if( nStt <= nAttrStart ) // Faelle: 1,3,5
+ if (nStt <= nAttrStart) // Case: 1,3,5
{
const sal_Int32 nAttrEnd = pAttrEnd != NULL
? *pAttrEnd
: nAttrStart;
- if( nEnd > nAttrStart
- || ( nEnd == nAttrEnd && nEnd == nAttrStart ) )
+ if (nEnd > nAttrStart
+ || (nEnd == nAttrEnd && nEnd == nAttrStart)) // Case: 1,3
{
- // Faelle: 1,3
if ( nMin > nAttrStart )
nMin = nAttrStart;
if ( nMax < nAttrEnd )
nMax = nAttrEnd;
- // Falls wir nur ein nichtaufgespanntes Attribut entfernen,
- // tun wir mal so, als ob sich nichts geaendert hat.
+ // If only a no-extent hint is deleted, no resorting is needed
bChanged = bChanged || nEnd > nAttrStart || bNoLen;
- if( nAttrEnd <= nEnd ) // Fall: 1
+ if (nAttrEnd <= nEnd) // Case: 1
{
m_pSwpHints->DeleteAtPos(i);
DestroyAttr( pHt );
@@ -521,16 +519,13 @@ void SwTxtNode::RstTxtAttr(
break;
//JP 26.11.96:
- // beim DeleteAtPos wird ein Resort ausgefuehrt!!
- // darum muessen wir wieder bei 0 anfangen!!!
- // ueber den Fall 3 koennen Attribute nach hinten
- // verschoben worden sein; damit stimmt jetzt das i
- // nicht mehr!!!
+ // DeleteAtPos does a Resort! Via Case 3 or 4 hints could
+ // have been moved around so i is wrong now.
+ // So we have to start over at 0 again.
i = 0;
-
continue;
}
- else // Fall: 3
+ else // Case: 3
{
m_pSwpHints->NoteInHistory( pHt );
// UGLY: this may temporarily destroy the sorting!
@@ -552,11 +547,11 @@ void SwTxtNode::RstTxtAttr(
}
}
}
- else if ( pAttrEnd != NULL ) // Faelle: 2,4,5
+ else if (pAttrEnd != 0) // Case: 2,4,5
{
- if( *pAttrEnd > nStt ) // Faelle: 2,4
+ if (*pAttrEnd > nStt) // Case: 2,4
{
- if( *pAttrEnd < nEnd ) // Fall: 2
+ if (*pAttrEnd < nEnd) // Case: 2
{
if ( nMin > nAttrStart )
nMin = nAttrStart;
@@ -582,10 +577,10 @@ void SwTxtNode::RstTxtAttr(
// and pNew being inserted behind pHt
assert(pHt == m_pSwpHints->GetTextHint(i));
}
- else if( nLen ) // Fall: 4
+ else if (nLen) // Case: 4
{
- // bei Lange 0 werden beide Hints vom Insert(Ht)
- // wieder zu einem zusammengezogen !!!!
+ // for Length 0 both hints would be merged again by
+ // InsertHint, so leave them alone!
if ( nMin > nAttrStart )
nMin = nAttrStart;
if ( nMax < *pAttrEnd )
@@ -618,8 +613,8 @@ void SwTxtNode::RstTxtAttr(
nsSetAttrMode::SETATTR_NOHINTADJUST );
}
- // jetzt kein i+1, weil das eingefuegte Attribut
- // ein anderes auf die Position geschoben hat !
+ // don't increment, the inserted attribute has pushed
+ // another onto position i!
continue;
}
@@ -639,7 +634,7 @@ void SwTxtNode::RstTxtAttr(
{ // possibly sometimes Resort would be sufficient, but...
m_pSwpHints->MergePortions(*this);
}
- //TxtFrm's reagieren auf aHint, andere auf aNew
+ // TxtFrm's respond to aHint, others to aNew
SwUpdateAttr aHint( nMin, nMax, 0 );
NotifyClients( 0, &aHint );
SwFmtChg aNew( GetFmtColl() );
commit a639a08892a6ebe5d2fe4b284ff21ca83e38bd7c
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jan 13 18:52:46 2014 +0100
SwTxtNode::RstTxtAttr() depends on some implementation details..
... of the hints array, attempt to document those with assertions.
Change-Id: I5e0310e7a213c7c8fd2e1f992ae91b739a7923a5
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 9abddfa..f885990 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -533,6 +533,7 @@ void SwTxtNode::RstTxtAttr(
else // Fall: 3
{
m_pSwpHints->NoteInHistory( pHt );
+ // UGLY: this may temporarily destroy the sorting!
*pHt->GetStart() = nEnd;
m_pSwpHints->NoteInHistory( pHt, sal_True );
@@ -543,6 +544,10 @@ void SwTxtNode::RstTxtAttr(
InsertHint( pNew, nsSetAttrMode::SETATTR_NOHINTADJUST );
}
+ // this case appears to rely on InsertHint not re-sorting
+ // and pNew being inserted behind pHt
+ assert(pHt == m_pSwpHints->GetTextHint(i));
+
bChanged = true;
}
}
@@ -562,6 +567,7 @@ void SwTxtNode::RstTxtAttr(
const sal_Int32 nAttrEnd = *pAttrEnd;
m_pSwpHints->NoteInHistory( pHt );
+ // UGLY: this may temporarily destroy the sorting!
*pAttrEnd = nStt;
m_pSwpHints->NoteInHistory( pHt, sal_True );
@@ -571,6 +577,10 @@ void SwTxtNode::RstTxtAttr(
*pStyleHandle, nStt, nAttrEnd );
InsertHint( pNew, nsSetAttrMode::SETATTR_NOHINTADJUST );
}
+
+ // this case appears to rely on InsertHint not re-sorting
+ // and pNew being inserted behind pHt
+ assert(pHt == m_pSwpHints->GetTextHint(i));
}
else if( nLen ) // Fall: 4
{
@@ -583,6 +593,7 @@ void SwTxtNode::RstTxtAttr(
bChanged = true;
const sal_Int32 nTmpEnd = *pAttrEnd;
m_pSwpHints->NoteInHistory( pHt );
+ // UGLY: this may temporarily destroy the sorting!
*pAttrEnd = nStt;
m_pSwpHints->NoteInHistory( pHt, sal_True );
@@ -611,6 +622,10 @@ void SwTxtNode::RstTxtAttr(
// ein anderes auf die Position geschoben hat !
continue;
}
+
+ // this case appears to rely on InsertHint not re-sorting
+ // and pNew being inserted behind pHt
+ assert(pHt == m_pSwpHints->GetTextHint(i));
}
}
}
commit fed66bb28573edb0276c42eb5f1fa1ca4626738d
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Jan 13 18:36:04 2014 +0100
fdo#72788: sw: fix infinite loop in SwTxtAttr::RstTxtAttr
The increment was erroneously moved into the else branch in commit
c1c5feaff453cfbb23c43f2b423201b883ff048d.
Change-Id: If71cb58967e215548aed5679da86af20de17a0f1
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index c2c6602..9abddfa 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -613,8 +613,8 @@ void SwTxtNode::RstTxtAttr(
}
}
}
- ++i;
}
+ ++i;
}
TryDeleteSwpHints();
commit 1ebeb4cac0b1497443f858ace945902816ad5d48
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Mon Jan 13 18:45:59 2014 +0100
Revert "Resolves: fdo#72277 https CMIS Alfresco "The specified device is invalid.""
This reverts commit 0d1f724f9645e7ec0da6a4c3a1c22d0dcf785cb6.
(as requested by https://bugs.freedesktop.org/show_bug.cgi?id=72277#c20)
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index a2e1868..53777bc 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -297,11 +297,9 @@ namespace cmis
ALFRESCO_CLOUD_SCOPE, ALFRESCO_CLOUD_REDIRECT_URI,
ALFRESCO_CLOUD_CLIENT_ID, ALFRESCO_CLOUD_CLIENT_SECRET ) );
- OUString pURL = m_aURL.getBindingUrl( );
-
m_pSession = libcmis::SessionFactory::createSession(
OUSTR_TO_STDSTR( m_aURL.getBindingUrl( ) ),
- rUsername, rPassword, OUSTR_TO_STDSTR( m_aURL.getRepositoryId( ) ), pURL.startsWith("https")?true:false, oauth2Data );
+ rUsername, rPassword, OUSTR_TO_STDSTR( m_aURL.getRepositoryId( ) ), sal_False, oauth2Data );
if ( m_pSession == NULL )
ucbhelper::cancelCommandExecution(
ucb::IOErrorCode_INVALID_DEVICE,
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index 918a3d4..88fefb5 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -159,11 +159,9 @@ namespace cmis
ALFRESCO_CLOUD_SCOPE, ALFRESCO_CLOUD_REDIRECT_URI,
ALFRESCO_CLOUD_CLIENT_ID, ALFRESCO_CLOUD_CLIENT_SECRET ) );
- OUString pURL = m_aURL.getBindingUrl( );
-
libcmis::Session* session = libcmis::SessionFactory::createSession(
- OUSTR_TO_STDSTR(pURL),
- rUsername, rPassword, "", pURL.startsWith("https")?true:false, oauth2Data );
+ OUSTR_TO_STDSTR( m_aURL.getBindingUrl( ) ),
+ rUsername, rPassword, "", sal_False, oauth2Data );
if (session == NULL )
ucbhelper::cancelCommandExecution(
ucb::IOErrorCode_INVALID_DEVICE,
commit 2ff412269bd947566c4dcdb006e5d73a20766268
Author: Nikhil Walvekar <nikhil.walvekar at synerzip.com>
Date: Fri Jan 10 20:21:45 2014 +0530
fdo#70942 Preserve original shape type, if shape contains text.
Currently we change shape type to textframe if a shape contains
text. Due to this shape information is not preserved when file
is saved.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7372
Change-Id: I7af3ce29f857d6fa2ceab0350937d91638361e7c
diff --git a/include/oox/drawingml/customshapeproperties.hxx b/include/oox/drawingml/customshapeproperties.hxx
index e6df846..fdf8d49 100644
--- a/include/oox/drawingml/customshapeproperties.hxx
+++ b/include/oox/drawingml/customshapeproperties.hxx
@@ -135,6 +135,8 @@ public:
sal_Int32 getShapePresetType() const { return mnShapePresetType; }
OUString getShapePresetTypeName() const;
void setShapePresetType( sal_Int32 nShapePresetType ){ mnShapePresetType = nShapePresetType; };
+ sal_Bool getShapeTypeOverride(){ return mbShapeTypeOverride; };
+ void setShapeTypeOverride( sal_Bool bShapeTypeOverride ) { mbShapeTypeOverride = bShapeTypeOverride; };
std::vector< CustomShapeGuide >& getAdjustmentGuideList(){ return maAdjustmentGuideList; };
std::vector< CustomShapeGuide >& getGuideList(){ return maGuideList; };
@@ -155,6 +157,7 @@ public:
private:
sal_Int32 mnShapePresetType;
+ sal_Bool mbShapeTypeOverride;
std::vector< CustomShapeGuide > maAdjustmentGuideList;
std::vector< CustomShapeGuide > maGuideList;
std::vector< AdjustHandle > maAdjustHandleList;
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 247e8cf..cdc6974 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -44,6 +44,7 @@ namespace oox { namespace drawingml {
CustomShapeProperties::CustomShapeProperties()
: mnShapePresetType ( -1 )
+, mbShapeTypeOverride(sal_False)
, mbMirroredX ( sal_False )
, mbMirroredY ( sal_False )
, mnTextRotateAngle ( 0 )
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 9437f02..eff9ad4 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -621,6 +621,18 @@ Reference< XShape > Shape::createAndInsert(
{
if (aServiceName == "com.sun.star.text.TextFrame")
{
+ if (mpCustomShapePropertiesPtr != NULL && mpCustomShapePropertiesPtr->getShapeTypeOverride())
+ {
+ uno::Reference<beans::XPropertySet> propertySet (mxShape, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ propertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag;
+ sal_Int32 length = aGrabBag.getLength();
+ aGrabBag.realloc( length+1);
+ aGrabBag[length].Name = "mso-orig-shape-type";
+ aGrabBag[length].Value = uno::makeAny(mpCustomShapePropertiesPtr->getShapePresetTypeName());
+ propertySet->setPropertyValue("FrameInteropGrabBag",uno::makeAny(aGrabBag));
+ }
+
// TextFrames have BackColor, not FillColor
if (aShapeProps.hasProperty(PROP_FillColor))
{
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index e2bbb0e..04e8a23 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -101,6 +101,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
}
break;
case XML_txbx:
+ mpShape->getCustomShapeProperties()->setShapeTypeOverride(true);
mpShape->setServiceName("com.sun.star.text.TextFrame");
break;
default:
diff --git a/sw/qa/extras/ooxmlexport/data/fdo70942.docx b/sw/qa/extras/ooxmlexport/data/fdo70942.docx
new file mode 100644
index 0000000..a04a784
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo70942.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index d4f5e3f..95b2cb2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2413,6 +2413,15 @@ DECLARE_OOXMLEXPORT_TEST(testFdo73247, "fdo73247.docx")
"rot", "1969698");
}
+DECLARE_OOXMLEXPORT_TEST(testFdo70942, "fdo70942.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
+ "prst", "ellipse");
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index e498c09..8416554 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -309,13 +309,12 @@ void DocxAttributeOutput::WriteDMLTextFrame(sw::Frame* pParentFrame)
uno::Reference< drawing::XShape > xShape( ((SdrObject*)pSdrObj)->getUnoShape(), uno::UNO_QUERY );
uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropertySet->getPropertySetInfo();
- OUString pName = "FrameInteropGrabBag";
sal_Int32 nRotation = 0;
- if ( xPropSetInfo->hasPropertyByName( pName ) )
+ if ( xPropSetInfo->hasPropertyByName( "FrameInteropGrabBag" ) )
{
uno::Sequence< beans::PropertyValue > propList;
- xPropertySet->getPropertyValue( pName ) >>= propList;
+ xPropertySet->getPropertyValue( "FrameInteropGrabBag" ) >>= propList;
for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp )
{
OUString propName = propList[nProp].Name;
@@ -352,8 +351,24 @@ void DocxAttributeOutput::WriteDMLTextFrame(sw::Frame* pParentFrame)
XML_cy, aHeight.getStr(),
FSEND);
m_pSerializer->endElementNS(XML_a, XML_xfrm);
+ OUString shapeType = "rect";
+ if ( xPropSetInfo->hasPropertyByName( "FrameInteropGrabBag" ) )
+ {
+ uno::Sequence< beans::PropertyValue > propList;
+ xPropertySet->getPropertyValue( "FrameInteropGrabBag" ) >>= propList;
+ for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp )
+ {
+ OUString propName = propList[nProp].Name;
+ if ( propName == "mso-orig-shape-type")
+ {
+ propList[nProp].Value >>= shapeType;
+ break;
+ }
+ }
+ }
+
m_pSerializer->singleElementNS(XML_a, XML_prstGeom,
- XML_prst, "rect",
+ XML_prst, OUStringToOString( shapeType, RTL_TEXTENCODING_UTF8 ).getStr(),
FSEND);
m_bDMLTextFrameSyntax = true;
m_pBodyPrAttrList = m_pSerializer->createAttrList();
commit 75b9435f8aae7338e44630685ecb47eb83ba196b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jan 13 18:13:58 2014 +0100
Work around G_DEFINE_TYPE -Werror,-Wunused-function
At least G_DEFINE_TYPE from glib2-devel-2.38.2-2.fc20.x86_64
/usr/include/glib-2.0/gobject/gtype.h defines unsed *_get_instance_private
functions.
Change-Id: I47211b6451d9699c7b8741555f3ad11a09e411bf
diff --git a/ucb/source/ucp/gio/gio_mount.cxx b/ucb/source/ucp/gio/gio_mount.cxx
index 30c97e2..6d7bc63 100644
--- a/ucb/source/ucp/gio/gio_mount.cxx
+++ b/ucb/source/ucp/gio/gio_mount.cxx
@@ -22,7 +22,14 @@
#include <stdio.h>
#include <string.h>
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
G_DEFINE_TYPE (OOoMountOperation, ooo_mount_operation, G_TYPE_MOUNT_OPERATION);
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
+#pragma GCC diagnostic pop
+#endif
static void ooo_mount_operation_ask_password (GMountOperation *op,
const char *message, const char *default_user, const char *default_domain,
diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx
index 19187a6..00ce933 100644
--- a/vcl/unx/gtk/window/gloactiongroup.cxx
+++ b/vcl/unx/gtk/window/gloactiongroup.cxx
@@ -40,7 +40,14 @@ struct _GLOAction
typedef GObjectClass GLOActionClass;
typedef struct _GLOAction GLOAction;
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
G_DEFINE_TYPE (GLOAction, g_lo_action, G_TYPE_OBJECT);
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
+#pragma GCC diagnostic pop
+#endif
GLOAction*
g_lo_action_new (void)
@@ -100,10 +107,17 @@ struct _GLOActionGroupPrivate
static void g_lo_action_group_iface_init (GActionGroupInterface *);
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
G_DEFINE_TYPE_WITH_CODE (GLOActionGroup,
g_lo_action_group, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (G_TYPE_ACTION_GROUP,
g_lo_action_group_iface_init));
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
+#pragma GCC diagnostic pop
+#endif
static gchar **
g_lo_action_group_list_actions (GActionGroup *group)
diff --git a/vcl/unx/gtk/window/glomenu.cxx b/vcl/unx/gtk/window/glomenu.cxx
index 8227fb1..e012aa0 100644
--- a/vcl/unx/gtk/window/glomenu.cxx
+++ b/vcl/unx/gtk/window/glomenu.cxx
@@ -25,7 +25,14 @@ struct _GLOMenu
typedef GMenuModelClass GLOMenuClass;
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
+#endif
G_DEFINE_TYPE (GLOMenu, g_lo_menu, G_TYPE_MENU_MODEL);
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_SCOPE && HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
+#pragma GCC diagnostic pop
+#endif
struct item
{
commit aa8e056bab9116586053d2111ef10e2dcf2c913e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jan 13 18:05:27 2014 +0100
Filter out GCC-ism for Clang
At least mariadb-5.5.34-2.fc20.x86_64 "mysql_config --cflags" somewhat
unhelpfully includes GCC-specific -fstack-protector-strong which at least Clang
trunk towards 3.5 does not understand.
Change-Id: Ic38104323b6d9275384effdf21d1885c0720edb0
diff --git a/configure.ac b/configure.ac
index 01c66bf..0405e9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8261,6 +8261,9 @@ if test "$ENABLE_MARIADBC" = "TRUE"; then
fi
AC_MSG_CHECKING([for MariaDB Client library])
MARIADB_CFLAGS=`$MARIADBCONFIG --cflags`
+ if test "$COM_GCC_IS_CLANG" = TRUE; then
+ MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-fstack-protector-strong//)
+ fi
MARIADB_LIBS=`$MARIADBCONFIG --libs_r`
AC_MSG_RESULT([includes '$MARIADB_CFLAGS', libraries '$MARIADB_LIBS'])
AC_MSG_CHECKING([whether to bundle the MySQL/MariaDB client library])
commit bd59efcdc7494c311cb9db7eedcaa1f986bddbef
Author: Eike Rathke <erack at redhat.com>
Date: Mon Jan 13 18:02:21 2014 +0100
resolved fdo#73555 compile statistics templates using English grammar
The statistics templates' formula expressions are setup using English
function names, so compile the resulting expressions using an English
grammar merged with the current address conventions.
Change-Id: I7c782a42d007daeaaf99463beb8aa580c05c7363
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index cc35630..0dc9971 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -104,7 +104,8 @@ sal_Int16 ScAnalysisOfVarianceDialog::GetUndoNameId()
ScRange ScAnalysisOfVarianceDialog::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument);
+ AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument,
+ formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
FormulaTemplate aTemplate(mDocument, mAddressDetails);
output.writeBoldString(SC_STRLOAD(RID_STATISTICS_DLGS, STR_ANOVA_SINGLE_FACTOR_LABEL));
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index d4601ff..1687773 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -83,7 +83,8 @@ sal_Int16 ScDescriptiveStatisticsDialog::GetUndoNameId()
ScRange ScDescriptiveStatisticsDialog::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter aOutput(mOutputAddress, pDocShell, mDocument);
+ AddressWalkerWriter aOutput(mOutputAddress, pDocShell, mDocument,
+ formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
FormulaTemplate aTemplate(mDocument, mAddressDetails);
boost::scoped_ptr<DataRangeIterator> pIterator;
diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
index be6de68..6b20afd 100644
--- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx
@@ -52,7 +52,8 @@ sal_Int16 ScExponentialSmoothingDialog::GetUndoNameId()
ScRange ScExponentialSmoothingDialog::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument);
+ AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument,
+ formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
FormulaTemplate aTemplate(mDocument, mAddressDetails);
// Smoothing factor
diff --git a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
index e797b0c..a5e5001 100644
--- a/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
+++ b/sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx
@@ -74,7 +74,8 @@ sal_Int16 ScMatrixComparisonGenerator::GetUndoNameId()
ScRange ScMatrixComparisonGenerator::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument);
+ AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument,
+ formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
FormulaTemplate aTemplate(mDocument, mAddressDetails);
SCTAB inTab = mInputRange.aStart.Tab();
diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
index 9097b96..85466de 100644
--- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx
@@ -52,7 +52,8 @@ sal_Int16 ScMovingAverageDialog::GetUndoNameId()
ScRange ScMovingAverageDialog::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument);
+ AddressWalkerWriter output(mOutputAddress, pDocShell, mDocument,
+ formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
FormulaTemplate aTemplate(mDocument, mAddressDetails);
boost::scoped_ptr<DataRangeIterator> pIterator;
diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
index 4c576e9..59c249c 100644
--- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
@@ -60,7 +60,8 @@ sal_Int16 ScTTestDialog::GetUndoNameId()
ScRange ScTTestDialog::ApplyOutput(ScDocShell* pDocShell)
{
- AddressWalkerWriter aOutput(mOutputAddress, pDocShell, mDocument);
+ AddressWalkerWriter aOutput(mOutputAddress, pDocShell, mDocument,
+ formula::FormulaGrammar::mergeToGrammar( formula::FormulaGrammar::GRAM_ENGLISH, mAddressDetails.eConv));
FormulaTemplate aTemplate(mDocument, mAddressDetails);
boost::scoped_ptr<DataRangeIterator> pVariable1Iterator;
diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
index f708b3b..53e01bf 100644
--- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
+++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
@@ -152,15 +152,18 @@ void AddressWalker::pop()
mAddressStack.pop_back();
}
-AddressWalkerWriter::AddressWalkerWriter(ScAddress aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument) :
+AddressWalkerWriter::AddressWalkerWriter(ScAddress aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument,
+ formula::FormulaGrammar::Grammar eGrammar ) :
AddressWalker(aInitialAddress, true),
mpDocShell(pDocShell),
- mpDocument(pDocument)
+ mpDocument(pDocument),
+ meGrammar(eGrammar)
{}
void AddressWalkerWriter::writeFormula(OUString aFormula)
{
- mpDocShell->GetDocFunc().SetFormulaCell(mCurrentAddress, new ScFormulaCell(mpDocument, mCurrentAddress, aFormula), true);
+ mpDocShell->GetDocFunc().SetFormulaCell(mCurrentAddress,
+ new ScFormulaCell(mpDocument, mCurrentAddress, aFormula, meGrammar), true);
}
void AddressWalkerWriter::writeMatrixFormula(OUString aFormula)
@@ -168,7 +171,7 @@ void AddressWalkerWriter::writeMatrixFormula(OUString aFormula)
ScRange aRange;
aRange.aStart = mCurrentAddress;
aRange.aEnd = mCurrentAddress;
- mpDocShell->GetDocFunc().EnterMatrix(aRange, NULL, NULL, aFormula, false, false, OUString(), formula::FormulaGrammar::GRAM_DEFAULT );
+ mpDocShell->GetDocFunc().EnterMatrix(aRange, NULL, NULL, aFormula, false, false, OUString(), meGrammar );
}
void AddressWalkerWriter::writeString(OUString aString)
diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
index f616e5b..88f7c3f 100644
--- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
+++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
@@ -76,10 +76,12 @@ public:
class AddressWalkerWriter : public AddressWalker
{
public:
- ScDocShell* mpDocShell;
- ScDocument* mpDocument;
+ ScDocShell* mpDocShell;
+ ScDocument* mpDocument;
+ formula::FormulaGrammar::Grammar meGrammar;
- AddressWalkerWriter(ScAddress aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument);
+ AddressWalkerWriter(ScAddress aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument,
+ formula::FormulaGrammar::Grammar eGrammar );
void writeFormula(OUString aFormula);
void writeMatrixFormula(OUString aFormula);
commit 6a5509b56052f844fe6d93055d013d2d16b4401e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jan 13 18:07:49 2014 +0100
SvTreeListBox::ExpandingHdl should return bool
Change-Id: I39a854910299ab2e7c64beabda381bb9f0bd2891
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index b353853..c899447 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -700,7 +700,7 @@ SvTreeListEntry* TreeListBox::FindEntry( SvTreeListEntry* pParent, const OUStrin
return 0;
}
-long TreeListBox::ExpandingHdl()
+bool TreeListBox::ExpandingHdl()
{
// expanding or collapsing?
bool bOK = true;
diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx
index 90cc273..bc7d669 100644
--- a/basctl/source/basicide/bastype2.hxx
+++ b/basctl/source/basicide/bastype2.hxx
@@ -185,7 +185,7 @@ protected:
virtual void RequestingChildren( SvTreeListEntry* pParent );
virtual void ExpandedHdl();
virtual SvTreeListEntry* CloneEntry( SvTreeListEntry* pSource );
- virtual long ExpandingHdl();
+ virtual bool ExpandingHdl();
void ImpCreateLibEntries( SvTreeListEntry* pShellRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation );
void ImpCreateLibSubEntries( SvTreeListEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 6339593..b47fa2e 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -340,9 +340,9 @@ void SFTreeListBox:: RequestSubEntries( SvTreeListEntry* pRootEntry, Reference<
}
}
-long SFTreeListBox::ExpandingHdl()
+bool SFTreeListBox::ExpandingHdl()
{
- return sal_True;
+ return true;
}
void SFTreeListBox::ExpandAllTrees()
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
index bbf35c0..394462f 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -73,7 +73,7 @@ protected:
void ExpandTree( SvTreeListEntry* pRootEntry );
virtual void RequestingChildren( SvTreeListEntry* pParent );
virtual void ExpandedHdl();
- virtual long ExpandingHdl();
+ virtual bool ExpandingHdl();
public:
void Init( const OUString& language );
void RequestSubEntries( SvTreeListEntry* pRootEntry, ::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >& node,
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 0d9b768..6d1f2ca 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -442,7 +442,7 @@ public:
const Link& GetExpandingHdl() const { return aExpandingHdl; }
virtual void ExpandedHdl();
- virtual long ExpandingHdl();
+ virtual bool ExpandingHdl();
virtual void SelectHdl();
virtual void DeselectHdl();
virtual sal_Bool DoubleClickHdl();
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index ecc4d41..067eae9 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -526,7 +526,7 @@ protected:
virtual void Command( const CommandEvent& rMEvt );
virtual long Notify( NotifyEvent& rNEvt );
virtual sal_Bool DoubleClickHdl();
- virtual long ExpandingHdl();
+ virtual bool ExpandingHdl();
virtual void ExpandedHdl();
virtual sal_Bool NotifyMoving(SvTreeListEntry* pTarget,
SvTreeListEntry* pEntry,
@@ -644,7 +644,7 @@ sal_Bool StyleTreeListBox_Impl::NotifyMoving(SvTreeListEntry* pTarget,
//-------------------------------------------------------------------------
-long StyleTreeListBox_Impl::ExpandingHdl()
+bool StyleTreeListBox_Impl::ExpandingHdl()
/* [Description]
@@ -656,7 +656,7 @@ long StyleTreeListBox_Impl::ExpandingHdl()
*/
{
pCurEntry = GetCurEntry();
- return sal_True;
+ return true;
}
//-------------------------------------------------------------------------
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 018fcbd..1399757 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -504,10 +504,10 @@ sal_uLong SvTreeListBox::Insert( SvTreeListEntry* pEntry,sal_uLong nRootPos )
return nInsPos;
}
-long SvTreeListBox::ExpandingHdl()
+bool SvTreeListBox::ExpandingHdl()
{
DBG_CHKTHIS(SvTreeListBox,0);
- return aExpandingHdl.IsSet() ? aExpandingHdl.Call( this ) : 1;
+ return !aExpandingHdl.IsSet() || aExpandingHdl.Call( this );
}
void SvTreeListBox::ExpandedHdl()
commit 30edf67b45a69abb02516c889466b4317b6677ce
Author: YogeshBharate <yogesh.bharate at synerzip.com>
Date: Fri Jan 10 19:15:10 2014 +0530
fdo#73247: Code fixed for Shape rotation not preserved in RT
Problem Description:
- When we create the shape with text, rotated it with some angle,
the rotation angle is not preserved after roundtrip.
Implementation:
- Use the FrameInteroGrabBag to preserve the rotation angle.
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7367
Change-Id: I8a44e82d21f08ecb221cdbfef73f02a652f2bad3
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index b191762..9437f02 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -657,7 +657,28 @@ Reference< XShape > Shape::createAndInsert(
}
aShapeProps.erase(PROP_LineColor);
}
-
+ if(mnRotation)
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(mxShape, uno::UNO_QUERY);
+ const OUString aGrabBagPropName = "FrameInteropGrabBag";
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ xPropertySet->getPropertyValue(aGrabBagPropName) >>= aGrabBag;
+ beans::PropertyValue aPair;
+ aPair.Name = "mso-rotation-angle";
+ aPair.Value = uno::makeAny(mnRotation);
+ if (aGrabBag.hasElements())
+ {
+ sal_Int32 nLength = aGrabBag.getLength();
+ aGrabBag.realloc(nLength + 1);
+ aGrabBag[nLength] = aPair;
+ }
+ else
+ {
+ aGrabBag.realloc(1);
+ aGrabBag[0] = aPair;
+ }
+ xPropertySet->setPropertyValue(aGrabBagPropName, uno::makeAny(aGrabBag));
+ }
// TextFrames have ShadowFormat, not individual shadow properties.
boost::optional<sal_Int32> oShadowDistance;
if (aShapeProps.hasProperty(PROP_ShadowXDistance))
diff --git a/sw/qa/extras/ooxmlexport/data/fdo73247.docx b/sw/qa/extras/ooxmlexport/data/fdo73247.docx
new file mode 100644
index 0000000..63ad782
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo73247.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 46488de..d4f5e3f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2404,6 +2404,15 @@ DECLARE_OOXMLEXPORT_TEST(testFdo65833, "fdo65833.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:group", "editas", "canvas");
}
+DECLARE_OOXMLEXPORT_TEST(testFdo73247, "fdo73247.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:xfrm",
+ "rot", "1969698");
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index a94cd68..e498c09 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -304,9 +304,43 @@ void DocxAttributeOutput::WriteDMLTextFrame(sw::Frame* pParentFrame)
XML_txBox, "1",
FSEND);
+ uno::Any aRotation ;
+ const SdrObject* pSdrObj = rFrmFmt.FindRealSdrObject();
+ uno::Reference< drawing::XShape > xShape( ((SdrObject*)pSdrObj)->getUnoShape(), uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropertySet->getPropertySetInfo();
+ OUString pName = "FrameInteropGrabBag";
+ sal_Int32 nRotation = 0;
+
+ if ( xPropSetInfo->hasPropertyByName( pName ) )
+ {
+ uno::Sequence< beans::PropertyValue > propList;
+ xPropertySet->getPropertyValue( pName ) >>= propList;
+ for ( sal_Int32 nProp=0; nProp < propList.getLength(); ++nProp )
+ {
+ OUString propName = propList[nProp].Name;
+ if ( propName == "mso-rotation-angle")
+ {
+ aRotation = propList[nProp].Value ;
+ break;
+ }
+ }
+ }
+ aRotation >>= nRotation ;
+ OString sRotation(OString::number(nRotation));
// Shape properties
m_pSerializer->startElementNS(XML_wps, XML_spPr, FSEND);
- m_pSerializer->startElementNS(XML_a, XML_xfrm, FSEND);
+ if(nRotation)
+ {
+ m_pSerializer->startElementNS(XML_a, XML_xfrm,
+ XML_rot, sRotation.getStr(),
+ FSEND);
+
+ }
+ else
+ {
+ m_pSerializer->startElementNS(XML_a, XML_xfrm, FSEND);
+ }
m_pSerializer->singleElementNS(XML_a, XML_off,
XML_x, "0",
XML_y, "0",
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 57255088..226dc5c 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1820,9 +1820,9 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
if (xSInfo->supportsService("com.sun.star.text.TextFrame"))
{
// Extract the special "btLr text frame" mode, requested by oox, if needed.
- uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapePropertySet(xShape, uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aGrabBag;
- xPropertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag;
+ xShapePropertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag;
for (int i = 0; i < aGrabBag.getLength(); ++i)
{
if (aGrabBag[i].Name == "mso-layout-flow-alt")
@@ -1835,6 +1835,10 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
uno::Reference<text::XTextContent> xTextContent(xShape, uno::UNO_QUERY_THROW);
uno::Reference<text::XTextRange> xTextRange(xTextAppend->createTextCursorByRange(xTextAppend->getEnd()), uno::UNO_QUERY_THROW);
xTextAppend->insertTextContent(xTextRange, xTextContent, sal_False);
+
+ uno::Reference<beans::XPropertySet> xPropertySet(xTextContent, uno::UNO_QUERY);
+ // we need to re-set this value to xTextContent, then only values are preserved.
+ xPropertySet->setPropertyValue("FrameInteropGrabBag",uno::makeAny(aGrabBag));
}
else if (nAnchorType != text::TextContentAnchorType_AS_CHARACTER)
{
commit c7a075b3c79afdb42704a4a0d9e2b027d8751fb6
Author: Vinaya Mandke <vinaya.mandke at synerzip.com>
Date: Wed Jan 8 18:54:51 2014 +0530
fdo#65833 Fix to preserve VML Canvas Information
Grab-bagged the "editas" attribute of v:group and added UT for
the same
Please verify this fix on MS Office 2007 as it renders the mc:Fallback VML part
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7335
Change-Id: I4e4456997621089967514009005ee775b71d6d69
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 782dcfc..129831e 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -5081,6 +5081,11 @@ void EscherEx::ReplacePersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset )
PtReplace( ESCHER_Persist_PrivateEntry | nKey, nOffset );
}
+void EscherEx::SetEditAs( OUString rEditAs )
+{
+ mEditAs = rEditAs;
+}
+
sal_uInt32 EscherEx::GetPersistOffset( sal_uInt32 nKey )
{
return PtGetOffsetByID( ESCHER_Persist_PrivateEntry | nKey );
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 16311df..fa697ee 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -191,6 +191,30 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( const SdrObject* pSdrObj = rObj.GetSdrObject() )
if (!pSdrObj->GetName().isEmpty())
aShapeName = pSdrObj->GetName();
+ uno::Reference< drawing::XShape> mXShape(rObj.GetShapeRef(), uno::UNO_QUERY);
+ if (mXShape.is())
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(mXShape, uno::UNO_QUERY);
+ if (xPropertySet.is())
+ {
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ uno::Reference< XPropertySetInfo > xPropInfo = xPropertySet->getPropertySetInfo();
+ if ( xPropInfo.is() && xPropInfo->hasPropertyByName( "InteropGrabBag" ) )
+ {
+ xPropertySet->getPropertyValue( "InteropGrabBag" ) >>= aGrabBag;
+ for (int i=0; i< aGrabBag.getLength(); i++)
+ {
+ if (aGrabBag[i].Name == "mso-edit-as")
+ {
+ OUString rEditAs;
+ aGrabBag[i].Value >>= rEditAs;
+ mpEscherEx->SetEditAs(rEditAs);
+ break;
+ }
+ }
+ }
+ }
+ }
Point aTextRefPoint;
diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx
index e24996c..d69e49d 100644
--- a/include/filter/msfilter/escherex.hxx
+++ b/include/filter/msfilter/escherex.hxx
@@ -1588,6 +1588,7 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable
sal_Bool mbEscherDg;
sal_Bool mbOleEmf; // OLE is EMF instead of WMF
bool mbOOXML;
+ OUString mEditAs;
virtual sal_Bool DoSeek( sal_uInt32 nKey );
@@ -1643,7 +1644,8 @@ public:
sal_Bool SeekToPersistOffset( sal_uInt32 nKey );
virtual sal_Bool InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ); // nValue is being inserted into the Stream where it's appropriate (overwrite modus), without that the
// current StreamPosition changes
-
+ void SetEditAs( OUString rEditAs );
+ rtl::OUString GetEditAs() { return mEditAs; }
SvStream& GetStream() const { return *mpOutStrm; }
sal_uLong GetStreamPos() const { return mpOutStrm->Tell(); }
diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx
index 876ff7b..bc7bf29 100644
--- a/include/oox/export/vmlexport.hxx
+++ b/include/oox/export/vmlexport.hxx
@@ -133,7 +133,7 @@ private:
void AddLineDimensions( const Rectangle& rRectangle );
/// Add position and size to the OStringBuffer.
- void AddRectangleDimensions( OStringBuffer& rBuffer, const Rectangle& rRectangle );
+ void AddRectangleDimensions( OStringBuffer& rBuffer, const Rectangle& rRectangle, sal_Bool rbAbsolutePos = true );
};
} // namespace vml
diff --git a/include/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx
index fcfb967..e45c87d 100644
--- a/include/oox/vml/vmlshape.hxx
+++ b/include/oox/vml/vmlshape.hxx
@@ -84,6 +84,7 @@ struct OOX_DLLPUBLIC ShapeTypeModel
sal_Bool mbVisible; ///< Visible or Hidden
OUString maWrapStyle; ///< Wrapping mode for text.
OUString maArcsize; ///< round rectangles arc size
+ OUString maEditAs; ///< Edit As type (e.g. "canvas" etc)
StrokeModel maStrokeModel; ///< Border line formatting.
FillModel maFillModel; ///< Shape fill formatting.
@@ -205,6 +206,7 @@ struct ShapeModel
OUString maControl1; ///< Bezier control point 1
OUString maControl2; ///< Bezier control point 2
OUString maVmlPath; ///< VML path for this shape
+ OUString maEditAs; ///< VML EditAs for shape
explicit ShapeModel();
~ShapeModel();
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index c594cd5..85003b7 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -129,9 +129,18 @@ sal_uInt32 VMLExport::EnterGroup( const OUString& rShapeName, const Rectangle* p
if ( rShapeName.getLength() )
pAttrList->add( XML_alt, OUStringToOString( rShapeName, RTL_TEXTENCODING_UTF8 ) );
+ sal_Bool rbAbsolutePos = true;
+ //editAs
+ OUString rEditAs = EscherEx::GetEditAs();
+ if (!rEditAs.isEmpty())
+ {
+ pAttrList->add(XML_editas, OUStringToOString( rEditAs, RTL_TEXTENCODING_UTF8 ));
+ rbAbsolutePos = false;
+ }
+
// style
if ( pRect )
- AddRectangleDimensions( aStyle, *pRect );
+ AddRectangleDimensions( aStyle, *pRect, rbAbsolutePos );
if ( !aStyle.isEmpty() )
pAttrList->add( XML_style, aStyle.makeStringAndClear() );
@@ -844,12 +853,15 @@ void VMLExport::AddLineDimensions( const Rectangle& rRectangle )
.makeStringAndClear() );
}
-void VMLExport::AddRectangleDimensions( OStringBuffer& rBuffer, const Rectangle& rRectangle )
+void VMLExport::AddRectangleDimensions( OStringBuffer& rBuffer, const Rectangle& rRectangle, sal_Bool rbAbsolutePos)
{
if ( !rBuffer.isEmpty() )
rBuffer.append( ";" );
- rBuffer.append( "position:absolute;" );
+ if (rbAbsolutePos)
+ {
+ rBuffer.append( "position:absolute;" );
+ }
if ( mnGroupLevel == 1 )
{
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 731931d..31828db 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -1068,6 +1068,28 @@ Reference< XShape > GroupShape::implConvertAndInsert( const Reference< XShapes >
catch( Exception& )
{
}
+
+ if (!maTypeModel.maEditAs.isEmpty())
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(xGroupShape, uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ xPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ beans::PropertyValue aPair;
+ aPair.Name = "mso-edit-as";
+ aPair.Value = uno::makeAny(maTypeModel.maEditAs);
+ if (aGrabBag.hasElements())
+ {
+ sal_Int32 nLength = aGrabBag.getLength();
+ aGrabBag.realloc(nLength + 1);
+ aGrabBag[nLength] = aPair;
+ }
+ else
+ {
+ aGrabBag.realloc(1);
+ aGrabBag[0] = aPair;
+ }
+ xPropertySet->setPropertyValue("InteropGrabBag", uno::makeAny(aGrabBag));
+ }
// Make sure group shapes are inline as well, unless there is an explicit different style.
PropertySet aPropertySet(xGroupShape);
lcl_SetAnchorType(aPropertySet, maTypeModel);
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index 95c98a2..9e51e2a 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -312,6 +312,8 @@ ShapeTypeContext::ShapeTypeContext( ContextHandler2Helper& rParent, ShapeType& r
// For roundrect we may have a arcsize attribute to read
mrTypeModel.maArcsize = rAttribs.getString( XML_arcsize,OUString( ) );
+ // editas
+ mrTypeModel.maEditAs = rAttribs.getString(XML_editas, OUString());
}
ContextHandlerRef ShapeTypeContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
diff --git a/sw/qa/extras/ooxmlexport/data/fdo65833.docx b/sw/qa/extras/ooxmlexport/data/fdo65833.docx
new file mode 100644
index 0000000..097015e
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo65833.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 7727bc1..46488de 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2394,6 +2394,16 @@ DECLARE_OOXMLEXPORT_TEST(testPreserveXfieldTOC, "PreserveXfieldTOC.docx")
OUString contents = OUString::createFromAscii((const char*)((pXmlNode->children[0]).content));
CPPUNIT_ASSERT(contents.match(" TOC \\x \\f \\o \"1-3\" \\h"));
}
+
+DECLARE_OOXMLEXPORT_TEST(testFdo65833, "fdo65833.docx")
+{
+ // The "editas" attribute for vml group shape was not preserved.
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:group", "editas", "canvas");
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
commit cceaf00a034850f209add1b8288fca579c877a36
Author: Adam Co <rattles2013 at gmail.com>
Date: Mon Jan 13 17:58:25 2014 +0200
Renamed 'SwRedline' to 'SwRangeRedline'
This is in preparation to adding more types of 'SwRedlines'.
Change-Id: Id61217ed3c4622f7689427ea9f30e364f6bb65d1
Reviewed-on: https://gerrit.libreoffice.org/7410
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx
index ddea588..8125717 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -27,7 +27,7 @@
#include <com/sun/star/uno/Sequence.hxx>
- class SwRedline;
+ class SwRangeRedline;
class SwRedlineTbl;
class SwPaM;
struct SwPosition;
@@ -141,7 +141,7 @@ public:
@returns
*/
- virtual bool AppendRedline(/*[in]*/SwRedline* pPtr, /*[in]*/bool bCallDelete) = 0;
+ virtual bool AppendRedline(/*[in]*/SwRangeRedline* pPtr, /*[in]*/bool bCallDelete) = 0;
virtual bool SplitRedline(/*[in]*/const SwPaM& rPam) = 0;
@@ -161,7 +161,7 @@ public:
virtual void CompressRedlines() = 0;
- virtual const SwRedline* GetRedline(
+ virtual const SwRangeRedline* GetRedline(
/*[in]*/const SwPosition& rPos,
/*[in]*/sal_uInt16* pFndPos) const = 0;
@@ -177,9 +177,9 @@ public:
virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) = 0;
- virtual const SwRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const = 0;
+ virtual const SwRangeRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const = 0;
- virtual const SwRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const = 0;
+ virtual const SwRangeRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const = 0;
// Representation has changed, invalidate all Redlines.
virtual void UpdateRedlineAttr() = 0;
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 160ae4d..cfb409f 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -60,7 +60,7 @@ class SwFmtINetFmt;
class SwTxtAttr;
class SwTableBox;
class SwTOXMark;
-class SwRedline;
+class SwRangeRedline;
class IBlockCursor;
class SwCntntNode;
class SwPostItField;
@@ -108,7 +108,7 @@ struct SwContentAtPos
union {
const SwField* pFld;
const SfxPoolItem* pAttr;
- const SwRedline* pRedl;
+ const SwRangeRedline* pRedl;
SwCntntNode * pNode;
const sw::mark::IFieldmark* pFldmark;
} aFnd;
@@ -263,7 +263,7 @@ private:
typedef sal_Bool (SwCursor:: *FNCrsr)();
SW_DLLPRIVATE sal_Bool CallCrsrFN( FNCrsr );
- SW_DLLPRIVATE const SwRedline* _GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect );
+ SW_DLLPRIVATE const SwRangeRedline* _GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect );
protected:
@@ -817,9 +817,9 @@ public:
SwRect& rRect, short& rOrient );
sal_Bool SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode );
- const SwRedline* SelNextRedline();
- const SwRedline* SelPrevRedline();
- const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False );
+ const SwRangeRedline* SelNextRedline();
+ const SwRangeRedline* SelPrevRedline();
+ const SwRangeRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False );
// is cursor or the point in/over a vertical formatted text?
bool IsInVerticalText( const Point* pPt = 0 ) const;
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index de4487c..4f2bea9 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -142,7 +142,7 @@ class SwNumRule;
class SwNumRuleTbl;
class SwPageDesc;
class SwPagePreviewPrtData;
-class SwRedline;
+class SwRangeRedline;
class SwRedlineTbl;
class SwRootFrm;
class SwRubyList;
@@ -767,21 +767,21 @@ public:
virtual bool IsIgnoreRedline() const;
virtual bool IsInRedlines(const SwNode& rNode) const;
virtual const SwRedlineTbl& GetRedlineTbl() const;
- virtual bool AppendRedline(/*[in]*/SwRedline* pPtr, /*[in]*/bool bCallDelete);
+ virtual bool AppendRedline(/*[in]*/SwRangeRedline* pPtr, /*[in]*/bool bCallDelete);
virtual bool SplitRedline(const SwPaM& rPam);
virtual bool DeleteRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bSaveInUndo, /*[in]*/sal_uInt16 nDelType);
virtual bool DeleteRedline(/*[in]*/const SwStartNode& rSection, /*[in]*/bool bSaveInUndo, /*[in]*/sal_uInt16 nDelType);
virtual sal_uInt16 GetRedlinePos(/*[in]*/const SwNode& rNode, /*[in]*/sal_uInt16 nType) const;
virtual void CompressRedlines();
- virtual const SwRedline* GetRedline(/*[in]*/const SwPosition& rPos, /*[in]*/sal_uInt16* pFndPos) const;
+ virtual const SwRangeRedline* GetRedline(/*[in]*/const SwPosition& rPos, /*[in]*/sal_uInt16* pFndPos) const;
virtual bool IsRedlineMove() const;
virtual void SetRedlineMove(/*[in]*/bool bFlag);
virtual bool AcceptRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete);
virtual bool AcceptRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete);
virtual bool RejectRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete);
virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete);
- virtual const SwRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const;
- virtual const SwRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const;
+ virtual const SwRangeRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const;
+ virtual const SwRangeRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const;
virtual void UpdateRedlineAttr();
virtual sal_uInt16 GetRedlineAuthor();
virtual sal_uInt16 InsertRedlineAuthor(const OUString& rAuthor);
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index 8927cde..ea868e8 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -33,7 +33,7 @@ class SwTOXType;
class SwUndo;
class SwSectionFmt;
class SwNumRule;
-class SwRedline;
+class SwRangeRedline;
class SwUnoCrsr;
class SwOLENode;
class SwTxtFmtColl;
@@ -140,10 +140,10 @@ public:
struct CompareSwRedlineTbl
{
- bool operator()(SwRedline* const &lhs, SwRedline* const &rhs) const;
+ bool operator()(SwRangeRedline* const &lhs, SwRangeRedline* const &rhs) const;
};
class _SwRedlineTbl
- : public o3tl::sorted_vector<SwRedline*, CompareSwRedlineTbl,
+ : public o3tl::sorted_vector<SwRangeRedline*, CompareSwRedlineTbl,
o3tl::find_partialorder_ptrequals>
{
public:
@@ -153,15 +153,15 @@ public:
class SwRedlineTbl : private _SwRedlineTbl
{
public:
- bool Contains(const SwRedline* p) const { return find(const_cast<SwRedline* const>(p)) != end(); }
- sal_uInt16 GetPos(const SwRedline* p) const;
+ bool Contains(const SwRangeRedline* p) const { return find(const_cast<SwRangeRedline* const>(p)) != end(); }
+ sal_uInt16 GetPos(const SwRangeRedline* p) const;
- bool Insert( SwRedline* p, bool bIns = true );
- bool Insert( SwRedline* p, sal_uInt16& rInsPos, bool bIns = true );
- bool InsertWithValidRanges( SwRedline* p, sal_uInt16* pInsPos = 0 );
+ bool Insert( SwRangeRedline* p, bool bIns = true );
+ bool Insert( SwRangeRedline* p, sal_uInt16& rInsPos, bool bIns = true );
+ bool InsertWithValidRanges( SwRangeRedline* p, sal_uInt16* pInsPos = 0 );
void Remove( sal_uInt16 nPos );
- bool Remove( const SwRedline* p );
+ bool Remove( const SwRangeRedline* p );
void DeleteAndDestroy( sal_uInt16 nPos, sal_uInt16 nLen = 1 );
void DeleteAndDestroyAll();
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 9991fd0..eebd616 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -86,7 +86,7 @@ class SwTxtINetFmt;
class SwSeqFldList;
class SwGlblDocContent;
class SwGlblDocContents;
-class SwRedline;
+class SwRangeRedline;
class SwRedlineData;
class SwFtnInfo;
class SwEndNoteInfo;
@@ -891,7 +891,7 @@ public:
void SetRedlineMode( sal_uInt16 eMode );
sal_Bool IsRedlineOn() const;
sal_uInt16 GetRedlineCount() const;
- const SwRedline& GetRedline( sal_uInt16 nPos ) const;
+ const SwRangeRedline& GetRedline( sal_uInt16 nPos ) const;
sal_Bool AcceptRedline( sal_uInt16 nPos );
sal_Bool RejectRedline( sal_uInt16 nPos );
@@ -903,7 +903,7 @@ public:
/// Set comment to Redline at position.
sal_Bool SetRedlineComment( const OUString& rS );
- const SwRedline* GetCurrRedline() const;
+ const SwRangeRedline* GetCurrRedline() const;
/// Redline attributes have been changed. Updated views.
void UpdateRedlineAttr();
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index ff84272..7895d61 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -105,7 +105,7 @@ public:
class SW_DLLPUBLIC SwRedlineData
{
- friend class SwRedline;
+ friend class SwRangeRedline;
SwRedlineData* pNext; // Points to other data.
SwRedlineExtraData* pExtraData;
@@ -181,7 +181,7 @@ public:
};
-class SW_DLLPUBLIC SwRedline : public SwPaM
+class SW_DLLPUBLIC SwRangeRedline : public SwPaM
{
SwRedlineData* pRedlineData;
SwNodeIndex* pCntntSect;
@@ -195,17 +195,17 @@ class SW_DLLPUBLIC SwRedline : public SwPaM
void MoveFromSection();
public:
- SwRedline( RedlineType_t eType, const SwPaM& rPam );
- SwRedline( const SwRedlineData& rData, const SwPaM& rPam );
- SwRedline( const SwRedlineData& rData, const SwPosition& rPos );
+ SwRangeRedline( RedlineType_t eType, const SwPaM& rPam );
+ SwRangeRedline( const SwRedlineData& rData, const SwPaM& rPam );
+ SwRangeRedline( const SwRedlineData& rData, const SwPosition& rPos );
// For sw3io: pData is taken over!
- SwRedline(SwRedlineData* pData, const SwPosition& rPos, sal_Bool bVsbl,
+ SwRangeRedline(SwRedlineData* pData, const SwPosition& rPos, sal_Bool bVsbl,
sal_Bool bDelLP, sal_Bool bIsPD) :
SwPaM( rPos ), pRedlineData( pData ), pCntntSect( 0 ),
bDelLastPara( bDelLP ), bIsLastParaDelete( bIsPD ), bIsVisible( bVsbl )
{}
- SwRedline( const SwRedline& );
- virtual ~SwRedline();
+ SwRangeRedline( const SwRangeRedline& );
+ virtual ~SwRangeRedline();
SwNodeIndex* GetContentIdx() const { return pCntntSect; }
// For Undo.
@@ -275,11 +275,11 @@ public:
/// Initiate the layout.
void InvalidateRange();
- sal_Bool IsOwnRedline( const SwRedline& rRedl ) const
+ sal_Bool IsOwnRedline( const SwRangeRedline& rRedl ) const
{ return GetAuthor() == rRedl.GetAuthor(); }
- sal_Bool CanCombine( const SwRedline& rRedl ) const;
+ sal_Bool CanCombine( const SwRangeRedline& rRedl ) const;
- void PushData( const SwRedline& rRedl, sal_Bool bOwnAsNext = sal_True );
+ void PushData( const SwRangeRedline& rRedl, sal_Bool bOwnAsNext = sal_True );
sal_Bool PopData();
/**
@@ -295,8 +295,8 @@ public:
*/
OUString GetDescr(sal_uInt16 nPos = 0);
- int operator==( const SwRedline& ) const;
- int operator<( const SwRedline& ) const;
+ int operator==( const SwRangeRedline& ) const;
+ int operator<( const SwRangeRedline& ) const;
};
class SW_DLLPUBLIC SwRedlineHint : public SfxHint
@@ -307,19 +307,19 @@ class SW_DLLPUBLIC SwRedlineHint : public SfxHint
#define SWREDLINE_CHANGED 4
#define SWREDLINE_LANGUAGE 5
- const SwRedline* pRedline;
+ const SwRangeRedline* pRedline;
sal_Int16 nWhich;
const SwView* pView;
public:
- SwRedlineHint( const SwRedline* p, sal_Int16 n, const SwView* pV = 0)
+ SwRedlineHint( const SwRangeRedline* p, sal_Int16 n, const SwView* pV = 0)
: pRedline(p)
, nWhich(n)
, pView(pV)
{}
TYPEINFO();
- const SwRedline* GetRedline() const { return pRedline; }
+ const SwRangeRedline* GetRedline() const { return pRedline; }
sal_Int16 Which() const { return nWhich; }
const SwView* GetView() const { return pView; }
};
diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx
index 25d2e79..4ef2690 100644
--- a/sw/inc/unoredline.hxx
+++ b/sw/inc/unoredline.hxx
@@ -22,7 +22,7 @@
#include <unotext.hxx>
-class SwRedline;
+class SwRangeRedline;
/**
* SwXRedlineText provides an XText which may be used to write
@@ -71,9 +71,9 @@ class SwXRedline :
public SwClient
{
SwDoc* pDoc;
- SwRedline* pRedline;
+ SwRangeRedline* pRedline;
public:
- SwXRedline(SwRedline& rRedline, SwDoc& rDoc);
+ SwXRedline(SwRangeRedline& rRedline, SwDoc& rDoc);
~SwXRedline();
TYPEINFO();
@@ -105,7 +105,7 @@ public:
virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
- const SwRedline* GetRedline() const {return pRedline;}
+ const SwRangeRedline* GetRedline() const {return pRedline;}
protected:
//SwClient
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx
index ed2595a..ea2527d 100644
--- a/sw/inc/unoredlines.hxx
+++ b/sw/inc/unoredlines.hxx
@@ -23,7 +23,7 @@
#include <unobaseclass.hxx>
#include <com/sun/star/container/XEnumerationAccess.hpp>
-class SwRedline;
+class SwRangeRedline;
namespace com{ namespace sun{ namespace star{
namespace beans{
class XPropertySet;
@@ -62,7 +62,7 @@ public:
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
- static ::com::sun::star::beans::XPropertySet* GetObject( SwRedline& rRedline, SwDoc& rDoc );
+ static ::com::sun::star::beans::XPropertySet* GetObject( SwRangeRedline& rRedline, SwDoc& rDoc );
};
class SwXRedlineEnumeration
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index b629d42..6f23da1 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -715,9 +715,9 @@ short SwAccessibleParagraph::GetTOCLevel()
}
//the function is to check whether the position is in a redline range.
-const SwRedline* SwAccessibleParagraph::GetRedlineAtIndex( sal_Int32 )
+const SwRangeRedline* SwAccessibleParagraph::GetRedlineAtIndex( sal_Int32 )
{
- const SwRedline* pRedline = NULL;
+ const SwRangeRedline* pRedline = NULL;
SwPaM* pCrSr = GetCursor( true );
if ( pCrSr )
{
@@ -2285,7 +2285,7 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex,
{
PropertyValue ChangeAttr, ChangeAttrColor;
- const SwRedline* pRedline = GetRedlineAtIndex( nIndex );
+ const SwRangeRedline* pRedline = GetRedlineAtIndex( nIndex );
if ( pRedline )
{
diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx
index 37e7607..ff02bb3 100644
--- a/sw/source/core/access/accpara.hxx
+++ b/sw/source/core/access/accpara.hxx
@@ -39,7 +39,7 @@ class SwTxtNode;
class SwPaM;
class SwAccessiblePortionData;
class SwAccessibleHyperTextData;
-class SwRedline;
+class SwRangeRedline;
class SwXTextPortion;
class SwParaChangeTrackingInfo; //#i108125#
@@ -139,7 +139,7 @@ class SwAccessibleParagraph :
}
}
- const SwRedline* GetRedlineAtIndex( sal_Int32 nPos );
+ const SwRangeRedline* GetRedlineAtIndex( sal_Int32 nPos );
OUString GetFieldTypeNameAtIndex(sal_Int32 nIndex);
// #i63870#
diff --git a/sw/source/core/access/parachangetrackinginfo.cxx b/sw/source/core/access/parachangetrackinginfo.cxx
index b76d9d3..0ad7a77 100644
--- a/sw/source/core/access/parachangetrackinginfo.cxx
+++ b/sw/source/core/access/parachangetrackinginfo.cxx
@@ -83,7 +83,7 @@ namespace {
nActRedline < nRedlineCount;
++nActRedline)
{
- const SwRedline* pActRedline = rRedlineTbl[ nActRedline ];
+ const SwRangeRedline* pActRedline = rRedlineTbl[ nActRedline ];
if ( pActRedline->Start()->nNode > rTxtNode.GetIndex() )
{
break;
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 1d5f42e..724b5ce 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1451,7 +1451,7 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
if( !bRet && SwContentAtPos::SW_REDLINE & rCntntAtPos.eCntntAtPos )
{
- const SwRedline* pRedl = GetDoc()->GetRedline(aPos, NULL);
+ const SwRangeRedline* pRedl = GetDoc()->GetRedline(aPos, NULL);
if( pRedl )
{
rCntntAtPos.aFnd.pRedl = pRedl;
@@ -1974,9 +1974,9 @@ sal_Bool SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
return bRet;
}
-const SwRedline* SwCrsrShell::SelNextRedline()
+const SwRangeRedline* SwCrsrShell::SelNextRedline()
{
- const SwRedline* pFnd = 0;
+ const SwRangeRedline* pFnd = 0;
if( !IsTableMode() )
{
SET_CURR_SHELL( this );
@@ -1992,9 +1992,9 @@ const SwRedline* SwCrsrShell::SelNextRedline()
return pFnd;
}
-const SwRedline* SwCrsrShell::SelPrevRedline()
+const SwRangeRedline* SwCrsrShell::SelPrevRedline()
{
- const SwRedline* pFnd = 0;
+ const SwRangeRedline* pFnd = 0;
if( !IsTableMode() )
{
SET_CURR_SHELL( this );
@@ -2010,9 +2010,9 @@ const SwRedline* SwCrsrShell::SelPrevRedline()
return pFnd;
}
-const SwRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect )
+const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect )
{
- const SwRedline* pFnd = 0;
+ const SwRangeRedline* pFnd = 0;
SwCallLink aLk( *this ); // watch Crsr-Moves
SwCrsrSaveState aSaveState( *m_pCurCrsr );
@@ -2078,15 +2078,15 @@ const SwRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect
return pFnd;
}
-const SwRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect )
+const SwRangeRedline* SwCrsrShell::GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect )
{
- const SwRedline* pFnd = 0;
+ const SwRangeRedline* pFnd = 0;
if( !IsTableMode() )
{
SET_CURR_SHELL( this );
const SwRedlineTbl& rTbl = GetDoc()->GetRedlineTbl();
- const SwRedline* pTmp = rTbl[ nArrPos ];
+ const SwRangeRedline* pTmp = rTbl[ nArrPos ];
sal_uInt16 nSeqNo = pTmp->GetSeqNo();
if( nSeqNo && bSelect )
{
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 20e3655..8c1e282 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1403,7 +1403,7 @@ static OUString lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd )
sal_uInt16 nAct = rDoc.GetRedlinePos( *pTxtNd, USHRT_MAX );
for ( ; nAct < rDoc.GetRedlineTbl().size(); nAct++ )
{
- const SwRedline* pRed = rDoc.GetRedlineTbl()[ nAct ];
+ const SwRangeRedline* pRed = rDoc.GetRedlineTbl()[ nAct ];
if ( pRed->Start()->nNode > pTxtNd->GetIndex() )
break;
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index b5603fd..7e85132 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -874,7 +874,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
aPam.SetMark();
aPam.Move( fnMoveBackward );
if( IsRedlineOn() )
- AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+ AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
else
SplitRedline( aPam );
}
@@ -912,7 +912,7 @@ bool SwDoc::AppendTxtNode( SwPosition& rPos )
aPam.SetMark();
aPam.Move( fnMoveBackward );
if( IsRedlineOn() )
- AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+ AppendRedline( new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
else
SplitRedline( aPam );
}
@@ -1004,7 +1004,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const OUString &rStr,
if( IsRedlineOn() )
{
AppendRedline(
- new SwRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
+ new SwRangeRedline( nsRedlineType_t::REDLINE_INSERT, aPam ), true);
}
else
{
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index e914069..224fae1 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1325,7 +1325,7 @@ void _DelBookmarks(
for(sal_uInt16 nCnt = 0; nCnt < rTbl.size(); ++nCnt )
{
// Is at position?
- SwRedline* pRedl = rTbl[ nCnt ];
+ SwRangeRedline* pRedl = rTbl[ nCnt ];
SwPosition *pRStt = &pRedl->GetBound(sal_True),
*pREnd = &pRedl->GetBound(sal_False);
@@ -1430,7 +1430,7 @@ void _SaveCntntIdx(SwDoc* pDoc,
const SwRedlineTbl& rRedlTbl = pDoc->GetRedlineTbl();
for( ; aSave.GetCount() < rRedlTbl.size(); aSave.IncCount() )
{
- const SwRedline* pRdl = rRedlTbl[ aSave.GetCount() ];
+ const SwRangeRedline* pRdl = rRedlTbl[ aSave.GetCount() ];
int nPointPos = lcl_RelativePosition( *pRdl->GetPoint(), nNode, nCntnt );
int nMarkPos = pRdl->HasMark() ? lcl_RelativePosition( *pRdl->GetMark(), nNode, nCntnt ) :
nPointPos;
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 0ae219b..12d5bb9 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1687,7 +1687,7 @@ void SwCompareData::SetRedlinesToDoc( sal_Bool bUseDocInfo )
SwUndo *const pUndo(new SwUndoCompDoc( *pTmp, sal_False )) ;
rDoc.GetIDocumentUndoRedo().AppendUndo(pUndo);
}
- rDoc.AppendRedline( new SwRedline( aRedlnData, *pTmp ), true );
+ rDoc.AppendRedline( new SwRangeRedline( aRedlnData, *pTmp ), true );
} while( pDelRing != ( pTmp = (SwPaM*)pTmp->GetNext() ));
}
@@ -1749,7 +1749,7 @@ void SwCompareData::SetRedlinesToDoc( sal_Bool bUseDocInfo )
}
do {
- if( rDoc.AppendRedline( new SwRedline( aRedlnData, *pTmp ), true) &&
+ if( rDoc.AppendRedline( new SwRangeRedline( aRedlnData, *pTmp ), true) &&
rDoc.GetIDocumentUndoRedo().DoesUndo())
{
SwUndo *const pUndo(new SwUndoCompDoc( *pTmp, sal_True ));
@@ -1828,18 +1828,18 @@ long SwDoc::CompareDoc( const SwDoc& rDoc )
class _SaveMergeRedlines : public Ring
{
- const SwRedline* pSrcRedl;
- SwRedline* pDestRedl;
+ const SwRangeRedline* pSrcRedl;
+ SwRangeRedline* pDestRedl;
public:
_SaveMergeRedlines( const SwNode& rDstNd,
- const SwRedline& rSrcRedl, Ring* pRing );
+ const SwRangeRedline& rSrcRedl, Ring* pRing );
sal_uInt16 InsertRedline();
- SwRedline* GetDestRedline() { return pDestRedl; }
+ SwRangeRedline* GetDestRedline() { return pDestRedl; }
};
_SaveMergeRedlines::_SaveMergeRedlines( const SwNode& rDstNd,
- const SwRedline& rSrcRedl, Ring* pRing )
+ const SwRangeRedline& rSrcRedl, Ring* pRing )
: Ring( pRing ), pSrcRedl( &rSrcRedl )
{
SwPosition aPos( rDstNd );
@@ -1847,7 +1847,7 @@ _SaveMergeRedlines::_SaveMergeRedlines( const SwNode& rDstNd,
const SwPosition* pStt = rSrcRedl.Start();
if( rDstNd.IsCntntNode() )
aPos.nContent.Assign( ((SwCntntNode*)&rDstNd), pStt->nContent.GetIndex() );
- pDestRedl = new SwRedline( rSrcRedl.GetRedlineData(), aPos );
+ pDestRedl = new SwRangeRedline( rSrcRedl.GetRedlineData(), aPos );
if( nsRedlineType_t::REDLINE_DELETE == pDestRedl->GetType() )
{
@@ -1914,7 +1914,7 @@ sal_uInt16 _SaveMergeRedlines::InsertRedline()
const SwRedlineTbl& rRedlineTbl = pDoc->GetRedlineTbl();
for( ; n < rRedlineTbl.size(); ++n )
{
- SwRedline* pRedl = rRedlineTbl[ n ];
+ SwRangeRedline* pRedl = rRedlineTbl[ n ];
SwPosition* pRStt = pRedl->Start(),
* pREnd = pRStt == pRedl->GetPoint() ? pRedl->GetMark()
: pRedl->GetPoint();
@@ -1940,7 +1940,7 @@ sal_uInt16 _SaveMergeRedlines::InsertRedline()
case POS_OUTSIDE:
{
- SwRedline* pCpyRedl = new SwRedline(
+ SwRangeRedline* pCpyRedl = new SwRangeRedline(
pDestRedl->GetRedlineData(), *pDStt );
pCpyRedl->SetMark();
*pCpyRedl->GetPoint() = *pRStt;
@@ -2033,7 +2033,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
sal_uLong nMyEndOfExtra = GetNodes().GetEndOfExtras().GetIndex();
for( sal_uInt16 n = 0; n < rSrcRedlTbl.size(); ++n )
{
- const SwRedline* pRedl = rSrcRedlTbl[ n ];
+ const SwRangeRedline* pRedl = rSrcRedlTbl[ n ];
sal_uLong nNd = pRedl->GetPoint()->nNode.GetIndex();
RedlineType_t eType = pRedl->GetType();
if( nEndOfExtra < nNd &&
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index 6f8b07d..03aa3b3 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -192,7 +192,7 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode,
for (sal_uInt16 n = 0; n < rTbl.size(); )
{
// is on position ??
- SwRedline *const pRedline( rTbl[ n ] );
+ SwRangeRedline *const pRedline( rTbl[ n ] );
bool const bChanged =
lcl_PaMCorrAbs(*pRedline, *aPam.Start(), *aPam.End(), aNewPos);
// clean up empty redlines: docredln.cxx asserts these as invalid
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 4a4ad17..fdba68e 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -54,12 +54,12 @@ using namespace ::com::sun::star::i18n;
struct _SaveRedline
{
- SwRedline* pRedl;
+ SwRangeRedline* pRedl;
sal_uInt32 nStt, nEnd;
sal_Int32 nSttCnt;
sal_Int32 nEndCnt;
- _SaveRedline( SwRedline* pR, const SwNodeIndex& rSttIdx )
+ _SaveRedline( SwRangeRedline* pR, const SwNodeIndex& rSttIdx )
: pRedl( pR )
{
const SwPosition* pStt = pR->Start(),
@@ -79,7 +79,7 @@ struct _SaveRedline
pRedl->GetMark()->nContent.Assign( 0, 0 );
}
- _SaveRedline( SwRedline* pR, const SwPosition& rPos )
+ _SaveRedline( SwRangeRedline* pR, const SwPosition& rPos )
: pRedl( pR )
{
const SwPosition* pStt = pR->Start(),
@@ -465,7 +465,7 @@ static void lcl_SaveRedlines( const SwPaM& aPam, _SaveRedlines& rArr )
SwRedlineTbl& rRedlineTable = const_cast<SwRedlineTbl&>( pDoc->GetRedlineTbl() );
for( ; nCurrentRedline < rRedlineTable.size(); nCurrentRedline++ )
{
- SwRedline* pCurrent = rRedlineTable[ nCurrentRedline ];
+ SwRangeRedline* pCurrent = rRedlineTable[ nCurrentRedline ];
SwComparePosition eCompare =
ComparePosition( *pCurrent->Start(), *pCurrent->End(),
*pStart, *pEnd);
@@ -484,7 +484,7 @@ static void lcl_SaveRedlines( const SwPaM& aPam, _SaveRedlines& rArr )
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list