The problem was the following: setPropertyValue("IsAutoUpdate") on the
style failed -> a number of styles was not imported in
StyleSheetTable::ApplyStyleSheets() due to the exception, then when we
tried to use one of the not imported styles, we also got an exception in
DomainMapper_Impl::finishParagraph(), which resulted in not calling
DomainMapperTableManager::handle(), so multiple cells of the same table
wanted the same range for cell contents, and that resulted in a crash.
Regression from cf33af732ed0d3d553bb74636e3b14c55d44c153 (handle
w:gridBefore by faking cells (fdo#38414), 2014-04-23), but that commit
just made the previously hidden problem visible.
Change-Id: I788cb6b4a2c7b7efbfa48297c658bb26450bf583
The exporter already handled TextFrames inside TextFrames, a feature
supported by Writer, and not by Word.
Similarly, if DocxSdrExport::writeDMLAndVMLDrawing() starts a shape,
then anchored TextFrames should be posponed till the end of that shape.
Change-Id: I597a8a46b1cf2348a8ccb9af668ea5afab27541b
A usual problem with SDT is that in case it should end after the last
paragrah of a container, there is no "next" paragraph that could have
the relevant "EndSdtBefore" property. This is usually handled by closing
the SDT tag before the container is closed.
The problem here was that DocxAttributeOutput::WriteSdtBlock() did not
notify DocxSdrExport about opening the SDT, as it thought there is no
draw export in progress. This is because in case of "shape with a
TextBox", the common writeDMLAndVMLDrawing() method is not called,
instead the separate writeDMLTextFrame() and writeVMLTextFrame() methods
are invoked.
Fix the problem by adjusting these methods to writeDMLAndVMLDrawing(),
so that they also set m_bDMLAndVMLDrawingOpen to true during the TextBox
export.
Change-Id: Ie08b0b955cd2d6a645970da3d485e447abfd6495
...signed/unsigned mismatch
In history this was sal_Long and then converted to sal_uLong, but the
test never got aligned.
Fix it by adding arbitrary element counts starting from 30.
old: getCount():
{-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9}
(With -5 silently converted to SAL_MAX_UINT32 - 5)
new: getCount():
{30,31,32,33,34,0,1,2,3,4,5,6,7,8,9}
Change-Id: Ic13678094c7bb4dcd122727f028c910513609cef
Into the new class DocumentFieldsManager.
Removed SwDoc::_MakeFldList because it is not defined anywhere.
Also moved a few non interface methods that belong to the manager.
Change-Id: Icefd7ca7adcbb05a18d6fae0529fc54150b862fd
Into the new class DocumentRedlineManager.
Added an non const version of GetRedlineTbl to the interface.
Also Moved SetAutoFmtRedlineComment which is not part of interface.
Change-Id: I600d5821d5d5831557f5fc5375fb1203fe67a295
SwXText::convertToTextFrame is called for a Para with FramePr.
convertToTextFrame in turn calls DelFullPara which throws an assert
as a few Bookmarks are still registered to the paragraph.
In MarkManager::correctMarksAbsolute, pMark->GetMarkPos().nNode.GetNode()
is checked if it is pOldNode, and then the Mark Position is shifted to aNewPos.
In the following condition pMark->GetOtherMarkPos().nNode.GetNode()
if it is the pOldNode, and still the Mark Position is changed.
However the Other Mark Position must be changed as now the Othe Mark is in pOldNode.
Change-Id: I4507f6b2906d33bc65c922fffe12db2110de651b
Reviewed-on: https://gerrit.libreoffice.org/10536
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Problem Description:
This issue is reproducible.
Step to reproduce :
1. Create .docx contains page break on first page.
2. Second page contains '&'(ampersand) with some character like 'x','z','#' etc.
3. Changes the size or font of '&character' which is on second page.
4. Precaution will be take all this i.e page break and '&character' contains in single paragraph'.
Solution:
Added a check for Context Type which must be CONTEXT_CHARACTER for deferring character.
Change-Id: I27989d2ca8d62fbd9efafe5ba7f4a65d56467c1e
Reviewed-on: https://gerrit.libreoffice.org/10532
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Luboš Luňák <l.lunak@collabora.com>
LO crashes while opening the document because PropertySet interface
is null and check for this condition was missing, so added the check.
Change-Id: I04dd873ea0923a662e27f9eb2013cde31edc912b
Reviewed-on: https://gerrit.libreoffice.org/10379
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Luboš Luňák <l.lunak@collabora.com>
For shapeType PictureFrame, a default CustomShape was created and then
RTFDocumentImpl::resolvePict() crashes because it actually operates on a
previous shape, because in this special case RTFSdrImport::m_xShape
is never actually set to the new shape, so contains the previous one.
Also the new shape needs to be added to the draw-page, at least
otherwise the assertion of the supported service fails because
some SvxShape::mpObj weak-reference is dead?
This essentially reverts commit 3cab1adf19d553663685e8198f0ec3f258a37c36
(except for the added testcase, which was slightly different because
it did not have a "pib" property).
(regression from ba9b63d8101197d3fd8612193b1ca188271dfc1a)
Change-Id: I6539c4286850dff2d8564006487cc765f1d117be
Into the new class DocumentContentOperationsManager.
Made SwNodes in sw/inc/ndarr.hxx friend class to
DocumentContentOperationsManager so it can call DelNodes at end of
DocumentContentOperationsManager::DeleteSection .
Added DeleteAutoCorrExceptWord to SwDoc, its needed in the Manager.
Added a non const version of SwDoc::GetDfltGrfFmtColl() to SwDoc
because its needed in the Manager.
Made SwDoc a friend class to DocumentContentOperationsManager so it
can call SwDoc::checkRedlining and SwDocL::_MakeFlySection.
Moved SwDoc::CopyImpl_ , SwDoc::CopyWithFlyInFly and
SwDoc::CopyFlyInFlyImpl into the Manager.
Moved "struct ParaRstFmt" and "lcl_RstTxtAttr" from docfmt.cxx
in DocumentContentOperationsManager.hxx .
Change-Id: Icaab57f4a8c158a85e549ecb4aacc752bc95bbc9
LO crashes while opening the issue file as, an extra Num Pic Bullets is
attached to the dummy para. All NumPicBullets were disposed in
dtor of ListsManager.
LO tries to remove dummy para after the section, while the pic bullet is still attached to it.
This causes Lo to crash while removing the paragraph.
Added a 'ListsManager::DisposeNumPicBullets( )' to remove the extra bullets from the document
Added the issue file in sw/qa/core/data/ooxml/pass/
Change-Id: I578f48364dcb4ff939fa3800e90db88a99d5ca1a
Reviewed-on: https://gerrit.libreoffice.org/9897
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
LO crashes while opening the issue file as, DomainMapper_Impl::RemoveLastParagraph
tries to dispose a paragraph which has bookmarks attached.
If A para finishes and a new para has not been started as yet,
which means the current cursor position is outside a paragraph. In such a case move the
Bookmark-End to the earlier paragraph.
Added the issue file in sw/qa/core/data/ooxml/pass/
Change-Id: I62cf94718add943d042d770ab5337a0dae70d9e8
Reviewed-on: https://gerrit.libreoffice.org/9764
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Find places where we are returning a pointer to something, where we can
be returning a reference.
e.g.
class A {
struct X x;
public X* getX() { return &x; }
}
which can be:
public X& getX() { return x; }
Change-Id: I796fd23fd36a18aedf6e36bc28f8fab4f518c6c7
Description:
- If the equation ends with two dots(.) then file get crash.
- In SmParser::NextToken()
the file get crash because string index is out of bound.
Change-Id: I5f25814220d556d53c10d4ca33a38b4d0d451438
Reviewed-on: https://gerrit.libreoffice.org/9840
Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com>
Tested-by: Muthu Subramanian K <muthusuba@gmail.com>
- In case of framePr attributes being omitted in original xml, LO defaults
such attributes to incorrect values.
- Correcting these values in this fix.
- This fix stops LO from getting hang while saving the document, the actual
fix needs to be somewhere in the table layout. We need to restrict the
frame from being considered as part of the table as MSO does not allow
frame to be part of a table.
Change-Id: I4c35f7eff6ca1122901f5667fc26b849df527f60
Reviewed-on: https://gerrit.libreoffice.org/9774
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
- File attached to issue contains footnote between a table and reference
of footnote is in field.
- In PopFieldContext code was throwing exception due to null value of
footnotestartnode.
Reviewed on:
https://gerrit.libreoffice.org/9697
Change-Id: I467e234a7daa6a5f724087c2cc959e4c9d76f4d2
Word will reject Shift-JIS following \loch, but apparently OOo could read
and (worse) write such documents, so accept Shift-JIS regardless of run
charset type.
Change-Id: Ib181956e9f218548a52037dd76fa1d3ecdc006bd
Also fixes fdo#42899 and fdo#67685 in a different way; the previous fix
for fdo#42899 caused the problem with password-protected libraries for
which the password is not known: only the binary representation of the
BAISC module was stored, not the source code; by simply copying from the
source storage the problem can be avoided.
It would be possible to ask for the password when storing, but that
would not work when non-interactive (called via API).
An alternative fix would be to pass in the
SfxObjectShell::IsSetModifyEnabled() flag and actually reset the BASIC
library's modify flag correctly, but that requires adding a
parameter to XStorageBasedLibraryContainer::storeLibrariesToStorage().
(regression from af34774d260a68fc02cd78ba90dd8d4afaf1a2a4 )
Change-Id: I4701401f35171139fc2fe8d225d13d4e533091a0
- ModelToViewHelper: add new flag REPLACEMODE, which causes fields and
footnotes to be replaced with ZWSP instead of expanding them
- SwXFlatParagraph: add FootnotePositions and FieldPositions properties
- GrammarCheckingIterator: invoke XProofreader::doProofreading with
properties FootnotePositions and FieldPositions
Change-Id: I9b66a37aac94f940546e812d8b85a35aebd8181a
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."
Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1