[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2023-03-15 Thread Caolán McNamara (via logerrit)
 svx/source/tbxctrls/fontworkgallery.cxx |2 +-
 sw/source/core/crsr/crsrsh.cxx  |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7c66d037b09238709d78206431cf487443633787
Author: Caolán McNamara 
AuthorDate: Wed Mar 15 12:55:39 2023 +
Commit: Caolán McNamara 
CommitDate: Wed Mar 15 16:28:19 2023 +

cid#1522014 Dereference null return value

Change-Id: I9c5b48ececd6be84d8f1a3c4a45b02d81641736e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148926
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 132a3cd7c9db..298801ace223 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -638,7 +638,7 @@ typename SwCursorShell::StartsWith 
SwCursorShell::StartsWith_()
 }
 nNode = rNodes.GetEndOfContent();
 pContentNode = SwNodes::GoPrevious();
-if (pContentNode->GetTextNode()->IsHidden())
+if (pContentNode && pContentNode->GetTextNode()->IsHidden())
 {
 return StartsWith::HiddenPara;
 }
@@ -2798,7 +2798,7 @@ bool SwCursorShell::IsEndOfDoc() const
 if( !pCNd )
 pCNd = SwNodes::GoPrevious(  );
 
-return aIdx == m_pCurrentCursor->GetPoint()->GetNode() &&
+return aIdx == m_pCurrentCursor->GetPoint()->GetNode() && pCNd &&
 pCNd->Len() == m_pCurrentCursor->GetPoint()->GetContentIndex();
 }
 
commit a84a15eadc4ff5b14287f548170f4a9d81ee
Author: Caolán McNamara 
AuthorDate: Wed Mar 15 12:52:06 2023 +
Commit: Caolán McNamara 
CommitDate: Wed Mar 15 16:28:11 2023 +

cid#1521990 silence Unchecked return value

Change-Id: I7833b6ab19334ea17f5210a0381109aa55d6efd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148925
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/svx/source/tbxctrls/fontworkgallery.cxx 
b/svx/source/tbxctrls/fontworkgallery.cxx
index da1df7a8fd96..b08698c03921 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -129,7 +129,7 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 
nThemeId)
 maIdToTitleMap.clear();
 
 std::vector aTitles;
-GalleryExplorer::FillObjListTitle(nThemeId, aTitles);
+(void)GalleryExplorer::FillObjListTitle(nThemeId, aTitles);
 assert(aTitles.size() == nFavCount);
 
 for( size_t nFavorite = 1; nFavorite <= nFavCount; nFavorite++ )


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2022-12-14 Thread Noel Grandin (via logerrit)
 svx/source/tbxctrls/tbunocontroller.cxx|   31 ---
 svx/source/tbxctrls/tbunosearchcontrollers.cxx |  217 ++---
 sw/source/core/unocore/unostyle.cxx|   28 --
 sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx |   50 
 sw/source/uibase/inc/unotxvw.hxx   |   33 +--
 sw/source/uibase/inc/workctrl.hxx  |8 
 sw/source/uibase/ribbar/workctrl.cxx   |   53 -
 sw/source/uibase/uno/unotxvw.cxx   |   97 -
 8 files changed, 54 insertions(+), 463 deletions(-)

New commits:
commit 705594fc805012b5bf6167d7f9fee63bb1b90a1b
Author: Noel Grandin 
AuthorDate: Wed Dec 14 16:14:02 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 14 18:24:45 2022 +

loplugin:implinheritancehelper in sw

use more ImplInheritanceHelper to reduce boilerplate

Change-Id: I0bf96b2e3d897d19d4883c2958c72fbfe3b61080
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144164
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index 54292da78c9c..cd2097cc3db5 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -630,23 +630,18 @@ public:
 void PutItemToSet(const SvxSetItem* pSetItem, const SfxItemPropertySet& 
rPropSet, const SfxItemPropertyMapEntry& rEntry, const uno::Any& rVal, 
SwStyleBase_Impl& rBaseImpl);
 };
 
+typedef cppu::ImplInheritanceHelper< SwXStyle, css::document::XEventsSupplier> 
SwXFrameStyle_Base;
 class SwXFrameStyle
-: public SwXStyle
-, public css::document::XEventsSupplier
+: public SwXFrameStyle_Base
 , public sw::ICoreFrameStyle
 {
 public:
 SwXFrameStyle(SfxStyleSheetBasePool& rPool,
 SwDoc*  pDoc,
 const OUString& rStyleName) :
-SwXStyle(, SfxStyleFamily::Frame, pDoc, rStyleName){}
+SwXFrameStyle_Base(, SfxStyleFamily::Frame, pDoc, rStyleName){}
 explicit SwXFrameStyle(SwDoc *pDoc);
 
-virtual void SAL_CALL acquire(  ) noexcept override {SwXStyle::acquire();}
-virtual void SAL_CALL release(  ) noexcept override {SwXStyle::release();}
-
-virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) 
override;
-virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType 
) override;
 virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL 
getEvents(  ) override;
 
 //ICoreStyle
@@ -3343,7 +3338,7 @@ void SwXPageStyle::setPropertyValue(const OUString& 
rPropertyName, const uno::An
 }
 
 SwXFrameStyle::SwXFrameStyle(SwDoc *pDoc)
-: SwXStyle(pDoc, SfxStyleFamily::Frame, false)
+: SwXFrameStyle_Base(pDoc, SfxStyleFamily::Frame, false)
 { }
 
 void SwXFrameStyle::SetItem(sal_uInt16 eAtr, const SfxPoolItem& rItem)
@@ -3369,21 +3364,6 @@ const SfxPoolItem* SwXFrameStyle::GetItem(sal_uInt16 
eAtr)
 return >GetItemSet().Get(eAtr);
 }
 
-uno::Sequence SwXFrameStyle::getTypes()
-{
-return cppu::OTypeCollection(
-cppu::UnoType::get(),
-SwXStyle::getTypes()
-).getTypes();
-}
-
-uno::Any SwXFrameStyle::queryInterface(const uno::Type& rType)
-{
-if(rType == cppu::UnoType::get())
-return uno::Any(uno::Reference(this));
-return SwXStyle::queryInterface(rType);
-}
-
 uno::Reference SwXFrameStyle::getEvents()
 {
 return new SwFrameStyleEventDescriptor(*this);
diff --git a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx 
b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
index a97974f57f34..1603d11b2608 100644
--- a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
+++ b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
@@ -97,7 +97,8 @@ IMPL_LINK(CurrentEdit, KeyInputHdl, const KeyEvent&, rKEvt, 
bool)
 }
 
 /// Controller for .uno:MailMergeCurrentEntry toolbar checkbox: creates the 
checkbox & handles the value.
-class MMCurrentEntryController : public svt::ToolboxController, public 
lang::XServiceInfo
+typedef cppu::ImplInheritanceHelper< ::svt::ToolboxController, 
css::lang::XServiceInfo> MMCurrentEntryController_Base;
+class MMCurrentEntryController : public MMCurrentEntryController_Base
 {
 VclPtr m_xCurrentEdit;
 
@@ -105,31 +106,11 @@ class MMCurrentEntryController : public 
svt::ToolboxController, public lang::XSe
 
 public:
 explicit MMCurrentEntryController(const 
uno::Reference& rContext)
-: svt::ToolboxController(rContext, uno::Reference(), 
".uno:MailMergeCurrentEntry")
+: MMCurrentEntryController_Base(rContext, 
uno::Reference(), ".uno:MailMergeCurrentEntry")
 , m_xCurrentEdit(nullptr)
 {
 }
 
-// XInterface
-virtual uno::Any SAL_CALL queryInterface(const uno::Type& aType) override
-{
-uno::Any a(ToolboxController::queryInterface(aType));
-if (a.hasValue())
-return a;
-
-return ::cppu::queryInterface(aType, 

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2021-05-30 Thread Noel Grandin (via logerrit)
 svx/source/fmcomp/gridctrl.cxx   |   15 ++-
 sw/source/filter/ww8/ww8par.cxx  |   18 +-
 sw/source/filter/ww8/ww8par.hxx  |2 +-
 sw/source/filter/ww8/ww8scan.cxx |2 +-
 sw/source/filter/ww8/ww8scan.hxx |2 +-
 sw/source/filter/xml/xmltbli.cxx |   20 ++--
 sw/source/filter/xml/xmltbli.hxx |2 +-
 7 files changed, 29 insertions(+), 32 deletions(-)

New commits:
commit 4e9e9b796bf597a7ceedb608e3fbb0c1480b0633
Author: Noel Grandin 
AuthorDate: Sat May 29 13:47:17 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun May 30 09:09:12 2021 +0200

don't check isDisposed inside dispose()

my fault, from a recent commit. besides defeating the dispose(), it
should also be checked from the call sites.

Change-Id: Ia09580d4224bcf78e5684015c747105fa6606878
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116383
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index d631d87eef58..ab8f128a7b29 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -751,16 +751,13 @@ DbGridControl::~DbGridControl()
 
 void DbGridControl::dispose()
 {
-if (!isDisposed())
-{
-RemoveColumns();
+RemoveColumns();
 
-m_bWantDestruction = true;
-osl::MutexGuard aGuard(m_aDestructionSafety);
-if (m_pFieldListeners)
-DisconnectFromFields();
-m_pCursorDisposeListener.reset();
-}
+m_bWantDestruction = true;
+osl::MutexGuard aGuard(m_aDestructionSafety);
+if (m_pFieldListeners)
+DisconnectFromFields();
+m_pCursorDisposeListener.reset();
 
 if (m_nDeleteEvent)
 Application::RemoveUserEvent(m_nDeleteEvent);
commit 1d641424d2591c3e221d0bd6a203f46e5c4352fe
Author: Noel Grandin 
AuthorDate: Fri May 28 15:19:37 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun May 30 09:08:57 2021 +0200

std::unique_ptr->std::optional

Change-Id: I674ef2bccaa56d1435b821e3e161f7c47340202f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116380
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a86e6f5b2687..9f8b38e6dd46 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5366,7 +5366,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const 
*pGloss)
 m_xSBase.reset();
 m_xWDop.reset();
 m_xFonts.reset();
-m_pAtnNames.reset();
+m_xAtnNames.reset();
 m_xSprmParser.reset();
 m_xProgress.reset();
 
@@ -6090,10 +6090,10 @@ void SwWW8ImplReader::SetOutlineStyles()
 
 const OUString* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
 {
-if (!m_pAtnNames && m_xWwFib->m_lcbGrpStAtnOwners)
+if (!m_xAtnNames && m_xWwFib->m_lcbGrpStAtnOwners)
 {
 // Determine authors: can be found in the TableStream
-m_pAtnNames.reset(new std::vector);
+m_xAtnNames.emplace();
 SvStream& rStrm = *m_pTableStream;
 
 tools::Long nOldPos = rStrm.Tell();
@@ -6104,23 +6104,23 @@ const OUString* 
SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
 {
 if( m_bVer67 )
 {
-m_pAtnNames->push_back(read_uInt8_PascalString(rStrm,
+m_xAtnNames->push_back(read_uInt8_PascalString(rStrm,
 RTL_TEXTENCODING_MS_1252));
-nRead += m_pAtnNames->rbegin()->getLength() + 1; // Length + 
sal_uInt8 count
+nRead += m_xAtnNames->rbegin()->getLength() + 1; // Length + 
sal_uInt8 count
 }
 else
 {
-m_pAtnNames->push_back(read_uInt16_PascalString(rStrm));
+m_xAtnNames->push_back(read_uInt16_PascalString(rStrm));
 // Unicode: double the length + sal_uInt16 count
-nRead += (m_pAtnNames->rbegin()->getLength() + 1)*2;
+nRead += (m_xAtnNames->rbegin()->getLength() + 1)*2;
 }
 }
 rStrm.Seek( nOldPos );
 }
 
 const OUString *pRet = nullptr;
-if (m_pAtnNames && nIdx < m_pAtnNames->size())
-pRet = &((*m_pAtnNames)[nIdx]);
+if (m_xAtnNames && nIdx < m_xAtnNames->size())
+pRet = &((*m_xAtnNames)[nIdx]);
 return pRet;
 }
 
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 575841ffbeee..d2ad5f67b6c7 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1263,7 +1263,7 @@ private:
 
 std::unique_ptr m_xMSDffManager;
 
-std::unique_ptr> m_pAtnNames;
+std::optional> m_xAtnNames;
 
 std::unique_ptr m_pSmartTagData;
 
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 8f24ccac97c8..ae7309c4ca23 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5074,7 +5074,7 @@ 

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2020-09-18 Thread Szymon Kłos (via logerrit)
 svx/source/inc/StylesPreviewToolBoxControl.hxx  |2 -
 svx/source/inc/StylesPreviewWindow.hxx  |   18 +
 svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx |   10 -
 svx/source/tbxctrls/StylesPreviewWindow.cxx |   39 +++-
 sw/source/core/doc/DocumentStylePoolManager.cxx |   11 +
 sw/source/core/edit/edfcol.cxx  |   13 ++
 6 files changed, 65 insertions(+), 28 deletions(-)

New commits:
commit 10aac52bafc8a0430d1da3fe8f45832c64d6bf34
Author: Szymon Kłos 
AuthorDate: Mon Aug 31 13:05:31 2020 +0200
Commit: Szymon Kłos 
CommitDate: Fri Sep 18 13:30:17 2020 +0200

Styles preview widget language independent

Use both english / universal and translated names
to identify a style.

Change-Id: Ibd8b23e678e8bea5773d1da97adf5201377b4453
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101832
Tested-by: Jenkins CollaboraOffice 
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102963
Tested-by: Jenkins

diff --git a/svx/source/inc/StylesPreviewToolBoxControl.hxx 
b/svx/source/inc/StylesPreviewToolBoxControl.hxx
index 7e2bd85da67e..c7ac3f9953b6 100644
--- a/svx/source/inc/StylesPreviewToolBoxControl.hxx
+++ b/svx/source/inc/StylesPreviewToolBoxControl.hxx
@@ -35,7 +35,7 @@ class StylesPreviewToolBoxControl final
 
 css::uno::Reference m_xDispatchProvider;
 
-std::vector m_aDefaultStyles;
+std::vector> m_aDefaultStyles;
 
 public:
 StylesPreviewToolBoxControl();
diff --git a/svx/source/inc/StylesPreviewWindow.hxx 
b/svx/source/inc/StylesPreviewWindow.hxx
index 5ae857210c6f..26ba93d7be79 100644
--- a/svx/source/inc/StylesPreviewWindow.hxx
+++ b/svx/source/inc/StylesPreviewWindow.hxx
@@ -44,19 +44,19 @@ class StyleItemController : public 
weld::CustomWidgetController
 static constexpr unsigned LEFT_MARGIN = 8;
 
 SfxStyleFamily m_eStyleFamily;
-OUString m_aStyleName;
+std::pair m_aStyleName;
 bool m_bSelected;
 css::uno::Reference m_xDispatchProvider;
 
 public:
-StyleItemController(const OUString& aStyleName,
+StyleItemController(const std::pair& aStyleName,
 css::uno::Reference& 
xDispatchProvider);
 
 void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& 
rRect) override;
 
 bool MouseButtonDown(const MouseEvent&) override;
 
-void SetStyle(const OUString& sStyleName);
+void SetStyle(const std::pair& sStyleName);
 
 void Select(bool bSelect);
 
@@ -83,8 +83,8 @@ protected:
 std::unique_ptr m_xUp;
 std::unique_ptr m_xDown;
 
-std::vector m_aDefaultStyles;
-std::vector m_aAllStyles;
+std::vector> m_aDefaultStyles;
+std::vector> m_aAllStyles;
 
 unsigned m_nStyleIterator;
 OUString m_sSelectedStyle;
@@ -93,7 +93,8 @@ protected:
 DECL_LINK(GoDown, const OString&, void);
 
 public:
-StylesPreviewWindow_Base(weld::Builder& xBuilder, std::vector& 
aDefaultStyles,
+StylesPreviewWindow_Base(weld::Builder& xBuilder,
+ std::vector>& 
aDefaultStyles,
  
css::uno::Reference& xDispatchProvider);
 ~StylesPreviewWindow_Base();
 
@@ -103,13 +104,14 @@ private:
 void Update();
 void UpdateStylesList();
 void MakeCurrentStyleVisible();
-OUString GetVisibleStyle(unsigned nPosition);
+std::pair GetVisibleStyle(unsigned nPosition);
 };
 
 class StylesPreviewWindow_Impl : public InterimItemWindow, public 
StylesPreviewWindow_Base
 {
 public:
-StylesPreviewWindow_Impl(vcl::Window* pParent, std::vector& 
aDefaultStyles,
+StylesPreviewWindow_Impl(vcl::Window* pParent,
+ std::vector>& 
aDefaultStyles,
  
css::uno::Reference& xDispatchProvider);
 ~StylesPreviewWindow_Impl();
 
diff --git a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx 
b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
index 7e4a0167b908..9b78a0e7aaf0 100644
--- a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
+++ b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
@@ -79,7 +79,10 @@ void StylesPreviewToolBoxControl::InitializeStyles(
 OUString sName;
 xStyle->getPropertyValue("DisplayName") >>= sName;
 if (!sName.isEmpty())
-m_aDefaultStyles.push_back(sName);
+m_aDefaultStyles.push_back(std::pair(aStyle, sName));
+}
+catch (const css::container::NoSuchElementException&)
+{
 }
 catch (const css::uno::Exception&)
 {
@@ -103,7 +106,10 @@ void StylesPreviewToolBoxControl::InitializeStyles(
 OUString sName;
 xStyle->getPropertyValue("DisplayName") >>= sName;
 if (!sName.isEmpty())
-   

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2019-07-16 Thread Caolán McNamara (via logerrit)
 svx/source/dialog/ctredlin.cxx |1 +
 sw/source/ui/fldui/flddinf.cxx |4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 9f3a68efcdf53b1ec2ca8736943f00aeae6e642d
Author: Caolán McNamara 
AuthorDate: Mon Jul 15 21:57:32 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 16 09:29:27 2019 +0200

cid#1448424 silence Uninitialized pointer field

Change-Id: Ie68cb97a092753185cc31c0b590fe75fad79989b
Reviewed-on: https://gerrit.libreoffice.org/75668
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index f912a6fc7f9c..18c7cd44e1fb 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -79,6 +79,7 @@ 
SvxRedlinTable::SvxRedlinTable(std::unique_ptr xWriterControl,
 Application::GetSettings().GetUILanguageTag().getLocale()))
 , xWriterTreeView(std::move(xWriterControl))
 , xCalcTreeView(std::move(xCalcControl))
+, pTreeView(nullptr)
 , nDatePos(WRITER_DATE)
 , bAuthor(false)
 , bDate(false)
commit 50119846cc9cb32705dd3a7f95bb4c7b3505
Author: Caolán McNamara 
AuthorDate: Mon Jul 15 21:53:56 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 16 09:29:16 2019 +0200

cid#1448306 silence Unchecked return value

Change-Id: I4d95a54820a3cce9b23ac772abfbfe35ec908765
Reviewed-on: https://gerrit.libreoffice.org/75667
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 8780fa60c9e9..3c29bd911a43 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -216,9 +216,9 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
 IMPL_LINK_NOARG(SwFieldDokInfPage, TypeHdl, weld::TreeView&, void)
 {
 // current ListBoxPos
-if (!m_xTypeTLB->get_selected(m_xSelEntry.get()))
+if (!m_xTypeTLB->get_selected(m_xSelEntry.get()) &&
+m_xTypeTLB->get_iter_first(*m_xSelEntry))
 {
-m_xTypeTLB->get_iter_first(*m_xSelEntry);
 m_xTypeTLB->select(*m_xSelEntry);
 }
 FillSelectionLB(m_xTypeTLB->get_id(*m_xSelEntry).toUInt32());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2019-05-11 Thread Noel Grandin (via logerrit)
 svx/source/dialog/dialcontrol.cxx |5 +++--
 svx/source/svdraw/svdogrp.cxx |   27 ++-
 svx/source/svdraw/svdopath.cxx|8 
 sw/source/uibase/uiview/view.cxx  |   12 
 4 files changed, 37 insertions(+), 15 deletions(-)

New commits:
commit f8d29fea9915a5fe66e4ba24cbd3b248929b51b7
Author: Noel Grandin 
AuthorDate: Fri May 10 15:47:53 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat May 11 09:09:52 2019 +0200

handle empty tools::Rectangle in svx

Change-Id: I45e26c9cdc00ae6d3bc56534d612b83b5ac26074
Reviewed-on: https://gerrit.libreoffice.org/72125
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/svx/source/dialog/dialcontrol.cxx 
b/svx/source/dialog/dialcontrol.cxx
index 547949ce5e2e..598caafc8201 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -212,8 +212,9 @@ void DialControlBmp::DrawBackground()
 
 SetLineColor();
 SetFillColor( GetBackgroundColor() );
-DrawEllipse( tools::Rectangle( maRect.Left() + DIAL_OUTER_WIDTH, 
maRect.Top() + DIAL_OUTER_WIDTH,
-maRect.Right() - DIAL_OUTER_WIDTH, maRect.Bottom() - DIAL_OUTER_WIDTH 
) );
+tools::Rectangle aEllipseRect = maRect;
+aEllipseRect.shrink(DIAL_OUTER_WIDTH);
+DrawEllipse( aEllipseRect );
 }
 
 
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 61bca73c9a37..c50ba9524908 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -501,17 +501,26 @@ void SdrObjGroup::SetSnapRect(const tools::Rectangle& 
rRect)
 {
 tools::Rectangle aBoundRect0; if (pUserCall!=nullptr) 
aBoundRect0=GetLastBoundRect();
 tools::Rectangle aOld(GetSnapRect());
-long nMulX=rRect.Right()-rRect.Left();
-long nDivX=aOld.Right()-aOld.Left();
-long nMulY=rRect.Bottom()-rRect.Top();
-long nDivY=aOld.Bottom()-aOld.Top();
-if (nDivX==0) { nMulX=1; nDivX=1; }
-if (nDivY==0) { nMulY=1; nDivY=1; }
-if (nMulX!=nDivX || nMulY!=nDivY) {
-Fraction aX(nMulX,nDivX);
-Fraction aY(nMulY,nDivY);
+if (aOld.IsEmpty())
+{
+Fraction aX(1,1);
+Fraction aY(1,1);
 Resize(aOld.TopLeft(),aX,aY);
 }
+else
+{
+long nMulX=rRect.Right()-rRect.Left();
+long nDivX=aOld.Right()-aOld.Left();
+long nMulY=rRect.Bottom()-rRect.Top();
+long nDivY=aOld.Bottom()-aOld.Top();
+if (nDivX==0) { nMulX=1; nDivX=1; }
+if (nDivY==0) { nMulY=1; nDivY=1; }
+if (nMulX!=nDivX || nMulY!=nDivY) {
+Fraction aX(nMulX,nDivX);
+Fraction aY(nMulY,nDivY);
+Resize(aOld.TopLeft(),aX,aY);
+}
+}
 if (rRect.Left()!=aOld.Left() || rRect.Top()!=aOld.Top()) {
 Move(Size(rRect.Left()-aOld.Left(),rRect.Top()-aOld.Top()));
 }
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 4c3d0f2040b9..12a7b2c1af39 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2362,6 +2362,14 @@ void SdrPathObj::RecalcSnapRect()
 void SdrPathObj::NbcSetSnapRect(const tools::Rectangle& rRect)
 {
 tools::Rectangle aOld(GetSnapRect());
+if (aOld.IsEmpty())
+{
+Fraction aX(1,1);
+Fraction aY(1,1);
+NbcResize(aOld.TopLeft(), aX, aY);
+NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
+return;
+}
 
 // Take empty into account when calculating scale factors
 long nMulX = rRect.IsWidthEmpty() ? 0 : rRect.Right()  - rRect.Left();
commit 08b79ade4f2e2fa98487696591123f71a7521dff
Author: Noel Grandin 
AuthorDate: Fri May 10 15:47:05 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat May 11 09:09:39 2019 +0200

handle empty tools::Rectangle in sw

Change-Id: I44c4b5a6d4f0aada0ed95d8cd4d05366958c6207
Reviewed-on: https://gerrit.libreoffice.org/72124
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index c48a59c22841..67fce780a56a 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1527,13 +1527,17 @@ void SwView::WriteUserDataSequence ( uno::Sequence < 
beans::PropertyValue >& rSe
 
 aVector.push_back(comphelper::makePropertyValue("ViewTop", 
convertTwipToMm100 ( rRect.Top() )));
 
-aVector.push_back(comphelper::makePropertyValue("VisibleLeft", 
convertTwipToMm100 ( rVis.Left() )));
+auto visibleLeft = convertTwipToMm100 ( rVis.Left() );
+aVector.push_back(comphelper::makePropertyValue("VisibleLeft", 
visibleLeft));
 
-aVector.push_back(comphelper::makePropertyValue("VisibleTop", 
convertTwipToMm100 ( rVis.Top() )));
+auto visibleTop = convertTwipToMm100 ( rVis.Top() );
+aVector.push_back(comphelper::makePropertyValue("VisibleTop", visibleTop));
 
-aVector.push_back(comphelper::makePropertyValue("VisibleRight", 
convertTwipToMm100 ( 

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2018-07-18 Thread Libreoffice Gerrit user
 svx/source/sdr/properties/properties.cxx |   13 +++--
 sw/source/core/inc/scriptinfo.hxx|7 ---
 sw/source/core/text/porlay.cxx   |   25 ++---
 3 files changed, 21 insertions(+), 24 deletions(-)

New commits:
commit 7d2668517b68f9a7f056a993e53b4dd80838a4f9
Author: Armin Le Grand 
AuthorDate: Tue Jul 17 18:39:23 2018 +0200
Commit: Armin Le Grand 
CommitDate: Wed Jul 18 10:46:43 2018 +0200

tdf#118139 Set Default StyleSheet only when available

Change-Id: Id8643895add3181c41737249326bb49e1a2c2493
Reviewed-on: https://gerrit.libreoffice.org/57582
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/svx/source/sdr/properties/properties.cxx 
b/svx/source/sdr/properties/properties.cxx
index bdaaec8d..61929a9b498a 100644
--- a/svx/source/sdr/properties/properties.cxx
+++ b/svx/source/sdr/properties/properties.cxx
@@ -43,8 +43,17 @@ namespace sdr
 
 void BaseProperties::applyDefaultStyleSheetFromSdrModel()
 {
-// do not delete hard attributes when setting dsefault Style
-
SetStyleSheet(GetSdrObject().getSdrModelFromSdrObject().GetDefaultStyleSheet(), 
true);
+SfxStyleSheet* 
pDefaultStyleSheet(GetSdrObject().getSdrModelFromSdrObject().GetDefaultStyleSheet());
+
+// tdf#118139 Only do this when StyleSheet really differs. It may 
e.g.
+// be the case that nullptr == pDefaultStyleSheet and there is 
none set yet,
+// so indeed no need to set it (needed for some strange old 
MSWord2003
+// documents with CustomShape-'Group' and added Text-Frames, see 
task description)
+if(pDefaultStyleSheet != GetStyleSheet())
+{
+// do not delete hard attributes when setting dsefault Style
+SetStyleSheet(pDefaultStyleSheet, true);
+}
 }
 
 const SdrObject& BaseProperties::GetSdrObject() const
commit f3df554636b32160cab6d9e6e42cd32550a6a0c7
Author: Takeshi Abe 
AuthorDate: Wed Jul 18 15:46:47 2018 +0900
Commit: Noel Grandin 
CommitDate: Wed Jul 18 10:46:37 2018 +0200

sw: Change m_KashidaInvalid to std::unordered_set

... for clarifying what is supposed to do, and doing it more
efficiently.
Actually this assumes that m_KashidaInvalid has no duplicate
entries, which I think is humble and sane.

Change-Id: I010d3d9788378b369b5b52a37a3824c8e415c2aa
Reviewed-on: https://gerrit.libreoffice.org/57611
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sw/source/core/inc/scriptinfo.hxx 
b/sw/source/core/inc/scriptinfo.hxx
index e3b532783439..7f81a8d0e99f 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -63,7 +64,7 @@ private:
 std::vector m_DirectionChanges;
 std::deque m_Kashida;
 /// indexes into m_Kashida
-std::deque m_KashidaInvalid;
+std::unordered_set m_KashidaInvalid;
 std::deque m_NoKashidaLine;
 std::deque m_NoKashidaLineEnd;
 std::deque m_HiddenChg;
@@ -84,9 +85,9 @@ private:
 sal_uInt8 m_nDefaultDir;
 
 void UpdateBidiInfo( const OUString& rText );
-
 bool IsKashidaValid(size_t nKashPos) const;
-void MarkKashidaInvalid(size_t nKashPos);
+// returns true if nKashPos is newly marked invalid
+bool MarkKashidaInvalid(size_t nKashPos);
 void ClearKashidaInvalid(size_t nKashPos);
 bool MarkOrClearKashidaInvalid(TextFrameIndex nStt, TextFrameIndex nLen,
 bool bMark, sal_Int32 nMarkCount);
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index a5391aa817a6..e6b2ea0ee5a1 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1795,7 +1795,7 @@ long SwScriptInfo::Compress(long* pKernArray, 
TextFrameIndex nIdx, TextFrameInde
 // Note on calling KashidaJustify():
 // Kashida positions may be marked as invalid. Therefore KashidaJustify may 
return the clean
 // total number of kashida positions, or the number of kashida positions after 
some positions
-// have been dropped, depending on the state of the m_KashidaInvalid array.
+// have been dropped, depending on the state of the m_KashidaInvalid set.
 
 sal_Int32 SwScriptInfo::KashidaJustify( long* pKernArray,
 long* pScrArray,
@@ -1921,24 +1921,12 @@ bool SwScriptInfo::IsArabicText(const OUString& rText,
 
 bool SwScriptInfo::IsKashidaValid(size_t const nKashPos) const
 {
-for (size_t i : m_KashidaInvalid)
-{
-if ( i == nKashPos )
-return false;
-}
-return true;
+return m_KashidaInvalid.find(nKashPos) == m_KashidaInvalid.end();
 }
 
 void SwScriptInfo::ClearKashidaInvalid(size_t const nKashPos)
 {
-for (size_t i = 0; i < m_KashidaInvalid.size(); ++i)
-{
-if (m_KashidaInvalid [ i ] == nKashPos)
-{
- 

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source xmloff/source

2018-03-10 Thread Tomaž Vajngerl
 svx/source/unodraw/unoshap2.cxx|   32 +++-
 sw/source/filter/xml/xmltexte.cxx  |4 ++--
 sw/source/filter/xml/xmltexte.hxx  |3 ++-
 xmloff/source/draw/shapeexport.cxx |4 +++-
 4 files changed, 22 insertions(+), 21 deletions(-)

New commits:
commit 91ab5a07708892c3df6940aeb643d50bfd43e285
Author: Tomaž Vajngerl 
Date:   Sun Mar 11 01:53:13 2018 +0900

use XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE define

Change-Id: I6d37cc1e745b797a1c727a988177916291b650be
Reviewed-on: https://gerrit.libreoffice.org/51049
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/source/filter/xml/xmltexte.cxx 
b/sw/source/filter/xml/xmltexte.cxx
index 2324d667cb39..27205f248222 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -79,7 +79,6 @@ SwXMLTextParagraphExport::SwXMLTextParagraphExport(
  SvXMLAutoStylePoolP& _rAutoStylePool ) :
 XMLTextParagraphExport( rExp, _rAutoStylePool ),
 sEmbeddedObjectProtocol( "vnd.sun.star.EmbeddedObject:" ),
-sGraphicObjectProtocol( "vnd.sun.star.GraphicObject:" ),
 aAppletClassId( SO3_APPLET_CLASSID ),
 aPluginClassId( SO3_PLUGIN_CLASSID ),
 aIFrameClassId( SO3_IFRAME_CLASSID )
@@ -562,7 +561,8 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
 }
 if( SV_EMBEDDED_OUTPLACE==nType || SV_EMBEDDED_OWN==nType )
 {
-OUString sURL( sGraphicObjectProtocol + 
rOLEObj.GetCurrentPersistName() );
+OUString sURL(XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE);
+sURL += rOLEObj.GetCurrentPersistName();
 if( !(rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED) )
 {
 sURL = GetExport().AddEmbeddedObject( sURL );
diff --git a/sw/source/filter/xml/xmltexte.hxx 
b/sw/source/filter/xml/xmltexte.hxx
index 9ff9581d5070..38d0d2bdd02e 100644
--- a/sw/source/filter/xml/xmltexte.hxx
+++ b/sw/source/filter/xml/xmltexte.hxx
@@ -23,6 +23,8 @@
 #include 
 #include 
 
+#define XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE "vnd.sun.star.GraphicObject:"
+
 class SwXMLExport;
 class SvXMLAutoStylePoolP;
 class SwNoTextNode;
@@ -33,7 +35,6 @@ namespace com { namespace sun { namespace star { namespace 
style {
 class SwXMLTextParagraphExport : public XMLTextParagraphExport
 {
 const OUString sEmbeddedObjectProtocol;
-const OUString sGraphicObjectProtocol;
 
 const SvGlobalName aAppletClassId;
 const SvGlobalName aPluginClassId;
diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index e028f56e846e..6a6613e486d4 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -128,6 +128,8 @@ using namespace ::com::sun::star;
 using namespace ::xmloff::EnhancedCustomShapeToken;
 using namespace ::xmloff::token;
 
+#define XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE "vnd.sun.star.GraphicObject:"
+
 namespace {
 
 bool supportsText(XmlShapeType eShapeType)
@@ -2954,7 +2956,7 @@ void XMLShapeExport::ImpExportOLE2Shape(
 }
 if( !bIsEmptyPresObj )
 {
-OUString sURL(  "vnd.sun.star.GraphicObject:"  );
+OUString sURL(XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE);
 sURL += sPersistName;
 if( !bExportEmbedded )
 {
commit cfb90793b42ff57281d1cdd8b0c609652664ffe9
Author: Tomaž Vajngerl 
Date:   Sun Mar 11 01:11:22 2018 +0900

svx: convert XBitmap directly to XGraphic

Change-Id: If2bd8419d9073625f0392f59f671d70193bf990c
Reviewed-on: https://gerrit.libreoffice.org/51048
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index bf8b7b706c0d..453e6a254cfb 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1308,25 +1308,24 @@ bool SvxGraphicObject::setPropertyValueImpl( const 
OUString& rName, const SfxIte
 bOk = true;
 }
 }
-else if( (rValue.getValueType() == cppu::UnoType::get()) 
|| (rValue.getValueType() == cppu::UnoType::get()))
+else if (rValue.getValueType() == 
cppu::UnoType::get())
 {
-Reference< graphic::XGraphic> xGraphic( rValue, UNO_QUERY );
-if( xGraphic.is() )
+auto xGraphic = rValue.get();
+if (xGraphic.is())
 {
 
static_cast(mpObj.get())->SetGraphic(Graphic(xGraphic));
 bOk = true;
 }
-else
+}
+else if (rValue.getValueType() == cppu::UnoType::get())
+{
+auto xBitmap = rValue.get();
+if (xBitmap.is())
 {
-// pack bitmap in the object
-Reference< awt::XBitmap > xBmp( rValue, UNO_QUERY );
-if( xBmp.is() )
-{
-

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2016-09-13 Thread Tor Lillqvist
 svx/source/sdr/contact/objectcontactofpageview.cxx |5 +
 sw/source/core/edit/edws.cxx   |2 --
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 6e18d56c77b705bafa0754e057a8048afa70dad8
Author: Tor Lillqvist 
Date:   Tue Sep 13 16:43:36 2016 +0300

Remove totally bogus comment

Was initially in German with glorious ASCII graphics, but equally
bogus.

Change-Id: I9f7286049ed6a0ec7c1511dd3da018e5f6442b15

diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx
index 6c9ac86..8cb0c59 100644
--- a/sw/source/core/edit/edws.cxx
+++ b/sw/source/core/edit/edws.cxx
@@ -145,8 +145,6 @@ bool SwEditShell::HasOtherCnt() const
 return false;
 }
 
-// access control functions for file name handling
-
 SwActContext::SwActContext(SwEditShell *pShell)
 : m_rShell(*pShell)
 {
commit 647360d9489c0589467aad18008ddb347d1ebf85
Author: Tor Lillqvist 
Date:   Tue Sep 13 12:14:20 2016 +0300

Add comment wondering whether a #if makes sense

Change-Id: Ib6e6ab79632325dd3d592265a9ee859b1bc2c3ca

diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx 
b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 2497750e..efeaad6 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -259,6 +259,11 @@ namespace sdr
 // and may use the MapMode from the Target OutDev in the 
DisplayInfo
 xPrimitiveSequence = 
rDrawPageVOContact.getPrimitive2DSequenceHierarchy(rDisplayInfo);
 #else
+// Hmm, !HAVE_FEATURE_DESKTOP && !ANDROID means iOS,
+// right? But does it make sense to use a different code
+// path for iOS than for Android; both use tiled rendering
+// etc now.
+
 // HACK: this only works when we are drawing sdr shapes via
 // drawinglayer; but it can happen that the hierarchy contains
 // more than just the shapes, and then it fails.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2016-01-17 Thread Justin Luth
 svx/source/accessibility/AccessibleShape.cxx |2 ++
 sw/source/core/text/itrpaint.cxx |   19 ++-
 sw/source/core/text/porlin.hxx   |1 +
 3 files changed, 21 insertions(+), 1 deletion(-)

New commits:
commit 3b14cdf7386f41395d1b089c3b9dde7d4429cf38
Author: Justin Luth 
Date:   Tue Dec 29 16:15:56 2015 +0300

tdf#96685 - set initial focus of accessible editeng objects

signalIMDeleteSurrounding searches for the focused accessible object.
Since newly created accessible objects were not inheriting
the focus setting of their peer, the search returned nothing
until some event triggered the focus to be adjusted.

Change-Id: I92f980b4bbe741d8ce9196165eff51059c807a2b
Reviewed-on: https://gerrit.libreoffice.org/21002
Tested-by: Jenkins 
Reviewed-by: Justin Luth 

diff --git a/svx/source/accessibility/AccessibleShape.cxx 
b/svx/source/accessibility/AccessibleShape.cxx
index 67f8800..a352e2b 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -179,6 +179,8 @@ void AccessibleShape::Init()
 // non-empty text -> use full-fledged edit source right 
away
 mpText = new AccessibleTextHelper( 
o3tl::make_unique(*pSdrObject, nullptr, *pView, *pWindow) );
 }
+if( pWindow->HasFocus() )
+mpText->SetFocus();
 
 if( bOwnParaObj )
 delete pOutlinerParaObject;
commit d1bd4465be649a4078c3a2f85a64c8a6300dd65d
Author: Justin Luth 
Date:   Wed Oct 28 11:12:17 2015 +0300

tdf#93637 TAB_OVER_MARGIN support for a few more cases

Extending nMaxRight when TAB_OVER_MARGIN compatibility is set and
the right tabstop goes beyond the right margin fixes PDF output
as well as certain cases of screen display.

Change-Id: Ida4b4f399f06670d9bdefdc21978adf19a81d53a
Reviewed-on: https://gerrit.libreoffice.org/19635
Tested-by: Jenkins 
Reviewed-by: Justin Luth 

diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 79d3c5d..c5eba01 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -37,6 +37,7 @@
 #include 
 
 #include 
+#include 
 
 #include "flyfrms.hxx"
 #include "viewsh.hxx"
@@ -161,8 +162,24 @@ void SwTextPainter::DrawTextLine( const SwRect , 
SwSaveClip ,
 SwLinePortion *pPor = bEndPor ? m_pCurr->GetFirstPortion() : 
CalcPaintOfst( rPaint );
 
 // Optimization!
-const SwTwips nMaxRight = std::min( rPaint.Right(), Right() );
+SwTwips nMaxRight = std::min( rPaint.Right(), Right() );
 const SwTwips nTmpLeft = GetInfo().X();
+//compatibility setting: allow tabstop text to exceed right margin
+if( 
GetInfo().GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::TAB_OVER_MARGIN)
 )
+{
+SwLinePortion* pPorIter = pPor;
+while( pPorIter )
+{
+if( pPorIter->IsTabRightPortion() )
+{
+   const SwTabRightPortion *pRightTabPor = 
static_cast(pPorIter);
+   const SwTwips nTabPos = nTmpLeft + pRightTabPor->GetTabPos();
+if( nMaxRight < nTabPos )
+nMaxRight = std::min( rPaint.Right(), nTabPos );
+}
+pPorIter = pPorIter->GetPortion();
+}
+}
 if( !bEndPor && nTmpLeft >= nMaxRight )
 return;
 
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index 486827d..cf46070 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -125,6 +125,7 @@ public:
 inline bool IsErgoSumPortion() const { return nWhichPor == POR_ERGOSUM; }
 inline bool IsQuoVadisPortion() const { return nWhichPor == POR_QUOVADIS; }
 inline bool IsTabLeftPortion() const { return nWhichPor == POR_TABLEFT; }
+inline bool IsTabRightPortion() const { return nWhichPor == POR_TABRIGHT; }
 inline bool IsFootnoteNumPortion() const { return nWhichPor == POR_FTNNUM; 
}
 inline bool IsFootnotePortion() const { return nWhichPor == POR_FTN; }
 inline bool IsDropPortion() const { return nWhichPor == POR_DROP; }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source xmloff/source

2016-01-13 Thread Noel Grandin
 svx/source/customshapes/EnhancedCustomShape2d.cxx |6 -
 sw/source/filter/html/htmlcss1.cxx|   33 +++---
 sw/source/filter/html/parcss1.cxx |8 --
 sw/source/filter/html/parcss1.hxx |   10 +--
 sw/source/filter/html/svxcss1.cxx |9 --
 sw/source/filter/html/svxcss1.hxx |4 -
 sw/source/filter/html/swcss1.hxx  |2 
 sw/source/filter/html/swhtml.hxx  |2 
 sw/source/filter/html/wrthtml.hxx |4 -
 sw/source/filter/ww8/escher.hxx   |2 
 sw/source/filter/ww8/rtfsdrexport.cxx |4 -
 sw/source/filter/ww8/rtfsdrexport.hxx |2 
 sw/source/filter/ww8/wrtw8esh.cxx |   16 +---
 sw/source/filter/ww8/wrtw8nds.cxx |4 -
 sw/source/filter/ww8/wrtw8sty.cxx |3 
 sw/source/filter/ww8/wrtww8.cxx   |   18 ++---
 sw/source/filter/ww8/wrtww8.hxx   |   15 ++--
 sw/source/filter/ww8/ww8graf.cxx  |3 
 sw/source/filter/ww8/ww8graf.hxx  |2 
 sw/source/filter/ww8/ww8graf2.cxx |4 -
 sw/source/filter/ww8/ww8par.cxx   |   17 ++---
 sw/source/filter/ww8/ww8par.hxx   |8 +-
 sw/source/filter/ww8/ww8par2.cxx  |   18 ++---
 sw/source/filter/ww8/ww8par3.cxx  |   11 +--
 sw/source/filter/ww8/ww8scan.cxx  |   39 +++
 sw/source/filter/ww8/ww8scan.hxx  |   18 ++---
 sw/source/ui/fldui/fldpage.cxx|7 --
 sw/source/ui/fldui/fldpage.hxx|2 
 sw/source/ui/fldui/fldvar.cxx |4 -
 sw/source/ui/fldui/fldvar.hxx |2 
 sw/source/ui/frmdlg/frmpage.cxx   |4 -
 sw/source/ui/vba/vbaborders.cxx   |5 -
 sw/source/uibase/config/caption.cxx   |8 --
 sw/source/uibase/dochdl/gloshdl.cxx   |7 --
 sw/source/uibase/dochdl/swdtflvr.cxx  |6 -
 sw/source/uibase/docvw/edtwin.cxx |   20 +-
 sw/source/uibase/fldui/fldmgr.cxx |5 -
 sw/source/uibase/frmdlg/frmmgr.cxx|3 
 sw/source/uibase/inc/caption.hxx  |3 
 sw/source/uibase/inc/conttree.hxx |2 
 sw/source/uibase/inc/dbinsdlg.hxx |2 
 sw/source/uibase/inc/edtwin.hxx   |2 
 sw/source/uibase/inc/fldmgr.hxx   |2 
 sw/source/uibase/inc/frmmgr.hxx   |2 
 sw/source/uibase/inc/frmpage.hxx  |2 
 sw/source/uibase/inc/gloshdl.hxx  |4 -
 sw/source/uibase/inc/gloslst.hxx  |2 
 sw/source/uibase/inc/olmenu.hxx   |2 
 sw/source/uibase/inc/pview.hxx|2 
 sw/source/uibase/inc/redlndlg.hxx |2 
 sw/source/uibase/inc/srcview.hxx  |2 
 sw/source/uibase/inc/swdtflvr.hxx |2 
 sw/source/uibase/inc/toxmgr.hxx   |1 
 sw/source/uibase/inc/wrtsh.hxx|   72 +++---
 sw/source/uibase/index/toxmgr.cxx |8 --
 sw/source/uibase/lingu/olmenu.cxx |3 
 sw/source/uibase/uiview/pview.cxx |3 
 sw/source/uibase/uiview/srcview.cxx   |3 
 sw/source/uibase/utlui/content.cxx|3 
 sw/source/uibase/utlui/gloslst.cxx|3 
 sw/source/uibase/wrtsh/delete.cxx |   34 +++---
 sw/source/uibase/wrtsh/move.cxx   |   39 +--
 sw/source/uibase/wrtsh/select.cxx |   27 ++--
 sw/source/uibase/wrtsh/wrtsh3.cxx |   11 +--
 xmloff/source/style/TransGradientStyle.cxx|4 -
 65 files changed, 220 insertions(+), 357 deletions(-)

New commits:
commit c2460312ffcc430f97bea6fb1101be2e736fe002
Author: Noel Grandin 
Date:   Wed Jan 13 13:44:16 2016 +0200

-Werror=unused-but-set-variable

Change-Id: I61a07db63cc8a6bad159ca455f92d604c5e78edc

diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 7fd344a..de8b9d4 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -536,12 +536,6 @@ bool 
EnhancedCustomShape2d::ConvertSequenceToEnhancedCustomShape2dHandle(
 
 void EnhancedCustomShape2d::ApplyShapeAttributes( const 
SdrCustomShapeGeometryItem& rGeometryItem )
 {
-const sal_Int32* pDefData = nullptr;
-const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eSpType );
-if ( pDefCustomShape )
-pDefData = pDefCustomShape->pDefData;
-
-
 // AdjustmentValues
 const Any* pAny = 

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2016-01-01 Thread Bjoern Michaelsen
 svx/source/accessibility/AccessibleControlShape.cxx |   31 ++--
 sw/source/core/unocore/unostyle.cxx |2 -
 2 files changed, 17 insertions(+), 16 deletions(-)

New commits:
commit c1258abe50f1508ea0f628ff963bc1914ab86b67
Author: Bjoern Michaelsen 
Date:   Sat Jan 2 02:02:21 2016 +0100

tdf#96365: ensure holding SolarMutex before triggering core code

(likely a bad sign that this compilation unit, defines lots of UNO
interfaces without ever using a SolarMutexGuard)

Change-Id: I2cca810f8e4e1684c75d9185d701024f692403a4

diff --git a/svx/source/accessibility/AccessibleControlShape.cxx 
b/svx/source/accessibility/AccessibleControlShape.cxx
index 03e6a2c..ab768d7 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include "svx/svdstr.hrc"
+#include 
 #include 
 
 using namespace ::accessibility;
@@ -466,24 +467,24 @@ void SAL_CALL AccessibleControlShape::notifyEvent( const 
AccessibleEventObject&
 }
 }
 
-void SAL_CALL AccessibleControlShape::modeChanged( const ModeChangeEvent& 
_rSource ) throw (RuntimeException, std::exception)
+void SAL_CALL AccessibleControlShape::modeChanged(const ModeChangeEvent& 
rSource) throw (RuntimeException, std::exception)
 {
 // did it come from our inner context (the real one, not it's proxy!)?
-OSL_TRACE ("AccessibleControlShape::modeChanged");
-Reference< XControl > xSource( _rSource.Source, UNO_QUERY );// for 
faster compare
-if ( xSource.get() == m_xUnoControl.get() )
-{
-// If our "pseudo-aggregated" inner context does not live anymore,
-// we don't want to live, too.  This is accomplished by asking our
-// parent to replace this object with a new one.  Disposing this
-// object and sending notifications about the replacement are in
-// the responsibility of our parent.
-OSL_VERIFY( mpParent->ReplaceChild ( this, mxShape, mnIndex, 
maShapeTreeInfo ) );
+SAL_INFO("sw.uno", "AccessibleControlShape::modeChanged");
+Reference xSource(rSource.Source, UNO_QUERY); // for faster 
compare
+if(xSource.get() != m_xUnoControl.get())
+{
+SAL_WARN("sw.uno", "AccessibleControlShape::modeChanged: where did 
this come from?");
+return;
 }
-#if OSL_DEBUG_LEVEL > 0
-else
-OSL_FAIL( "AccessibleControlShape::modeChanged: where did this come 
from?" );
-#endif
+SolarMutexGuard g;
+// If our "pseudo-aggregated" inner context does not live anymore,
+// we don't want to live, too.  This is accomplished by asking our
+// parent to replace this object with a new one.  Disposing this
+// object and sending notifications about the replacement are in
+// the responsibility of our parent.
+const bool bReplaced = mpParent->ReplaceChild(this, mxShape, mnIndex, 
maShapeTreeInfo);
+SAL_WARN_IF(!bReplaced, "sw.uno", "AccessibleControlShape::modeChanged: 
replacing ourselves away did fail");
 }
 
 void SAL_CALL AccessibleControlShape::disposing (const EventObject& _rSource) 
throw (RuntimeException, std::exception)
commit 3ae3af4a989758a0772881b1a2a6c1a68ee67dda
Author: Bjoern Michaelsen 
Date:   Sat Jan 2 01:35:53 2016 +0100

fix indent

Change-Id: I79623024b008b60a33935942986e8a98fccc3d8d

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index 8caa0dd..0bfb6b8 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -937,7 +937,7 @@ static const std::vector* 
lcl_GetStyleFamilyEntries()
 { SFX_STYLE_FAMILY_PARA,   PROPERTY_MAP_PARA_STYLE,  
nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL,  "ParagraphStyles", 
STR_STYLE_FAMILY_PARAGRAPH, _GetCountOrName,   
_CreateStyle,   
_TranslateIndex   },
 { SFX_STYLE_FAMILY_PAGE,   PROPERTY_MAP_PAGE_STYLE,  
nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, "PageStyles",  
STR_STYLE_FAMILY_PAGE,  _GetCountOrName,   
_CreateStyle,   
_TranslateIndexRange  },
 { SFX_STYLE_FAMILY_FRAME,  PROPERTY_MAP_FRAME_STYLE, 
nsSwGetPoolIdFromName::GET_POOLID_FRMFMT,   "FrameStyles", 
STR_STYLE_FAMILY_FRAME, _GetCountOrName,  
_CreateStyle,  
_TranslateIndexRange },
-{ SFX_STYLE_FAMILY_PSEUDO, PROPERTY_MAP_NUM_STYLE, 
nsSwGetPoolIdFromName::GET_POOLID_NUMRULE,  "NumberingStyles", 
STR_STYLE_FAMILY_NUMBERING, _GetCountOrName, 
_CreateStyle, 
_TranslateIndexRange   }
+{ SFX_STYLE_FAMILY_PSEUDO, PROPERTY_MAP_NUM_STYLE,   
nsSwGetPoolIdFromName::GET_POOLID_NUMRULE,  "NumberingStyles", 
STR_STYLE_FAMILY_NUMBERING, _GetCountOrName, 
_CreateStyle, 
_TranslateIndexRange   }

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2015-06-03 Thread Caolán McNamara
 svx/source/sdr/attribute/sdrtextattribute.cxx |   13 ++---
 sw/source/core/layout/layact.cxx  |1 +
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 9eb16c85d6af4b73de9a75716c3ff34f929f26b2
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Jun 3 14:15:03 2015 +0100

don't crash on layout of ooo55381-1.sxw

The pLay here is getting joined and thus deleted in a stack of
FormatLayoutTabs so set it as unjoinable for the duration that
we expect pLay to remain valid

Change-Id: Iedfaf710022ad19c0f415cee84f70c74dd7dbd96

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index fa4c289..c06706e 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1393,6 +1393,7 @@ bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, bool 
bAddRect )
 if ( pLay-IsFootnoteFrm() ) // no LayFrms as Lower
 return bChanged;
 
+FlowFrmJoinLockGuard aJoinGuard(pLay);
 SwFrm *pLow = pLay-Lower();
 bool bTabChanged = false;
 while ( pLow  pLow-GetUpper() == pLay )
commit 768a2d61c3b0a71fef0d9d732ae83938fe24633e
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Jun 2 20:37:04 2015 +0100

coverity#1302605 Resource leak in object

Change-Id: I574714c2d587ac22fcc812ffe8217f151ac40cb6

diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx 
b/svx/source/sdr/attribute/sdrtextattribute.cxx
index 45b55fb..ddd1ce1 100644
--- a/svx/source/sdr/attribute/sdrtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrtextattribute.cxx
@@ -38,7 +38,7 @@ namespace drawinglayer
 // all-text attributes. The SdrText itself and a copy
 // of the OPO
 const SdrText*  mpSdrText;
-const OutlinerParaObject*   mpOutlinerParaObject;
+std::shared_ptrOutlinerParaObject mxOutlinerParaObject;
 
 // Set when it's a FormText; contains all FormText attributes
 SdrFormTextAttributemaSdrFormTextAttribute;
@@ -88,7 +88,7 @@ namespace drawinglayer
 bool bFixedCellHeight,
 bool bWrongSpell)
 :   mpSdrText(pSdrText),
-mpOutlinerParaObject(new 
OutlinerParaObject(rOutlinerParaObject)),
+mxOutlinerParaObject(new 
OutlinerParaObject(rOutlinerParaObject)),
 maSdrFormTextAttribute(),
 maTextLeftDistance(aTextLeftDistance),
 maTextUpperDistance(aTextUpperDistance),
@@ -125,7 +125,6 @@ namespace drawinglayer
 
 ImpSdrTextAttribute()
 :   mpSdrText(0),
-mpOutlinerParaObject(0),
 maSdrFormTextAttribute(),
 maTextLeftDistance(0),
 maTextUpperDistance(0),
@@ -155,8 +154,8 @@ namespace drawinglayer
 
 const OutlinerParaObject getOutlinerParaObject() const
 {
-assert(mpOutlinerParaObject  Access to OutlinerParaObject 
of default version of ImpSdrTextAttribute (!));
-return *mpOutlinerParaObject;
+assert(mxOutlinerParaObject  Access to OutlinerParaObject 
of default version of ImpSdrTextAttribute (!));
+return *mxOutlinerParaObject;
 }
 
 bool isContour() const { return mbContour; }
@@ -180,9 +179,9 @@ namespace drawinglayer
 // compare operator
 bool operator==(const ImpSdrTextAttribute rCandidate) const
 {
-if(mpOutlinerParaObject != rCandidate.mpOutlinerParaObject)
+if (mxOutlinerParaObject.get() != 
rCandidate.mxOutlinerParaObject.get())
 {
-if(mpOutlinerParaObject  rCandidate.mpOutlinerParaObject)
+if (mxOutlinerParaObject  
rCandidate.mxOutlinerParaObject)
 {
 // compares OPO and it's contents, but traditionally 
not the RedLining
 // which is not seen as model, but as temporary 
information
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2014-10-01 Thread Samuel Mehrbrodt
 svx/source/tbxctrls/layctrl.cxx  |2 +-
 sw/source/uibase/ribbar/workctrl.cxx |2 +-
 sw/source/uibase/ribbar/workctrl.src |   32 
 3 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 5f45400ca17d52a4ee40672ac409b6521ad86f76
Author: Samuel Mehrbrodt s.mehrbr...@gmail.com
Date:   Wed Oct 1 14:17:07 2014 +0200

fdo#84550 Make 'Insert field' entry dropdown only

and reorder items; rename Other to More

Change-Id: I8a6f2a68fd43af2c7c25a2d14bdad09409964037

diff --git a/sw/source/uibase/ribbar/workctrl.cxx 
b/sw/source/uibase/ribbar/workctrl.cxx
index ff70be3..6b51a18 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -286,7 +286,7 @@ SwTbxFieldCtrl::SwTbxFieldCtrl(
 pPopup(0),
 pView(0)
 {
-rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
 }
 
 SwTbxFieldCtrl::~SwTbxFieldCtrl()
diff --git a/sw/source/uibase/ribbar/workctrl.src 
b/sw/source/uibase/ribbar/workctrl.src
index 0362623..4acde4c 100644
--- a/sw/source/uibase/ribbar/workctrl.src
+++ b/sw/source/uibase/ribbar/workctrl.src
@@ -30,18 +30,6 @@ Menu RID_INSERT_FIELD_CTRL
 {
 MenuItem
 {
-Identifier = FN_INSERT_FLD_DATE ;
-HelpId = CMD_FN_INSERT_FLD_DATE ;
-Text [ en-US ] = Date ;
-};
-MenuItem
-{
-Identifier = FN_INSERT_FLD_TIME ;
-HelpId = CMD_FN_INSERT_FLD_TIME ;
-Text [ en-US ] = Time ;
-};
-MenuItem
-{
 Identifier = FN_INSERT_FLD_PGNUMBER ;
 HelpId = CMD_FN_INSERT_FLD_PGNUMBER ;
 Text [ en-US ] = Page Number ;
@@ -54,9 +42,15 @@ Menu RID_INSERT_FIELD_CTRL
 };
 MenuItem
 {
-Identifier = FN_INSERT_FLD_TOPIC ;
-HelpId = CMD_FN_INSERT_FLD_TOPIC ;
-Text [ en-US ] = Subject ;
+Identifier = FN_INSERT_FLD_DATE ;
+HelpId = CMD_FN_INSERT_FLD_DATE ;
+Text [ en-US ] = Date ;
+};
+MenuItem
+{
+Identifier = FN_INSERT_FLD_TIME ;
+HelpId = CMD_FN_INSERT_FLD_TIME ;
+Text [ en-US ] = Time ;
 };
 MenuItem
 {
@@ -72,13 +66,19 @@ Menu RID_INSERT_FIELD_CTRL
 };
 MenuItem
 {
+Identifier = FN_INSERT_FLD_TOPIC ;
+HelpId = CMD_FN_INSERT_FLD_TOPIC ;
+Text [ en-US ] = Subject ;
+};
+MenuItem
+{
 Separator = TRUE ;
 };
 MenuItem
 {
 Identifier = FN_INSERT_FIELD ;
 HelpId = CMD_FN_INSERT_FIELD ;
-Text [ en-US ] = Other... ;
+Text [ en-US ] = More... ;
 };
 };
 };
commit 92bbd7bc99103df5136b012bf3b6652a2a721ab0
Author: Samuel Mehrbrodt s.mehrbr...@gmail.com
Date:   Wed Oct 1 13:49:54 2014 +0200

fdo#84551 Make 'Insert table' entry dropdown only

Change-Id: I26a3f2672fa9a849c370a24a5d21162cfb2a91c5

diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 2794af2..920669e 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -704,7 +704,7 @@ SvxTableToolBoxControl::SvxTableToolBoxControl( sal_uInt16 
nSlotId, sal_uInt16 n
 SfxToolBoxControl( nSlotId, nId, rTbx ),
 bEnabled( true )
 {
-rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
+rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) );
 rTbx.Invalidate();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2014-09-26 Thread Michael Stahl
 svx/source/form/ParseContext.cxx   |2 +-
 sw/source/filter/html/htmlgrin.cxx |8 
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit f6c6474ddea7dfdb63d5b67a0b637c8c41fa4d13
Author: Michael Stahl mst...@redhat.com
Date:   Fri Sep 26 15:23:12 2014 +0200

AddressSanitizer: alloc-dealloc-mismatch (operator new vs free)

Change-Id: I500e70e64c478210bc6da0c13894995a0984c018

diff --git a/sw/source/filter/html/htmlgrin.cxx 
b/sw/source/filter/html/htmlgrin.cxx
index 4e136a4..0d834fe 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -698,12 +698,12 @@ IMAGE_SETEVENT:
 INetURLObject aGraphicURL( sGrfNm );
 if( aGraphicURL.GetProtocol() == INET_PROT_DATA )
 {
-SvMemoryStream* aStream = aGraphicURL.getData();
-if( aStream )
+SvMemoryStream* pStream = aGraphicURL.getData();
+if (pStream)
 {
-if (GRFILTER_OK == 
GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, , *aStream))
+if (GRFILTER_OK == 
GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, , *pStream))
 sGrfNm = ;
-free( aStream );
+delete pStream;
 }
 }
 // sBaseURL is empty if the source is clipboard
commit 24a9eac14fc22e18a48eae5a0de1b5e98194ef86
Author: Michael Stahl mst...@redhat.com
Date:   Fri Sep 26 15:56:15 2014 +0200

svx: fix up c10225762ce2c242d21126b5730b1d60f0150ed

Change-Id: Ib810a512f5a88af88901c53025cdf132f95b2ddc

diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx
index f075d00..9c3c760 100644
--- a/svx/source/form/ParseContext.cxx
+++ b/svx/source/form/ParseContext.cxx
@@ -65,7 +65,7 @@ OUString OSystemParseContext::getErrorMessage(ErrorCode 
_eCode) const
 case ERROR_INVALID_INT_COMPARE: aMsg = 
SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_INT_NO_VALID); break;
 case ERROR_INVALID_DATE_COMPARE:aMsg = 
SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_ACCESS_DAT_NO_VALID); break;
 case ERROR_INVALID_REAL_COMPARE:aMsg = 
SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_REAL_NO_VALID); break;
-case ERROR_INVALID_TABLE:   aMsg = 
SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_TABLE); break;
+case ERROR_INVALID_TABLE1:   aMsg = 
SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_TABLE); break;
 case ERROR_INVALID_TABLE_OR_QUERY:  aMsg = 
SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_TABLE_OR_QUERY); break;
 case ERROR_INVALID_COLUMN:  aMsg = 
SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_COLUMN); break;
 case ERROR_INVALID_TABLE_EXIST: aMsg = 
SVX_RESSTR(RID_STR_SVT_SQL_SYNTAX_TABLE_EXISTS); break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2014-09-13 Thread Caolán McNamara
 svx/source/svdraw/svdcrtv.cxx   |4 ++--
 sw/source/uibase/utlui/glbltree.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 46adbf9612e56179b783b48a293dc14850045aeb
Author: Caolán McNamara caol...@redhat.com
Date:   Sat Sep 13 17:28:38 2014 +0100

coverity#704830 Dereference after null check

Change-Id: Ifb9e226b848bfcba593bc54558680738158adc36

diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index b8ed6cb..a84c3ff 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -453,7 +453,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, 
sal_uInt16 nIdent, const
 pAktCreate-SetMergedItemSet(aDefaultAttr);
 }
 
-if (HAS_BASE(SdrCaptionObj,pAktCreate))
+if (pMod  HAS_BASE(SdrCaptionObj,pAktCreate))
 {
 SfxItemSet aSet(pMod-GetItemPool());
 aSet.Put(XFillColorItem(OUString(),Color(COL_WHITE))); // 
in case someone turns on Solid
@@ -461,7 +461,7 @@ bool SdrCreateView::ImpBegCreateObj(sal_uInt32 nInvent, 
sal_uInt16 nIdent, const
 
 pAktCreate-SetMergedItemSet(aSet);
 }
-if (nInvent==SdrInventor  (nIdent==OBJ_TEXT || 
nIdent==OBJ_TEXTEXT ||
+if (pMod  nInvent==SdrInventor  (nIdent==OBJ_TEXT || 
nIdent==OBJ_TEXTEXT ||
 nIdent==OBJ_TITLETEXT || nIdent==OBJ_OUTLINETEXT))
 {
 // default for all text frames: no background, no border
commit 06287413acd3ea58051835a6de0383b668164f27
Author: Caolán McNamara caol...@redhat.com
Date:   Sat Sep 13 17:26:28 2014 +0100

coverity#705042 Dereference after null check

Change-Id: Iac532477802588333560497767a613bb0a55effe

diff --git a/sw/source/uibase/utlui/glbltree.cxx 
b/sw/source/uibase/utlui/glbltree.cxx
index 83f23c3..994cd53 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -431,10 +431,10 @@ sal_uInt16  SwGlobalTree::GetEnableFlags() const
 if(nSelCount == 1)
 {
 nRet |= ENABLE_EDIT;
-if( ((SwGlblDocContent*)pEntry-GetUserData())-GetType() != 
GLBLDOC_UNKNOWN 
+if (pEntry  ((SwGlblDocContent*)pEntry-GetUserData())-GetType() != 
GLBLDOC_UNKNOWN 
 (!pPrevEntry || 
((SwGlblDocContent*)pPrevEntry-GetUserData())-GetType() != GLBLDOC_UNKNOWN))
 nRet |= ENABLE_INSERT_TEXT;
-if( GLBLDOC_SECTION == 
((SwGlblDocContent*)pEntry-GetUserData())-GetType() )
+if (pEntry  GLBLDOC_SECTION == 
((SwGlblDocContent*)pEntry-GetUserData())-GetType())
 nRet |= ENABLE_EDIT_LINK;
 }
 else if(!nEntryCount)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2014-07-16 Thread Caolán McNamara
 svx/source/gallery2/galtheme.cxx |8 
 sw/source/filter/ww8/ww8scan.cxx |8 
 sw/source/filter/ww8/ww8scan.hxx |9 +
 3 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 3a1abb6804c0012718e11dab15d4f35acdef243a
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Jul 16 10:35:35 2014 +0100

coverity#707280 Uncaught exception

Change-Id: I764f6472903e6aebef55af1e96c4941e8429d18f

diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 5672d9f..41f607c 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -652,11 +652,19 @@ void GalleryTheme::Actualize( const Link rActualizeLink, 
GalleryProgress* pProg
 
 sal_uIntPtr nStorErr = 0;
 
+try
 {
 SvStorageRef aTempStorageRef( new SvStorage( false, 
aTmpURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READWRITE ) );
 aSvDrawStorageRef-CopyTo( aTempStorageRef );
 nStorErr = aSvDrawStorageRef-GetError();
 }
+catch (const css::ucb::ContentCreationException e)
+{
+SAL_WARN(svx, failed to open: 
+   aTmpURL.GetMainURL(INetURLObject::NO_DECODE)
+   due to :   e.Message);
+nStorErr = ERRCODE_IO_GENERAL;
+}
 
 if( !nStorErr )
 {
commit bfd22d4ba76df2ab3939339ddb5030f3c7082cb8
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Jul 16 09:44:09 2014 +0100

coverity#708510 Uninitialized scalar field

and

coverity708511 Uninitialized scalar field

Change-Id: I05b5d836f3a207e70f8fff84524866a54a15daa2

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index bbf74a0..1800a82 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -6519,9 +6519,9 @@ void WW8PLCF_HdFt::UpdateIndex( sal_uInt8 grpfIhdt )
 nIdxOffset++;
 }
 
-WW8Dop::WW8Dop(SvStream rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 
nSize) : bUseThaiLineBreakingRules(false)
+WW8Dop::WW8Dop(SvStream rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize)
 {
-memset( nDataStart, 0, (nDataEnd - nDataStart) );
+memset(this, 0, sizeof(WW8Dop));
 fDontUseHTMLAutoSpacing = true; //default
 fAcetateShowAtn = true; //default
 const sal_uInt32 nMaxDopSize = 0x268;
@@ -6743,10 +6743,10 @@ WW8Dop::WW8Dop(SvStream rSt, sal_Int16 nFib, sal_Int32 
nPos, sal_uInt32 nSize)
 delete[] pDataPtr;
 }
 
-WW8Dop::WW8Dop() : bUseThaiLineBreakingRules(false)
+WW8Dop::WW8Dop()
 {
 // first set everything to a default of 0
-memset( nDataStart, 0, (nDataEnd - nDataStart) );
+memset(this, 0, sizeof(WW8Dop));
 
 fWidowControl = true;
 fpc = 1;
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index b3ca7ca..893df81 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -1497,7 +1497,7 @@ namespace nsHdFtFlags
 }
 
 /// Document Properties
-class WW8Dop
+struct WW8Dop
 {
 public:
 /* Error Status */
@@ -1506,9 +1506,6 @@ public:
 Corresponds only roughly to the actual structure of the Winword DOP,
 the winword FIB version matters to what exists.
 */
-// Initialisier-Dummy:
-sal_uInt8nDataStart;
-
 boolfFacingPages : 1;   // 1 when facing pages should be printed
 
 boolfWidowControl : 1;  //a: orig 97 docs say
@@ -1729,9 +1726,6 @@ public:
 bool   fAcetateShowInsDel : 1;
 bool   fAcetateShowProps : 1;
 
-// 2. Initialisier-Dummy:
-sal_uInt8 nDataEnd;
-
 bool bUseThaiLineBreakingRules;
 
 /* Constructor for importing, needs to know the version of word used */
@@ -1741,7 +1735,6 @@ public:
 WW8Dop();
 bool Write(SvStream rStrm, WW8Fib rFib) const;
 
-public:
 sal_uInt32 GetCompatabilityOptions() const;
 void SetCompatabilityOptions(sal_uInt32 a32Bit);
 // i#78591#
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2014-05-16 Thread Michael Stahl
 svx/source/sdr/contact/objectcontactofpageview.cxx |4 +++-
 sw/source/core/text/txtfrm.cxx |2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit aa68e1309450f79d1b40545ad6c340a49eff51c6
Author: Michael Stahl mst...@redhat.com
Date:   Sat May 17 00:08:34 2014 +0200

fdo#78149: set the ViewPort even when painting to a MetaFile

ObjectContactOfPageView::DoProcessDisplay() has a special case for
painting to MetaFiles, and does not set the ViewPort from the passed-in
RedrawArea unless it's a printing or PDF export, with the result
that for a plain MetaFile all fly-frames in a Writer document
are painted, whether visible or not.

Since e2eda70f2746f08376d8cdf5e5360df217335aef now calls
GetPreviewMetaFile() after every document load, this issue is more
visible.

Since there is no obvious reason to ever ignore a passed RedrawArea,
simply always use it for the ViewPort, not just when printing.

Change-Id: I256710f1476181f567069b45a2a494b0d2064d6b

diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx 
b/svx/source/sdr/contact/objectcontactofpageview.cxx
index cefbd96..864e730 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -175,12 +175,14 @@ namespace sdr
 // create ViewRange
 if(isOutputToRecordingMetaFile())
 {
-if(isOutputToPDFFile() || isOutputToPrinter())
+if (!rDisplayInfo.GetRedrawArea().IsEmpty())
 {
 // #i98402# if it's a PDF export, set the ClipRegion as 
ViewRange. This is
 // mainly because SW does not use DrawingLayer 
Page-Oriented and if not doing this,
 // all existing objects will be collected as primitives 
and processed.
 // OD 2009-03-05 #i99876# perform the same also for SW on 
printing.
+// fdo#78149 same thing also needed for plain MetaFile
+//   export, so why not do it always
 const Rectangle 
aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect());
 
 aViewRange = basegfx::B2DRange(
commit 44c81ce21825554aad8dcebd58388cb5c0f81df8
Author: Michael Stahl mst...@redhat.com
Date:   Fri May 16 17:58:12 2014 +0200

sw: try to fix a valgrind warning

Invalid read of size 1
   at SwParaPortion::SetPrep(bool) (porlay.hxx:299)
   by SwTxtFrm::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:1756)
   by SwTxtFrm::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:1663)
   by SwCntntFrm::MakeAll() (calcmove.cxx:1310)
   by SwFrm::OptPrepareMake() (calcmove.cxx:356)
   by SwFrm::OptCalc() const (frame.hxx:1037)
   by SwLayAction::_FormatCntnt(SwCntntFrm const*, SwPageFrm const*) 
(layact.cxx:1829)
   by SwLayAction::FormatCntnt(SwPageFrm const*) (layact.cxx:1660)
   by SwLayAction::InternalAction() (layact.cxx:597)
   by SwLayAction::Action() (layact.cxx:376)
   by SwLayIdle::SwLayIdle(SwRootFrm*, SwViewImp*) (layact.cxx:2179)
 Address 0x1f9507e0 is 832 bytes inside a block of size 840 free'd
   by FixedMemPool::Free(void*) (mempool.cxx:48)
   by SwParaPortion::operator delete(void*, unsigned long) (in 
/work/lo/master/instdir/program/libswlo.so)
   by SwParaPortion::~SwParaPortion() (porlay.cxx:1972)
   by SwTxtFrm::ClearPara() (txtcache.cxx:102)
   by SwTxtFrm::Init() (txtfrm.cxx:329)
   by SwTxtFrm::CalcLineSpace() (txtfrm.cxx:746)
   by SwTxtFrm::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:1680)
   by SwTxtFrm::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:1663)
   by SwCntntFrm::MakeAll() (calcmove.cxx:1310)
   by SwFrm::OptPrepareMake() (calcmove.cxx:356)
   by SwFrm::OptCalc() const (frame.hxx:1037)
   by SwLayAction::_FormatCntnt(SwCntntFrm const*, SwPageFrm const*) 
(layact.cxx:1829)
   by SwLayAction::FormatCntnt(SwPageFrm const*) (layact.cxx:1660)
   by SwLayAction::InternalAction() (layact.cxx:597)
   by SwLayAction::Action() (layact.cxx:376)
   by SwLayIdle::SwLayIdle(SwRootFrm*, SwViewImp*) (layact.cxx:2179)

Change-Id: I64a1cc6ea301b653af951ba0e00e28d4655d2d97

diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index bd4fc8c..ab0d613 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1678,6 +1678,8 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const 
void* pVoid,
 {
 pPara-SetPrepAdjust();
 CalcLineSpace();
+// possible that pPara was deleted above; retrieve it again
+pPara = aAccess.GetPara();
 InvalidateSize();
 _InvalidatePrt();
 SwFrm* pNxt;
___

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source vcl/ios

2014-04-20 Thread Julien Nabet
 svx/source/items/svxerr.src   |4 ++--
 sw/source/ui/index/cnttab.cxx |2 +-
 vcl/ios/iosinst.cxx   |4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 80915b8f21f0745cd4de2c4bb72fba24a0ffebcd
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Apr 20 22:54:18 2014 +0200

cppcheck: Prefer prefix ++/-- operators for non-primitive types

Change-Id: Ic24715d86b3f822babd236ac73c041f3a5c1d92b

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index ff0857b..0e44b97 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2282,7 +2282,7 @@ IMPL_LINK(SwTOXEntryTabPage, LevelHdl, SvTreeListBox*, 
pBox)
 m_pAuthFieldsLB-RemoveEntry(nLstBoxPos);
 }
 
-aIt++; // #i21237#
+++aIt; // #i21237#
 }
 m_pAuthFieldsLB-SelectEntryPos(0);
 }
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index 91735bb..b4fa76a 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -301,7 +301,7 @@ IMPL_LINK( IosSalInstance, DisplayConfigurationChanged, 
void*, )
 {
 for( std::list SalFrame* ::const_iterator it = getFrames().begin();
  it != getFrames().end();
- it++ ) {
+ ++it ) {
 (*it)-Show( false, false );
 (*it)-CallCallback( SALEVENT_SETTINGSCHANGED, 0 );
 (*it)-SetPosSize(0, 0, viewWidth, viewHeight, SAL_FRAME_POSSIZE_WIDTH 
| SAL_FRAME_POSSIZE_HEIGHT);
@@ -343,7 +343,7 @@ IMPL_LINK( IosSalInstance, RenderWindows, 
RenderWindowsArg*, arg )
 
 for( std::list SalFrame* ::const_reverse_iterator it = 
getFrames().rbegin();
  it != getFrames().rend();
- it++ ) {
+ ++it ) {
 IosSalFrame *pFrame = static_castIosSalFrame *(*it);
 SalFrameGeometry aGeom = pFrame-GetGeometry();
 CGRect bbox = CGRectMake( 0, 0, aGeom.nWidth, aGeom.nHeight );
commit 664c175e33a04f36e8af8a4a5e885542d2e22f7a
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Apr 20 20:45:30 2014 +0200

cpplint: invalid UTF-8 + punctuation

Change-Id: I31871db6f344e90c54ed9efb51b9576cd36d9fa8

diff --git a/svx/source/items/svxerr.src b/svx/source/items/svxerr.src
index 90a0b8c..1feaed2 100644
--- a/svx/source/items/svxerr.src
+++ b/svx/source/items/svxerr.src
@@ -112,9 +112,9 @@ Resource RID_SVXERRCODE
 
 String ERRCODE_SVX_MODIFIED_VBASIC_STORAGE  ERRCODE_RES_MASK
 {
-//  TEXT = Der Basic-Code wurde verändert und kann somit nicht mehr als 
Original gespeichert werden. ;
+//  TEXT = Der Basic-Code wurde verändert und kann somit nicht mehr als 
Original gespeichert werden. ;
 //  TEXT [ English ] = The Basic-Code is modified and so it can not be 
saved as original. ;
-Text [ en-US ] = All changes to the Basic Code are lost.The original 
VBA Macro Code is saved instead.;
+Text [ en-US ] = All changes to the Basic Code are lost. The original 
VBA Macro Code is saved instead.;
 };
 
 String ERRCODE_SVX_VBASIC_STORAGE_EXIST  ERRCODE_RES_MASK
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source vcl/source

2014-03-11 Thread Norbert Thiebaud
 svx/source/sidebar/tools/ValueSetWithTextControl.cxx |7 +++
 svx/source/stbctrls/modctrl.cxx  |4 ++--
 svx/source/stbctrls/pszctrl.cxx  |3 +--
 svx/source/stbctrls/selctrl.cxx  |4 ++--
 svx/source/stbctrls/xmlsecctrl.cxx   |2 --
 svx/source/stbctrls/zoomsliderctrl.cxx   |4 ++--
 svx/source/tbxctrls/tbcontrl.cxx |4 ++--
 sw/source/core/uibase/utlui/content.cxx  |2 --
 sw/source/core/uibase/utlui/viewlayoutctrl.cxx   |3 +--
 vcl/source/window/toolbox2.cxx   |3 +--
 vcl/source/window/window.cxx |   10 --
 11 files changed, 22 insertions(+), 24 deletions(-)

New commits:
commit 58fae0f715433a72d814584d97a1368f8a1b62d2
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Tue Mar 11 15:43:48 2014 -0500

remove osolete ifdef

now that the ScaleDPI is forced to 1 on mac there is no need
for these ifdef

Change-Id: I0ca3bc301b63f5f4c7d1eb36f27bc9b6ab41af29

diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx 
b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index 51c157f..5dd6e99 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -101,7 +101,6 @@ void ValueSetWithTextControl::AddItem(
 ? *pSelectedItemImage
 : rItemImage;
 
-#ifndef MACOSX
 if ( GetDPIScaleFactor()  1 )
 {
 BitmapEx b = aItem.maItemImage.GetBitmapEx();
@@ -115,7 +114,7 @@ void ValueSetWithTextControl::AddItem(
 aItem.maSelectedItemImage = Image(b);
 }
 }
-#endif
+
 aItem.maItemText = rItemText;
 
 maItems.push_back( aItem );
@@ -169,7 +168,7 @@ void ValueSetWithTextControl::ReplaceItemImages(
  ? *pSelectedItemImage
  : rItemImage;
 
-#ifndef MACOSX
+//#ifndef MACOSX
 if ( GetDPIScaleFactor()  1 )
 {
 BitmapEx b = maItems[nItemId-1].maItemImage.GetBitmapEx();
@@ -183,7 +182,7 @@ void ValueSetWithTextControl::ReplaceItemImages(
 maItems[nItemId-1].maSelectedItemImage = Image(b);
 }
 }
-#endif
+//#endif
 }
 
 
diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx
index 3d7c577..15bc693 100644
--- a/svx/source/stbctrls/modctrl.cxx
+++ b/svx/source/stbctrls/modctrl.cxx
@@ -73,7 +73,7 @@ SvxModifyControl::SvxModifyControl( sal_uInt16 _nSlotId, 
sal_uInt16 _nId, Status
 SfxStatusBarControl( _nSlotId, _nId, rStb ),
 mpImpl(new ImplData)
 {
-#ifndef MACOSX
+//#ifndef MACOSX
 if ( rStb.GetDPIScaleFactor()  1 )
 {
 for (int i = 0; i  mpImpl-MODIFICATION_STATE_SIZE; i++)
@@ -83,7 +83,7 @@ SvxModifyControl::SvxModifyControl( sal_uInt16 _nSlotId, 
sal_uInt16 _nId, Status
 mpImpl-maImages[i] = Image(b);
 }
 }
-#endif
+//#endif
 mpImpl-maTimer.SetTimeoutHdl( LINK(this, SvxModifyControl, OnTimer) );
 }
 
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 634badf..a3383fe 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -178,7 +178,6 @@ SvxPosSizeStatusBarControl::SvxPosSizeStatusBarControl( 
sal_uInt16 _nSlotId,
 pImp-aPosImage = Image( ResId( RID_SVXBMP_POSITION, DIALOG_MGR() ) );
 pImp-aSizeImage = Image( ResId( RID_SVXBMP_SIZE, DIALOG_MGR() ) );
 
-#ifndef MACOSX
 if ( rStb.GetDPIScaleFactor()  1)
 {
 BitmapEx b = pImp-aPosImage.GetBitmapEx();
@@ -189,7 +188,7 @@ SvxPosSizeStatusBarControl::SvxPosSizeStatusBarControl( 
sal_uInt16 _nSlotId,
 b.Scale(rStb.GetDPIScaleFactor(), rStb.GetDPIScaleFactor(), 
BMP_SCALE_FAST);
 pImp-aSizeImage = Image(b);
 }
-#endif
+
 addStatusListener( OUString( STR_POSITION )); // SID_ATTR_POSITION
 addStatusListener( OUString( STR_TABLECELL ));   // SID_TABLE_CELL
 addStatusListener( OUString( STR_FUNC ));// SID_PSZ_FUNCTION
diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx
index a56cd0a..acfb2da 100644
--- a/svx/source/stbctrls/selctrl.cxx
+++ b/svx/source/stbctrls/selctrl.cxx
@@ -80,14 +80,14 @@ SvxSelectionModeControl::SvxSelectionModeControl( 
sal_uInt16 _nSlotId,
 mnState( 0 ),
 maImage( SVX_RES( RID_SVXBMP_SELECTION ) )
 {
-#ifndef MACOSX
+//#ifndef MACOSX
 if ( GetStatusBar().GetDPIScaleFactor()  1 )
 {
 BitmapEx b = maImage.GetBitmapEx();
 b.Scale(GetStatusBar().GetDPIScaleFactor(), 
GetStatusBar().GetDPIScaleFactor(), BMP_SCALE_FAST);
 maImage = Image(b);
 }
-#endif
+//#endif
 GetStatusBar().SetItemText( GetId(),  );
 }
 
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx 
b/svx/source/stbctrls/xmlsecctrl.cxx
index 1ecfd52..46ea35b 100644
--- 

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2014-01-28 Thread Michael Stahl
 svx/source/tbxctrls/tbcontrl.cxx |7 +--
 sw/source/core/fields/reffld.cxx |   30 +++---
 2 files changed, 24 insertions(+), 13 deletions(-)

New commits:
commit d9896aeeedb0ca03bec65df23e2fd96f30239619
Author: Michael Stahl mst...@redhat.com
Date:   Tue Jan 28 20:45:20 2014 +0100

fix bad cast in SvxStyleBox_Impl::StateChanged()

This causes various JunitTest crashes on Windows, regression from
887bc4dd3e62fe6dd19dc9d1c3ba273a5b21b5ec.

Change-Id: Iab24e0d39375ac1e5ac63d32470dca1e54d518c5

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 5284816..0a96bd0 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -596,7 +596,10 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent 
rUDEvt )
 Size aPixelSize( pDevice-LogicToPixel( aFontSize, 
pShell-GetMapUnit() ) );
 
 // setup the font properties
-Font aFont( pFontItem-GetFamilyName(), 
pFontItem-GetStyleName(), aPixelSize );
+SvxFont aFont;
+aFont.SetName(pFontItem-GetFamilyName());
+aFont.SetStyleName(pFontItem-GetStyleName());
+aFont.SetSize(aPixelSize);
 
 const SfxPoolItem *pItem = aItemSet.GetItem( 
SID_ATTR_CHAR_WEIGHT );
 if ( pItem )
@@ -632,7 +635,7 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent 
rUDEvt )
 
 pItem = aItemSet.GetItem( SID_ATTR_CHAR_CASEMAP );
 if ( pItem )
-((SvxFont )aFont).SetCaseMap( static_cast const 
SvxCaseMapItem* ( pItem )-GetCaseMap() );
+aFont.SetCaseMap(static_castconst 
SvxCaseMapItem*(pItem)-GetCaseMap());
 
 pItem = aItemSet.GetItem( SID_ATTR_CHAR_EMPHASISMARK );
 if ( pItem )
commit 8676c2157a0d294dabd967b9591f48ba2ec95ac1
Author: Michael Stahl mst...@redhat.com
Date:   Tue Jan 28 17:04:24 2014 +0100

sw: style cleanup in GetFieldIdsFromDoc

Change-Id: Ib7141b47d5c2a27b75e47756adb4c644aace721a

diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 2974c7b..1288582 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -950,17 +950,23 @@ typedef boost::ptr_vector_RefIdsMap _RefIdsMaps;
 /// @param[in,out] rIds The list of IDs found in the document.
 void _RefIdsMap::GetFieldIdsFromDoc( SwDoc rDoc, std::setsal_uInt16 rIds)
 {
-const SwTxtNode* pNd;
-SwFieldType* pType;
+SwFieldType *const pType = rDoc.GetFldType(RES_SETEXPFLD, aName, false);
 
-if( 0 != ( pType = rDoc.GetFldType( RES_SETEXPFLD, aName, false ) ))
+if (!pType)
+return;
+
+SwIteratorSwFmtFld,SwFieldType aIter( *pType );
+for (SwFmtFld const* pF = aIter.First(); pF; pF = aIter.Next())
 {
-SwIteratorSwFmtFld,SwFieldType aIter( *pType );
-for( SwFmtFld* pF = aIter.First(); pF; pF = aIter.Next() )
-if( pF-GetTxtFld() 
-0 != ( pNd = pF-GetTxtFld()-GetpTxtNode() ) 
-pNd-GetNodes().IsDocNodes() )
-rIds.insert( ((SwSetExpField*)pF-GetField())-GetSeqNumber() 
);
+if (pF-GetTxtFld())
+{
+SwTxtNode const*const pNd = pF-GetTxtFld()-GetpTxtNode();
+if (pNd  pNd-GetNodes().IsDocNodes())
+{
+rIds.insert(static_castSwSetExpField const*(pF-GetField())
+-GetSeqNumber());
+}
+}
 }
 }
 
@@ -999,8 +1005,10 @@ void _RefIdsMap::Init( SwDoc rDoc, SwDoc rDestDoc, bool 
bField )
 for( SwFmtFld* pF = aIter.First(); pF; pF = aIter.Next() )
 if( pF-GetTxtFld() )
 {
-sal_uInt16 n = 
((SwSetExpField*)pF-GetField())-GetSeqNumber( );
-((SwSetExpField*)pF-GetField())-SetSeqNumber( 
sequencedIds[ n ] );
+SwSetExpField *const pSetExp(
+static_castSwSetExpField *(pF-GetField()));
+sal_uInt16 const n = pSetExp-GetSeqNumber();
+pSetExp-SetSeqNumber( sequencedIds[n] );
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2014-01-23 Thread Caolán McNamara
 svx/source/tbxctrls/tbunosearchcontrollers.cxx |7 ---
 sw/source/core/doc/docedt.cxx  |8 ++--
 2 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 5a4766857ad3c9172847197a262e25c1926cbab2
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Jan 23 16:07:04 2014 +

coverity#1158448 Uninitialized scalar field

Change-Id: I189503d88d54b32b20d5f866687214cb4af35200

diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 2816f8d..2a0a14a 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -60,7 +60,9 @@ struct _SaveRedline
 sal_Int32 nEndCnt;
 
 _SaveRedline( SwRangeRedline* pR, const SwNodeIndex rSttIdx )
-: pRedl( pR )
+: pRedl(pR)
+, nEnd(0)
+, nEndCnt(0)
 {
 const SwPosition* pStt = pR-Start(),
 * pEnd = pR-GetMark() == pStt ? pR-GetPoint() : pR-GetMark();
@@ -80,7 +82,9 @@ struct _SaveRedline
 }
 
 _SaveRedline( SwRangeRedline* pR, const SwPosition rPos )
-: pRedl( pR )
+: pRedl(pR)
+, nEnd(0)
+, nEndCnt(0)
 {
 const SwPosition* pStt = pR-Start(),
 * pEnd = pR-GetMark() == pStt ? pR-GetPoint() : pR-GetMark();
commit 4bc75ba3eb07bac4c079d5de8cac6de10d93c0f1
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Jan 23 16:05:25 2014 +

coverity#1158462 Uninitialized pointer field

Change-Id: Ie5b72f4d3f357e76e233ccf412e2f5863a6999dc

diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx 
b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 8cedb04..2cbdc93 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -348,9 +348,10 @@ css::uno::Reference css::frame::XStatusListener  
SearchToolbarControllersManag
 // FindTextToolbarController
 
 FindTextToolbarController::FindTextToolbarController( const 
css::uno::Reference css::uno::XComponentContext  rxContext )
-:svt::ToolboxController( rxContext,
-css::uno::Reference css::frame::XFrame (),
-OUString(COMMAND_FINDTEXT) )
+: svt::ToolboxController(rxContext, css::uno::Reference 
css::frame::XFrame (), OUString(COMMAND_FINDTEXT))
+, m_pFindTextFieldControl(NULL)
+, m_nDownSearchId(0)
+, m_nUpSearchId(0)
 {
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source sw/uiconfig sw/UIConfig_swriter.mk

2013-12-17 Thread Caolán McNamara
 svx/source/gallery2/galmisc.cxx |   20 ++-
 sw/UIConfig_swriter.mk  |1 
 sw/source/ui/config/optload.cxx |   11 +---
 sw/source/ui/inc/optload.hxx|5 -
 sw/uiconfig/swriter/ui/captiondialog.ui |   81 
 5 files changed, 104 insertions(+), 14 deletions(-)

New commits:
commit 2e4360815b08e1b5bd7233509d033b5a49b7c61e
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Dec 17 10:21:49 2013 +

fix caption dialog

Change-Id: I499f47b116ff6957bbbc20b91224fe95593d1da1

diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 441cc43..2787065 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/bulletsandnumbering \
sw/uiconfig/swriter/ui/businessdatapage \
sw/uiconfig/swriter/ui/cannotsavelabeldialog \
+   sw/uiconfig/swriter/ui/captiondialog \
sw/uiconfig/swriter/ui/captionoptions \
sw/uiconfig/swriter/ui/cardformatpage \
sw/uiconfig/swriter/ui/cardmediumpage \
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 8196d48..3eef208 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -312,15 +312,12 @@ IMPL_LINK_NOARG(SwLoadOptPage, MetricHdl)
 return 0;
 }
 
-SwCaptionOptDlg::SwCaptionOptDlg(Window* pParent, const SfxItemSet rSet) :
-SfxNoLayoutSingleTabDialog(pParent, rSet, 0)
+SwCaptionOptDlg::SwCaptionOptDlg(Window* pParent, const SfxItemSet rSet)
+: SfxSingleTabDialog(pParent, rSet, CaptionDialog,
+modules/swriter/ui/captiondialog.ui)
 {
 // create TabPage
-SetTabPage((SwCaptionOptPage*) SwCaptionOptPage::Create(this, rSet));
-}
-
-SwCaptionOptDlg::~SwCaptionOptDlg()
-{
+setTabPage(SwCaptionOptPage::Create(get_content_area(), rSet));
 }
 
 SwCaptionPreview::SwCaptionPreview( Window* pParent, WinBits nStyle )
diff --git a/sw/source/ui/inc/optload.hxx b/sw/source/ui/inc/optload.hxx
index 7825ab5..0ee5023 100644
--- a/sw/source/ui/inc/optload.hxx
+++ b/sw/source/ui/inc/optload.hxx
@@ -69,11 +69,10 @@ public:
 virtual voidReset( const SfxItemSet rSet );
 };
 
-class SwCaptionOptDlg : public SfxNoLayoutSingleTabDialog
+class SwCaptionOptDlg : public SfxSingleTabDialog
 {
 public:
- SwCaptionOptDlg(Window* pParent, const SfxItemSet rSet);
-~SwCaptionOptDlg();
+SwCaptionOptDlg(Window* pParent, const SfxItemSet rSet);
 };
 
 class CaptionComboBox : public SwComboBox
diff --git a/sw/uiconfig/swriter/ui/captiondialog.ui 
b/sw/uiconfig/swriter/ui/captiondialog.ui
new file mode 100644
index 000..0b6e2d2
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/captiondialog.ui
@@ -0,0 +1,81 @@
+?xml version=1.0 encoding=UTF-8?
+interface
+  !-- interface-requires gtk+ 3.0 --
+  object class=GtkDialog id=CaptionDialog
+property name=can_focusFalse/property
+property name=border_width6/property
+property name=title translatable=yesCaption/property
+property name=type_hintdialog/property
+child internal-child=vbox
+  object class=GtkBox id=dialog-vbox1
+property name=can_focusFalse/property
+property name=orientationvertical/property
+property name=spacing12/property
+child internal-child=action_area
+  object class=GtkButtonBox id=dialog-action_area1
+property name=can_focusFalse/property
+property name=layout_styleend/property
+child
+  object class=GtkButton id=ok
+property name=labelgtk-ok/property
+property name=visibleTrue/property
+property name=can_focusTrue/property
+property name=can_defaultTrue/property
+property name=has_defaultTrue/property
+property name=receives_defaultTrue/property
+property name=use_stockTrue/property
+  /object
+  packing
+property name=expandFalse/property
+property name=fillTrue/property
+property name=position0/property
+  /packing
+/child
+child
+  object class=GtkButton id=cancel
+property name=labelgtk-cancel/property
+property name=visibleTrue/property
+property name=can_focusTrue/property
+property name=receives_defaultTrue/property
+property name=use_stockTrue/property
+  /object
+  packing
+property name=expandFalse/property
+property name=fillTrue/property
+property name=position1/property
+  /packing
+/child
+child
+  object class=GtkButton id=help
+property name=labelgtk-help/property
+property name=visibleTrue/property
+  

[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2013-07-11 Thread Andras Timar
 svx/source/xoutdev/_xoutbmp.cxx   |1 -
 sw/source/filter/html/htmlfly.cxx |6 ++
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 0b48a9b5e05e57306d7f3a32d2be01bb352b0d18
Author: Andras Timar ati...@suse.com
Date:   Thu Jul 11 15:17:15 2013 +0200

remove unused headers

Change-Id: I3345e6322a9aa25239df98033b8436ec377e197f

diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 40f9f7f..bad0533 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -31,7 +31,6 @@
 #include vcl/graphicfilter.hxx
 #include vcl/cvtgrf.hxx
 #include sax/tools/converter.hxx
-#include svtools/htmlkywd.hxx
 
 #define FORMAT_BMP  OUString(bmp)
 #define FORMAT_GIF  OUString(gif)
commit e6fb87e6039de7d871563cd14b5b9d21129cd216
Author: Andras Timar ati...@suse.com
Date:   Thu Jul 11 15:15:08 2013 +0200

statement aligned as second statement in if body but not in a statement 
block

Change-Id: I0d691c75cc5477b3b0f9c6f6f2dc420a51751201

diff --git a/sw/source/filter/html/htmlfly.cxx 
b/sw/source/filter/html/htmlfly.cxx
index 0bac1d7..fb7ac88 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -1220,16 +1220,14 @@ Writer OutHTML_BulletImage( Writer rWrt,
 const Graphic* pGrf = pBrush-GetGraphic();
 if( pGrf )
 {
-const Graphic* aGraphic = pBrush-GetGraphic();
-sal_uLong nErr = XOutBitmap::GraphicToBase64(*aGraphic, 
aGraphicInBase64);
+sal_uLong nErr = XOutBitmap::GraphicToBase64(*pGrf, 
aGraphicInBase64);
 if( nErr )
 {
 rHTMLWrt.nWarn = WARN_SWG_POOR_LOAD | WARN_SW_WRITE_BASE;
 }
-// Grafik als (JPG-)File speichern
 if( rHTMLWrt.GetOrigFileName() )
 rGrfName = *rHTMLWrt.GetOrigFileName();
-pLink = rGrfName;
+pLink = rGrfName;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - svx/source sw/source

2013-02-14 Thread Luboš Luňák
 svx/source/tbxctrls/tbcontrl.cxx |   32 +++
 sw/source/filter/ww8/docxattributeoutput.cxx |4 +--
 2 files changed, 16 insertions(+), 20 deletions(-)

New commits:
commit a12286cf81b2483e1585b2c45c40fa507fdd3136
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Feb 14 17:12:54 2013 +0100

more reliable detecting of changes in the combobox lineedit

Change-Id: I3563a961c54e235fffe0c2ab1809f51882ba3831

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 89d73d1..021e8a9 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -191,7 +191,7 @@ private:
 
 voidReleaseFocus_Impl();
 voidEnableControls_Impl();
-voidCheckAndMarkUnknownFont( const OUString fontname );
+DECL_DLLPRIVATE_LINK( CheckAndMarkUnknownFont, VclWindowEvent* );
 
 protected:
 virtual voidSelect();
@@ -201,6 +201,7 @@ public:
 SvxFontNameBox_Impl( Window* pParent, const Reference XDispatchProvider 
 rDispatchProvider,const Reference XFrame  _xFrame
 , WinBits nStyle = WB_SORT
 );
+virtual ~SvxFontNameBox_Impl();
 
 voidFillList();
 voidUpdate( const SvxFontItem* pFontItem );
@@ -209,8 +210,6 @@ public:
 voidFill( const FontList* pList )
 { FontNameBox::Fill( pList );
   nFtCount = pList-GetFontNameCount(); }
-virtual voidSetText( const OUString rStr ) SAL_OVERRIDE;
-virtual voidSetText( const OUString rStr, const Selection 
rNewSelection ) SAL_OVERRIDE;
 virtual longPreNotify( NotifyEvent rNEvt );
 virtual longNotify( NotifyEvent rNEvt );
 virtual Reference ::com::sun::star::accessibility::XAccessible  
CreateAccessible();
@@ -771,7 +770,14 @@ SvxFontNameBox_Impl::SvxFontNameBox_Impl( Window* pParent, 
const Reference XDis
 {
 SetSizePixel(LogicToPixel( aLogicalSize, MAP_APPFONT ));
 EnableControls_Impl();
+GetSubEdit()-AddEventListener( LINK( this, SvxFontNameBox_Impl, 
CheckAndMarkUnknownFont ));
 }
+
+SvxFontNameBox_Impl::~SvxFontNameBox_Impl()
+{
+GetSubEdit()-RemoveEventListener( LINK( this, SvxFontNameBox_Impl, 
CheckAndMarkUnknownFont ));
+}
+
 // ---
 
 void SvxFontNameBox_Impl::FillList()
@@ -784,22 +790,11 @@ void SvxFontNameBox_Impl::FillList()
 SetSelection( aOldSel );
 }
 
-void SvxFontNameBox_Impl::SetText( const OUString rStr )
-{
-CheckAndMarkUnknownFont( rStr );
-return FontNameBox::SetText( rStr );
-}
-
-void SvxFontNameBox_Impl::SetText( const OUString rStr, const Selection 
rNewSelection )
-{
-CheckAndMarkUnknownFont( rStr );
-return FontNameBox::SetText( rStr, rNewSelection );
-}
-
-void SvxFontNameBox_Impl::CheckAndMarkUnknownFont( const OUString fontname )
+IMPL_LINK( SvxFontNameBox_Impl, CheckAndMarkUnknownFont, VclWindowEvent*, 
event )
 {
-if( fontname == GetText())
-return;
+if( event-GetId() != VCLEVENT_EDIT_MODIFY )
+return 0;
+OUString fontname = GetSubEdit()-GetText();
 GetDocFontList_Impl( pFontList, this );
 // If the font is unknown, show it in italic.
 Font font = GetControlFont();
@@ -821,6 +816,7 @@ void SvxFontNameBox_Impl::CheckAndMarkUnknownFont( const 
OUString fontname )
 SetQuickHelpText( SVX_RESSTR( RID_SVXSTR_CHARFONTNAME_NOTAVAILABLE 
));
 }
 }
+return 0;
 }
 
 // ---
commit fe8bfb201e79c31de1b692931a0e9ee6c7ff1d25
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Feb 12 19:06:54 2013 +0100

mso saves obfuscated fonts as .odttf in .docx, so use the extension as well

Change-Id: I5d4cb579c042f03137188f3e0293015bea723dce

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 0732979..9ff630a 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3059,7 +3059,7 @@ void DocxAttributeOutput::EmbedFontStyle( const OUString 
name, int tag, const c
 if( file.open( osl_File_OpenFlag_Read ) != osl::File::E_None )
 return;
 uno::Reference com::sun::star::io::XOutputStream  xOutStream = 
m_rExport.GetFilter().openFragmentStream(
-OUString( word/fonts/font ) + OUString::number(m_nextFontId) + 
.ttf,
+OUString( word/fonts/font ) + OUString::number(m_nextFontId) + 
.odttf,
 application/vnd.openxmlformats-officedocument.obfuscatedFont );
 // Not much point in trying hard with the obfuscation key, whoever reads 
the spec can read the font anyway,
 // so just alter the first and last part of the key.
@@ -3110,7 +3110,7 @@ void DocxAttributeOutput::EmbedFontStyle( const OUString 
name, int tag, const c
 xOutStream-closeOutput();
 OString relId = OUStringToOString(