comphelper/source/misc/asyncnotification.cxx | 4 - cui/source/inc/cuitabarea.hxx | 11 ---- cui/source/tabpages/tparea.cxx | 56 ++++++++------------- desktop/source/app/officeipcthread.cxx | 30 +++++------ editeng/source/outliner/outliner.cxx | 30 +++++------ libreofficekit/source/gtk/lokdocview.cxx | 2 package/inc/ZipOutputStream.hxx | 2 package/source/zipapi/ZipOutputStream.cxx | 2 sc/source/core/data/table3.cxx | 4 - sc/source/filter/excel/expop2.cxx | 4 - sc/source/filter/oox/pagesettings.cxx | 4 - sc/source/filter/xml/XMLTableShapeImportHelper.cxx | 10 +-- sc/source/filter/xml/xmlcelli.cxx | 10 +-- sd/source/ui/sidebar/SlideBackground.cxx | 1 sfx2/source/notebookbar/PriorityHBox.cxx | 10 +-- svtools/qa/unit/GraphicObjectTest.cxx | 4 - svx/source/fmcomp/gridctrl.cxx | 9 --- svx/source/sidebar/paragraph/ParaSpacingWindow.cxx | 2 sw/source/core/unocore/unostyle.cxx | 11 +--- sw/source/filter/ww8/ww8par.cxx | 9 +-- sw/source/filter/ww8/ww8par6.cxx | 4 - sw/source/uibase/dochdl/swdtflvr.cxx | 5 + sw/source/uibase/lingu/olmenu.cxx | 1 vcl/source/control/combobox.cxx | 14 +---- vcl/unx/generic/printer/ppdparser.cxx | 1 vcl/workben/fftester.cxx | 2 xmloff/source/draw/shapeimport.cxx | 3 + xmloff/source/style/MarkerStyle.cxx | 13 ++-- xmloff/source/transform/StyleOOoTContext.cxx | 3 - 29 files changed, 114 insertions(+), 147 deletions(-)
New commits: commit b69503ea67cea885fde8a36f41af37a56455fe19 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 20:41:04 2016 +0100 WaE: -Werror=logical-op, I guess this is what was intended Change-Id: I8646045372fc66cf459a7bd1d977ced6502ef751 diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index a65e0c5..355978a 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -3252,7 +3252,7 @@ bool ScTable::HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCR CellType eFstCellType = GetCellType(nStartCol, nStartRow); CellType eSndCellType = GetCellType(nStartCol, nStartRow+1); return ((eFstCellType == CELLTYPE_STRING || eFstCellType == CELLTYPE_EDIT) && - (eSndCellType != CELLTYPE_STRING && eSndCellType != CELLTYPE_STRING)); + (eSndCellType != CELLTYPE_STRING && eSndCellType != CELLTYPE_EDIT)); } for (SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++) @@ -3289,7 +3289,7 @@ bool ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCR CellType eFstCellType = GetCellType(nStartCol, nStartRow); CellType eSndCellType = GetCellType(nStartCol+1, nStartRow); return ((eFstCellType == CELLTYPE_STRING || eFstCellType == CELLTYPE_EDIT) && - (eSndCellType != CELLTYPE_STRING && eSndCellType != CELLTYPE_STRING)); + (eSndCellType != CELLTYPE_STRING && eSndCellType != CELLTYPE_EDIT)); } for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++) commit 88c9133b16749e33872e358aedd81ebc81593e3a Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 19:47:38 2016 +0100 coverity#1371121 Unchecked return value Change-Id: I1413b62112922af8d6872de413ca7decc0d75875 diff --git a/svtools/qa/unit/GraphicObjectTest.cxx b/svtools/qa/unit/GraphicObjectTest.cxx index f17aeca..88041df 100644 --- a/svtools/qa/unit/GraphicObjectTest.cxx +++ b/svtools/qa/unit/GraphicObjectTest.cxx @@ -334,8 +334,8 @@ void GraphicObjectTest::testPdf() CPPUNIT_ASSERT_MESSAGE("Missing image", pGraphicObject); CPPUNIT_ASSERT(pGraphicObject->GetGraphic().getPdfData().hasElements()); - pGraphicObject->SwapOut(); - pGraphicObject->SwapIn(); + CPPUNIT_ASSERT(pGraphicObject->SwapOut()); + CPPUNIT_ASSERT(pGraphicObject->SwapIn()); // This failed, swap out + swap in lost the PDF data. CPPUNIT_ASSERT(pGraphicObject->GetGraphic().getPdfData().hasElements()); commit 0afe3e257e9d7b76e252b1022d7d0e4e0c940384 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 19:46:06 2016 +0100 coverity#1371123 Unchecked return value Change-Id: I892b4b0531d456f73777d81cb47847cde2ed7364 diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index c239638..c5542e9 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -107,7 +107,7 @@ try_again: SvFileStream aFileStream(out, StreamMode::READ); ret = (int) ReadWindowMetafile(aFileStream, aGDIMetaFile); BitmapEx aTarget; - aGDIMetaFile.CreateThumbnail(aTarget); + (void)aGDIMetaFile.CreateThumbnail(aTarget); } else if (strcmp(argv[2], "jpg") == 0) { commit 4495427eabddcb553b3dd7fe06a8abfb320dc51f Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:51:54 2016 +0100 experiment with renaming for bogus coverity#1371326 Misused comma operator Change-Id: Idd2cc5e888c85a33c9d26aac26c48f3c74571724 diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 1ef28d5..3c65230 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -366,20 +366,20 @@ throw( RuntimeException, std::exception ) class IpcThread: public salhelper::Thread { public: void start(RequestHandler * handler) { - handler_ = handler; + m_handler = handler; launch(); } virtual void close() = 0; protected: - explicit IpcThread(char const * name): Thread(name), handler_(nullptr) {} + explicit IpcThread(char const * name): Thread(name), m_handler(nullptr) {} virtual ~IpcThread() {} bool process(OString const & arguments, bool * waitProcessed); - RequestHandler * handler_; + RequestHandler * m_handler; }; class PipeIpcThread: public IpcThread { @@ -561,12 +561,12 @@ RequestHandler::Status DbusIpcThread::enable(rtl::Reference<IpcThread> * thread) void DbusIpcThread::execute() { - assert(handler_ != nullptr); - handler_->cReady.wait(); + assert(m_handler != nullptr); + m_handler->cReady.wait(); for (;;) { { osl::MutexGuard g(RequestHandler::GetMutex()); - if (handler_->mState == RequestHandler::State::Downing) { + if (m_handler->mState == RequestHandler::State::Downing) { break; } } @@ -607,7 +607,7 @@ void DbusIpcThread::execute() } } if (waitProcessed) { - handler_->cProcessed.wait(); + m_handler->cProcessed.wait(); } DbusMessageHolder repl(dbus_message_new_method_return(msg.message)); if (repl.message == nullptr) { @@ -1038,8 +1038,8 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) { ProcessDocumentsRequest* pRequest = new ProcessDocumentsRequest( aCmdLineArgs->getCwdUrl()); - handler_->cProcessed.reset(); - pRequest->pcProcessed = &handler_->cProcessed; + m_handler->cProcessed.reset(); + pRequest->pcProcessed = &m_handler->cProcessed; // Print requests are not dependent on the --invisible cmdline argument as they are // loaded with the "hidden" flag! So they are always checked. @@ -1186,7 +1186,7 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) { void PipeIpcThread::execute() { - assert(handler_ != nullptr); + assert(m_handler != nullptr); do { osl::StreamPipe aStreamPipe; @@ -1199,16 +1199,16 @@ void PipeIpcThread::execute() // bootstrap, that dialogs event loop might get events that are dispatched by this thread // we have to wait for cReady to be set by the real main loop. // only requests that don't dispatch events may be processed before cReady is set. - handler_->cReady.wait(); + m_handler->cReady.wait(); // we might have decided to shutdown while we were sleeping - if (!handler_->pGlobal.is()) return; + if (!m_handler->pGlobal.is()) return; // only lock the mutex when processing starts, othewise we deadlock when the office goes // down during wait osl::ClearableMutexGuard aGuard( RequestHandler::GetMutex() ); - if ( handler_->mState == RequestHandler::State::Downing ) + if (m_handler->mState == RequestHandler::State::Downing) { break; } @@ -1238,7 +1238,7 @@ void PipeIpcThread::execute() aGuard.clear(); // wait for processing to finish if (waitProcessed) - handler_->cProcessed.wait(); + m_handler->cProcessed.wait(); // processing finished, inform the requesting end: SAL_INFO("desktop.app", "writing <" << PROCESSING_DONE << ">"); n = aStreamPipe.write( @@ -1253,7 +1253,7 @@ void PipeIpcThread::execute() { { osl::MutexGuard aGuard( RequestHandler::GetMutex() ); - if ( handler_->mState == RequestHandler::State::Downing ) + if (m_handler->mState == RequestHandler::State::Downing) { break; } commit 1b69b87f0faade1b7bc3bfe552af33da5a2d657f Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:38:08 2016 +0100 coverity#1371450 Uninitialized scalar field Change-Id: I7feaef7a97c0acc10f70a1c5807f5c7af0068b78 diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx index db8699f..f26b596 100644 --- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx +++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx @@ -36,6 +36,7 @@ using namespace svx; ParaULSpacingWindow::ParaULSpacingWindow(vcl::Window* pParent, css::uno::Reference<css::frame::XFrame>& xFrame) : VclVBox(pParent) + , m_eUnit(SFX_MAPUNIT_TWIP) { m_pUIBuilder = new VclBuilder(this, getUIRootDir(), "svx/ui/paraulspacing.ui", commit 4819843badc7536370052320ff5fb9cd934254e1 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:36:50 2016 +0100 coverity#1371448 Uninitialized pointer field Change-Id: Iedfa017dffa4681a9d698108b5dbc7388637c611 diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx index e13be28..9267444 100644 --- a/comphelper/source/misc/asyncnotification.cxx +++ b/comphelper/source/misc/asyncnotification.cxx @@ -71,7 +71,6 @@ namespace comphelper } }; - struct EventNotifierImpl { ::osl::Mutex aMutex; @@ -83,7 +82,8 @@ namespace comphelper std::shared_ptr<AsyncEventNotifierAutoJoin> pKeepThisAlive; EventNotifierImpl() - :bTerminate( false ) + : bTerminate(false) + , name(nullptr) { } }; commit ffa4d16c798fecee0e268e0cfe02e488d7b971b0 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:35:35 2016 +0100 coverity#1371447 Uninitialized scalar field Change-Id: I6c3e18a3ab56a719552cfe9f0f6951e6bce3c2e7 diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx index e5d81ed..db8699f 100644 --- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx +++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx @@ -104,6 +104,7 @@ IMPL_LINK_NOARG_TYPED(ParaULSpacingWindow, ModifySpacingHdl, Edit&, void) ParaLRSpacingWindow::ParaLRSpacingWindow(vcl::Window* pParent, css::uno::Reference<css::frame::XFrame>& xFrame) : VclVBox(pParent) + , m_eUnit(SFX_MAPUNIT_TWIP) { m_pUIBuilder = new VclBuilder(this, getUIRootDir(), "svx/ui/paralrspacing.ui", commit d33412979a2efe023a9bbaea4c70822c8a443f95 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:33:07 2016 +0100 coverity#1371444 Uninitialized scalar field Change-Id: I3e4294f3459ab069f4bd5a8233cbd8a4c1dd2beb diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index ca60281..e169b83 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -589,6 +589,7 @@ const PPDParser* PPDParser::getParser( const OUString& rFile ) PPDParser::PPDParser( const OUString& rFile ) : m_aFile( rFile ), m_bType42Capable( false ), + m_nLanguageLevel( 0 ), m_aFileEncoding( RTL_TEXTENCODING_MS_1252 ), m_pDefaultImageableArea( nullptr ), m_pImageableAreas( nullptr ), commit 2179871c1f28871749680ecc7dc3191770684129 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:32:34 2016 +0100 coverity#1371445 Uninitialized scalar field Change-Id: Ib9d2cf811b86cadee77877c6d294505e985b0111 diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 48d2e74..44616df 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -267,6 +267,7 @@ SwSpellPopup::SwSpellPopup( ) : PopupMenu( SW_RES(MN_SPELL_POPUP) ) , m_pSh( pWrtSh ) , m_xSpellAlt(xAlt) + , m_nGrammarError(0) , m_bGrammarResults(false) { OSL_ENSURE(m_xSpellAlt.is(), "no spelling alternatives available"); commit 4cb71eca76ca5572f059e4af79ea1578cf766869 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:29:13 2016 +0100 coverity#1371443 Uninitialized scalar field Change-Id: I801ca445a89fb1b613323201c3cbfeb26381a8e5 diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index 7c9af4c..0a5caa1 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -109,6 +109,7 @@ SlideBackground::SlideBackground( mbEditModeChangePending(false), mxFrame(rxFrame), maContext(), + maApplication(vcl::EnumContext::Application_None), mbTitle(false), mpBindings(pBindings) { commit 13194412aaed3b88655c3e4ce6ae34d742e8273e Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:27:19 2016 +0100 coverity#1371441 Uninitialized scalar field since commit 7438bc1f0c4fd42420460a144cc074bfb8091705 Author: Rishabh Kumar <kris.kr...@gmail.com> Date: Fri Jul 8 02:48:42 2016 +0530 [GSoC] Remove bitmap controls from area tab Change-Id: I7290fda782bf7bb5c8a47168f5f74798bc353769 diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 415055b..590cd6e 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -250,14 +250,6 @@ private: SfxItemSet& m_rXFSet; SfxMapUnit m_ePoolUnit; - FieldUnit m_eFUnit; - - //UUUU - bool mbOfferImportButton; - bool mbDirectGraphicSet; - Graphic maDirectGraphic; - OUString maDirectName; - VclPtr<PushButton> m_pBtnImport; DECL_LINK_TYPED(SelectDialogTypeHdl_Impl, ListBox&, void); DECL_LINK_TYPED( ModifyColorHdl_Impl, ListBox&, void ); @@ -265,9 +257,6 @@ private: DECL_LINK_TYPED( ModifyHatchingHdl_Impl, ListBox&, void ); DECL_LINK_TYPED( ModifyBitmapHdl_Impl, ListBox&, void ); - //UUUU - DECL_LINK_TYPED( ClickImportHdl_Impl, Button*, void ); - DECL_LINK_TYPED( ModifyTileHdl_Impl, Edit&, void ); DECL_LINK_TYPED( ModifyTileClickHdl_Impl, Button*, void ); DECL_LINK_TYPED( ClickScaleHdl_Impl, Button*, void ); diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 3dd275b..3f54e22 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -174,11 +174,9 @@ void SvxAreaTabPage::dispose() m_pLbBitmap.clear(); m_pCtlBitmapPreview.clear(); m_pCtlXRectPreview.clear(); - m_pBtnImport.clear(); SvxTabPage::dispose(); } - void SvxAreaTabPage::Construct() { // fill colortables / lists @@ -493,45 +491,35 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs ) case drawing::FillStyle_BITMAP: { //UUUU - if(mbDirectGraphicSet && GraphicType::NONE != maDirectGraphic.GetType()) + m_nPos = m_pLbBitmap->GetSelectEntryPos(); + if( m_nPos != LISTBOX_ENTRY_NOTFOUND && + m_pLbBitmap->IsValueChangedFromSaved() ) { - const XFillBitmapItem aXBmpItem(maDirectName, maDirectGraphic); - rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP)); - rAttrs->Put(aXBmpItem); - bModified = true; + const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap(m_nPos); + const OUString aString(m_pLbBitmap->GetSelectEntry()); + const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()); + pOld = GetOldItem( *rAttrs, XATTR_FILLBITMAP ); + if ( !pOld || !( *static_cast<const XFillBitmapItem*>(pOld) == aFillBitmapItem ) ) + { + rAttrs->Put( aFillBitmapItem ); + bModified = true; + } } - else + // NEW + if( (eSavedStyle != eStyle) && + ( bModified || + SfxItemState::SET == m_rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ) ) ) ) { - m_nPos = m_pLbBitmap->GetSelectEntryPos(); - if( m_nPos != LISTBOX_ENTRY_NOTFOUND && - m_pLbBitmap->IsValueChangedFromSaved() ) - { - const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap(m_nPos); - const OUString aString(m_pLbBitmap->GetSelectEntry()); - const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()); - pOld = GetOldItem( *rAttrs, XATTR_FILLBITMAP ); - if ( !pOld || !( *static_cast<const XFillBitmapItem*>(pOld) == aFillBitmapItem ) ) + XFillStyleItem aStyleItem( drawing::FillStyle_BITMAP ); + pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); + if ( !pOld || !( *static_cast<const XFillStyleItem*>(pOld) == aStyleItem ) ) { - rAttrs->Put( aFillBitmapItem ); + rAttrs->Put( aStyleItem ); bModified = true; } - } - // NEW - if( (eSavedStyle != eStyle) && - ( bModified || - SfxItemState::SET == m_rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ) ) ) ) - { - XFillStyleItem aStyleItem( drawing::FillStyle_BITMAP ); - pOld = GetOldItem( *rAttrs, XATTR_FILLSTYLE ); - if ( !pOld || !( *static_cast<const XFillStyleItem*>(pOld) == aStyleItem ) ) - { - rAttrs->Put( aStyleItem ); - bModified = true; - } - } } - } - break; + } + break; } rAttrs->Put (SfxUInt16Item(SID_PAGE_TYPE, (sal_uInt16)m_nPageType)); rAttrs->Put (SfxUInt16Item(SID_TABPAGE_POS,m_nPos)); commit fb46ba9dfa37ed3b56c9374230f1dd557d162388 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:22:34 2016 +0100 coverity#1371440 Uncaught exception Change-Id: Ia9ce56ecbaecd6e63b3ec7086d3a677a7816c924 diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx index 1fc4166..0149ade 100644 --- a/package/inc/ZipOutputStream.hxx +++ b/package/inc/ZipOutputStream.hxx @@ -57,7 +57,7 @@ public: throw(css::io::IOException, css::uno::RuntimeException); void finish() - throw(css::io::IOException, css::uno::RuntimeException); + throw(css::io::IOException, css::uno::RuntimeException, std::exception); const css::uno::Reference< css::io::XOutputStream >& getStream(); static sal_uInt32 getCurrentDosTime(); diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx index 7e9ffe5..4db3aba 100644 --- a/package/source/zipapi/ZipOutputStream.cxx +++ b/package/source/zipapi/ZipOutputStream.cxx @@ -173,7 +173,7 @@ void ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess(sal_Int32 nThrea } void ZipOutputStream::finish() - throw(IOException, RuntimeException) + throw(IOException, RuntimeException, std::exception) { assert(!m_aZipList.empty() && "Zip file must have at least one entry!"); commit 6d9953a4d951353b5f04acc0522a98ccb331d7ab Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:20:00 2016 +0100 coverity#1371381 Dereference before null check this ones in 5-2 also Change-Id: Ia594fdc466d745df141b76ad7d8af3f362287766 diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 4bb11e0d..2fabc42 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -1487,26 +1487,24 @@ void Outliner::SetRefDevice( OutputDevice* pRefDev ) void Outliner::ParaAttribsChanged( sal_Int32 nPara ) { - // The Outliner does not have an undo of its own, when paragraphs are // separated/merged. When ParagraphInserted the attribute EE_PARA_OUTLLEVEL // may not be set, this is however needed when the depth of the paragraph // is to be determined. - if( pEditEngine->IsInUndo() ) - { - if ( pParaList->GetParagraphCount() == pEditEngine->GetParagraphCount() ) - { - Paragraph* pPara = pParaList->GetParagraph( nPara ); - // tdf#100734: force update of bullet - pPara->Invalidate(); - const SfxInt16Item& rLevel = static_cast<const SfxInt16Item&>( pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL ) ); - if ( pPara && pPara->GetDepth() != rLevel.GetValue() ) - { - pPara->SetDepth( rLevel.GetValue() ); - ImplCalcBulletText( nPara, true, true ); - } - } - } + if (!pEditEngine->IsInUndo()) + return; + if (pParaList->GetParagraphCount() != pEditEngine->GetParagraphCount()) + return; + Paragraph* pPara = pParaList->GetParagraph(nPara); + if (!pPara) + return; + // tdf#100734: force update of bullet + pPara->Invalidate(); + const SfxInt16Item& rLevel = static_cast<const SfxInt16Item&>( pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL ) ); + if (pPara->GetDepth() == rLevel.GetValue()) + return; + pPara->SetDepth(rLevel.GetValue()); + ImplCalcBulletText(nPara, true, true); } void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle ) commit cafe446d2456e5bed120045b1c693fbe31874262 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:16:50 2016 +0100 coverity#1371377 Resource leak Change-Id: Ib8fddfe5c62b937d23306a31a2a8ab9c83179546 diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx index e109c78..a0dc8db 100644 --- a/xmloff/source/style/MarkerStyle.cxx +++ b/xmloff/source/style/MarkerStyle.cxx @@ -57,7 +57,7 @@ void XMLMarkerStyleImport::importXML( bool bHasPathData = false; OUString aDisplayName; - SdXMLImExViewBox* pViewBox = nullptr; + std::unique_ptr<SdXMLImExViewBox> xViewBox; SvXMLNamespaceMap& rNamespaceMap = rImport.GetNamespaceMap(); SvXMLUnitConverter& rUnitConverter = rImport.GetMM100UnitConverter(); @@ -82,7 +82,7 @@ void XMLMarkerStyleImport::importXML( } else if( IsXMLToken( aStrAttrName, XML_VIEWBOX ) ) { - pViewBox = new SdXMLImExViewBox( aStrValue, rUnitConverter ); + xViewBox.reset(new SdXMLImExViewBox(aStrValue, rUnitConverter)); bHasViewBox = true; } @@ -104,11 +104,12 @@ void XMLMarkerStyleImport::importXML( // ViewBox probably not used, but stay with former processing inside of // SdXMLImExSvgDElement const basegfx::B2DRange aSourceRange( - pViewBox->GetX(), pViewBox->GetY(), - pViewBox->GetX() + pViewBox->GetWidth(), pViewBox->GetY() + pViewBox->GetHeight()); + xViewBox->GetX(), xViewBox->GetY(), + xViewBox->GetX() + xViewBox->GetWidth(), + xViewBox->GetY() + xViewBox->GetHeight()); const basegfx::B2DRange aTargetRange( 0.0, 0.0, - pViewBox->GetWidth(), pViewBox->GetHeight()); + xViewBox->GetWidth(), xViewBox->GetHeight()); if(!aSourceRange.equal(aTargetRange)) { @@ -136,7 +137,7 @@ void XMLMarkerStyleImport::importXML( } } - delete pViewBox; + xViewBox.reset(); } // Export commit bbc2824876f102f237fbe40c16321c31fbdf4779 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:13:17 2016 +0100 coverity#1371373 Resource leak Change-Id: Ic292feea48f073b4f3c72d23d4516186ed06328e diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx index 553c36f..75b83ff 100644 --- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx +++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx @@ -97,7 +97,7 @@ void XMLTableShapeImportHelper::finishShape( sal_Int32 nEndY(-1); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; table::CellAddress aEndCell; - OUString* pRangeList(nullptr); + std::unique_ptr<OUString> xRangeList; sal_Int16 nLayerID(-1); for( sal_Int16 i=0; i < nAttrCount; ++i ) { @@ -137,7 +137,7 @@ void XMLTableShapeImportHelper::finishShape( else if(nPrefix == XML_NAMESPACE_DRAW) { if (IsXMLToken(aLocalName, XML_NOTIFY_ON_UPDATE_OF_RANGES)) - pRangeList = new OUString(rValue); + xRangeList.reset(new OUString(rValue)); } } SetLayer(rShape, nLayerID, rShape->getShapeType()); @@ -153,17 +153,17 @@ void XMLTableShapeImportHelper::finishShape( } } - if (pRangeList) + if (xRangeList) { // #i78086# If there are notification ranges, the ChartListener must be created // also when anchored to the sheet // -> call AddOLE with invalid cell position (checked in ScMyShapeResizer::ResizeShapes) if (ScMyTables::IsOLE(rShape)) - rTables.AddOLE(rShape, *pRangeList); + rTables.AddOLE(rShape, *xRangeList); } - delete pRangeList; + xRangeList.reset(); } else // shape is annotation { commit 43641dbdfc25fdecee0c58acb98e016797399ea7 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:11:43 2016 +0100 coverity#1371371 Resource leak Change-Id: Icf83030835a62a7ba91a085e87889c17a106993a diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx index 7367596..cc51946 100644 --- a/sc/source/filter/excel/expop2.cxx +++ b/sc/source/filter/excel/expop2.cxx @@ -98,8 +98,8 @@ FltError ExportBiff5::Write() VbaExport aExport(pDocShell->GetModel()); if (aExport.containsVBAProject()) { - SotStorage* pVBARoot = xRootStrg->OpenSotStorage("_VBA_PROJECT_CUR"); - aExport.exportVBA(pVBARoot); + tools::SvRef<SotStorage> xVBARoot = xRootStrg->OpenSotStorage("_VBA_PROJECT_CUR"); + aExport.exportVBA(xVBARoot); } } else if( pDocShell && xRootStrg.Is() && eVbaExportMode == VBAExportMode::REEXPORT_STREAM ) commit f36c0efc89201f49dd14d0a225a548753e0b8fac Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:08:37 2016 +0100 coverity#1371369 Resource leak and coverity#1371370 Resource leak Change-Id: Ib08b893396a9abc210c8ed391170fc620a3dad3b diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index c8825fe..8c440ff 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -173,8 +173,8 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, rXMLImport.GetTables().AddColumn(bTempIsCovered); const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; OUString aLocalName; - OUString* pStyleName = nullptr; - OUString* pCurrencySymbol = nullptr; + std::unique_ptr<OUString> xStyleName; + std::unique_ptr<OUString> xCurrencySymbol; const SvXMLTokenMap& rTokenMap = rImport.GetTableRowCellAttrTokenMap(); for (sal_Int16 i = 0; i < nAttrCount; ++i) { @@ -186,7 +186,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, switch (nToken) { case XML_TOK_TABLE_ROW_CELL_ATTR_STYLE_NAME: - pStyleName = new OUString(sValue); + xStyleName.reset(new OUString(sValue)); mbHasStyle = true; break; case XML_TOK_TABLE_ROW_CELL_ATTR_CONTENT_VALIDATION_NAME: @@ -295,7 +295,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, } break; case XML_TOK_TABLE_ROW_CELL_ATTR_CURRENCY: - pCurrencySymbol = new OUString(sValue); + xCurrencySymbol.reset(new OUString(sValue)); break; default: ; @@ -313,7 +313,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, if(bIsEmpty) bFormulaTextResult = true; } - rXMLImport.GetStylesImportHelper()->SetAttributes(pStyleName, pCurrencySymbol, nCellType); + rXMLImport.GetStylesImportHelper()->SetAttributes(xStyleName.release(), xCurrencySymbol.release(), nCellType); } ScXMLTableRowCellContext::~ScXMLTableRowCellContext() commit 9b181fa48f20b09bcfd9de1fb433a1b21d1546c3 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 17:05:46 2016 +0100 coverity#1371368 Resource leak Change-Id: I5c35b3eaa6e9afe10096bf5013f83ff51cb870a4 diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index 4f28f65..9d2d46c 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -810,12 +810,13 @@ void XMLPropertiesOOoTContext_Impl::StartElement( XMLPersAttrListTContext *pSymbolImageContext = new XMLPersAttrListTContext( GetTransformer(), GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_CHART, GetXMLToken( XML_SYMBOL_IMAGE ))); + rtl::Reference<XMLTransformerContext> xSymbolImageContext(pSymbolImageContext); OUString aAttrValue( sAttrValue ); if( GetTransformer().ConvertURIToOASIS( aAttrValue, true )) { pSymbolImageContext->AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aAttrValue ); - pContext->AddContent( pSymbolImageContext ); + pContext->AddContent(xSymbolImageContext); } } break; commit f20090c4313eddfac481b8ac8cb98f4bb9cfec0a Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 16:59:35 2016 +0100 coverity#1371341 Illegal address computation a sample commit to see if this is what coverity doesn't like Change-Id: I7b1f5d10623616a5aa9c2c8cd84ff3ad71ca665d diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx index de3dca6..0d5829e 100644 --- a/sc/source/filter/oox/pagesettings.cxx +++ b/sc/source/filter/oox/pagesettings.cxx @@ -475,8 +475,8 @@ HeaderFooterParser::HeaderFooterParser( const WorkbookHelper& rHelper ) : maSheetNameService( "com.sun.star.text.TextField.SheetName" ), maFileNameService( "com.sun.star.text.TextField.FileName" ), maDateTimeService( "com.sun.star.text.TextField.DateTime" ), - maBoldNames( sppcBoldNames, ::std::end(sppcBoldNames) ), - maItalicNames( sppcItalicNames, ::std::end(sppcItalicNames) ), + maBoldNames( std::begin(sppcBoldNames), std::end(sppcBoldNames) ), + maItalicNames( std::begin(sppcItalicNames), std::end(sppcItalicNames) ), maPortions( static_cast< size_t >( HF_COUNT ) ), meCurrPortion( HF_CENTER ) { commit b5abad1aa512004b32a58b38ba2c9e0c67ce19fa Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 16:48:17 2016 +0100 coverity#1371136 Explicit null dereferenced Change-Id: I61a9bf2b99eabef1802de73ac10fab1c9279c238 diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index c6db306..2402aad 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -414,6 +414,9 @@ SvXMLShapeContext* XMLShapeImportHelper::Create3DSceneChildContext( } } + if (!pContext) + return nullptr; + // now parse the attribute list and call the child context for each unknown attribute sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for(sal_Int16 a(0); a < nAttrCount; a++) commit cb17a73d98a8385a6f7e0cdd86af4947ea2be0ed Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 16:43:31 2016 +0100 coverity#1371135 this is surely all wrong maybe this is the intent Change-Id: I8917719984bff4aba0e9ced48e031104e3d02c36 diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 3d71381..1e7ae1e 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -4469,12 +4469,11 @@ void SwXTextTableStyle::SetPhysical() SwBoxAutoFormat* pOldBoxFormat = &m_pTableAutoFormat->GetBoxFormat(aTableTemplateMap[i]); uno::Reference<style::XStyle> xCellStyle(pOldBoxFormat->GetXObject(), uno::UNO_QUERY); if (!xCellStyle.is()) - { - SwXTextCellStyle* pStyle = dynamic_cast<SwXTextCellStyle*>(xCellStyle.get()); - SwBoxAutoFormat* pNewBoxFormat = &pTableAutoFormat->GetBoxFormat(aTableTemplateMap[i]); - pStyle->SetBoxFormat(pNewBoxFormat); - pNewBoxFormat->SetXObject(uno::Reference<style::XStyle>(xCellStyle)); - } + continue; + SwXTextCellStyle& rStyle = dynamic_cast<SwXTextCellStyle&>(*xCellStyle.get()); + SwBoxAutoFormat& rNewBoxFormat = pTableAutoFormat->GetBoxFormat(aTableTemplateMap[i]); + rStyle.SetBoxFormat(&rNewBoxFormat); + rNewBoxFormat.SetXObject(xCellStyle); } m_pTableAutoFormat_Impl = nullptr; m_pTableAutoFormat = pTableAutoFormat; commit efe91354ef0445c0b7261174d5dd701feba66715 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 16:39:03 2016 +0100 coverity#1371133 Dereference after null check Change-Id: Ic3ba3e3a6f1ec945c83c5aeaf8b905be3ec49686 diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 387ceb9..ca7e347 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -2639,7 +2639,8 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData, { rSh.MakeDrawView(); FmFormView* pFmView = dynamic_cast<FmFormView*>( rSh.GetDrawView() ); - if(pFmView) { + if (pFmView && pDragPt) + { const OXFormsDescriptor &rDesc = OXFormsTransferable::extractDescriptor(rData); SdrObject* pObj = pFmView->CreateXFormsControl(rDesc); if(nullptr != pObj) @@ -2696,7 +2697,7 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData, { rSh.MakeDrawView(); FmFormView* pFmView = dynamic_cast<FmFormView*>( rSh.GetDrawView() ); - if (pFmView && bHaveColumnDescriptor) + if (pFmView && bHaveColumnDescriptor && pDragPt) { SdrObject* pObj = pFmView->CreateFieldControl( OColumnTransferable::extractColumnDescriptor(rData) ); if ( nullptr != pObj) commit 42ed857640e7d506344713972e0cb6a971391a54 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 16:30:25 2016 +0100 coverity#1371132 Unchecked dynamic_cast Change-Id: I8df35ce69d4960d8f5529100ba705fd4d3cf684a diff --git a/sfx2/source/notebookbar/PriorityHBox.cxx b/sfx2/source/notebookbar/PriorityHBox.cxx index 0b02f63..46f6282 100644 --- a/sfx2/source/notebookbar/PriorityHBox.cxx +++ b/sfx2/source/notebookbar/PriorityHBox.cxx @@ -121,12 +121,10 @@ public: m_nNeededWidth += pChild->GetSizePixel().Width() + spacing; // Add only containers which have explicitly assigned priority. - if (pChild->GetType() == WINDOW_CONTAINER) - { - IPrioritable* pPrioritable = dynamic_cast<IPrioritable*>(pChild); - if (pPrioritable->GetPriority() != VCL_PRIORITY_DEFAULT) - m_aSortedChilds.push_back(pPrioritable); - } + IPrioritable* pPrioritable = pChild->GetType() == WINDOW_CONTAINER ? + dynamic_cast<IPrioritable*>(pChild) : nullptr; + if (pPrioritable && pPrioritable->GetPriority() != VCL_PRIORITY_DEFAULT) + m_aSortedChilds.push_back(pPrioritable); } std::sort(m_aSortedChilds.begin(), m_aSortedChilds.end(), lcl_comparePriority); commit 951ceab4016f183d8c8be15f50c12538aa196a50 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 16:28:58 2016 +0100 coverity#1371131 Dereference after null check Change-Id: I292ac0b59af2ed8897367d56ddb01bf4606a7693 diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index b4e53e1..0156330 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -1355,7 +1355,7 @@ static void callbackWorker (int nType, const char* pPayload, void* pData) CallbackData* pCallback = new CallbackData(nType, pPayload ? pPayload : "(nil)", pDocView); LOKDocViewPrivate& priv = getPrivate(pDocView); std::stringstream ss; - ss << "callbackWorker, view #" << priv->m_nViewId << ": " << callbackTypeToString(nType) << ", '" << pPayload << "'"; + ss << "callbackWorker, view #" << priv->m_nViewId << ": " << callbackTypeToString(nType) << ", '" << (pPayload ? pPayload : "(nil)") << "'"; g_info("%s", ss.str().c_str()); gdk_threads_add_idle(callback, pCallback); } commit f0d1a4fce2b1859bf0088badfd0c02ddc1054c15 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 16:25:06 2016 +0100 coverity#1371129 'Constant' variable guards dead code since commit 920d4463f6e59b815852c173e2974ffc7b4bb284 Author: Noel Grandin <n...@peralex.com> Date: Thu Jun 23 13:13:28 2016 +0200 loplugin:singlevalfields in vcl(part1) Change-Id: I7bba52453a57832e5c6d2f54d36c18cf04568ed0 diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 77b9c2e..d5e4708 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -351,28 +351,22 @@ IMPL_LINK_TYPED(ComboBox::Impl, ImplAutocompleteHdl, Edit&, rEdit, void) if ( nStart == LISTBOX_ENTRY_NOTFOUND ) nStart = 0; - bool bForward = true; - sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND; if (!m_isMatchCase) { // Try match case insensitive from current position - nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward ); + nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, nStart, true); if ( nPos == LISTBOX_ENTRY_NOTFOUND ) // Try match case insensitive, but from start - nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText, - bForward ? 0 : (m_pImplLB->GetEntryList()->GetEntryCount()-1), - bForward ); + nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, 0, true); } if ( nPos == LISTBOX_ENTRY_NOTFOUND ) // Try match full from current position - nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, false ); + nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, nStart, true, false); if ( nPos == LISTBOX_ENTRY_NOTFOUND ) // Match full, but from start - nPos = m_pImplLB->GetEntryList()->FindMatchingEntry( aStartText, - bForward ? 0 : (m_pImplLB->GetEntryList()->GetEntryCount()-1), - bForward, false ); + nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, 0, true, false); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { commit 063b5a081986a2a64980cb957fd9a0c33dc02ae1 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 16:21:03 2016 +0100 coverity#1371127 Logically dead code since commit 4391d400e01e4a756d03d357d81e9769c34ae83b Author: Noel Grandin <n...@peralex.com> Date: Mon Jun 27 15:11:50 2016 +0200 loplugin:singlevalfields in svx Change-Id: I43bef29ec1ef8b526b32d511a6013de9ff0758d5 diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 4eac8ee..b70e879 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -2930,15 +2930,6 @@ CellController* DbGridControl::GetController(long /*nRow*/, sal_uInt16 nColumnId if ((bInsert && !pColumn->IsAutoValue()) || bUpdate) { pReturn = &pColumn->GetController(); - if (pReturn) - { - // if it is an edit row, it is possible to give it a forced read-only property - if ( dynamic_cast<const EditCellController*>( pReturn) == nullptr && dynamic_cast<const SpinCellController*>( pReturn) == nullptr ) - // controller could not be set to read-only in forceROController - if (!bInsert && !bUpdate) - // better use no controller than one without read-only - pReturn = nullptr; - } } } return pReturn; commit 213c14a9fb3eed27b9aee343495aa880b9c11c72 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Aug 18 16:15:00 2016 +0100 coverity#1371126 Logically dead code since commit 19c3aac98f756f6a9cda44a4cc70a2a924fa85df Author: Noel Grandin <n...@peralex.com> Date: Sat Jun 25 23:21:36 2016 +0200 loplugin:singlevalfields in sw(part2) which revealed the reality of what commit 5faf5492741abfd013ae677b1ec2fc06276d8644 Author: Lei De Bin <le...@apache.org> Date: Wed Sep 12 04:07:30 2012 +0000 Resolves: #i119612# fix the order of Hebraic string are changed after.. did to the effort of... commit 1ef7ca4438b74f9f7b24451df90b860418d70bb1 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Feb 24 13:28:15 2011 +0000 Resolves: fdo#34319 on import take into account idcthint i.e. force on the font that word would use. We really need a idcthint implementation of our own to be able to do this completely correct. note that the comment from leidb missed out on the use of the value "2", so retain the 0, 1, 2, ff values on import, and make use of them where we used to use m_nIdctHint. Change-Id: Id96ec6b088232a99fd1cbb7901452b5a0f55f8d3 diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 36debf0..32f40ba 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3239,10 +3239,6 @@ namespace // to auto-bias to LATIN. // See https://bugs.libreoffice.org/show_bug.cgi?id=34319 for an example -// -// TO-DO: revisit this after the fix of #i119612# which retains the -// idcthint feature on import from word and has it available for re-export -// but we don't use it yet for the actual rendering and layout void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString) { if (rAddString.isEmpty()) @@ -3280,7 +3276,10 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString int nLclIdctHint = 0xFF; if (nScript == i18n::ScriptType::WEAK) - nLclIdctHint = 0; + { + const SfxInt16Item *pIdctHint = static_cast<const SfxInt16Item*>(GetFormatAttr(RES_CHRATR_IDCTHINT)); + nLclIdctHint = pIdctHint->GetValue(); + } else if (nScript == MSASCII) // Force weak chars in ascii range to use LATIN font nLclIdctHint = 0; diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 26fcc8a..5c85b3c 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -4269,14 +4269,14 @@ void SwWW8ImplReader::Read_IdctHint( sal_uInt16, const sal_uInt8* pData, short n // this property determines what font and language the character will use. // when this value is 0, text properties bias towards non-far east properties. // when this value is 1, text properties bias towards far east properties. + // when this value is 2, text properties bias towards complex properties. if( nLen < 0 ) //Property end { m_pCtrlStck->SetAttr(*m_pPaM->GetPoint(),RES_CHRATR_IDCTHINT); } else //Property start { - sal_uInt8 nVal = *pData; - NewAttr( SfxInt16Item( RES_CHRATR_IDCTHINT, (nVal!=0)? 1 : 0 ) ); + NewAttr(SfxInt16Item(RES_CHRATR_IDCTHINT, *pData)); } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits