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

2023-11-01 Thread Noel Grandin (via logerrit)
 svx/inc/sdr/properties/attributeproperties.hxx|2 +-
 svx/source/sdr/properties/attributeproperties.cxx |   16 ++--
 2 files changed, 7 insertions(+), 11 deletions(-)

New commits:
commit 3d33912707a621b04467eb56823e26b4b0db01ae
Author: Noel Grandin 
AuthorDate: Wed Nov 1 09:51:35 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Nov 1 14:32:58 2023 +0100

AttributeProperties is effectively abstract

so remove the unused code and assert there, just to make sure

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

diff --git a/svx/inc/sdr/properties/attributeproperties.hxx 
b/svx/inc/sdr/properties/attributeproperties.hxx
index fa193aeec28e..bdaf48822b0b 100644
--- a/svx/inc/sdr/properties/attributeproperties.hxx
+++ b/svx/inc/sdr/properties/attributeproperties.hxx
@@ -51,13 +51,13 @@ namespace sdr::properties
 // apply the correct SfyStyleSheet from SdrObject's SdrModel
 virtual void applyDefaultStyleSheetFromSdrModel();
 
-public:
 // basic constructor
 explicit AttributeProperties(SdrObject& rObj);
 
 // constructor for copying, but using new object
 AttributeProperties(const AttributeProperties& rProps, SdrObject& 
rObj);
 
+public:
 // Clone() operator, normally just calls the local copy constructor
 virtual std::unique_ptr Clone(SdrObject& rObj) 
const override;
 
diff --git a/svx/source/sdr/properties/attributeproperties.cxx 
b/svx/source/sdr/properties/attributeproperties.cxx
index 3fc050f825f9..56ce36b9d095 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -122,15 +122,10 @@ namespace sdr::properties
 }
 
 // create a new itemset
-SfxItemSet 
AttributeProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
+SfxItemSet 
AttributeProperties::CreateObjectSpecificItemSet(SfxItemPool&)
 {
-return SfxItemSet(rPool,
-
-// ranges from SdrAttrObj
-svl::Items);
+assert(false && "this class is effectively abstract, should only 
be instantiating subclasses");
+abort();
 }
 
 AttributeProperties::AttributeProperties(SdrObject& rObj)
@@ -224,9 +219,10 @@ namespace sdr::properties
 ImpRemoveStyleSheet();
 }
 
-std::unique_ptr AttributeProperties::Clone(SdrObject& 
rObj) const
+std::unique_ptr AttributeProperties::Clone(SdrObject&) 
const
 {
-return std::unique_ptr(new 
AttributeProperties(*this, rObj));
+assert(false && "this class is effectively abstract, should only 
be instantiating subclasses");
+abort();
 }
 
 const SfxItemSet& AttributeProperties::GetObjectItemSet() const


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

2023-05-09 Thread Noel Grandin (via logerrit)
 svx/inc/galleryfilestorageentry.hxx |   15 ---
 svx/source/gallery2/gallery1.cxx|2 +-
 svx/source/gallery2/galleryfilestorageentry.cxx |9 +++--
 3 files changed, 12 insertions(+), 14 deletions(-)

New commits:
commit 4f520dc7e3badc0165ee3b13ddd514bb94b00265
Author: Noel Grandin 
AuthorDate: Mon May 8 13:00:26 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue May 9 18:12:02 2023 +0200

inline GalleryStorageLocations allocation into GalleryFileStorageEntry

no need to allocate this separately

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

diff --git a/svx/inc/galleryfilestorageentry.hxx 
b/svx/inc/galleryfilestorageentry.hxx
index 66762fa82241..10a020297e72 100644
--- a/svx/inc/galleryfilestorageentry.hxx
+++ b/svx/inc/galleryfilestorageentry.hxx
@@ -30,7 +30,7 @@ class GalleryObjectCollection;
 class GalleryFileStorageEntry final
 {
 private:
-std::unique_ptr mpGalleryStorageLocations;
+GalleryStorageLocations maGalleryStorageLocations;
 
 public:
 GalleryFileStorageEntry();
@@ -38,15 +38,16 @@ public:
 
 OUString ReadStrFromIni(std::u16string_view aKeyName) const;
 
-const INetURLObject& GetThmURL() const { return 
mpGalleryStorageLocations->GetThmURL(); }
-const INetURLObject& GetSdgURL() const { return 
mpGalleryStorageLocations->GetSdgURL(); }
-const INetURLObject& GetSdvURL() const { return 
mpGalleryStorageLocations->GetSdvURL(); }
-const INetURLObject& GetStrURL() const { return 
mpGalleryStorageLocations->GetStrURL(); }
+const INetURLObject& GetThmURL() const { return 
maGalleryStorageLocations.GetThmURL(); }
+const INetURLObject& GetSdgURL() const { return 
maGalleryStorageLocations.GetSdgURL(); }
+const INetURLObject& GetSdvURL() const { return 
maGalleryStorageLocations.GetSdvURL(); }
+const INetURLObject& GetStrURL() const { return 
maGalleryStorageLocations.GetStrURL(); }
 
-const std::unique_ptr& 
getGalleryStorageLocations() const
+const GalleryStorageLocations& getGalleryStorageLocations() const
 {
-return mpGalleryStorageLocations;
+return maGalleryStorageLocations;
 }
+GalleryStorageLocations& getGalleryStorageLocations() { return 
maGalleryStorageLocations; }
 
 static GalleryThemeEntry* CreateThemeEntry(const INetURLObject& rURL, bool 
bReadOnly);
 
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index 8dad889b6a8c..17bc19a8990a 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -726,7 +726,7 @@ bool GalleryThemeEntry::IsDefault() const
 
 GalleryStorageLocations& GalleryThemeEntry::getGalleryStorageLocations() const
 {
-return *mpGalleryStorageEngineEntry->getGalleryStorageLocations();
+return mpGalleryStorageEngineEntry->getGalleryStorageLocations();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/gallery2/galleryfilestorageentry.cxx 
b/svx/source/gallery2/galleryfilestorageentry.cxx
index b7de500f66e3..593396aaed37 100644
--- a/svx/source/gallery2/galleryfilestorageentry.cxx
+++ b/svx/source/gallery2/galleryfilestorageentry.cxx
@@ -35,20 +35,17 @@ static bool FileExists(const INetURLObject& rURL, 
std::u16string_view rExt)
 return FileExists(aURL);
 }
 
-GalleryFileStorageEntry::GalleryFileStorageEntry()
-{
-mpGalleryStorageLocations = std::make_unique();
-}
+GalleryFileStorageEntry::GalleryFileStorageEntry() {}
 
 void GalleryFileStorageEntry::setStorageLocations(INetURLObject& rURL)
 {
-mpGalleryStorageLocations->SetStorageLocations(rURL);
+maGalleryStorageLocations.SetStorageLocations(rURL);
 }
 
 std::unique_ptr 
GalleryFileStorageEntry::createGalleryStorageEngine(
 GalleryObjectCollection& mrGalleryObjectCollection, bool& bReadOnly)
 {
-return std::make_unique(*mpGalleryStorageLocations,
+return std::make_unique(maGalleryStorageLocations,
 mrGalleryObjectCollection, 
bReadOnly);
 }
 


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

2023-05-04 Thread Caolán McNamara (via logerrit)
 svx/inc/galbrws2.hxx |2 +-
 svx/source/gallery2/galbrws2.cxx |7 ---
 svx/source/gallery2/galctrl.cxx  |4 ++--
 3 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit a831886004fba93a4eb0e5675b1e3e8afbe3d3bb
Author: Caolán McNamara 
AuthorDate: Thu May 4 09:53:37 2023 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 4 21:22:14 2023 +0200

Resolves: tdf#155140 gallery right click for context menu doesn't consume 
event

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

diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index 9cfb5c7148d1..d5ca8a50a041 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -143,7 +143,7 @@ public:
 sal_Int8ExecuteDrop( const ExecuteDropEvent& rEvt );
 boolStartDrag();
 voidTogglePreview();
-voidShowContextMenu(const CommandEvent& rCEvt);
+boolShowContextMenu(const CommandEvent& rCEvt);
 boolKeyInput(const KeyEvent& rEvt);
 boolViewBoxHasFocus() const;
 
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 52c05515237d..8285419d1809 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -486,20 +486,20 @@ void GalleryBrowser2::TogglePreview()
 GetViewWindow()->grab_focus();
 }
 
-void GalleryBrowser2::ShowContextMenu(const CommandEvent& rCEvt)
+bool GalleryBrowser2::ShowContextMenu(const CommandEvent& rCEvt)
 {
 Point aMousePos = rCEvt.GetMousePosPixel();
 Point aSelPos;
 const sal_uInt32 nItemId = ImplGetSelectedItemId( rCEvt.IsMouseEvent() ? 
 : nullptr, aSelPos );
 
 if( !(mpCurTheme && nItemId && ( nItemId <= mpCurTheme->GetObjectCount() 
)) )
-return;
+return false;
 
 ImplSelectItemId( nItemId );
 
 css::uno::Reference< css::frame::XFrame > xFrame( GetFrame() );
 if ( !xFrame.is() )
-return;
+return false;
 
 weld::Widget* pParent = GetViewWindow();
 mnCurActionPos = nItemId - 1;
@@ -511,6 +511,7 @@ void GalleryBrowser2::ShowContextMenu(const CommandEvent& 
rCEvt)
 GALLERYBROWSERMODE_PREVIEW == GetMode(),
 this ) );
 xPopup->ExecutePopup(pParent, aSelPos);
+return true;
 }
 
 bool GalleryBrowser2::ViewBoxHasFocus() const
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index ae9de1ce77b8..716a198ec87f 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -384,9 +384,9 @@ bool GalleryIconView::Command(const CommandEvent& rCEvt)
 {
 bool bRet = ValueSet::Command(rCEvt);
 
-if (rCEvt.GetCommand() == CommandEventId::ContextMenu)
+if (!bRet && rCEvt.GetCommand() == CommandEventId::ContextMenu)
 {
-mpParent->ShowContextMenu(rCEvt);
+bRet = mpParent->ShowContextMenu(rCEvt);
 }
 
 return bRet;


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

2023-05-04 Thread Noel Grandin (via logerrit)
 svx/inc/shapecollection.hxx  |   74 +++
 svx/source/accessibility/ChildrenManagerImpl.cxx |   18 +++--
 svx/source/unodraw/unoshcol.cxx  |   52 +---
 3 files changed, 90 insertions(+), 54 deletions(-)

New commits:
commit cef0b4c187a669896706799967def4a9aecf2126
Author: Noel Grandin 
AuthorDate: Thu May 4 12:43:25 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu May 4 15:04:59 2023 +0200

speed up dealing with large shape selections

cuts the time spent waiting when changing large selections by 90%

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

diff --git a/svx/inc/shapecollection.hxx b/svx/inc/shapecollection.hxx
new file mode 100644
index ..67610f056763
--- /dev/null
+++ b/svx/inc/shapecollection.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#pragma once
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+class SvxShapeCollection
+: public cppu::WeakAggImplHelper3
+{
+private:
+std::mutex m_aMutex;
+std::vector> maShapeContainer;
+comphelper::OInterfaceContainerHelper4 
maEventListeners;
+bool bDisposed = false;
+bool bInDispose = false;
+
+public:
+SvxShapeCollection() noexcept;
+
+// XInterface
+virtual void SAL_CALL release() noexcept override;
+
+// XComponent
+virtual void SAL_CALL dispose() override;
+virtual void SAL_CALL
+addEventListener(const css::uno::Reference& 
aListener) override;
+virtual void SAL_CALL
+removeEventListener(const css::uno::Reference& 
aListener) override;
+
+// XIndexAccess
+virtual sal_Int32 SAL_CALL getCount() override;
+virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override;
+
+// XElementAccess
+virtual css::uno::Type SAL_CALL getElementType() override;
+virtual sal_Bool SAL_CALL hasElements() override;
+
+// XShapes
+virtual void SAL_CALL add(const css::uno::Reference& 
xShape) override;
+virtual void SAL_CALL remove(const 
css::uno::Reference& xShape) override;
+
+// XServiceInfo
+virtual OUString SAL_CALL getImplementationName() override;
+virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) 
override;
+virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() 
override;
+
+void getAllShapes(std::vector>& 
rShapes) const;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx 
b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 8a54822796ee..2926087060d3 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -40,11 +40,11 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
@@ -861,16 +861,22 @@ void ChildrenManagerImpl::UpdateSelection()
 }
 
 // tdf#139220 to quickly find if a given drawing::XShape is selected
-o3tl::sorted_vector> 
aSortedSelectedShapes;
+std::vector> 
aSortedSelectedShapes;
 if (!xSelectedShape.is() && xSelectedShapeAccess.is())
 {
 sal_Int32 nCount = xSelectedShapeAccess->getCount();
 aSortedSelectedShapes.reserve(nCount);
-for (sal_Int32 i = 0; i < nCount; ++i)
+if (auto pSvxShape = 
dynamic_cast(xSelectedShapeAccess.get()))
 {
-css::uno::Reference 
xShape(xSelectedShapeAccess->getByIndex(i), uno::UNO_QUERY);
-aSortedSelectedShapes.insert(xShape);
+pSvxShape->getAllShapes(aSortedSelectedShapes);
 }
+else
+for (sal_Int32 i = 0; i < nCount; ++i)
+{
+css::uno::Reference 
xShape(xSelectedShapeAccess->getByIndex(i), uno::UNO_QUERY);
+

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

2023-05-02 Thread Noel Grandin (via logerrit)
 svx/inc/sdr/properties/oleproperties.hxx|4 
 svx/source/sdr/properties/oleproperties.cxx |9 -
 2 files changed, 13 deletions(-)

New commits:
commit dbcf188d39ff70ac87312dd28444df97e3cea993
Author: Noel Grandin 
AuthorDate: Mon May 1 21:10:52 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue May 2 12:15:50 2023 +0200

remove unnecessary method

the call to GetObjectItemSet() in
OleProperties::ForceDefaultAttributes() is unnecessary, because
it is always called before ForceDefaultAttributes is called, and
having removed that, the rest of the method becomes unnecessary too.

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

diff --git a/svx/inc/sdr/properties/oleproperties.hxx 
b/svx/inc/sdr/properties/oleproperties.hxx
index abd321ba7cdf..2a35c3ad0ec4 100644
--- a/svx/inc/sdr/properties/oleproperties.hxx
+++ b/svx/inc/sdr/properties/oleproperties.hxx
@@ -42,10 +42,6 @@ namespace sdr::properties
 
 // Clone() operator, normally just calls the local copy constructor
 virtual std::unique_ptr Clone(SdrObject& rObj) 
const override;
-
-// force default attributes for a specific object type, called from
-// DefaultProperties::GetObjectItemSet() if a new ItemSet is 
created
-virtual void ForceDefaultAttributes() override;
 };
 } // end of namespace sdr::properties
 
diff --git a/svx/source/sdr/properties/oleproperties.cxx 
b/svx/source/sdr/properties/oleproperties.cxx
index da599428c97b..a0e0e82d37d7 100644
--- a/svx/source/sdr/properties/oleproperties.cxx
+++ b/svx/source/sdr/properties/oleproperties.cxx
@@ -60,15 +60,6 @@ namespace sdr::properties
 {
 return std::unique_ptr(new OleProperties(*this, 
rObj));
 }
-
-void OleProperties::ForceDefaultAttributes()
-{
-// call parent
-RectangleProperties::ForceDefaultAttributes();
-
-// force ItemSet
-GetObjectItemSet();
-}
 } // end of namespace
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2023-05-02 Thread Noel Grandin (via logerrit)
 svx/inc/sdr/properties/cellproperties.hxx |   81 ++
 svx/source/inc/cell.hxx   |8 +-
 svx/source/table/cell.cxx |   69 +++--
 svx/source/table/tablecolumn.cxx  |1 
 svx/source/table/tablemodel.cxx   |1 
 svx/source/table/tablerow.cxx |1 
 svx/source/table/tableundo.cxx|   16 ++---
 svx/source/table/tableundo.hxx|6 +-
 8 files changed, 106 insertions(+), 77 deletions(-)

New commits:
commit 7a1f2f0b9906228ce970d48fef29dd25cd4cc55b
Author: Noel Grandin 
AuthorDate: Mon May 1 21:43:32 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue May 2 12:15:35 2023 +0200

use more specific class in sdr::table::Cell

mpProperties always points at a CellProperties object.

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

diff --git a/svx/inc/sdr/properties/cellproperties.hxx 
b/svx/inc/sdr/properties/cellproperties.hxx
new file mode 100644
index ..ce8dd062bb66
--- /dev/null
+++ b/svx/inc/sdr/properties/cellproperties.hxx
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#pragma once
+
+#include "textproperties.hxx"
+#include 
+#include 
+
+namespace sdr::table
+{
+class Cell;
+typedef rtl::Reference CellRef;
+}
+
+namespace sdr::properties
+{
+class CellTextProvider : public svx::ITextProvider
+{
+public:
+explicit CellTextProvider(sdr::table::CellRef xCell);
+virtual ~CellTextProvider();
+
+private:
+virtual sal_Int32 getTextCount() const override;
+virtual SdrText* getText(sal_Int32 nIndex) const override;
+
+private:
+const sdr::table::CellRef m_xCell;
+};
+
+class CellProperties : public TextProperties
+{
+protected:
+// create a new itemset
+SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override;
+
+const svx::ITextProvider& getTextProvider() const override;
+
+public:
+// basic constructor
+CellProperties(SdrObject& rObj, ::sdr::table::Cell* pCell);
+
+// constructor for copying, but using new object
+CellProperties(const CellProperties& rProps, SdrObject& rObj, 
sdr::table::Cell* pCell);
+~CellProperties();
+
+// Clone() operator, normally just calls the local copy constructor
+std::unique_ptr Clone(SdrObject& rObj) const override;
+
+void ForceDefaultAttributes() override;
+
+void ItemSetChanged(o3tl::span aChangedItems,
+sal_uInt16 nDeletedWhich) override;
+
+void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 
nullptr) override;
+
+sdr::table::CellRef mxCell;
+
+private:
+const CellTextProvider maTextProvider;
+};
+
+} // namespace sdr::properties
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/cell.hxx b/svx/source/inc/cell.hxx
index 34ae09223ce5..b70c683ddde1 100644
--- a/svx/source/inc/cell.hxx
+++ b/svx/source/inc/cell.hxx
@@ -37,7 +37,7 @@
 class SfxItemSet;
 class OutlinerParaObject;
 class SdrObject;
-namespace sdr::properties { class TextProperties; }
+namespace sdr::properties { class CellProperties; }
 
 
 namespace sdr::table {
@@ -173,9 +173,7 @@ public:
 using SvxUnoTextRangeBase::setPropertyValue;
 using SvxUnoTextRangeBase::getPropertyValue;
 
-SVX_DLLPRIVATE sdr::properties::TextProperties* CloneProperties( 
SdrObject& rNewObj, Cell& rNewCell );
-
-SVX_DLLPRIVATE static sdr::properties::TextProperties* CloneProperties( 
sdr::properties::TextProperties const * pProperties, SdrObject& rNewObj, Cell& 
rNewCell );
+SVX_DLLPRIVATE sdr::properties::CellProperties* CloneProperties( 
SdrObject& rNewObj, Cell& rNewCell );
 
 SVX_DLLPRIVATE void notifyModified();
 
@@ -196,7 +194,7 @@ private:
 
 const SvxItemPropertySet* mpPropSet;
 
-std::unique_ptr mpProperties;
+std::unique_ptr mpProperties;
 
 css::table::CellContentType mnCellContentType;
 
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 

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

2023-04-29 Thread Noel Grandin (via logerrit)
 svx/inc/sdr/properties/groupproperties.hxx|2 +-
 svx/source/sdr/properties/groupproperties.cxx |   14 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 6e0eb7da0601ab4bf828a0fa71bbad83b9e8f465
Author: Noel Grandin 
AuthorDate: Sat Apr 29 16:27:38 2023 +0200
Commit: Noel Grandin 
CommitDate: Sat Apr 29 21:16:45 2023 +0200

rename field in GroupProperties

to distinguish it from the similarly named field in the
DefaultProperties superclass.

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

diff --git a/svx/inc/sdr/properties/groupproperties.hxx 
b/svx/inc/sdr/properties/groupproperties.hxx
index 40e944eb572a..d31806d06bd1 100644
--- a/svx/inc/sdr/properties/groupproperties.hxx
+++ b/svx/inc/sdr/properties/groupproperties.hxx
@@ -29,7 +29,7 @@ namespace sdr::properties
 class GroupProperties final : public BaseProperties
 {
 // the to be used ItemSet
-mutable std::optional mxItemSet;
+mutable std::optional moMergedItemSet;
 public:
 // basic constructor
 explicit GroupProperties(SdrObject& rObj);
diff --git a/svx/source/sdr/properties/groupproperties.cxx 
b/svx/source/sdr/properties/groupproperties.cxx
index 6ec522aa36b9..6bb3485689b4 100644
--- a/svx/source/sdr/properties/groupproperties.cxx
+++ b/svx/source/sdr/properties/groupproperties.cxx
@@ -57,12 +57,12 @@ namespace sdr::properties
 const SfxItemSet& GroupProperties::GetMergedItemSet() const
 {
 // prepare ItemSet
-if(mxItemSet)
+if(moMergedItemSet)
 // clear local itemset for merge
-mxItemSet->ClearItem();
-else if(!mxItemSet)
+moMergedItemSet->ClearItem();
+else if(!moMergedItemSet)
 // force local itemset
-mxItemSet.emplace(GetSdrObject().GetObjectItemPool());
+moMergedItemSet.emplace(GetSdrObject().GetObjectItemPool());
 
 // collect all ItemSets in mpItemSet
 const SdrObjList* pSub(static_cast(GetSdrObject()).GetSubList());
@@ -79,11 +79,11 @@ namespace sdr::properties
 {
 if(SfxItemState::DONTCARE == aIter.GetItemState(false))
 {
-mxItemSet->InvalidateItem(nWhich);
+moMergedItemSet->InvalidateItem(nWhich);
 }
 else
 {
-mxItemSet->MergeValue(rSet.Get(nWhich), true);
+moMergedItemSet->MergeValue(rSet.Get(nWhich), true);
 }
 
 nWhich = aIter.NextWhich();
@@ -92,7 +92,7 @@ namespace sdr::properties
 
 // For group properties, do not call parent since groups do
 // not have local ItemSets.
-return *mxItemSet;
+return *moMergedItemSet;
 }
 
 void GroupProperties::SetMergedItemSet(const SfxItemSet& rSet, bool 
bClearAllItems)


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

2022-12-15 Thread Khaled Hosny (via logerrit)
 svx/inc/CommonStylePreviewRenderer.hxx   |9 --
 svx/source/styles/CommonStylePreviewRenderer.cxx |   58 ++--
 svx/source/tbxctrls/tbcontrl.cxx |   79 +--
 3 files changed, 56 insertions(+), 90 deletions(-)

New commits:
commit bfecacb2487ba9470600e6f64056d9b1816ee96b
Author: Khaled Hosny 
AuthorDate: Thu Dec 15 22:51:54 2022 +0200
Commit: خالد حسني 
CommitDate: Fri Dec 16 06:04:25 2022 +

tdf#152460: Improve script handling in style previews

Use Edit Engine to get the script types instead of trying to duplicate
(poorly) its behaviour. This has the advantage of handling weak
characters and digits properly and is closer to what would happen in the
document itself.

We probably should go further and render the preview entirely using Edit
Engine (since the current code fails short of proper bidi handling), but
this is a bigger change.

Change-Id: I79b28067d80f66087e1d5e9399ba1a513de96c8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144283
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/svx/inc/CommonStylePreviewRenderer.hxx 
b/svx/inc/CommonStylePreviewRenderer.hxx
index cb0563be15c4..0e99421b4bfe 100644
--- a/svx/inc/CommonStylePreviewRenderer.hxx
+++ b/svx/inc/CommonStylePreviewRenderer.hxx
@@ -12,6 +12,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -19,9 +20,6 @@
 #include 
 #include 
 
-#include 
-#include 
-
 class OutputDevice;
 class SfxStyleSheetBase;
 
@@ -41,13 +39,12 @@ class CommonStylePreviewRenderer final : public 
sfx2::StylePreviewRenderer
 tools::Long mnBaseLine;
 OUString maStyleName;
 OUString maScriptText;
-css::uno::Reference mxBreak;
 struct ScriptInfo
 {
 tools::Long textWidth;
-sal_uInt16 scriptType;
+SvtScriptType scriptType;
 sal_Int32 changePos;
-ScriptInfo(sal_uInt16 scrptType, sal_Int32 position)
+ScriptInfo(SvtScriptType scrptType, sal_Int32 position)
 : textWidth(0)
 , scriptType(scrptType)
 , changePos(position)
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx 
b/svx/source/styles/CommonStylePreviewRenderer.cxx
index 5f12d209f0bf..9ddf3cf15017 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -39,9 +40,6 @@
 
 #include 
 
-#include 
-#include 
-
 using namespace css;
 
 namespace svx
@@ -235,7 +233,7 @@ void CommonStylePreviewRenderer::CalcRenderSize()
 
 mnBaseLine = 0;
 mnHeight = 0;
-sal_uInt16 nScript;
+SvtScriptType aScript;
 sal_uInt16 nIdx = 0;
 sal_Int32 nStart = 0;
 sal_Int32 nEnd;
@@ -244,19 +242,19 @@ void CommonStylePreviewRenderer::CalcRenderSize()
 if (nCnt)
 {
 nEnd = maScriptChanges[nIdx].changePos;
-nScript = maScriptChanges[nIdx].scriptType;
+aScript = maScriptChanges[nIdx].scriptType;
 }
 else
 {
 nEnd = rText.getLength();
-nScript = css::i18n::ScriptType::LATIN;
+aScript = SvtScriptType::LATIN;
 }
 
 do
 {
-auto oFont = (nScript == css::i18n::ScriptType::ASIAN) ?
+auto oFont = (aScript == SvtScriptType::ASIAN) ?
  m_oCJKFont :
- ((nScript == css::i18n::ScriptType::COMPLEX) ?
+ ((aScript == SvtScriptType::COMPLEX) ?
  m_oCTLFont :
  m_oFont);
 
@@ -287,7 +285,7 @@ void CommonStylePreviewRenderer::CalcRenderSize()
 {
 nStart = nEnd;
 nEnd = maScriptChanges[nIdx].changePos;
-nScript = maScriptChanges[nIdx].scriptType;
+aScript = maScriptChanges[nIdx].scriptType;
 }
 else
 break;
@@ -351,7 +349,7 @@ bool CommonStylePreviewRenderer::render(const 
tools::Rectangle& aRectangle, Rend
 aFontDrawPosition.AdjustY((aRectangle.GetHeight() - mnHeight) / 2 
);
 }
 
-sal_uInt16 nScript;
+SvtScriptType aScript;
 sal_uInt16 nIdx = 0;
 sal_Int32 nStart = 0;
 sal_Int32 nEnd;
@@ -359,19 +357,19 @@ bool CommonStylePreviewRenderer::render(const 
tools::Rectangle& aRectangle, Rend
 if (nCnt)
 {
 nEnd = maScriptChanges[nIdx].changePos;
-nScript = maScriptChanges[nIdx].scriptType;
+aScript = maScriptChanges[nIdx].scriptType;
 }
 else
 {
 nEnd = rText.getLength();
-nScript = css::i18n::ScriptType::LATIN;
+aScript = SvtScriptType::LATIN;
 }
 
 do
 {
-auto oFont = (nScript == css::i18n::ScriptType::ASIAN)
+auto oFont = (aScript == SvtScriptType::ASIAN)
  ? m_oCJKFont
- : ((nScript == css::i18n::ScriptType::COMPLEX)
+

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

2022-11-14 Thread Maxim Monastirsky (via logerrit)
 svx/inc/sdr/properties/textproperties.hxx |1 +
 svx/source/table/svdotable.cxx|5 -
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit f06353aadfc1a9329da0d5fe0cb5878d124b01aa
Author: Maxim Monastirsky 
AuthorDate: Wed Oct 19 21:19:39 2022 +0300
Commit: Maxim Monastirsky 
CommitDate: Mon Nov 14 09:35:27 2022 +0100

svx: Update tables on style changes

After modifying a cell style, it is required to broadcast
the SfxHintId::DataChanged hint on that style, to update
the table appearance. However, it doesn't work when only
text attributes (e.g. font name or color) were changed,
unless the table is also moved around a bit.

It seems to be the same problem as i#101556, whose fix
didn't handle the table case. The problem here is that
the change hint is handled by the individual cells
properties objects, and nothing updates the table's
properties object.

Change-Id: I30ebc85c16b20c5354f02a309e6fa3dd4b31f669
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142665
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky 

diff --git a/svx/inc/sdr/properties/textproperties.hxx 
b/svx/inc/sdr/properties/textproperties.hxx
index 916e5a7f6b5b..8a5065442ed0 100644
--- a/svx/inc/sdr/properties/textproperties.hxx
+++ b/svx/inc/sdr/properties/textproperties.hxx
@@ -79,6 +79,7 @@ namespace sdr::properties
 
 // #i101556# versioning support
 virtual sal_uInt32 getVersion() const override;
+void increaseVersion() { maVersion++; }
 };
 } // end of namespace sdr::properties
 
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index a22baf6d07b7..7764f35d1842 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -666,8 +666,11 @@ void SdrTableObjImpl::DragEdge( bool mbHorizontal, int 
nEdge, sal_Int32 nOffset
 // XModifyListener
 
 
-void SAL_CALL SdrTableObjImpl::modified( const css::lang::EventObject& 
/*aEvent*/ )
+void SAL_CALL SdrTableObjImpl::modified( const css::lang::EventObject& aEvent )
 {
+if (aEvent.Source == mxTableStyle && mpTableObj)
+
static_cast(mpTableObj->GetProperties()).increaseVersion();
+
 update();
 }
 


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

2022-11-11 Thread Caolán McNamara (via logerrit)
 svx/inc/tbxcolorupdate.hxx |   10 ++
 svx/source/tbxctrls/tbxcolorupdate.cxx |   27 ++-
 vcl/inc/image.h|5 -
 vcl/source/image/Image.cxx |2 ++
 vcl/source/image/ImplImage.cxx |   24 ++--
 5 files changed, 60 insertions(+), 8 deletions(-)

New commits:
commit c3da84a10260b3260ee42df900e2ff01119e4f7c
Author: Caolán McNamara 
AuthorDate: Fri Nov 11 15:52:51 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 11 20:36:14 2022 +0100

Resolves: tdf#151898 get hidpi font/highlight color icons

Most of this wouldn't be necessary if we could solve the split alpha
problem. In the meantime, let Image take a MetaFile as an arg, record
what we want to do in the metafile, and play it back when we need to
generate the bitmap for to render the image. That way we don't have
alpha to worry about during the recording, and we only have one alpha in
the final rendering, as opposed to having two alphas in a source and in
destination VirtualDevice, which is problematic in most backends.

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

diff --git a/svx/inc/tbxcolorupdate.hxx b/svx/inc/tbxcolorupdate.hxx
index 0ad6f502243a..d496a6921fab 100644
--- a/svx/inc/tbxcolorupdate.hxx
+++ b/svx/inc/tbxcolorupdate.hxx
@@ -83,6 +83,8 @@ namespace svx
 virtual OUString GetQuickHelpText() const = 0;
 virtual void SetImage(VirtualDevice* pVirDev) = 0;
 virtual VclPtr CreateVirtualDevice() const = 0;
+// true -> use Device to Record to Metafile, false -> Render to Device
+virtual bool RecordVirtualDevice() const = 0;
 virtual vcl::ImageType GetImageSize() const = 0;
 virtual Size GetItemSize(const Size& rImageSize) const = 0;
 };
@@ -103,6 +105,10 @@ namespace svx
 virtual OUString GetQuickHelpText() const override;
 virtual void SetImage(VirtualDevice* pVirDev) override;
 virtual VclPtr CreateVirtualDevice() const override;
+virtual bool RecordVirtualDevice() const  override
+{
+return true;
+}
 virtual vcl::ImageType GetImageSize() const override;
 virtual Size GetItemSize(const Size& rImageSize) const override;
 };
@@ -121,6 +127,10 @@ namespace svx
 virtual OUString GetQuickHelpText() const override;
 virtual void SetImage(VirtualDevice* pVirDev) override;
 virtual VclPtr CreateVirtualDevice() const override;
+virtual bool RecordVirtualDevice() const  override
+{
+return false;
+}
 virtual vcl::ImageType GetImageSize() const override;
 virtual Size GetItemSize(const Size& rImageSize) const override;
 };
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx 
b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 37c8db06cf50..4e438c3ede9c 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -27,6 +27,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -102,15 +103,21 @@ namespace svx
 
 void VclToolboxButtonColorUpdater::SetImage(VirtualDevice* pVirDev)
 {
-mpTbx->SetItemImage(mnBtnId, Image(pVirDev->GetBitmapEx(Point(0,0), 
maBmpSize)));
+GDIMetaFile* pMtf = pVirDev->GetConnectMetaFile();
+
+assert(pMtf && "should have been set in 
ToolboxButtonColorUpdaterBase::Update");
+
+pMtf->Stop();
+pMtf->WindStart();
+
+Graphic aGraphic(*pMtf);
+
+mpTbx->SetItemImage(mnBtnId, Image(aGraphic.GetXGraphic()));
 }
 
 VclPtr VclToolboxButtonColorUpdater::CreateVirtualDevice() 
const
 {
-auto xRet = VclPtr::Create(*mpTbx->GetOutDev(),
-DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
-xRet->SetBackground(mpTbx->GetControlBackground());
-return xRet;
+return VclPtr::Create(*mpTbx->GetOutDev());
 }
 
 vcl::ImageType VclToolboxButtonColorUpdater::GetImageSize() const
@@ -172,6 +179,16 @@ namespace svx
 pVirDev->SetOutputSizePixel(aItemSize);
 maBmpSize = aItemSize;
 
+std::unique_ptr xMetaFile;
+if (RecordVirtualDevice())
+{
+xMetaFile.reset(new GDIMetaFile);
+xMetaFile->SetPrefSize(pVirDev->GetOutputSize());
+xMetaFile->SetPrefMapMode(pVirDev->GetMapMode());
+xMetaFile->Record(pVirDev.get());
+pVirDev->EnableOutput(false);
+}
+
 if (maBmpSize.Width() == maBmpSize.Height())
 // tdf#84985 align color bar with icon bottom edge; integer 
arithmetic e.g. 26 - 26/4 <> 26 * 3/4
 maUpdRect = tools::Rectangle(Point( 0, maBmpSize.Height() - 
maBmpSize.Height() / 4), Size(maBmpSize.Width(), maBmpSize.Height() / 4));
diff --git 

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

2022-10-01 Thread Khaled Hosny (via logerrit)
 svx/inc/CommonStylePreviewRenderer.hxx   |1 
 svx/source/styles/CommonStylePreviewRenderer.cxx |   29 +--
 2 files changed, 18 insertions(+), 12 deletions(-)

New commits:
commit b7e7ae77f55e41dae2231b04062cf037f7f9b13f
Author: Khaled Hosny 
AuthorDate: Sat Oct 1 01:29:24 2022 +0200
Commit: خالد حسني 
CommitDate: Sat Oct 1 13:29:50 2022 +0200

tdf#151114: Improve styles preview alignment

Change-Id: Iefe265584d710bd6cfc9e7ed0a656dd83d91c84c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140811
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/svx/inc/CommonStylePreviewRenderer.hxx 
b/svx/inc/CommonStylePreviewRenderer.hxx
index c4d87abf61a0..cb0563be15c4 100644
--- a/svx/inc/CommonStylePreviewRenderer.hxx
+++ b/svx/inc/CommonStylePreviewRenderer.hxx
@@ -38,6 +38,7 @@ class CommonStylePreviewRenderer final : public 
sfx2::StylePreviewRenderer
 Color maHighlightColor;
 Color maBackgroundColor;
 tools::Long mnHeight;
+tools::Long mnBaseLine;
 OUString maStyleName;
 OUString maScriptText;
 css::uno::Reference mxBreak;
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx 
b/svx/source/styles/CommonStylePreviewRenderer.cxx
index bee9fb969f07..277948d3b6bc 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -54,6 +55,7 @@ CommonStylePreviewRenderer::CommonStylePreviewRenderer(
 , maHighlightColor(COL_AUTO)
 , maBackgroundColor(COL_AUTO)
 , mnHeight(0)
+, mnBaseLine(0)
 , maStyleName(mpStyle->GetName())
 {
 }
@@ -78,6 +80,7 @@ static bool SetFont(const SfxItemSet& rSet, sal_uInt16 nSlot, 
SvxFont& rFont)
 rFont.SetPitch(rFontItem.GetPitch());
 rFont.SetCharSet(rFontItem.GetCharSet());
 rFont.SetStyleName(rFontItem.GetStyleName());
+rFont.SetAlignment(ALIGN_BASELINE);
 return true;
 }
 return false;
@@ -92,6 +95,8 @@ bool CommonStylePreviewRenderer::SetFontSize(const 
SfxItemSet& rSet, sal_uInt16
 Size aFontSize(0, rFontHeightItem.GetHeight());
 aFontSize = mrOutputDev.LogicToPixel(aFontSize, 
MapMode(mrShell.GetMapUnit()));
 rFont.SetFontSize(aFontSize);
+mrOutputDev.SetFont(rFont);
+FontMetric aMetric(mrOutputDev.GetFontMetric());
 return true;
 }
 return false;
@@ -228,9 +233,8 @@ void CommonStylePreviewRenderer::CalcRenderSize()
 {
 const OUString& rText = maStyleName;
 
-tools::Rectangle aTextRect;
-tools::Long nHeight = 0;
-
+mnBaseLine = 0;
+mnHeight = 0;
 sal_uInt16 nScript;
 sal_uInt16 nIdx = 0;
 sal_Int32 nStart = 0;
@@ -258,23 +262,22 @@ void CommonStylePreviewRenderer::CalcRenderSize()
 
 mrOutputDev.Push(vcl::PushFlags::FONT);
 
-Size aSize;
+tools::Long nWidth;
 if (oFont)
 {
 mrOutputDev.SetFont(*oFont);
-aSize = oFont->GetTextSize(mrOutputDev, rText, nStart, nEnd - 
nStart);
+nWidth = oFont->GetTextSize(mrOutputDev, rText, nStart, nEnd - 
nStart).Width();
 }
 else
-aSize = Size(mrOutputDev.GetTextWidth(rText, nStart, nEnd - 
nStart), mrOutputDev.GetFont().GetFontHeight());
+nWidth = mrOutputDev.GetTextWidth(rText, nStart, nEnd - nStart);
 
 tools::Rectangle aRect;
 mrOutputDev.GetTextBoundRect(aRect, rText, nStart, nStart, nEnd - 
nStart);
-aTextRect = aTextRect.Union(aRect);
 
 mrOutputDev.Pop();
 
-auto nWidth = aSize.Width();
-nHeight = std::max(nHeight, aSize.Height());
+mnBaseLine = std::max(mnBaseLine, -aRect.Top());
+mnHeight = std::max(mnHeight, aRect.GetHeight());
 if (nIdx >= maScriptChanges.size())
 break;
 
@@ -292,10 +295,11 @@ void CommonStylePreviewRenderer::CalcRenderSize()
 while(true);
 
 double fRatio = 1;
-if (aTextRect.Bottom() > mnMaxHeight)
-fRatio = double(mnMaxHeight) / aTextRect.Bottom();
+if (mnHeight > mnMaxHeight)
+fRatio = double(mnMaxHeight) / mnHeight;
 
-mnHeight = std::min(tools::Long(nHeight * fRatio), mnMaxHeight);
+mnHeight *= fRatio;
+mnBaseLine *= fRatio;
 if (fRatio != 1)
 {
 Size aFontSize;
@@ -340,6 +344,7 @@ bool CommonStylePreviewRenderer::render(const 
tools::Rectangle& aRectangle, Rend
 mrOutputDev.SetTextFillColor(maHighlightColor);
 
 Point aFontDrawPosition = aRectangle.TopLeft();
+aFontDrawPosition.AdjustY(mnBaseLine);
 if (eRenderAlign == RenderAlign::CENTER)
 {
 if (aRectangle.GetHeight() > mnHeight)


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

2022-08-22 Thread Khaled Hosny (via logerrit)
 svx/inc/CommonStylePreviewRenderer.hxx   |   29 +-
 svx/source/styles/CommonStylePreviewRenderer.cxx |  326 ++-
 2 files changed, 293 insertions(+), 62 deletions(-)

New commits:
commit 0483fbd1d05d74c394d9274bdee77b3b2aebb495
Author: Khaled Hosny 
AuthorDate: Sun Aug 21 01:49:57 2022 +0200
Commit: Caolán McNamara 
CommitDate: Mon Aug 22 15:44:36 2022 +0200

tdf#87535: Preview styles using CTL/CJK fonts in the sidebar

Code is similar to code in svx/source/dialog/fntctrl.cxx and
source/ui/chrdlg/drpcps.cxx, etc. Instead of using only the “western”
font, it splits the text based on script type and uses the appropriate
font for each script type.

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

diff --git a/svx/inc/CommonStylePreviewRenderer.hxx 
b/svx/inc/CommonStylePreviewRenderer.hxx
index b613f489f7b9..c4d87abf61a0 100644
--- a/svx/inc/CommonStylePreviewRenderer.hxx
+++ b/svx/inc/CommonStylePreviewRenderer.hxx
@@ -10,6 +10,7 @@
 #pragma once
 
 #include 
+#include 
 
 #include 
 #include 
@@ -18,21 +19,45 @@
 #include 
 #include 
 
+#include 
+#include 
+
 class OutputDevice;
 class SfxStyleSheetBase;
 
+using namespace css;
+
 namespace svx
 {
 class CommonStylePreviewRenderer final : public sfx2::StylePreviewRenderer
 {
 std::optional m_oFont;
+std::optional m_oCJKFont;
+std::optional m_oCTLFont;
 Color maFontColor;
 Color maHighlightColor;
 Color maBackgroundColor;
-Size maPixelSize;
+tools::Long mnHeight;
 OUString maStyleName;
+OUString maScriptText;
+css::uno::Reference mxBreak;
+struct ScriptInfo
+{
+tools::Long textWidth;
+sal_uInt16 scriptType;
+sal_Int32 changePos;
+ScriptInfo(sal_uInt16 scrptType, sal_Int32 position)
+: textWidth(0)
+, scriptType(scrptType)
+, changePos(position)
+{
+}
+};
+std::vector maScriptChanges;
 
-Size getRenderSize() const;
+bool SetFontSize(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
+void CalcRenderSize();
+void CheckScript();
 
 public:
 CommonStylePreviewRenderer(const SfxObjectShell& rShell, OutputDevice& 
rOutputDev,
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx 
b/svx/source/styles/CommonStylePreviewRenderer.cxx
index df0e3539e769..66fbb9e72603 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -37,6 +38,9 @@
 
 #include 
 
+#include 
+#include 
+
 using namespace css;
 
 namespace svx
@@ -56,57 +60,127 @@ CommonStylePreviewRenderer::CommonStylePreviewRenderer(
 CommonStylePreviewRenderer::~CommonStylePreviewRenderer()
 {}
 
+static bool GetWhich(const SfxItemSet& rSet, sal_uInt16 nSlot, sal_uInt16& 
rWhich)
+{
+rWhich = rSet.GetPool()->GetWhich(nSlot);
+return rSet.GetItemState(rWhich) >= SfxItemState::DEFAULT;
+}
+
+static bool SetFont(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont)
+{
+sal_uInt16 nWhich;
+if (GetWhich(rSet, nSlot, nWhich))
+{
+const auto& rFontItem = static_cast(rSet.Get(nWhich));
+rFont.SetFamily(rFontItem.GetFamily());
+rFont.SetFamilyName(rFontItem.GetFamilyName());
+rFont.SetPitch(rFontItem.GetPitch());
+rFont.SetCharSet(rFontItem.GetCharSet());
+rFont.SetStyleName(rFontItem.GetStyleName());
+return true;
+}
+return false;
+}
+
+bool CommonStylePreviewRenderer::SetFontSize(const SfxItemSet& rSet, 
sal_uInt16 nSlot, SvxFont& rFont)
+{
+sal_uInt16 nWhich;
+if (GetWhich(rSet, nSlot, nWhich))
+{
+const auto& rFontHeightItem = static_cast(rSet.Get(nWhich));
+Size aFontSize(0, rFontHeightItem.GetHeight());
+aFontSize = mrOutputDev.LogicToPixel(aFontSize, 
MapMode(mrShell.GetMapUnit()));
+rFont.SetFontSize(aFontSize);
+return true;
+}
+return false;
+}
+
 bool CommonStylePreviewRenderer::recalculate()
 {
 m_oFont.reset();
+m_oCJKFont.reset();
+m_oCTLFont.reset();
 
 std::optional pItemSet(mpStyle->GetItemSetForPreview());
 
 if (!pItemSet) return false;
 
 SvxFont aFont;
+SvxFont aCJKFont;
+SvxFont aCTLFont;
 
 const SfxPoolItem* pItem;
 
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_WEIGHT)) != nullptr)
-{
 aFont.SetWeight(static_cast(pItem)->GetWeight());
-}
+if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_CJK_WEIGHT)) != nullptr)
+aCJKFont.SetWeight(static_cast(pItem)->GetWeight());
+if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_CTL_WEIGHT)) != nullptr)
+aCTLFont.SetWeight(static_cast(pItem)->GetWeight());
+
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_POSTURE)) != nullptr)
- 

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

2022-06-05 Thread Noel Grandin (via logerrit)
 svx/inc/CommonStylePreviewRenderer.hxx   |6 +-
 svx/source/styles/CommonStylePreviewRenderer.cxx |   50 +++
 2 files changed, 28 insertions(+), 28 deletions(-)

New commits:
commit e0e944a42059271d082f8bd5121f30a4536fb8f3
Author: Noel Grandin 
AuthorDate: Sat Jun 4 19:19:15 2022 +0200
Commit: Noel Grandin 
CommitDate: Sun Jun 5 08:23:36 2022 +0200

no need to allocate this separately

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

diff --git a/svx/inc/CommonStylePreviewRenderer.hxx 
b/svx/inc/CommonStylePreviewRenderer.hxx
index 1c21db99b378..b613f489f7b9 100644
--- a/svx/inc/CommonStylePreviewRenderer.hxx
+++ b/svx/inc/CommonStylePreviewRenderer.hxx
@@ -9,8 +9,9 @@
 
 #pragma once
 
-#include 
+#include 
 
+#include 
 #include 
 #include 
 #include 
@@ -19,13 +20,12 @@
 
 class OutputDevice;
 class SfxStyleSheetBase;
-class SvxFont;
 
 namespace svx
 {
 class CommonStylePreviewRenderer final : public sfx2::StylePreviewRenderer
 {
-std::unique_ptr m_pFont;
+std::optional m_oFont;
 Color maFontColor;
 Color maHighlightColor;
 Color maBackgroundColor;
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx 
b/svx/source/styles/CommonStylePreviewRenderer.cxx
index 7ad9c8697dd1..df0e3539e769 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -58,55 +58,55 @@ CommonStylePreviewRenderer::~CommonStylePreviewRenderer()
 
 bool CommonStylePreviewRenderer::recalculate()
 {
-m_pFont.reset();
+m_oFont.reset();
 
 std::optional pItemSet(mpStyle->GetItemSetForPreview());
 
 if (!pItemSet) return false;
 
-std::unique_ptr pFont(new SvxFont);
+SvxFont aFont;
 
 const SfxPoolItem* pItem;
 
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_WEIGHT)) != nullptr)
 {
-pFont->SetWeight(static_cast(pItem)->GetWeight());
+aFont.SetWeight(static_cast(pItem)->GetWeight());
 }
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_POSTURE)) != nullptr)
 {
-pFont->SetItalic(static_cast(pItem)->GetPosture());
+aFont.SetItalic(static_cast(pItem)->GetPosture());
 }
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_CONTOUR)) != nullptr)
 {
-pFont->SetOutline(static_cast< const 
SvxContourItem*>(pItem)->GetValue());
+aFont.SetOutline(static_cast< const 
SvxContourItem*>(pItem)->GetValue());
 }
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_SHADOWED)) != nullptr)
 {
-pFont->SetShadow(static_cast(pItem)->GetValue());
+aFont.SetShadow(static_cast(pItem)->GetValue());
 }
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_RELIEF)) != nullptr)
 {
-pFont->SetRelief(static_cast(pItem)->GetValue());
+aFont.SetRelief(static_cast(pItem)->GetValue());
 }
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_UNDERLINE)) != nullptr)
 {
-pFont->SetUnderline(static_cast< const 
SvxUnderlineItem*>(pItem)->GetLineStyle());
+aFont.SetUnderline(static_cast< const 
SvxUnderlineItem*>(pItem)->GetLineStyle());
 }
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_OVERLINE)) != nullptr)
 {
-pFont->SetOverline(static_cast(pItem)->GetValue());
+aFont.SetOverline(static_cast(pItem)->GetValue());
 }
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_STRIKEOUT)) != nullptr)
 {
-pFont->SetStrikeout(static_cast(pItem)->GetStrikeout());
+aFont.SetStrikeout(static_cast(pItem)->GetStrikeout());
 }
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_CASEMAP)) != nullptr)
 {
-pFont->SetCaseMap(static_cast(pItem)->GetCaseMap());
+aFont.SetCaseMap(static_cast(pItem)->GetCaseMap());
 }
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_EMPHASISMARK)) != nullptr)
 {
-pFont->SetEmphasisMark(static_cast(pItem)->GetEmphasisMark());
+aFont.SetEmphasisMark(static_cast(pItem)->GetEmphasisMark());
 }
 if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_COLOR)) != nullptr)
 {
@@ -137,8 +137,8 @@ bool CommonStylePreviewRenderer::recalculate()
 const SvxFontItem* pFontItem = static_cast(pItem);
 if (IsStarSymbol(pFontItem->GetFamilyName()))
 return false;
-pFont->SetFamilyName(pFontItem->GetFamilyName());
-pFont->SetStyleName(pFontItem->GetStyleName());
+aFont.SetFamilyName(pFontItem->GetFamilyName());
+aFont.SetStyleName(pFontItem->GetStyleName());
 }
 else
 {
@@ -150,11 +150,11 @@ bool CommonStylePreviewRenderer::recalculate()
 const SvxFontHeightItem* pFontHeightItem = static_cast(pItem);
 Size aFontSize(0, pFontHeightItem->GetHeight());
 maPixelSize = mrOutputDev.LogicToPixel(aFontSize, 
MapMode(mrShell.GetMapUnit()));
-pFont->SetFontSize(maPixelSize);
+

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

2022-05-25 Thread Noel Grandin (via logerrit)
 svx/inc/XPropertyTable.hxx|   14 +++
 svx/source/unodraw/XPropertyTable.cxx |   62 +++---
 svx/source/xoutdev/xtabbtmp.cxx   |3 -
 svx/source/xoutdev/xtabcolr.cxx   |4 --
 svx/source/xoutdev/xtabdash.cxx   |3 -
 svx/source/xoutdev/xtabgrdt.cxx   |4 --
 svx/source/xoutdev/xtabhtch.cxx   |3 -
 svx/source/xoutdev/xtablend.cxx   |3 -
 svx/source/xoutdev/xtabptrn.cxx   |3 -
 9 files changed, 42 insertions(+), 57 deletions(-)

New commits:
commit 37a5d60df7631cca8ce597905d09748a48ff2a86
Author: Noel Grandin 
AuthorDate: Wed May 25 08:07:33 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed May 25 09:23:39 2022 +0200

SvxUnoXPropertyTable is never passed a null ptr

and make the type of the constructor functions more precise to avoid
unnecessary UNO_QUERY at the call site

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

diff --git a/svx/inc/XPropertyTable.hxx b/svx/inc/XPropertyTable.hxx
index 19da2a0b524a..e9f76965ef36 100644
--- a/svx/inc/XPropertyTable.hxx
+++ b/svx/inc/XPropertyTable.hxx
@@ -19,17 +19,17 @@
 
 #pragma once
 
-#include 
+#include 
 #include 
 
 // FIXME: should have a single factory method with an enumeration here [!]
 
-css::uno::Reference< css::uno::XInterface > SvxUnoXColorTable_createInstance( 
XPropertyList* pList ) noexcept;
-css::uno::Reference< css::uno::XInterface > 
SvxUnoXLineEndTable_createInstance( XPropertyList* pList ) noexcept;
-css::uno::Reference< css::uno::XInterface > SvxUnoXDashTable_createInstance( 
XPropertyList* pList ) noexcept;
-css::uno::Reference< css::uno::XInterface > SvxUnoXHatchTable_createInstance( 
XPropertyList* pList ) noexcept;
-css::uno::Reference< css::uno::XInterface > 
SvxUnoXGradientTable_createInstance( XPropertyList* pList ) noexcept;
-css::uno::Reference< css::uno::XInterface > SvxUnoXBitmapTable_createInstance( 
XPropertyList* pList ) noexcept;
+css::uno::Reference< css::container::XNameContainer > 
SvxUnoXColorTable_createInstance( XPropertyList& rList ) noexcept;
+css::uno::Reference< css::container::XNameContainer > 
SvxUnoXLineEndTable_createInstance( XPropertyList& rList ) noexcept;
+css::uno::Reference< css::container::XNameContainer > 
SvxUnoXDashTable_createInstance( XPropertyList& rList ) noexcept;
+css::uno::Reference< css::container::XNameContainer > 
SvxUnoXHatchTable_createInstance( XPropertyList& rList ) noexcept;
+css::uno::Reference< css::container::XNameContainer > 
SvxUnoXGradientTable_createInstance( XPropertyList& rList ) noexcept;
+css::uno::Reference< css::container::XNameContainer > 
SvxUnoXBitmapTable_createInstance( XPropertyList& rList ) noexcept;
 
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/XPropertyTable.cxx 
b/svx/source/unodraw/XPropertyTable.cxx
index 9455f1fe4069..56bb135237f8 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -46,13 +46,13 @@ namespace {
 class SvxUnoXPropertyTable : public WeakImplHelper< container::XNameContainer, 
lang::XServiceInfo >
 {
 private:
-XPropertyList*  mpList;
+XPropertyList& mrList;
 sal_Int16 mnWhich;
 
-tools::Long getCount() const { return mpList ? mpList->Count() : 0; }
+tools::Long getCount() const { return mrList.Count(); }
 const XPropertyEntry* get(tools::Long index) const;
 public:
-SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList* pList ) noexcept;
+SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList& rList ) noexcept;
 
 /// @throws uno::RuntimeException
 virtual uno::Any getAny( const XPropertyEntry* pEntry ) const = 0;
@@ -81,17 +81,14 @@ public:
 
 }
 
-SvxUnoXPropertyTable::SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList* 
pList ) noexcept
-: mpList( pList ), mnWhich( nWhich )
+SvxUnoXPropertyTable::SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList& 
rList ) noexcept
+: mrList( rList ), mnWhich( nWhich )
 {
 }
 
 const XPropertyEntry* SvxUnoXPropertyTable::get(tools::Long index) const
 {
-if( mpList )
-return mpList->Get(index);
-else
-return nullptr;
+   return mrList.Get(index);
 }
 
 // XServiceInfo
@@ -105,9 +102,6 @@ void SAL_CALL SvxUnoXPropertyTable::insertByName( const  
OUString& aName, const
 {
 SolarMutexGuard aGuard;
 
-if( nullptr == mpList )
-throw lang::IllegalArgumentException();
-
 if( hasByName( aName ) )
 throw container::ElementExistException();
 
@@ -117,7 +111,7 @@ void SAL_CALL SvxUnoXPropertyTable::insertByName( const  
OUString& aName, const
 if (!pNewEntry)
 throw lang::IllegalArgumentException();
 
-mpList->Insert(std::move(pNewEntry));
+mrList.Insert(std::move(pNewEntry));
 }
 
 void SAL_CALL SvxUnoXPropertyTable::removeByName( const  OUString& Name )
@@ -133,7 +127,7 @@ 

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

2022-02-20 Thread Jan-Marek Glogowski (via logerrit)
 svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx|2 +-
 svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx |   14 ++
 2 files changed, 11 insertions(+), 5 deletions(-)

New commits:
commit 0b0d41b48fa7c5aebd42bdce60dab77421743ae1
Author: Jan-Marek Glogowski 
AuthorDate: Sun Feb 20 15:26:25 2022 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Sun Feb 20 20:43:26 2022 +0100

Fix --disable-avmedia build

Regression from commit 6f938dce6eaa927cfde39491ef7a0bc1d07df66b
("update video pos and size after change if currently playing").

Change-Id: Ib618fcd7347255d0cae352b7fc90aa85a2c14d32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130215
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx 
b/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
index d362048df3db..891c920aed79 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofsdrmediaobj.hxx
@@ -54,7 +54,7 @@ namespace sdr::contact
 virtual void ActionChanged() override;
 
 private:
-void updateMediaWindow() const;
+void updateMediaWindow(bool bShow) const;
 
 #if HAVE_FEATURE_AVMEDIA
 std::unique_ptr mpMediaWindow;
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx 
b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
index 0241fabd5661..777017472bf6 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrmediaobj.cxx
@@ -87,12 +87,15 @@ Size ViewObjectContactOfSdrMediaObj::getPreferredSize() 
const
 void ViewObjectContactOfSdrMediaObj::ActionChanged()
 {
 ViewObjectContactOfSdrObj::ActionChanged();
-if (mpMediaWindow && mpMediaWindow->isVisible())
-updateMediaWindow();
+updateMediaWindow(false);
 }
 
-void ViewObjectContactOfSdrMediaObj::updateMediaWindow() const
+void ViewObjectContactOfSdrMediaObj::updateMediaWindow(bool bShow) const
 {
+#if HAVE_FEATURE_AVMEDIA
+if (!mpMediaWindow || (!bShow && !mpMediaWindow->isVisible()))
+return;
+
 basegfx::B2DRange aViewRange(getObjectRange());
 
aViewRange.transform(GetObjectContact().getViewInformation2D().getViewTransformation());
 
@@ -120,6 +123,9 @@ void ViewObjectContactOfSdrMediaObj::updateMediaWindow() 
const
 // through to gtk which will now accept it as the underlying
 // m_pSocket of GtkSalObject::SetPosSize is now visible
 mpMediaWindow->setPosSize(aViewRectangle);
+#else
+(void) bShow;
+#endif
 }
 
 void ViewObjectContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& 
rItem ) const
@@ -137,7 +143,7 @@ void ViewObjectContactOfSdrMediaObj::updateMediaItem( 
::avmedia::MediaItem& rIte
 }
 else
 {
-updateMediaWindow();
+updateMediaWindow(true);
 }
 #else
 (void) rItem;


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

2022-01-07 Thread Noel Grandin (via logerrit)
 svx/inc/sdr/properties/textproperties.hxx|2 +-
 svx/source/sdr/properties/textproperties.cxx |   10 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit b2d742faa062d3656f751b32acfe089ffa2dca3f
Author: Noel Grandin 
AuthorDate: Fri Jan 7 16:29:38 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat Jan 8 07:12:37 2022 +0100

reduce cost of Sdr properties for text-derived objects

when they have no text in them

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

diff --git a/svx/inc/sdr/properties/textproperties.hxx 
b/svx/inc/sdr/properties/textproperties.hxx
index 4a6d59f61972..719cf838ed89 100644
--- a/svx/inc/sdr/properties/textproperties.hxx
+++ b/svx/inc/sdr/properties/textproperties.hxx
@@ -41,7 +41,7 @@ namespace sdr::properties
 
 // react on ItemSet changes
 virtual void ItemSetChanged(const SfxItemSet*) override;
-virtual bool WantItemSetInItemSetChanged() const override final { 
return true; }
+virtual bool WantItemSetInItemSetChanged() const override final;
 
 /// Get the TextProvider related to our SdrObject
 virtual const svx::ITextProvider& getTextProvider() const;
diff --git a/svx/source/sdr/properties/textproperties.cxx 
b/svx/source/sdr/properties/textproperties.cxx
index d361080e2062..c2892923 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -81,6 +81,14 @@ namespace sdr::properties
 return std::unique_ptr(new TextProperties(*this, 
rObj));
 }
 
+bool TextProperties::WantItemSetInItemSetChanged() const
+{
+// The itemset construction is fairly expensive, and we only need 
it
+// if this text (or sub-type of text, eg. rectangle) actually has 
text.
+const svx::ITextProvider& rTextProvider(getTextProvider());
+return rTextProvider.getTextCount() != 0;
+}
+
 void TextProperties::ItemSetChanged(const SfxItemSet* pSet)
 {
 SdrTextObj& rObj = static_cast(GetSdrObject());
@@ -145,7 +153,7 @@ namespace sdr::properties
 }
 
 // Extra-Repaint for radical layout changes (#43139#)
-if(SfxItemState::SET == 
pSet->GetItemState(SDRATTR_TEXT_CONTOURFRAME))
+if(pSet && SfxItemState::SET == 
pSet->GetItemState(SDRATTR_TEXT_CONTOURFRAME))
 {
 // Here only repaint wanted
 rObj.ActionChanged();


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

2021-12-06 Thread Noel Grandin (via logerrit)
 svx/inc/sdr/primitive2d/primitivefactory2d.hxx|   76 ++
 svx/source/sdr/primitive2d/primitivefactory2d.cxx |   60 +
 svx/source/svdraw/charthelper.cxx |   16 +---
 3 files changed, 100 insertions(+), 52 deletions(-)

New commits:
commit 8fe1a3c479d4aeaeb3a378aaceb77f72edcfb7c8
Author: Noel Grandin 
AuthorDate: Mon Dec 6 10:05:27 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 6 13:19:33 2021 +0100

skip some intermediate results in tryToGetChartContentAsPrimitive2DSequence

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

diff --git a/svx/inc/sdr/primitive2d/primitivefactory2d.hxx 
b/svx/inc/sdr/primitive2d/primitivefactory2d.hxx
new file mode 100644
index ..fd6ded05ab18
--- /dev/null
+++ b/svx/inc/sdr/primitive2d/primitivefactory2d.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#pragma once
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+typedef cppu::WeakComponentImplHelper
+PrimitiveFactory2DImplBase;
+
+// base class for C++ implementation of css::graphic::XPrimitiveFactory2D
+class PrimitiveFactory2D : protected cppu::BaseMutex, public 
PrimitiveFactory2DImplBase
+{
+public:
+PrimitiveFactory2D()
+: PrimitiveFactory2DImplBase(m_aMutex)
+{
+}
+
+// Methods from XPrimitiveFactory2D
+virtual css::uno::Sequence>
+SAL_CALL createPrimitivesFromXShape(
+const css::uno::Reference& xShape,
+const css::uno::Sequence& aParms) 
override;
+virtual css::uno::Sequence>
+SAL_CALL createPrimitivesFromXDrawPage(
+const css::uno::Reference& xDrawPage,
+const css::uno::Sequence& aParms) 
override;
+
+static void createPrimitivesFromXShape(
+const css::uno::Reference& xShape,
+const css::uno::Sequence& /*aParms*/,
+drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor);
+
+OUString SAL_CALL getImplementationName() override
+{
+return "com.sun.star.comp.graphic.PrimitiveFactory2D";
+}
+
+sal_Bool SAL_CALL supportsService(OUString const& ServiceName) override
+{
+return cppu::supportsService(this, ServiceName);
+}
+
+css::uno::Sequence SAL_CALL getSupportedServiceNames() override
+{
+return css::uno::Sequence{ 
"com.sun.star.graphic.PrimitiveFactory2D" };
+}
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sdr/primitive2d/primitivefactory2d.cxx 
b/svx/source/sdr/primitive2d/primitivefactory2d.cxx
index a03a7c0a7dde..9625c8bcd41e 100644
--- a/svx/source/sdr/primitive2d/primitivefactory2d.cxx
+++ b/svx/source/sdr/primitive2d/primitivefactory2d.cxx
@@ -17,49 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
+#include 
 
 using namespace com::sun::star;
 
-namespace {
-
-typedef cppu::WeakComponentImplHelper< css::graphic::XPrimitiveFactory2D, 
css::lang::XServiceInfo > PrimitiveFactory2DImplBase;
-
-// base class for C++ implementation of css::graphic::XPrimitiveFactory2D
-class PrimitiveFactory2D
-:   protected cppu::BaseMutex,
-public PrimitiveFactory2DImplBase
-{
-public:
-PrimitiveFactory2D(): PrimitiveFactory2DImplBase(m_aMutex) {}
-
-// Methods from XPrimitiveFactory2D
-virtual css::uno::Sequence< css::uno::Reference< 
css::graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXShape( const 
css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Sequence< 
css::beans::PropertyValue >& aParms ) override;
-virtual css::uno::Sequence< css::uno::Reference< 
css::graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXDrawPage( const 
css::uno::Reference< css::drawing::XDrawPage >& xDrawPage, const 
css::uno::Sequence< 

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

2021-11-26 Thread Noel Grandin (via logerrit)
 svx/inc/bitmaps.hlst   |2 
 svx/inc/strings.hxx|  718 -
 svx/source/unodraw/unoprov.cxx |   42 +-
 3 files changed, 380 insertions(+), 382 deletions(-)

New commits:
commit 26643b50a29cb25f4827aebbccc72beddeac7a69
Author: Noel Grandin 
AuthorDate: Fri Nov 26 15:57:12 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Nov 26 17:29:46 2021 +0100

use more OUStringLiteral in svx

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

diff --git a/svx/inc/bitmaps.hlst b/svx/inc/bitmaps.hlst
index 979bcb1891fe..4b2fcf0ce345 100644
--- a/svx/inc/bitmaps.hlst
+++ b/svx/inc/bitmaps.hlst
@@ -85,8 +85,6 @@ inline constexpr OUStringLiteral RID_SVXBMP_OTHER = 
u"res/da06.png";
 
 inline constexpr OUStringLiteral RID_SVXBMP_FORM = u"res/sx10593.png";
 inline constexpr OUStringLiteral RID_SVXBMP_CONTROL = u"res/sx10144.png";
-#define RID_SVXBMP_COLLAPSEDNODE"res/sx18002.png"
-#define RID_SVXBMP_EXPANDEDNODE "res/sx18003.png"
 inline constexpr OUStringLiteral RID_SVXBMP_BUTTON = u"res/sx10594.png";
 inline constexpr OUStringLiteral RID_SVXBMP_RADIOBUTTON = u"res/sx10595.png";
 inline constexpr OUStringLiteral RID_SVXBMP_CHECKBOX = u"res/sx10596.png";
diff --git a/svx/inc/strings.hxx b/svx/inc/strings.hxx
index 3d489a1a93d9..1c917bee9318 100644
--- a/svx/inc/strings.hxx
+++ b/svx/inc/strings.hxx
@@ -19,376 +19,376 @@ inline constexpr OUStringLiteral 
RID_GALLERYSTR_THEME_FONTWORK = u"private://gal
 inline constexpr OUStringLiteral RID_GALLERYSTR_THEME_FONTWORK_VERTICAL = 
u"private://gallery/hidden/fontworkvertical";
 
 // Reference-strings for standardcolor-table
-#define RID_SVXSTR_COLOR_BLACK_DEF  "Black"
-#define RID_SVXSTR_COLOR_BLUE_DEF   "Blue"
-#define RID_SVXSTR_COLOR_GREEN_DEF  "Green"
-#define RID_SVXSTR_COLOR_RED_DEF"Red"
-#define RID_SVXSTR_COLOR_GREY_DEF   "Gray"
-#define RID_SVXSTR_COLOR_YELLOW_DEF "Yellow"
-#define RID_SVXSTR_COLOR_WHITE_DEF  "White"
-#define RID_SVXSTR_COLOR_BLUEGREY_DEF   "Blue gray"
-#define RID_SVXSTR_COLOR_ORANGE_DEF "Orange"
-#define RID_SVXSTR_COLOR_MAGENTA_DEF"Magenta"
-#define RID_SVXSTR_COLOR_BORDEAUX_DEF   "Bordeaux"
-#define RID_SVXSTR_COLOR_PALE_YELLOW_DEF"Pale yellow"
-#define RID_SVXSTR_COLOR_PALE_GREEN_DEF "Pale green"
-#define RID_SVXSTR_COLOR_DARKVIOLET_DEF "Dark violet"
-#define RID_SVXSTR_COLOR_SALMON_DEF "Salmon"
-#define RID_SVXSTR_COLOR_SEABLUE_DEF"Sea blue"
-#define RID_SVXSTR_COLOR_CHART_DEF  "Chart"
-#define RID_SVXSTR_COLOR_PURPLE_DEF "Purple"
-#define RID_SVXSTR_COLOR_SKYBLUE_DEF"Sky blue"
-#define RID_SVXSTR_COLOR_YELLOWGREEN_DEF"Yellow green"
-#define RID_SVXSTR_COLOR_PINK_DEF   "Pink"
-#define RID_SVXSTR_COLOR_TURQUOISE_DEF  "Turquoise"
-#define RID_SVXSTR_COLOR_BLUE_CLASSIC_DEF   "Blue classic"
-#define RID_SVXSTR_COLOR_GOLD_DEF   "Gold"
-#define RID_SVXSTR_COLOR_BRICK_DEF  "Brick"
-#define RID_SVXSTR_COLOR_INDIGO_DEF "Indigo"
-#define RID_SVXSTR_COLOR_TEAL_DEF   "Teal"
-#define RID_SVXSTR_COLOR_LIME_DEF   "Lime"
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_BLACK_DEF  = 
u"Black";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_BLUE_DEF   = 
u"Blue";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_GREEN_DEF  = 
u"Green";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_RED_DEF= 
u"Red";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_GREY_DEF   = 
u"Gray";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_YELLOW_DEF = 
u"Yellow";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_WHITE_DEF  = 
u"White";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_BLUEGREY_DEF   = 
u"Blue gray";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_ORANGE_DEF = 
u"Orange";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_MAGENTA_DEF= 
u"Magenta";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_BORDEAUX_DEF   = 
u"Bordeaux";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_PALE_YELLOW_DEF= 
u"Pale yellow";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_PALE_GREEN_DEF = 
u"Pale green";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_DARKVIOLET_DEF = 
u"Dark violet";
+inline constexpr OUStringLiteral RID_SVXSTR_COLOR_SALMON_DEF = 
u"Salmon";
+inline constexpr OUStringLiteral 

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

2021-11-26 Thread Caolán McNamara (via logerrit)
 svx/inc/galbrws2.hxx |1 -
 svx/source/gallery2/galbrws2.cxx |   14 ++
 2 files changed, 6 insertions(+), 9 deletions(-)

New commits:
commit 23662e4ca69386c14425798f1e9d80ff803fb7cc
Author: Caolán McNamara 
AuthorDate: Thu Nov 25 17:12:26 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Nov 26 09:49:52 2021 +0100

tdf#139102 Erase with COL_TRANSPARENT doesn't do what it should

lets not fight that here, just provide a simple backportable fix to 7-2
for now.

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

diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index fc97d9bccdb5..2cf8609ed32b 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -85,7 +85,6 @@ private:
 std::unique_ptr mxIconButton;
 std::unique_ptr mxListButton;
 std::unique_ptr mxInfoBar;
-ScopedVclPtr mxDev;
 Size maPreviewSize;
 rtl::Reference m_xHelper;
 sal_uInt32 mnCurActionPos;
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index ffd38f8f45a5..2e715fa95071 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -340,14 +340,11 @@ GalleryBrowser2::GalleryBrowser2(weld::Builder& rBuilder, 
Gallery* pGallery)
 , mxIconButton(rBuilder.weld_toggle_button("icon"))
 , mxListButton(rBuilder.weld_toggle_button("list"))
 , mxInfoBar(rBuilder.weld_label("label"))
-, mxDev(mxListView->create_virtual_device())
 , maPreviewSize(28, 28)
 , mnCurActionPos  ( 0x )
 , meMode  ( GALLERYBROWSERMODE_NONE )
 , meLastMode  ( GALLERYBROWSERMODE_NONE )
 {
-mxDev->SetOutputSizePixel(maPreviewSize);
-
 m_xContext.set( ::comphelper::getProcessComponentContext() );
 
 int nHeight = mxListView->get_height_rows(10);
@@ -858,6 +855,9 @@ void GalleryBrowser2::UpdateRows(bool bVisibleOnly)
 }
 }
 
+ScopedVclPtr xDev(mxListView->create_virtual_device());
+xDev->SetOutputSizePixel(maPreviewSize);
+
 if (!aBitmapEx.IsEmpty())
 {
 const Size aBitmapExSizePixel(aBitmapEx.GetSizePixel());
@@ -865,19 +865,17 @@ void GalleryBrowser2::UpdateRows(bool bVisibleOnly)
 ((maPreviewSize.Width() - aBitmapExSizePixel.Width()) >> 1),
 ((maPreviewSize.Height() - aBitmapExSizePixel.Height()) >> 1));
 
-mxDev->Erase();
-
 if (aBitmapEx.IsAlpha())
 {
 // draw checkered background
-GalleryIconView::drawTransparenceBackground(*mxDev, aPos, 
aBitmapExSizePixel);
+GalleryIconView::drawTransparenceBackground(*xDev, aPos, 
aBitmapExSizePixel);
 }
 
-mxDev->DrawBitmapEx(aPos, aBitmapEx);
+xDev->DrawBitmapEx(aPos, aBitmapEx);
 }
 
 mxListView->set_text(rEntry, sItemTextTitle);
-mxListView->set_image(rEntry, *mxDev);
+mxListView->set_image(rEntry, *xDev);
 mxListView->set_id(rEntry, OUString());
 
 return false;


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

2021-08-22 Thread Noel Grandin (via logerrit)
 svx/inc/sdr/primitive3d/sdrattributecreator3d.hxx|   10 +++---
 svx/source/sdr/contact/viewcontactofe3dcube.cxx  |4 ++--
 svx/source/sdr/contact/viewcontactofe3dextrude.cxx   |4 ++--
 svx/source/sdr/contact/viewcontactofe3dlathe.cxx |4 ++--
 svx/source/sdr/contact/viewcontactofe3dpolygon.cxx   |4 ++--
 svx/source/sdr/contact/viewcontactofe3dsphere.cxx|4 ++--
 svx/source/sdr/primitive3d/sdrattributecreator3d.cxx |4 ++--
 7 files changed, 15 insertions(+), 19 deletions(-)

New commits:
commit 054166821842de6f25c3123fcc1976b3c9d1d69b
Author: Noel Grandin 
AuthorDate: Sun Aug 22 16:44:21 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Aug 22 18:54:48 2021 +0200

no need to use unique_ptr for Sdr3DObjectAttribute

it is already a COW type

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

diff --git a/svx/inc/sdr/primitive3d/sdrattributecreator3d.hxx 
b/svx/inc/sdr/primitive3d/sdrattributecreator3d.hxx
index 327f7da1cbcb..3f517842741e 100644
--- a/svx/inc/sdr/primitive3d/sdrattributecreator3d.hxx
+++ b/svx/inc/sdr/primitive3d/sdrattributecreator3d.hxx
@@ -20,23 +20,19 @@
 #ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE3D_SDRATTRIBUTECREATOR3D_HXX
 #define INCLUDED_SVX_INC_SDR_PRIMITIVE3D_SDRATTRIBUTECREATOR3D_HXX
 
+#include 
 
 // predefines
 class SfxItemSet;
-
-namespace drawinglayer::attribute {
-class Sdr3DObjectAttribute;
-}
-
 namespace basegfx {
 class B2DRange;
 }
 
 
 namespace drawinglayer::primitive2d
-{
+{
 // SdrAttribute creators
-attribute::Sdr3DObjectAttribute* createNewSdr3DObjectAttribute(const 
SfxItemSet& rSet);
+attribute::Sdr3DObjectAttribute createNewSdr3DObjectAttribute(const 
SfxItemSet& rSet);
 
 // helpers
 
diff --git a/svx/source/sdr/contact/viewcontactofe3dcube.cxx 
b/svx/source/sdr/contact/viewcontactofe3dcube.cxx
index 00e990f576cf..ee79ef9339ca 100644
--- a/svx/source/sdr/contact/viewcontactofe3dcube.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3dcube.cxx
@@ -69,7 +69,7 @@ namespace sdr::contact
 aWorldTransform.translate(aCubeRange.getMinX(), 
aCubeRange.getMinY(), aCubeRange.getMinZ());
 
 // get 3D Object Attributes
-std::unique_ptr 
pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet));
+drawinglayer::attribute::Sdr3DObjectAttribute 
aSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet));
 
 // calculate texture size to get a perfect mapping for
 // the front/back sides
@@ -78,7 +78,7 @@ namespace sdr::contact
 // create primitive and add
 const drawinglayer::primitive3d::Primitive3DReference xReference(
 new drawinglayer::primitive3d::SdrCubePrimitive3D(
-aWorldTransform, aTextureSize, aAttribute, 
*pSdr3DObjectAttribute));
+aWorldTransform, aTextureSize, aAttribute, 
aSdr3DObjectAttribute));
 xRetval = { xReference };
 
 return xRetval;
diff --git a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx 
b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx
index d510f9803d5d..3f1a72ab4388 100644
--- a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx
@@ -49,7 +49,7 @@ namespace sdr::contact
 const basegfx::B2DPolyPolygon 
aPolyPolygon(GetE3dExtrudeObj().GetExtrudePolygon());
 
 // get 3D Object Attributes
-std::unique_ptr 
pSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet));
+drawinglayer::attribute::Sdr3DObjectAttribute 
aSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet));
 
 // calculate texture size; use size of top/bottom cap to get a 
perfect mapping
 // for the caps. The in-between geometry will get a stretched size 
with a
@@ -71,7 +71,7 @@ namespace sdr::contact
 const basegfx::B3DHomMatrix aWorldTransform;
 const drawinglayer::primitive3d::Primitive3DReference xReference(
 new drawinglayer::primitive3d::SdrExtrudePrimitive3D(
-aWorldTransform, aTextureSize, aAttribute, 
*pSdr3DObjectAttribute,
+aWorldTransform, aTextureSize, aAttribute, 
aSdr3DObjectAttribute,
 aPolyPolygon, fDepth, fDiagonal, fBackScale, 
bSmoothNormals, bSmoothLids,
 bCharacterMode, bCloseFront, bCloseBack));
 xRetval = { xReference };
diff --git a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx 
b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx
index c76cae4df81c..4cf299259c4f 100644
--- a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx

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

2021-06-25 Thread Noel Grandin (via logerrit)
 svx/inc/AccessibleTableShape.hxx  |2 
 svx/inc/galbrws2.hxx  |4 -
 svx/inc/galleryobjectbinarystorage.hxx|2 
 svx/inc/galleryobjectxmlstorage.hxx   |2 
 svx/inc/sdgcoitm.hxx  |6 +-
 svx/inc/sdginitm.hxx  |2 
 svx/inc/sdgtritm.hxx  |2 
 svx/inc/sdr/contact/viewcontactofsdrpage.hxx  |5 --
 svx/inc/sdr/contact/viewcontactofunocontrol.hxx   |6 --
 svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx |3 -
 svx/inc/sxallitm.hxx  |8 +--
 svx/inc/sxcikitm.hxx  |2 
 svx/inc/sxlayitm.hxx  |4 -
 svx/inc/sxlogitm.hxx  |4 -
 svx/inc/sxmfsitm.hxx  |2 
 svx/inc/sxmkitm.hxx   |2 
 svx/inc/sxmoitm.hxx   |2 
 svx/inc/sxmovitm.hxx  |4 -
 svx/inc/sxmtaitm.hxx  |2 
 svx/inc/sxoneitm.hxx  |8 +--
 svx/inc/sxopitm.hxx   |4 -
 svx/inc/sxreaitm.hxx  |4 -
 svx/inc/sxreoitm.hxx  |4 -
 svx/inc/sxrooitm.hxx  |2 
 svx/inc/sxsaitm.hxx   |2 
 svx/inc/sxsalitm.hxx  |4 -
 svx/inc/sxsoitm.hxx   |4 -
 svx/inc/sxtraitm.hxx  |8 +--
 svx/inc/tbxcolorupdate.hxx|4 -
 svx/inc/textchainflow.hxx |5 --
 svx/source/inc/DefaultShapesPanel.hxx |2 
 svx/source/inc/StylesPreviewWindow.hxx|6 +-
 svx/source/inc/cell.hxx   |   11 ++--
 svx/source/inc/charmapacc.hxx |9 +--
 svx/source/inc/datalistener.hxx   |4 -
 svx/source/inc/datanavi.hxx   |   25 +-
 svx/source/inc/docrecovery.hxx|   12 ++---
 svx/source/inc/filtnav.hxx|   21 -
 svx/source/inc/fmPropBrw.hxx  |2 
 svx/source/inc/fmexch.hxx |8 +--
 svx/source/inc/fmexpl.hxx |   27 +--
 svx/source/inc/fmobj.hxx  |6 --
 svx/source/inc/fmscriptingenv.hxx |2 
 svx/source/inc/fmshimp.hxx|7 +--
 svx/source/inc/fmtextcontroldialogs.hxx   |6 +-
 svx/source/inc/fmtextcontrolfeature.hxx   |5 --
 svx/source/inc/fmtextcontrolshell.hxx |5 --
 svx/source/inc/fmundo.hxx |4 -
 svx/source/inc/fmvwimp.hxx|3 -
 svx/source/inc/formcontrolling.hxx|6 --
 svx/source/inc/gridcell.hxx   |   42 --
 svx/source/inc/tablemodel.hxx |4 -
 svx/source/inc/tabwin.hxx |7 +--
 svx/source/inc/tbxform.hxx|   12 ++---
 svx/source/inc/xmlxtexp.hxx   |2 
 svx/source/inc/xmlxtimp.hxx   |5 --
 56 files changed, 166 insertions(+), 190 deletions(-)

New commits:
commit 060bab5d3c87468d769fc0de8b2d96411414816a
Author: Noel Grandin 
AuthorDate: Thu Jun 24 15:43:40 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Jun 25 14:09:39 2021 +0200

loplugin:finalclasses in svx

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

diff --git a/svx/inc/AccessibleTableShape.hxx b/svx/inc/AccessibleTableShape.hxx
index 979fa64d3451..6fe03c15363b 100644
--- a/svx/inc/AccessibleTableShape.hxx
+++ b/svx/inc/AccessibleTableShape.hxx
@@ -142,7 +142,7 @@ typedef ::cppu::WeakImplHelper<
 css::accessibility::XAccessibleTableSelection >
 AccessibleTableHeaderShape_BASE;
 
-class AccessibleTableHeaderShape : public MutexOwner,
+class AccessibleTableHeaderShape final : public MutexOwner,
 public AccessibleTableHeaderShape_BASE
 {
 public:
diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index 2640184846e3..fc97d9bccdb5 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -67,7 +67,7 @@ struct DispatchInfo;
 
 namespace svx::sidebar { class GalleryControl; }
 
-class GalleryBrowser2 : public SfxListener
+class GalleryBrowser2 final : public SfxListener
 {
 

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

2021-04-22 Thread Noel Grandin (via logerrit)
 svx/inc/sdr/contact/viewobjectcontactofe3d.hxx|   14 +-
 svx/source/sdr/contact/viewobjectcontactofe3d.cxx |   16 +---
 2 files changed, 2 insertions(+), 28 deletions(-)

New commits:
commit b546af03ab9e371c70ce72562bc0a492972a8585
Author: Noel Grandin 
AuthorDate: Thu Apr 22 19:26:38 2021 +0200
Commit: Noel Grandin 
CommitDate: Thu Apr 22 21:29:50 2021 +0200

remove caching in ViewObjectContactOfE3d

we are re-creating it every time, so caching makes no sense

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

diff --git a/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx 
b/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx
index ca081d4c11d4..9c0e09e4c036 100644
--- a/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx
+++ b/svx/inc/sdr/contact/viewobjectcontactofe3d.hxx
@@ -31,18 +31,6 @@ namespace sdr::contact
 {
 class ViewObjectContactOfE3d final : public ViewObjectContactOfSdrObj
 {
-// Primitive3D sequence of the ViewContact. This contains all 
necessary information
-// for the graphical visualisation and needs to be supported by 
all VCs which
-// can be visualized.
-drawinglayer::primitive3d::Primitive3DContainer  
mxPrimitive3DContainer;
-
-// This method is responsible for creating the graphical 
visualisation data which is
-// stored/cached in the local primitive. Default gets 
view-independent Primitive3D
-// from the ViewContact using 
ViewContact::getViewIndependentPrimitive3DContainer(), takes care of
-// visibility and ghosted.
-// This method will not handle included hierarchies and not check 
geometric visibility.
-drawinglayer::primitive3d::Primitive3DContainer 
createPrimitive3DContainer(const DisplayInfo& rDisplayInfo) const;
-
 // also override the 2d method to deliver a 2d object with 
embedded 3d and the 3d transformation which is able to
 // answer the get2DRange question accordingly
 virtual drawinglayer::primitive2d::Primitive2DContainer 
createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const override;
@@ -54,7 +42,7 @@ namespace sdr::contact
 // access to the local primitive sequence. This will ensure that 
the list is
 // current in comparing the local list content with a fresh 
created incarnation
 // This method will not handle included hierarchies or visibility.
-drawinglayer::primitive3d::Primitive3DContainer const & 
getPrimitive3DContainer(const DisplayInfo& rDisplayInfo) const;
+drawinglayer::primitive3d::Primitive3DContainer 
getPrimitive3DContainer(const DisplayInfo& rDisplayInfo) const;
 };
 
 } // end of namespace sdr::contact
diff --git a/svx/source/sdr/contact/viewobjectcontactofe3d.cxx 
b/svx/source/sdr/contact/viewobjectcontactofe3d.cxx
index f12290634383..1d6bbe061614 100644
--- a/svx/source/sdr/contact/viewobjectcontactofe3d.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofe3d.cxx
@@ -33,7 +33,7 @@ namespace sdr::contact
 {
 }
 
-drawinglayer::primitive3d::Primitive3DContainer 
ViewObjectContactOfE3d::createPrimitive3DContainer(const DisplayInfo& 
rDisplayInfo) const
+drawinglayer::primitive3d::Primitive3DContainer 
ViewObjectContactOfE3d::getPrimitive3DContainer(const DisplayInfo& 
rDisplayInfo) const
 {
 // get the view-independent Primitive from the viewContact
 const ViewContactOfE3d& rViewContactOfE3d(dynamic_cast< const 
ViewContactOfE3d& >(GetViewContact()));
@@ -66,20 +66,6 @@ namespace sdr::contact
 return 
rViewContact.impCreateWithGivenPrimitive3DContainer(getPrimitive3DContainer(rDisplayInfo));
 }
 
-drawinglayer::primitive3d::Primitive3DContainer const & 
ViewObjectContactOfE3d::getPrimitive3DContainer(const DisplayInfo& 
rDisplayInfo) const
-{
-drawinglayer::primitive3d::Primitive3DContainer 
xNewPrimitive3DSeq(createPrimitive3DContainer(rDisplayInfo));
-
-// local up-to-date checks. New list different from local one?
-if(mxPrimitive3DContainer != xNewPrimitive3DSeq)
-{
-// has changed, copy content
-const_cast< ViewObjectContactOfE3d* 
>(this)->mxPrimitive3DContainer = xNewPrimitive3DSeq;
-}
-
-// return current Primitive2DContainer
-return mxPrimitive3DContainer;
-}
 
 } // end of namespace
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-04-20 Thread Xisco Fauli (via logerrit)
 svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx|6 -
 svx/source/sdr/contact/viewcontactofsdrole2obj.cxx |   76 ++---
 svx/source/unodraw/unoshape.cxx|   10 --
 3 files changed, 25 insertions(+), 67 deletions(-)

New commits:
commit eec03e848cb6874ce6d64dc0b8f45dbaf52e6c2b
Author: Xisco Fauli 
AuthorDate: Mon Apr 19 21:37:53 2021 +0200
Commit: Xisco Fauli 
CommitDate: Tue Apr 20 09:31:38 2021 +0200

tdf#86321: Revert "Resolves: #i123539# some optimizations for 3D chart..."

This reverts commit db1d2af02861b49e4f53d726d59cd71c20cee9b1

The commit was already partically reverted in
bca8d8985666d3fd22b91eb280f9baaeb933c2d0 < Resolves: tdf#90583
3D pie-chart missing guide handles >.
This partial revert broke the optimization introduced in
db1d2af02861b49e4f53d726d59cd71c20cee9b1  for 3D charts like
https://bz.apache.org/ooo/attachment.cgi?id=81810

Later, 3D charts were optimized again in
55a7e836a2db662a53adc4f8b98d08b06790c758 < chart2: When
creating objects prevent setting object rects dirty > so
the remaining code originally introduced can go.

Import time of https://bz.apache.org/ooo/attachment.cgi?id=81810
is the same with and without this patch

Change-Id: I25338d0dfb4b41651dfe05e7bfbd74c86091dacb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114313
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx 
b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
index ac7a861e924f..f034f02a6da5 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
@@ -31,9 +31,6 @@ namespace sdr::contact
 class ViewContactOfSdrOle2Obj final : public ViewContactOfSdrRectObj
 {
 private:
-// #i123539# allow local buffering of chart data (if chart)
-drawinglayer::primitive2d::Primitive2DReference mxChartContent;
-
 // Create an Object-Specific ViewObjectContact, set ViewContact and
 // ObjectContact. Always needs to return something.
 virtual ViewObjectContact&
@@ -56,9 +53,6 @@ public:
 // from the VOC which knows that
 drawinglayer::primitive2d::Primitive2DContainer 
createPrimitive2DSequenceWithParameters() const;
 
-// #i123539# get rid of buffered chart content (if there) on change
-virtual void ActionChanged() override;
-
 virtual basegfx::B2DRange
 getRange(const drawinglayer::geometry::ViewInformation2D& rViewInfo2D) 
const override;
 
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx 
b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
index db65802718c3..0c53ef5a4499 100644
--- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
@@ -45,8 +45,7 @@ ViewObjectContact& 
ViewContactOfSdrOle2Obj::CreateObjectSpecificViewObjectContac
 }
 
 ViewContactOfSdrOle2Obj::ViewContactOfSdrOle2Obj(SdrOle2Obj& rOle2Obj)
-:   ViewContactOfSdrRectObj(rOle2Obj),
-mxChartContent()
+:   ViewContactOfSdrRectObj(rOle2Obj)
 {
 }
 
@@ -90,45 +89,30 @@ drawinglayer::primitive2d::Primitive2DContainer 
ViewContactOfSdrOle2Obj::createP
 
 if(GetOle2Obj().IsChart())
 {
-// #i123539# allow buffering and reuse of local chart data to not need 
to rebuild it
-// on every ViewObjectContact::getPrimitive2DSequence call. : Not 
needed for
-// aw080, there this mechanism already works differently
-if(mxChartContent.is())
+// try to get chart primitives and chart range directly from 
xChartModel
+basegfx::B2DRange aChartContentRange;
+const drawinglayer::primitive2d::Primitive2DContainer aChartSequence(
+ChartHelper::tryToGetChartContentAsPrimitive2DSequence(
+GetOle2Obj().getXModel(),
+aChartContentRange));
+const double fWidth(aChartContentRange.getWidth());
+const double fHeight(aChartContentRange.getHeight());
+
+if(!aChartSequence.empty()
+&& basegfx::fTools::more(fWidth, 0.0)
+&& basegfx::fTools::more(fHeight, 0.0))
 {
-xContent = mxChartContent;
-}
-else
-{
-// try to get chart primitives and chart range directly from 
xChartModel
-basegfx::B2DRange aChartContentRange;
-const drawinglayer::primitive2d::Primitive2DContainer 
aChartSequence(
-ChartHelper::tryToGetChartContentAsPrimitive2DSequence(
-GetOle2Obj().getXModel(),
-aChartContentRange));
-const double fWidth(aChartContentRange.getWidth());
-const double fHeight(aChartContentRange.getHeight());
-
-if(!aChartSequence.empty()
-&& basegfx::fTools::more(fWidth, 0.0)
-&& basegfx::fTools::more(fHeight, 0.0))
-{
-// create embedding 

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

2021-03-07 Thread shivam-51 (via logerrit)
 svx/inc/inspectorvalues.hrc |4 
 svx/source/sidebar/inspector/InspectorTextPanel.cxx |6 ++
 sw/qa/uitest/styleInspector/styleInspector.py   |8 
 sw/qa/uitest/styleInspector/tdf137513.py|6 +++---
 4 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 8dfad592b4ab0497c140a921b8f56977a383f1d1
Author: shivam-51 
AuthorDate: Fri Feb 5 18:21:50 2021 +0530
Commit: Mike Kaganski 
CommitDate: Sun Mar 7 09:33:49 2021 +0100

tdf#140051 SI property values like "Bold" are now localisable

This patch now allows "Bold", "Italic" and "Normal" to
be localisable.

Change-Id: Icd8102ce84db9a3c68ab69f5f9eadf0cf04755b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110475
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/svx/inc/inspectorvalues.hrc b/svx/inc/inspectorvalues.hrc
index 2a6c0d8cb03c..863b13b899e8 100644
--- a/svx/inc/inspectorvalues.hrc
+++ b/svx/inc/inspectorvalues.hrc
@@ -18,6 +18,10 @@
  */
 
 // Node names
+#define RID_NORMAL  
NC_("RID_ATTRIBUTE_NAMES_MAP", "Normal")
+#define RID_BOLD
NC_("RID_ATTRIBUTE_NAMES_MAP", "Bold")
+#define RID_ITALIC  
NC_("RID_ATTRIBUTE_NAMES_MAP", "Italic")
+
 #define RID_FALSE   
NC_("RID_ATTRIBUTE_NAMES_MAP", "False")
 #define RID_TRUE
NC_("RID_ATTRIBUTE_NAMES_MAP", "True")
 
diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx 
b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
index 7b07be9997c4..493c4e37451f 100644
--- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx
+++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
@@ -79,8 +79,7 @@ static bool GetPropertyValues(const OUString& rPropName, 
const uno::Any& rAny, O
 }
 else if (awt::FontSlant eValue; rAny >>= eValue)
 {
-rString = (eValue == awt::FontSlant_ITALIC) ? 
OUStringLiteral(u"italic")
-: 
OUStringLiteral(u"normal");
+rString = SvxResId(eValue == awt::FontSlant_ITALIC ? RID_ITALIC : 
RID_NORMAL);
 }
 else if (tools::Long nValueLong; rAny >>= nValueLong)
 {
@@ -92,8 +91,7 @@ static bool GetPropertyValues(const OUString& rPropName, 
const uno::Any& rAny, O
 else if (double fValue; rAny >>= fValue)
 {
 if (rPropName.indexOf("Weight") != -1)
-rString
-= (fValue > 100) ? std::u16string_view(u"bold") : 
std::u16string_view(u"normal");
+rString = SvxResId(fValue > 100 ? RID_BOLD : RID_NORMAL);
 else
 rString = OUString::number((round(fValue * 100)) / 100.00);
 }
diff --git a/sw/qa/uitest/styleInspector/styleInspector.py 
b/sw/qa/uitest/styleInspector/styleInspector.py
index 0ab0c0a22719..1b8cc0c68d90 100644
--- a/sw/qa/uitest/styleInspector/styleInspector.py
+++ b/sw/qa/uitest/styleInspector/styleInspector.py
@@ -88,9 +88,9 @@ class styleNavigator(UITestCase):
 self.assertEqual("Char Property Height\t100", 
get_state_as_dict(xTitleStyle.getChild('6'))['Text'])
 self.assertEqual("Char Property Height Asian\t100", 
get_state_as_dict(xTitleStyle.getChild('7'))['Text'])
 self.assertEqual("Char Property Height Complex\t100", 
get_state_as_dict(xTitleStyle.getChild('8'))['Text'])
-self.assertEqual("Char Weight\tbold", 
get_state_as_dict(xTitleStyle.getChild('9'))['Text'])
-self.assertEqual("Char Weight Asian\tbold", 
get_state_as_dict(xTitleStyle.getChild('10'))['Text'])
-self.assertEqual("Char Weight Complex\tbold", 
get_state_as_dict(xTitleStyle.getChild('11'))['Text'])
+self.assertEqual("Char Weight\tBold", 
get_state_as_dict(xTitleStyle.getChild('9'))['Text'])
+self.assertEqual("Char Weight Asian\tBold", 
get_state_as_dict(xTitleStyle.getChild('10'))['Text'])
+self.assertEqual("Char Weight Complex\tBold", 
get_state_as_dict(xTitleStyle.getChild('11'))['Text'])
 self.assertEqual("Follow Style\tText body", 
get_state_as_dict(xTitleStyle.getChild('12'))['Text'])
 self.assertEqual("Para Adjust\t3", 
get_state_as_dict(xTitleStyle.getChild('13'))['Text'])
 self.assertEqual("Para Expand Single Word\tFalse", 
get_state_as_dict(xTitleStyle.getChild('14'))['Text'])
@@ -118,7 +118,7 @@ class styleNavigator(UITestCase):
 self.assertEqual("Char Height\t20", 
get_state_as_dict(xCustomStyle.getChild('2'))['Text'])
 self.assertEqual("Char Property Height\t100", 
get_state_as_dict(xCustomStyle.getChild('3'))['Text'])
 self.assertEqual("Char Transparence\t0", 
get_state_as_dict(xCustomStyle.getChild('4'))['Text'])
-self.assertEqual("Char Weight\tbold", 

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

2021-02-19 Thread Caolán McNamara (via logerrit)
 svx/inc/pch/precompiled_svxcore.hxx |3 +
 svx/source/stbctrls/pszctrl.cxx |   55 
 2 files changed, 33 insertions(+), 25 deletions(-)

New commits:
commit a6f364433b0bd5e1d51c775ad10099004a20140b
Author: Caolán McNamara 
AuthorDate: Fri Feb 19 12:22:33 2021 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 19 15:56:09 2021 +0100

weld FunctionPopup_Impl

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

diff --git a/svx/inc/pch/precompiled_svxcore.hxx 
b/svx/inc/pch/precompiled_svxcore.hxx
index 3af3a93cd751..de853a2a8359 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2021-02-05 16:11:24 using:
+ Generated on 2021-02-19 12:23:00 using:
  ./bin/update_pch svx svxcore --cutoff=7 --exclude:system --include:module 
--exclude:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -377,6 +377,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 4dee38e06930..2c2ef29b1574 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
 #include 
 #include 
 #include 
@@ -26,6 +25,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -92,15 +93,18 @@ namespace {
 
 class FunctionPopup_Impl
 {
-VclBuilderm_aBuilder;
-VclPtr m_xMenu;
+std::unique_ptr m_xBuilder;
+std::unique_ptr m_xMenu;
 sal_uInt32m_nSelected;
 static sal_uInt16 id_to_function(std::string_view rIdent);
-sal_uInt16 function_to_id(sal_uInt16 nFunc) const;
+static OString function_to_id(sal_uInt16 nFunc);
 public:
-explicit FunctionPopup_Impl( sal_uInt32 nCheckEncoded );
-sal_uInt16 Execute(vcl::Window* pWindow, const Point& rPopupPos) { return 
m_xMenu->Execute(pWindow, rPopupPos); }
-sal_uInt32 GetSelected() const;
+explicit FunctionPopup_Impl(sal_uInt32 nCheckEncoded);
+OString Execute(weld::Window* pParent, const tools::Rectangle& rRect)
+{
+return m_xMenu->popup_at_rect(pParent, rRect);
+}
+sal_uInt32 GetSelected(std::string_view curident) const;
 };
 
 }
@@ -126,44 +130,44 @@ sal_uInt16 
FunctionPopup_Impl::id_to_function(std::string_view rIdent)
 return 0;
 }
 
-sal_uInt16 FunctionPopup_Impl::function_to_id(sal_uInt16 nFunc) const
+OString FunctionPopup_Impl::function_to_id(sal_uInt16 nFunc)
 {
 switch (nFunc)
 {
 case PSZ_FUNC_AVG:
-return m_xMenu->GetItemId("avg");
+return "avg";
 case PSZ_FUNC_COUNT2:
-return m_xMenu->GetItemId("counta");
+return "counta";
 case PSZ_FUNC_COUNT:
-return m_xMenu->GetItemId("count");
+return "count";
 case PSZ_FUNC_MAX:
-return m_xMenu->GetItemId("max");
+return "max";
 case PSZ_FUNC_MIN:
-return m_xMenu->GetItemId("min");
+return "min";
 case PSZ_FUNC_SUM:
-return m_xMenu->GetItemId("sum");
+return "sum";
 case PSZ_FUNC_SELECTION_COUNT:
-return m_xMenu->GetItemId("selection");
+return "selection";
 case PSZ_FUNC_NONE:
-return m_xMenu->GetItemId("none");
+return "none";
 }
-return 0;
+return OString();
 }
 
 FunctionPopup_Impl::FunctionPopup_Impl(sal_uInt32 nCheckEncoded)
-: m_aBuilder(nullptr, AllSettings::GetUIRootDir(), 
"svx/ui/functionmenu.ui", "")
-, m_xMenu(m_aBuilder.get_menu("menu"))
+: m_xBuilder(Application::CreateBuilder(nullptr, "svx/ui/functionmenu.ui"))
+, m_xMenu(m_xBuilder->weld_menu("menu"))
 , m_nSelected(nCheckEncoded)
 {
 for ( sal_uInt16 nCheck = 1; nCheck < 32; ++nCheck )
 if ( nCheckEncoded & (1 << nCheck) )
-m_xMenu->CheckItem(function_to_id(nCheck));
+m_xMenu->set_active(function_to_id(nCheck), true);
 }
 
-sal_uInt32 FunctionPopup_Impl::GetSelected() const
+sal_uInt32 FunctionPopup_Impl::GetSelected(std::string_view curident) const
 {
 sal_uInt32 nSelected = m_nSelected;
-sal_uInt16 nCurItemId = id_to_function(m_xMenu->GetCurItemIdent());
+sal_uInt16 nCurItemId = id_to_function(curident);
 if ( nCurItemId == PSZ_FUNC_NONE )
 nSelected = ( 1 << PSZ_FUNC_NONE );
 else
@@ -349,10 +353,13 @@ void SvxPosSizeStatusBarControl::Command( const 
CommandEvent& rCEvt )
 sal_uInt32 nSelect = 

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

2021-01-24 Thread shivam-51 (via logerrit)
 svx/inc/inspectorvalues.hrc |   25 
 svx/source/sidebar/inspector/InspectorTextPanel.cxx |4 ++-
 sw/qa/uitest/styleInspector/styleInspector.py   |8 +++---
 3 files changed, 32 insertions(+), 5 deletions(-)

New commits:
commit 6b6b6f011c313e1a3419bdbe3e50ce09a0fb7d9a
Author: shivam-51 
AuthorDate: Wed Jan 20 17:45:41 2021 +0530
Commit: Mike Kaganski 
CommitDate: Sun Jan 24 20:36:59 2021 +0100

tdf#139136 Style Inspector: "true" and "false" now localizable

Change-Id: Ib223e941ca4285a0eeae9127edc161311f56aa36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109709
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/svx/inc/inspectorvalues.hrc b/svx/inc/inspectorvalues.hrc
new file mode 100644
index ..2a6c0d8cb03c
--- /dev/null
+++ b/svx/inc/inspectorvalues.hrc
@@ -0,0 +1,25 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#define NC_(Context, String) reinterpret_cast(Context "\004" 
u8##String)
+#define NNC_(Context, StringSingular, StringPlural) reinterpret_cast(Context "\004" u8##StringSingular "\004" u8##StringPlural)
+
+/*
+Description: API names for Paragraph, Character
+and Text cursor values
+ */
+
+// Node names
+#define RID_FALSE   
NC_("RID_ATTRIBUTE_NAMES_MAP", "False")
+#define RID_TRUE
NC_("RID_ATTRIBUTE_NAMES_MAP", "True")
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/inspector/InspectorTextPanel.cxx 
b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
index 4eb4a4889f8c..7c713696320a 100644
--- a/svx/source/sidebar/inspector/InspectorTextPanel.cxx
+++ b/svx/source/sidebar/inspector/InspectorTextPanel.cxx
@@ -20,12 +20,14 @@
 #include 
 
 #include 
+#include 
 
 #include 
 
 #include 
 #include 
 #include 
+#include 
 
 using namespace css;
 
@@ -68,7 +70,7 @@ static bool GetPropertyValues(const OUString& rPropName, 
const uno::Any& rAny, O
 
 if (bool bValue; rAny >>= bValue)
 {
-rString = OUString::boolean(bValue);
+rString = SvxResId(bValue ? RID_TRUE : RID_FALSE); // tdf#139136
 }
 else if (OUString aValue; (rAny >>= aValue) && !(aValue.isEmpty()))
 {
diff --git a/sw/qa/uitest/styleInspector/styleInspector.py 
b/sw/qa/uitest/styleInspector/styleInspector.py
index 49337ee61761..0ab0c0a22719 100644
--- a/sw/qa/uitest/styleInspector/styleInspector.py
+++ b/sw/qa/uitest/styleInspector/styleInspector.py
@@ -40,7 +40,7 @@ class styleNavigator(UITestCase):
 xDirFormatting = xListBox.getChild('3')
 self.assertEqual(5, len(xDirFormatting.getChildren()))
 self.assertEqual("Char Back Color\t0x00", 
get_state_as_dict(xDirFormatting.getChild('0'))['Text'])
-self.assertEqual("Char Back Transparent\tfalse", 
get_state_as_dict(xDirFormatting.getChild('1'))['Text'])
+self.assertEqual("Char Back Transparent\tFalse", 
get_state_as_dict(xDirFormatting.getChild('1'))['Text'])
 self.assertEqual("Char Color\t0xc9211e", 
get_state_as_dict(xDirFormatting.getChild('2'))['Text'])
 self.assertEqual("Char Shading Value\t0", 
get_state_as_dict(xDirFormatting.getChild('3'))['Text'])
 self.assertEqual("Char Transparence\t0", 
get_state_as_dict(xDirFormatting.getChild('4'))['Text'])
@@ -57,9 +57,9 @@ class styleNavigator(UITestCase):
 self.assertEqual(7, len(xParDirFormatting.getChildren()))
 self.assertEqual("Fill Color\t0xff", 
get_state_as_dict(xParDirFormatting.getChild('0'))['Text'])
 self.assertEqual("Para Back Color\t0xff", 
get_state_as_dict(xParDirFormatting.getChild('1'))['Text'])
-self.assertEqual("Para Back Transparent\tfalse", 
get_state_as_dict(xParDirFormatting.getChild('2'))['Text'])
+self.assertEqual("Para Back Transparent\tFalse", 
get_state_as_dict(xParDirFormatting.getChild('2'))['Text'])
 self.assertEqual("Para First Line Indent\t0", 
get_state_as_dict(xParDirFormatting.getChild('3'))['Text'])
-self.assertEqual("Para is Auto First Line Indent\tfalse", 
get_state_as_dict(xParDirFormatting.getChild('4'))['Text'])
+self.assertEqual("Para is Auto First Line Indent\tFalse", 
get_state_as_dict(xParDirFormatting.getChild('4'))['Text'])
 self.assertEqual("Para Left Margin\t1482", 
get_state_as_dict(xParDirFormatting.getChild('5'))['Text'])
 self.assertEqual("Para Right Margin\t0", 

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

2020-09-22 Thread Caolán McNamara (via logerrit)
 svx/inc/CommonStylePreviewRenderer.hxx   |1 +
 svx/source/styles/CommonStylePreviewRenderer.cxx |   20 
 2 files changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 804dac9222fdf6e423993ac348a43e52a8f74ba3
Author: Caolán McNamara 
AuthorDate: Tue Sep 22 12:24:15 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Sep 22 15:20:00 2020 +0200

tdf#93756 show highlight color in style preview

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

diff --git a/svx/inc/CommonStylePreviewRenderer.hxx 
b/svx/inc/CommonStylePreviewRenderer.hxx
index 5dfd41faa39a..6d4466b31bf3 100644
--- a/svx/inc/CommonStylePreviewRenderer.hxx
+++ b/svx/inc/CommonStylePreviewRenderer.hxx
@@ -27,6 +27,7 @@ class CommonStylePreviewRenderer final : public 
sfx2::StylePreviewRenderer
 {
 std::unique_ptr m_pFont;
 Color maFontColor;
+Color maHighlightColor;
 Color maBackgroundColor;
 Size maPixelSize;
 OUString maStyleName;
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx 
b/svx/source/styles/CommonStylePreviewRenderer.cxx
index 9920903df469..cd3a311dfcb0 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -47,6 +48,7 @@ CommonStylePreviewRenderer::CommonStylePreviewRenderer(
 : StylePreviewRenderer(rShell, rOutputDev, pStyle, nMaxHeight)
 , m_pFont()
 , maFontColor(COL_AUTO)
+, maHighlightColor(COL_AUTO)
 , maBackgroundColor(COL_AUTO)
 , maPixelSize()
 , maStyleName(mpStyle->GetName())
@@ -112,6 +114,10 @@ bool CommonStylePreviewRenderer::recalculate()
 {
 maFontColor = static_cast(pItem)->GetValue();
 }
+if ((pItem = pItemSet->GetItem(SID_ATTR_BRUSH_CHAR)) != nullptr)
+{
+maHighlightColor = static_cast(pItem)->GetColor();
+}
 
 if (mpStyle->GetFamily() == SfxStyleFamily::Para)
 {
@@ -188,9 +194,7 @@ bool CommonStylePreviewRenderer::render(const 
tools::Rectangle& aRectangle, Rend
 const OUString& rText = maStyleName;
 
 // setup the device & draw
-vcl::Font aOldFont(mrOutputDev.GetFont());
-Color aOldColor(mrOutputDev.GetTextColor());
-Color aOldFillColor(mrOutputDev.GetFillColor());
+mrOutputDev.Push(PushFlags::FONT | PushFlags::TEXTCOLOR | 
PushFlags::FILLCOLOR | PushFlags::TEXTFILLCOLOR);
 
 if (maBackgroundColor != COL_AUTO)
 {
@@ -199,12 +203,14 @@ bool CommonStylePreviewRenderer::render(const 
tools::Rectangle& aRectangle, Rend
 }
 
 if (m_pFont)
-{
 mrOutputDev.SetFont(*m_pFont);
-}
+
 if (maFontColor != COL_AUTO)
 mrOutputDev.SetTextColor(maFontColor);
 
+if (maHighlightColor != COL_AUTO)
+mrOutputDev.SetTextFillColor(maHighlightColor);
+
 Size aPixelSize(m_pFont ? maPixelSize : 
mrOutputDev.GetFont().GetFontSize());
 
 Point aFontDrawPosition = aRectangle.TopLeft();
@@ -216,9 +222,7 @@ bool CommonStylePreviewRenderer::render(const 
tools::Rectangle& aRectangle, Rend
 
 mrOutputDev.DrawText(aFontDrawPosition, rText);
 
-mrOutputDev.SetFillColor(aOldFillColor);
-mrOutputDev.SetTextColor(aOldColor);
-mrOutputDev.SetFont(aOldFont);
+mrOutputDev.Pop();
 
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-05 Thread Caolán McNamara (via logerrit)
 svx/inc/CommonStylePreviewRenderer.hxx   |2 ++
 svx/source/styles/CommonStylePreviewRenderer.cxx |   12 
 2 files changed, 14 insertions(+)

New commits:
commit 2f6728f88cb895d7bfe185185ace30327b23e8ed
Author: Caolán McNamara 
AuthorDate: Wed Aug 5 15:50:31 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 5 17:58:10 2020 +0200

tdf#135438 Paragraph styles preview in sidebar are clipped

since...

commit fe9a13dc0e6d1384416c2a2343223b33925fc925
Author: Caolán McNamara 
Date:   Sun Apr 26 15:43:25 2020 +0100

weld SfxTemplatePanelControl

getRenderSize used to be called after recalculate and before
render to change maSizePixel

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

diff --git a/svx/inc/CommonStylePreviewRenderer.hxx 
b/svx/inc/CommonStylePreviewRenderer.hxx
index 55391327533e..5dfd41faa39a 100644
--- a/svx/inc/CommonStylePreviewRenderer.hxx
+++ b/svx/inc/CommonStylePreviewRenderer.hxx
@@ -31,6 +31,8 @@ class CommonStylePreviewRenderer final : public 
sfx2::StylePreviewRenderer
 Size maPixelSize;
 OUString maStyleName;
 
+Size getRenderSize() const;
+
 public:
 CommonStylePreviewRenderer(const SfxObjectShell& rShell, OutputDevice& 
rOutputDev,
SfxStyleSheetBase* pStyle, long nMaxHeight);
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx 
b/svx/source/styles/CommonStylePreviewRenderer.cxx
index d677a135461e..9920903df469 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -168,9 +168,21 @@ bool CommonStylePreviewRenderer::recalculate()
 }
 
 m_pFont = std::move(pFont);
+maPixelSize = getRenderSize();
 return true;
 }
 
+Size CommonStylePreviewRenderer::getRenderSize() const
+{
+assert(m_pFont);
+Size aPixelSize = m_pFont->GetTextSize(, maStyleName);
+
+if (aPixelSize.Height() > mnMaxHeight)
+aPixelSize.setHeight( mnMaxHeight );
+
+return aPixelSize;
+}
+
 bool CommonStylePreviewRenderer::render(const tools::Rectangle& aRectangle, 
RenderAlign eRenderAlign)
 {
 const OUString& rText = maStyleName;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svx/inc svx/source svx/uiconfig svx/UIConfig_svx.mk

2020-07-31 Thread Caolán McNamara (via logerrit)
 svx/UIConfig_svx.mk |1 
 svx/inc/pch/precompiled_svxcore.hxx |4 
 svx/source/form/filtnav.cxx |  964 
 svx/source/inc/filtnav.hxx  |  106 ++-
 svx/source/inc/fmexpl.hxx   |3 
 svx/uiconfig/ui/filternavigator.ui  |   74 ++
 6 files changed, 576 insertions(+), 576 deletions(-)

New commits:
commit 7533a62f3989f76f3f5d2d461e7f8118ebcd51f9
Author: Caolán McNamara 
AuthorDate: Wed Jul 29 17:17:16 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 31 21:19:18 2020 +0200

weld FilterNavigator

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

diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 098a7d3dd577..b04db125cb0e 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -52,6 +52,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/extrustiondepthdialog \
svx/uiconfig/ui/fillctrlbox \
svx/uiconfig/ui/filtermenu \
+   svx/uiconfig/ui/filternavigator \
svx/uiconfig/ui/findbox \
svx/uiconfig/ui/findreplacedialog \
svx/uiconfig/ui/findreplacedialog-mobile \
diff --git a/svx/inc/pch/precompiled_svxcore.hxx 
b/svx/inc/pch/precompiled_svxcore.hxx
index 0f5d6f8f4137..2684415e5cd1 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-07-25 14:55:53 using:
+ Generated on 2020-07-31 16:53:36 using:
  ./bin/update_pch svx svxcore --cutoff=7 --exclude:system --include:module 
--exclude:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -65,7 +65,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -191,6 +190,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 272bfa3a29da..ac588c2b76f3 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -47,31 +47,18 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 
 #include 
 
 #include 
 
-#define DROP_ACTION_TIMER_INITIAL_TICKS 10
-// it takes this long for the scrolling to begin
-#define DROP_ACTION_TIMER_SCROLL_TICKS  3
-// a line is scrolled in these intervals
-#define DROP_ACTION_TIMER_TICK_BASE 10
-// this is the basis for multiplying both figures (in ms)
-
 using namespace ::svxform;
 using namespace ::connectivity;
 using namespace ::dbtools;
 
-
 namespace svxform
 {
-
-
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::container::XIndexAccess;
 using ::com::sun::star::uno::UNO_QUERY;
@@ -108,7 +95,6 @@ void OFilterItemExchange::AddSupportedFormats()
 AddFormat(getFormatId());
 }
 
-
 SotClipboardFormatId OFilterItemExchange::getFormatId()
 {
 static SotClipboardFormatId s_nFormat =
@@ -117,25 +103,23 @@ SotClipboardFormatId OFilterItemExchange::getFormatId()
 return s_nFormat;
 }
 
-
 OLocalExchange* OFilterExchangeHelper::createExchange() const
 {
 return new OFilterItemExchange;
 }
 
-
-Image FmFilterData::GetImage() const
+OUString FmFilterData::GetImage() const
 {
-return Image();
+return OUString();
 }
 
 FmParentData::~FmParentData()
 {
 }
 
-Image FmFormItem::GetImage() const
+OUString FmFormItem::GetImage() const
 {
-return Image(StockImage::Yes, RID_SVXBMP_FORM);
+return RID_SVXBMP_FORM;
 }
 
 FmFilterItem* FmFilterItems::Find( const ::sal_Int32 _nFilterComponentIndex ) 
const
@@ -149,9 +133,9 @@ FmFilterItem* FmFilterItems::Find( const ::sal_Int32 
_nFilterComponentIndex ) co
 return nullptr;
 }
 
-Image FmFilterItems::GetImage() const
+OUString FmFilterItems::GetImage() const
 {
-return Image(StockImage::Yes, RID_SVXBMP_FILTER);
+return RID_SVXBMP_FILTER;
 }
 
 FmFilterItem::FmFilterItem( FmFilterItems* pParent,
@@ -164,9 +148,9 @@ FmFilterItem::FmFilterItem( FmFilterItems* pParent,
 {
 }
 
-Image FmFilterItem::GetImage() const
+OUString FmFilterItem::GetImage() const
 {
-return Image(StockImage::Yes, RID_SVXBMP_FIELD);
+return RID_SVXBMP_FIELD;
 }
 
 // Hints for communication between model and view
@@ -930,165 +914,171 @@ void FmFilterModel::EnsureEmptyFilterRows( 
FmParentData& _rItem )
 }
 }
 
-namespace {
+const int nxD = 4;
+const int nxDBmp = 12;
 
-class FmFilterItemsString : public SvLBoxString
+IMPL_STATIC_LINK(FmFilterNavigator, CustomGetSizeHdl, 
weld::TreeView::get_size_args, aPayload, Size)
 {
-public:
-explicit FmFilterItemsString(const OUString& rStr)
-: SvLBoxString(rStr)
+vcl::RenderContext& rRenderContext = aPayload.first;
+const 

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

2020-07-28 Thread Caolán McNamara (via logerrit)
 svx/inc/tbxcolorupdate.hxx |7 +--
 svx/source/tbxctrls/tbxcolorupdate.cxx |   67 -
 2 files changed, 22 insertions(+), 52 deletions(-)

New commits:
commit f67554d23c2efbdd0e70a8a35a694661ea4e054a
Author: Caolán McNamara 
AuthorDate: Mon Jul 27 20:27:23 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 28 12:11:36 2020 +0200

tdf#135121 ImageType::Size26 isn't always 26x26px

so use ImageType just to detect the user has selected a new size,
and use the size of the returned image for the icon pixel size

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

diff --git a/svx/inc/tbxcolorupdate.hxx b/svx/inc/tbxcolorupdate.hxx
index d413b31d9c44..9912ea2db53e 100644
--- a/svx/inc/tbxcolorupdate.hxx
+++ b/svx/inc/tbxcolorupdate.hxx
@@ -70,6 +70,7 @@ namespace svx
 Color   maCurColor;
 tools::Rectangle   maUpdRect;
 SizemaBmpSize;
+vcl::ImageType meImageType;
 OUStringmaCommandLabel;
 OUStringmaCommandURL;
 css::uno::Reference mxFrame;
@@ -81,7 +82,7 @@ namespace svx
 virtual void SetImage(VirtualDevice* pVirDev) = 0;
 virtual VclPtr CreateVirtualDevice() const = 0;
 virtual vcl::ImageType GetImageSize() const = 0;
-virtual Size GetItemSize() const = 0;
+virtual Size GetItemSize(const Size& rImageSize) const = 0;
 };
 
 class VclToolboxButtonColorUpdater : public ToolboxButtonColorUpdaterBase
@@ -101,7 +102,7 @@ namespace svx
 virtual void SetImage(VirtualDevice* pVirDev) override;
 virtual VclPtr CreateVirtualDevice() const override;
 virtual vcl::ImageType GetImageSize() const override;
-virtual Size GetItemSize() const override;
+virtual Size GetItemSize(const Size& rImageSize) const override;
 };
 
 class ToolboxButtonColorUpdater : public ToolboxButtonColorUpdaterBase
@@ -119,7 +120,7 @@ namespace svx
 virtual void SetImage(VirtualDevice* pVirDev) override;
 virtual VclPtr CreateVirtualDevice() const override;
 virtual vcl::ImageType GetImageSize() const override;
-virtual Size GetItemSize() const override;
+virtual Size GetItemSize(const Size& rImageSize) const override;
 };
 
 class ToolboxButtonLineStyleUpdater
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx 
b/svx/source/tbxctrls/tbxcolorupdate.cxx
index 12c25038602f..f716a4e1f7c9 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -43,6 +43,7 @@ namespace svx
 : mbWideButton(bWideButton)
 , 
mbWasHiContrastMode(Application::GetSettings().GetStyleSettings().GetHighContrastMode())
 , maCurColor(COL_TRANSPARENT)
+, meImageType(vcl::ImageType::Size16)
 , maCommandLabel(rCommandLabel)
 , maCommandURL(rCommandURL)
 , mxFrame(rFrame)
@@ -116,26 +117,11 @@ namespace svx
 return mpTbx->GetImageSize();
 }
 
-Size VclToolboxButtonColorUpdater::GetItemSize() const
+Size VclToolboxButtonColorUpdater::GetItemSize(const Size& rImageSize) 
const
 {
 if (mbWideButton)
 return mpTbx->GetItemContentSize(mnBtnId);
-vcl::ImageType eImageType = GetImageSize();
-int nHeight(16);
-switch (eImageType)
-{
-case vcl::ImageType::Size16:
-nHeight = 16;
-break;
-case vcl::ImageType::Size26:
-nHeight = 26;
-break;
-case vcl::ImageType::Size32:
-nHeight = 32;
-break;
-}
-int nWidth = nHeight;
-return Size(nWidth, nHeight);
+return rImageSize;
 }
 
 ToolboxButtonColorUpdaterBase::~ToolboxButtonColorUpdaterBase()
@@ -156,22 +142,14 @@ namespace svx
 
 void ToolboxButtonColorUpdaterBase::Update(const Color& rColor, bool 
bForceUpdate)
 {
-Size aItemSize(GetItemSize());
+vcl::ImageType eImageType = GetImageSize();
 
 #ifdef IOS // tdf#126966
-// Oddly enough, it is in the "not wide button" case that we want the 
larger ones, hmm.
-if (!mbWideButton)
-{
-// usually the normal size is 16
-const long nIOSSize = 32;
-if (aItemSize.getWidth() < nIOSSize)
-{
-aItemSize.setWidth(nIOSSize);
-aItemSize.setHeight(nIOSSize);
-}
-}
+eImageType = vcl::ImageType::Size32;
 #endif
-const bool bSizeChanged = (maBmpSize != aItemSize);
+
+const bool bSizeChanged = (meImageType != eImageType);
+meImageType = eImageType;
 const bool bDisplayModeChanged = (mbWasHiContrastMode != 
Application::GetSettings().GetStyleSettings().GetHighContrastMode());
   

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

2020-07-17 Thread Tomaž Vajngerl (via logerrit)
 svx/inc/galobj.hxx |2 ++
 svx/source/gallery2/galobj.cxx |   10 ++
 2 files changed, 12 insertions(+)

New commits:
commit e12be466706d8984c0d1adcd2538fa9a950273f7
Author: Tomaž Vajngerl 
AuthorDate: Fri Jul 17 15:27:42 2020 +0200
Commit: Michael Stahl 
CommitDate: Fri Jul 17 15:44:14 2020 +0200

add explicit copy-constructor for SgaObject

Change-Id: If833cbd28af2043f71bc1ada4ea7b0f80bebf682
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98974
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/svx/inc/galobj.hxx b/svx/inc/galobj.hxx
index 6501b49ff1c7..1c2b013bf6f9 100644
--- a/svx/inc/galobj.hxx
+++ b/svx/inc/galobj.hxx
@@ -67,6 +67,8 @@ protected:
 
 public:
 SgaObject();
+SgaObject(const SgaObject& aObject);
+
 virtual ~SgaObject() {};
 
 virtual SgaObjKind  GetObjKind() const = 0;
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index ef5972181105..e2922419f1e4 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -43,6 +43,16 @@ SgaObject::SgaObject()
 {
 }
 
+SgaObject::SgaObject(const SgaObject& aObject)
+: aThumbBmp(aObject.aThumbBmp)
+, aThumbMtf(aObject.aThumbMtf)
+, aURL(aObject.aURL)
+, aTitle(aObject.aTitle)
+, bIsValid(aObject.bIsValid)
+, bIsThumbBmp(aObject.bIsThumbBmp)
+{
+}
+
 BitmapEx SgaObject::createPreviewBitmapEx(const Size& rSizePixel) const
 {
 BitmapEx aRetval;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-11 Thread Mike Kaganski (via logerrit)
 svx/inc/sdr/primitive2d/sdrattributecreator.hxx|3 --
 svx/source/sdr/primitive2d/sdrattributecreator.cxx |   30 ++---
 2 files changed, 15 insertions(+), 18 deletions(-)

New commits:
commit 14514042f7c908d08c3284135cc6de8da387c118
Author: Mike Kaganski 
AuthorDate: Mon May 11 17:35:52 2020 +0300
Commit: Mike Kaganski 
CommitDate: Mon May 11 18:23:14 2020 +0200

Limit utility function's visibility

Change-Id: I1d1a89a197d90dcb1e7de9b4090e1fe6baf53e1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93972
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/svx/inc/sdr/primitive2d/sdrattributecreator.hxx 
b/svx/inc/sdr/primitive2d/sdrattributecreator.hxx
index 10d105fd1c45..9cff4afd6770 100644
--- a/svx/inc/sdr/primitive2d/sdrattributecreator.hxx
+++ b/svx/inc/sdr/primitive2d/sdrattributecreator.hxx
@@ -68,9 +68,6 @@ namespace drawinglayer
 attribute::SdrFillAttribute SVXCORE_DLLPUBLIC 
createNewSdrFillAttribute(
 const SfxItemSet& rSet);
 
-attribute::SdrGlowAttribute createNewSdrGlowAttribute(
-const SfxItemSet& rSet);
-
 // #i101508# Support handing over given text-to-border distances
 attribute::SdrTextAttribute createNewSdrTextAttribute(
 const SfxItemSet& rSet,
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx 
b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index bb43198bf4f6..0e8dec828bf6 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -212,6 +212,21 @@ namespace drawinglayer
 
 return aRetval;
 }
+
+attribute::SdrGlowAttribute createNewSdrGlowAttribute(const 
SfxItemSet& rSet)
+{
+const bool bGlow(rSet.Get(SDRATTR_GLOW).GetValue());
+if (!bGlow)
+return attribute::SdrGlowAttribute();
+sal_Int32 nRadius = rSet.Get(SDRATTR_GLOW_RAD).GetValue();
+Color aColor(rSet.Get(SDRATTR_GLOW_COLOR).GetColorValue());
+sal_uInt16 
nTransparency(rSet.Get(SDRATTR_GLOW_TRANSPARENCY).GetValue());
+if (nTransparency)
+aColor.SetTransparency(std::round(nTransparency / 100.0 * 
255.0));
+
+attribute::SdrGlowAttribute glowAttr{ nRadius, aColor };
+return glowAttr;
+}
 } // end of anonymous namespace
 } // end of namespace drawinglayer
 
@@ -335,21 +350,6 @@ namespace drawinglayer::primitive2d
 return attribute::SdrLineStartEndAttribute();
 }
 
-attribute::SdrGlowAttribute createNewSdrGlowAttribute( const 
SfxItemSet& rSet)
-{
-const bool bGlow(rSet.Get(SDRATTR_GLOW).GetValue());
-if(!bGlow)
-return attribute::SdrGlowAttribute();
-sal_Int32 nRadius = rSet.Get(SDRATTR_GLOW_RAD).GetValue();
-Color aColor(rSet.Get(SDRATTR_GLOW_COLOR).GetColorValue());
-sal_uInt16 
nTransparency(rSet.Get(SDRATTR_GLOW_TRANSPARENCY).GetValue());
-if (nTransparency)
-aColor.SetTransparency(std::round(nTransparency / 100.0 * 
255.0));
-
-attribute::SdrGlowAttribute glowAttr{ nRadius, aColor };
-return glowAttr;
-}
-
 attribute::SdrShadowAttribute createNewSdrShadowAttribute(const 
SfxItemSet& rSet)
 {
 const bool bShadow(rSet.Get(SDRATTR_SHADOW).GetValue());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-11 Thread Miklos Vajna (via logerrit)
 svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx|3 +--
 svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx |7 +--
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |   13 +
 svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx|8 +---
 4 files changed, 12 insertions(+), 19 deletions(-)

New commits:
commit 4ba368a3dd793bdc703858f358e1af7112decadd
Author: Miklos Vajna 
AuthorDate: Mon May 11 10:10:34 2020 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 11 10:54:46 2020 +0200

Related: tdf#129916 svx: clean up duplicated matrix decompose for shadow 
size

Pass the object's transform matrix to createEmbeddedShadowPrimitive(),
this allows decomposing it only at a single place. Also, this will allow
creating the shadow based on the object size.

Change-Id: I8d8bf59934b00e13cda1da0398910aa9f1ce3c59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93950
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx 
b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
index 63af09222a6d..d991eb4ed2f3 100644
--- a/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
+++ b/svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
@@ -72,8 +72,7 @@ namespace drawinglayer
 Primitive2DContainer SVXCORE_DLLPUBLIC createEmbeddedShadowPrimitive(
 const Primitive2DContainer& rContent,
 const attribute::SdrShadowAttribute& rShadow,
-sal_Int32 nGraphicTranslateX = 0,
-sal_Int32 nGraphicTranslateY = 0);
+const basegfx::B2DHomMatrix& rObjectMatrix = 
basegfx::B2DHomMatrix());
 
 Primitive2DContainer SVXCORE_DLLPUBLIC createEmbeddedGlowPrimitive(
 const Primitive2DContainer& rContent,
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx 
b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
index eac5278ada2d..87f564e8dd6f 100644
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
@@ -74,13 +74,8 @@ namespace drawinglayer::primitive2d
 // shadow will be correct (using ColorModifierStack), but 
expensive.
 if(!get3DShape())
 {
-basegfx::B2DTuple aScale;
-basegfx::B2DTuple aTranslate;
-double fRotate = 0;
-double fShearX = 0;
-maTransform.decompose(aScale, aTranslate, fRotate, 
fShearX);
 aRetval = createEmbeddedShadowPrimitive(aRetval, 
getSdrSTAttribute().getShadow(),
-aTranslate.getX(), 
aTranslate.getY());
+maTransform);
 }
 }
 
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx 
b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index e4f67c0ed665..ca26a45f826b 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -48,6 +48,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 using namespace com::sun::star;
@@ -483,8 +484,7 @@ namespace drawinglayer::primitive2d
 Primitive2DContainer createEmbeddedShadowPrimitive(
 const Primitive2DContainer& rContent,
 const attribute::SdrShadowAttribute& rShadow,
-sal_Int32 nGraphicTranslateX,
-sal_Int32 nGraphicTranslateY)
+const basegfx::B2DHomMatrix& rObjectMatrix)
 {
 if(!rContent.empty())
 {
@@ -494,10 +494,15 @@ namespace drawinglayer::primitive2d
 {
 if(rShadow.getSize().getX() != 10)
 {
+basegfx::B2DTuple aScale;
+basegfx::B2DTuple aTranslate;
+double fRotate = 0;
+double fShearX = 0;
+rObjectMatrix.decompose(aScale, aTranslate, fRotate, 
fShearX);
 // Scale the shadow
-aShadowOffset.translate(-nGraphicTranslateX, 
-nGraphicTranslateY);
+aShadowOffset.translate(-aTranslate.getX(), 
-aTranslate.getY());
 aShadowOffset.scale(rShadow.getSize().getX() * 
0.1, rShadow.getSize().getY() * 0.1);
-aShadowOffset.translate(nGraphicTranslateX, 
nGraphicTranslateY);
+aShadowOffset.translate(aTranslate.getX(), 
aTranslate.getY());
 }
 
 aShadowOffset.translate(rShadow.getOffset().getX(), 
rShadow.getOffset().getY());
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx 
b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index 2a83e5b6aeed..a06d3967ae1a 100644
--- 

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

2020-05-08 Thread Miklos Vajna (via logerrit)
 svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx |5 ++-
 svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx |   19 +-
 svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx  |   14 --
 3 files changed, 28 insertions(+), 10 deletions(-)

New commits:
commit e2b0e614e1185c960b3015414919f69a1ed35aa0
Author: Miklos Vajna 
AuthorDate: Fri May 8 16:43:22 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri May 8 21:00:12 2020 +0200

Related: tdf#129916 svx: improve shadow size of custom shapes

There are multiple problems with this bug document, the first is that
the shadow primitive got the default position (0) of the owning shape.
Do it the same way as commit 6454b6336b8de9a4c5899adeab552af6f794cdc4
(tdf#130058 Import shadow size., 2020-04-14) did for graphic objects.

This requires constructing a transform matrix in
ViewContactOfSdrObjCustomShape::createViewIndependentPrimitive2DSequence(),
include position and size in that as a start.

Change-Id: Ia51df555c1984971afe7c52ba3f2658099a4e7b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93771
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx 
b/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
index 6ca417d340c5..aaa93af94595 100644
--- a/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
@@ -47,6 +47,8 @@ namespace drawinglayer
 // making exceptions with shadow generation
 boolmb3DShape : 1;
 
+basegfx::B2DHomMatrix maTransform;
+
 protected:
 // local decomposition.
 virtual void create2DDecomposition(Primitive2DContainer& 
rContainer, const geometry::ViewInformation2D& aViewInformation) const override;
@@ -57,7 +59,8 @@ namespace drawinglayer
 const Primitive2DContainer& rSubPrimitives,
 const basegfx::B2DHomMatrix& rTextBox,
 bool bWordWrap,
-bool b3DShape);
+bool b3DShape,
+const basegfx::B2DHomMatrix& rObjectMatrix);
 
 // data access
 const attribute::SdrShadowTextAttribute& getSdrSTAttribute() const 
{ return maSdrSTAttribute; }
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx 
b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index 61dd7d27e21b..bf1249be1c47 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -149,13 +149,13 @@ namespace sdr::contact
 basegfx::B2DHomMatrix aTextBoxMatrix;
 bool bWordWrap(false);
 
+// take unrotated snap rect as default, then get the
+// unrotated text box. Rotation needs to be done centered
+const tools::Rectangle 
aObjectBound(GetCustomShapeObj().GetGeoRect());
+const basegfx::B2DRange aObjectRange = 
vcl::unotools::b2DRectangleFromRectangle(aObjectBound);
+
 if(bHasText)
 {
-// take unrotated snap rect as default, then get the
-// unrotated text box. Rotation needs to be done centered
-const tools::Rectangle 
aObjectBound(GetCustomShapeObj().GetGeoRect());
-const basegfx::B2DRange aObjectRange = 
vcl::unotools::b2DRectangleFromRectangle(aObjectBound);
-
 // #i101684# get the text range unrotated and absolute to 
the object range
 const basegfx::B2DRange 
aTextRange(getCorrectedTextBoundRect());
 
@@ -230,6 +230,12 @@ namespace sdr::contact
 bWordWrap = 
GetCustomShapeObj().GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue();
 }
 
+// fill object matrix
+const basegfx::B2DHomMatrix 
aObjectMatrix(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix(
+aObjectRange.getWidth(), aObjectRange.getHeight(),
+/*fShearX=*/0, /*fRotate=*/0,
+aObjectRange.getMinX(), aObjectRange.getMinY()));
+
 // create primitive
 const drawinglayer::primitive2d::Primitive2DReference 
xReference(
 new drawinglayer::primitive2d::SdrCustomShapePrimitive2D(
@@ -237,7 +243,8 @@ namespace sdr::contact
 xGroup,
 aTextBoxMatrix,
 bWordWrap,
-b3DShape));
+b3DShape,
+aObjectMatrix));
 xRetval = drawinglayer::primitive2d::Primitive2DContainer { 
xReference };
 }
 
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx 

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

2020-01-21 Thread Caolán McNamara (via logerrit)
 svx/inc/galbrws2.hxx |4 +-
 svx/source/gallery2/galbrws2.cxx |   64 ++-
 2 files changed, 46 insertions(+), 22 deletions(-)

New commits:
commit b4b6daf8b70a5448d3e7aea440d56d95e19e7d2d
Author: Caolán McNamara 
AuthorDate: Mon Jan 20 20:10:23 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 21 13:55:26 2020 +0100

make gallery listview seem faster to populate

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

diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index 6b25012b6af4..a1e7732e1270 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -88,6 +88,8 @@ private:
 std::unique_ptr mxIconButton;
 std::unique_ptr mxListButton;
 std::unique_ptr mxInfoBar;
+VclPtr mxDev;
+Size maPreviewSize;
 rtl::Reference m_xHelper;
 sal_uInt32 mnCurActionPos;
 GalleryBrowserMode  meMode;
@@ -101,7 +103,7 @@ private:
 sal_uInt32  ImplGetSelectedItemId( const Point* pSelPosPixel, 
Point& rSelPos );
 voidImplSelectItemId(sal_uInt32 nItemId);
 voidImplUpdateSelection();
-voidUpdateVisibleRows();
+voidUpdateRows(bool bVisibleOnly);
 
 // SfxListener
 virtual voidNotify( SfxBroadcaster& rBC, const SfxHint& rHint ) 
override;
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index d973a43596a9..2c477e0b1c9b 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -351,10 +351,14 @@ GalleryBrowser2::GalleryBrowser2(weld::Builder& rBuilder, 
Gallery* pGallery)
 , mxIconButton(rBuilder.weld_toggle_button("icon"))
 , mxListButton(rBuilder.weld_toggle_button("list"))
 , mxInfoBar(rBuilder.weld_label("label"))
+, mxDev(mxListView->create_virtual_device())
+, maPreviewSize(28, 28)
 , mnCurActionPos  ( 0x )
 , meMode  ( GALLERYBROWSERMODE_NONE )
 , meLastMode  ( GALLERYBROWSERMODE_NONE )
 {
+mxDev->SetOutputSizePixel(maPreviewSize);
+
 m_xContext.set( ::comphelper::getProcessComponentContext() );
 
 int nHeight = mxListView->get_height_rows(10);
@@ -668,7 +672,7 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode )
 GalleryPreview::PreviewMedia( INetURLObject() );
 
 mxListView->show();
-UpdateVisibleRows();
+UpdateRows(true);
 
 mxIconButton->set_sensitive(true);
 mxListButton->set_sensitive(true);
@@ -791,13 +795,26 @@ void GalleryBrowser2::ImplUpdateViews( sal_uInt16 
nSelectionId )
 
 if( mpCurTheme )
 {
+const int nAlwaysUpToDate = 15;
+
+mxListView->freeze();
+
 OUString sCreateOnDemand;
-for (sal_uInt32 i = 0, nCount = mpCurTheme->GetObjectCount(); i < 
nCount; ++i)
+sal_uInt32 nCount = mpCurTheme->GetObjectCount();
+for (sal_uInt32 i = 0; i < nCount; ++i)
 {
 mxIconView->InsertItem(i + 1); // skip reserved id 0
 mxListView->append(OUString::number(i), sCreateOnDemand); // 
create on-demand in VisRowsScrolledHdl
+
+if (i == nAlwaysUpToDate) // fill in the first block
+UpdateRows(false);
 }
 
+if (nCount < nAlwaysUpToDate) // if less than block size, fill in all 
of them
+UpdateRows(false);
+
+mxListView->thaw();
+
 ImplSelectItemId( std::min( nSelectionId, 
mpCurTheme->GetObjectCount() ) );
 }
 
@@ -806,7 +823,7 @@ void GalleryBrowser2::ImplUpdateViews( sal_uInt16 
nSelectionId )
 case GALLERYBROWSERMODE_ICON: mxIconView->Show(); break;
 case GALLERYBROWSERMODE_LIST:
 mxListView->show();
-UpdateVisibleRows();
+UpdateRows(true);
 break;
 case GALLERYBROWSERMODE_PREVIEW: mxPreview->Show(); break;
 
@@ -817,7 +834,7 @@ void GalleryBrowser2::ImplUpdateViews( sal_uInt16 
nSelectionId )
 ImplUpdateInfoBar();
 }
 
-void GalleryBrowser2::UpdateVisibleRows()
+void GalleryBrowser2::UpdateRows(bool bVisibleOnly)
 {
 auto lambda = [this](weld::TreeIter& rEntry){
 // id is non-null if the preview is pending creation
@@ -826,9 +843,6 @@ void GalleryBrowser2::UpdateVisibleRows()
 return false;
 
 // get the icon for the listview
-VclPtr xDev = mxListView->create_virtual_device();
-const Size aSize(28, 28);
-xDev->SetOutputSizePixel(aSize);
 BitmapEx aBitmapEx;
 Size aPreparedSize;
 
@@ -839,7 +853,7 @@ void GalleryBrowser2::UpdateVisibleRows()
 mpCurTheme->GetPreviewBitmapExAndStrings(i, aBitmapEx, aPreparedSize, 
sItemTextTitle, sItemTextPath);
 
 bool bNeedToCreate(aBitmapEx.IsEmpty());
-if (!bNeedToCreate && 

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

2020-01-14 Thread Caolán McNamara (via logerrit)
 svx/inc/pch/precompiled_svx.hxx |   14 +++---
 svx/inc/pch/precompiled_svxcore.hxx |8 ++--
 svx/source/tbxctrls/layctrl.cxx |6 ++
 3 files changed, 19 insertions(+), 9 deletions(-)

New commits:
commit 5c093e7e1505e787a5781446aed8add83bf7f55d
Author: Caolán McNamara 
AuthorDate: Tue Jan 14 14:51:40 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 14 17:27:06 2020 +0100

remove unneeded includes and update pch

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

diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 55710e3fa399..fd54e6804165 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2019-12-04 09:33:31 using:
+ Generated on 2020-01-14 14:50:22 using:
  ./bin/update_pch svx svx --cutoff=3 --exclude:system --exclude:module 
--include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -78,6 +78,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -97,24 +98,25 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -213,6 +215,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -300,6 +303,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -314,6 +319,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -324,6 +330,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -351,6 +358,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/svx/inc/pch/precompiled_svxcore.hxx 
b/svx/inc/pch/precompiled_svxcore.hxx
index eeeb473d20ca..e1dc18dadb0b 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2019-12-04 09:34:08 using:
+ Generated on 2020-01-14 14:50:28 using:
  ./bin/update_pch svx svxcore --cutoff=7 --exclude:system --include:module 
--exclude:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -105,7 +105,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -138,6 +137,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -299,6 +299,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -332,6 +335,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index c20e12316306..b9640f16f6a6 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -18,13 +18,11 @@
  */
 
 #include 
-#include 
-#include 
-#include 
-#include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-12-10 Thread Caolán McNamara (via logerrit)
 svx/inc/spacing.hrc  |  101 ---
 svx/source/dialog/spacinglistbox.cxx |   21 -
 sw/inc/pageformatpanel.hrc   |   42 ++-
 sw/source/uibase/sidebar/PageFormatPanel.cxx |   17 
 4 files changed, 117 insertions(+), 64 deletions(-)

New commits:
commit 137c9e826cdce429a004f05bde40d274437d7554
Author: Caolán McNamara 
AuthorDate: Tue Dec 10 09:44:39 2019 +
Commit: Caolán McNamara 
CommitDate: Tue Dec 10 21:28:13 2019 +0100

Related: tdf#129267 format numbers with the UI locale

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

diff --git a/svx/inc/spacing.hrc b/svx/inc/spacing.hrc
index 82f107fc67db..b8ca2661c528 100644
--- a/svx/inc/spacing.hrc
+++ b/svx/inc/spacing.hrc
@@ -13,60 +13,81 @@
 
 #define NC_(Context, String) reinterpret_cast(Context "\004" 
u8##String)
 
+struct measurement
+{
+const char* key;
+int twips;
+int human;
+};
+
 // To translators: this is a listbox labelled by "Spacing:", inch units
-const std::pair RID_SVXSTRARY_SPACING_INCH[] =
+const measurement RID_SVXSTRARY_SPACING_INCH[] =
 {
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "None"),0 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Small (1/16″)"),   91 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Small (1/8″)"), 181 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Small Medium (1/4″)"),  363 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Medium (3/8″)"),539 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Medium Large (1/2″)"),  720 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Large (3/4″)"),1077 },
-{ NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Large (1″)"),1440 },
-{ nullptr, 0 }
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "None"),   0, 0 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Small (1/16″)"),   91, 0 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Small (1/8″)"), 181, 0 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Small Medium (1/4″)"),  363, 0 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Medium (3/8″)"),539, 0 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Medium Large (1/2″)"),  720, 0 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Large (3/4″)"),1077, 0 },
+{ NC_("RID_SVXSTRARY_SPACING_INCH", "Extra Large (1″)"),1440, 0 },
+{ nullptr, 0, 0 }
 };
 
 // To translators: this is a listbox labelled by "Spacing:", cm units
-const std::pair RID_SVXSTRARY_SPACING_CM[] =
+const measurement RID_SVXSTRARY_SPACING_CM[] =
 {
-{ NC_("RID_SVXSTRARY_SPACING_CM", "None"),0 },
-{ NC_("RID_SVXSTRARY_SPACING_CM", "Extra Small (0.16 cm)"),   91 },
-{ NC_("RID_SVXSTRARY_SPACING_CM", "Small (0.32 cm)"),181 },
-{ NC_("RID_SVXSTRARY_SPACING_CM", "Small Medium (0.64 cm)"), 363 },
-{ NC_("RID_SVXSTRARY_SPACING_CM", "Medium (0.95 cm)"),   539 },
-{ NC_("RID_SVXSTRARY_SPACING_CM", "Medium Large (1.27 cm)"), 720 },
-{ NC_("RID_SVXSTRARY_SPACING_CM", "Large (1.9 cm)"),1077 },
-{ NC_("RID_SVXSTRARY_SPACING_CM", "Extra Large (2.54 cm)"), 1440 },
-{ nullptr, 0 }
+{ NC_("RID_SVXSTRARY_SPACING_CM", "None"),0,   0 },
+// Extra Small (0.16 cm)
+{ NC_("RID_SVXSTRARY_SPACING_CM", "Extra Small (%1)"),   91,  16 },
+// Small (0.32 cm)
+{ NC_("RID_SVXSTRARY_SPACING_CM", "Small (%1)"),181,  32 },
+// Small Medium (0.64 cm)
+{ NC_("RID_SVXSTRARY_SPACING_CM", "Small Medium (%1)"), 363,  64 },
+// Medium (0.95 cm)
+{ NC_("RID_SVXSTRARY_SPACING_CM", "Medium (%1)"),   539,  95 },
+// Medium Large (1.27 cm)
+{ NC_("RID_SVXSTRARY_SPACING_CM", "Medium Large (%1)"), 720, 127 },
+// Large (1.9 cm)
+{ NC_("RID_SVXSTRARY_SPACING_CM", "Large (%1)"),   1077, 190 },
+// Extra Large (2.54 cm)
+{ NC_("RID_SVXSTRARY_SPACING_CM", "Extra Large (%1)"), 1440, 254 },
+{ nullptr, 0, 0 }
 };
 
 // To translators: this is a listbox labelled by "Margins:", inch units
-const std::pair RID_SVXSTRARY_MARGINS_INCH[] =
+const measurement RID_SVXSTRARY_MARGINS_INCH[] =
 {
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "None"),0 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Small (1/16″)"),   91 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Small (1/8″)"), 181 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Small Medium (1/4″)"),  363 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium (3/8″)"),539 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Medium Large (1/2″)"),  720 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Large (3/4″)"),1077 },
-{ NC_("RID_SVXSTRARY_MARGINS_INCH", "Extra Large (1″)"),1440 },
-{ nullptr, 0 }
+{ NC_("RID_SVXSTRARY_MARGINS_INCH", "None"),   0, 0 },
+{ 

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

2019-02-12 Thread Libreoffice Gerrit user
 svx/inc/pch/precompiled_svx.hxx   |1 
 svx/inc/pch/precompiled_svxcore.hxx   |1 
 svx/source/accessibility/AccessibleShape.cxx  |6 -
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx |3 
 svx/source/dialog/ctredlin.cxx|   11 +-
 svx/source/dialog/docrecovery.cxx |4 -
 svx/source/dialog/fontlb.cxx  |1 
 svx/source/engine3d/cube3d.cxx|3 
 svx/source/engine3d/dragmt3d.cxx  |3 
 svx/source/engine3d/extrud3d.cxx  |5 -
 svx/source/engine3d/float3d.cxx   |3 
 svx/source/engine3d/lathe3d.cxx   |5 -
 svx/source/engine3d/obj3d.cxx |9 +-
 svx/source/engine3d/polygn3d.cxx  |3 
 svx/source/engine3d/scene3d.cxx   |5 -
 svx/source/engine3d/sphere3d.cxx  |5 -
 svx/source/fmcomp/gridcell.cxx|3 
 svx/source/form/fmpgeimp.cxx  |5 -
 svx/source/form/fmshimp.cxx   |3 
 svx/source/form/fmtextcontrolshell.cxx|5 -
 svx/source/form/fmundo.cxx|3 
 svx/source/form/navigatortree.cxx |4 -
 svx/source/form/navigatortreemodel.cxx|4 -
 svx/source/sdr/primitive2d/sdrprimitivetools.cxx  |3 
 svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx |   13 +--
 svx/source/sdr/properties/attributeproperties.cxx |3 
 svx/source/sdr/properties/captionproperties.cxx   |3 
 svx/source/sdr/properties/circleproperties.cxx|3 
 svx/source/sdr/properties/connectorproperties.cxx |3 
 svx/source/sdr/properties/customshapeproperties.cxx   |3 
 svx/source/sdr/properties/defaultproperties.cxx   |3 
 svx/source/sdr/properties/e3dproperties.cxx   |3 
 svx/source/sdr/properties/emptyproperties.cxx |3 
 svx/source/sdr/properties/graphicproperties.cxx   |3 
 svx/source/sdr/properties/groupproperties.cxx |3 
 svx/source/sdr/properties/measureproperties.cxx   |3 
 svx/source/sdr/properties/pageproperties.cxx  |3 
 svx/source/sdr/properties/textproperties.cxx  |3 
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |3 
 svx/source/svdraw/svdedtv2.cxx|5 -
 svx/source/svdraw/svdfmtf.cxx |7 -
 svx/source/svdraw/svdmrkv.cxx |   25 +++---
 svx/source/svdraw/svdoashp.cxx|5 -
 svx/source/svdraw/svdoattr.cxx|3 
 svx/source/svdraw/svdobj.cxx  |5 -
 svx/source/svdraw/svdocapt.cxx|5 -
 svx/source/svdraw/svdocirc.cxx|5 -
 svx/source/svdraw/svdoedge.cxx|5 -
 svx/source/svdraw/svdograf.cxx|   23 ++---
 svx/source/svdraw/svdogrp.cxx |5 -
 svx/source/svdraw/svdomeas.cxx|5 -
 svx/source/svdraw/svdomedia.cxx   |3 
 svx/source/svdraw/svdoole2.cxx|7 -
 svx/source/svdraw/svdopage.cxx|5 -
 svx/source/svdraw/svdopath.cxx|3 
 svx/source/svdraw/svdorect.cxx|5 -
 svx/source/svdraw/svdotext.cxx|5 -
 svx/source/svdraw/svdouno.cxx |3 
 svx/source/svdraw/svdovirt.cxx|3 
 svx/source/svdraw/svdpdf.cxx  |   13 +--
 svx/source/svdraw/svdundo.cxx |   53 ++---
 svx/source/table/accessiblecell.cxx   |4 -
 svx/source/table/cell.cxx |7 -
 svx/source/table/svdotable.cxx|   25 +++---
 svx/source/table/tablecontroller.cxx  |5 -
 svx/source/table/tablemodel.cxx   |9 +-
 svx/source/table/tableundo.cxx|3 
 svx/source/tbxctrls/fillctrl.cxx  |7 -
 svx/source/tbxctrls/linectrl.cxx  |3 
 svx/source/unodraw/UnoNameItemTable.cxx   |4 -
 svx/source/unodraw/XPropertyTable.cxx |   13 +--
 svx/source/unodraw/unoctabl.cxx   |5 -
 svx/source/unodraw/unomtabl.cxx   |3 
 svx/source/xoutdev/xattr.cxx  |   23 ++---
 svx/source/xoutdev/xattrbmp.cxx   |3 
 svx/source/xoutdev/xpool.cxx  |5 -
 svx/source/xoutdev/xtabcolr.cxx   |   70 --
 svx/source/xoutdev/xtabdash.cxx  

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

2018-12-12 Thread Libreoffice Gerrit user
 svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx   |   14 +-
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |4 +--
 svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx |4 +--
 svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx|   25 +--
 4 files changed, 24 insertions(+), 23 deletions(-)

New commits:
commit 56ff7f7789cc914cef705b069553ad4f38f6b9c5
Author: Noel Grandin 
AuthorDate: Wed Dec 12 11:43:09 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 12 13:38:26 2018 +0100

use unique_ptr in createTransformedClone

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

diff --git a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx 
b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
index 30f5ccb0f833..84bacaf129aa 100644
--- a/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrtextprimitive2d.hxx
@@ -95,7 +95,7 @@ namespace drawinglayer
 virtual void get2DDecomposition(Primitive2DDecompositionVisitor& 
rVisitor, const geometry::ViewInformation2D& rViewInformation) const override;
 
 // transformed clone operator
-virtual SdrTextPrimitive2D* createTransformedClone(const 
basegfx::B2DHomMatrix& rTransform) const = 0;
+virtual std::unique_ptr 
createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const = 0;
 };
 } // end of namespace primitive2d
 } // end of namespace drawinglayer
@@ -133,7 +133,7 @@ namespace drawinglayer
 virtual bool operator==(const BasePrimitive2D& rPrimitive) const 
override;
 
 // transformed clone operator
-virtual SdrTextPrimitive2D* createTransformedClone(const 
basegfx::B2DHomMatrix& rTransform) const override;
+virtual std::unique_ptr 
createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const override;
 
 // provide unique ID
 DeclPrimitive2DIDBlock()
@@ -174,7 +174,7 @@ namespace drawinglayer
 virtual bool operator==(const BasePrimitive2D& rPrimitive) const 
override;
 
 // transformed clone operator
-virtual SdrTextPrimitive2D* createTransformedClone(const 
basegfx::B2DHomMatrix& rTransform) const override;
+virtual std::unique_ptr 
createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const override;
 
 // provide unique ID
 DeclPrimitive2DIDBlock()
@@ -234,7 +234,7 @@ namespace drawinglayer
 virtual bool operator==(const BasePrimitive2D& rPrimitive) const 
override;
 
 // transformed clone operator
-virtual SdrTextPrimitive2D* createTransformedClone(const 
basegfx::B2DHomMatrix& rTransform) const override;
+virtual std::unique_ptr 
createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const override;
 
 // provide unique ID
 DeclPrimitive2DIDBlock()
@@ -274,7 +274,7 @@ namespace drawinglayer
 virtual bool operator==(const BasePrimitive2D& rPrimitive) const 
override;
 
 // transformed clone operator
-virtual SdrTextPrimitive2D* createTransformedClone(const 
basegfx::B2DHomMatrix& rTransform) const override;
+virtual std::unique_ptr 
createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const override;
 
 // provide unique ID
 DeclPrimitive2DIDBlock()
@@ -313,7 +313,7 @@ namespace drawinglayer
 virtual bool operator==(const BasePrimitive2D& rPrimitive) const 
override;
 
 // transformed clone operator
-virtual SdrTextPrimitive2D* createTransformedClone(const 
::basegfx::B2DHomMatrix& rTransform) const override;
+virtual std::unique_ptr 
createTransformedClone(const ::basegfx::B2DHomMatrix& rTransform) const 
override;
 
 // provide unique ID
 DeclPrimitive2DIDBlock()
@@ -349,7 +349,7 @@ namespace drawinglayer
 virtual bool operator==(const BasePrimitive2D& rPrimitive) const 
override;
 
 // transformed clone operator
-virtual SdrTextPrimitive2D* createTransformedClone(const 
basegfx::B2DHomMatrix& rTransform) const override;
+virtual std::unique_ptr 
createTransformedClone(const basegfx::B2DHomMatrix& rTransform) const override;
 
 // provide unique ID
 DeclPrimitive2DIDBlock()
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx 
b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 159599cd5cf9..a1acce939be0 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -382,10 +382,10 @@ namespace drawinglayer
 aISRT.invert();
 
 // bring the primitive back to scaled only and get scaled 
range, create new clone for this
- 

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

2018-05-03 Thread Noel Grandin
 svx/inc/svdibrow.hxx   |4 ++--
 svx/source/svdraw/svdibrow.cxx |7 +++
 2 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit c3a8dc07be1beeccbefb9242a1fd1f270cb531ba
Author: Noel Grandin 
Date:   Wed May 2 10:36:41 2018 +0200

loplugin:useuniqueptr in SdrItemBrowserControl

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

diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index 21104c99829d..e735cee9db59 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -39,7 +39,7 @@ friend class ImpItemEdit;
 OUString aWNameMemorized;
 Link aEntryChangedHdl;
 Link aSetDirtyHdl;
-ImpItemListRow* pCurrentChangeEntry;
+std::unique_ptr pCurrentChangeEntry;
 long   nLastWhichOfs;
 sal_uInt16 nLastWhich;
 bool bWhichesButNames;
@@ -83,7 +83,7 @@ public:
 */
 virtual OUString  GetCellText(long _nRow, sal_uInt16 _nColId) const 
override;
 
-const ImpItemListRow* GetCurrentChangeEntry() const { return 
pCurrentChangeEntry; }
+const ImpItemListRow* GetCurrentChangeEntry() const { return 
pCurrentChangeEntry.get(); }
 OUString GetNewEntryValue() const { return 
pEditControl->GetText(); }
 void SetEntryChangedHdl(const Link& rLink)
{ aEntryChangedHdl=rLink; }
 void SetSetDirtyHdl(const Link& rLink)
{ aSetDirtyHdl=rLink; }
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 0128792cfc4e..b8976cfa12c4 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -220,7 +220,7 @@ void SdrItemBrowserControl::dispose()
 {
 pEditControl.disposeAndClear();
 
-delete pCurrentChangeEntry;
+pCurrentChangeEntry.reset();
 
 Clear();
 BrowseBox::dispose();
@@ -501,7 +501,7 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t 
nPos)
 }
 aNewName += " - Type 'del' to reset to default.";
 pParent->SetText(aNewName);
-pCurrentChangeEntry=new ImpItemListRow(*pEntry);
+pCurrentChangeEntry.reset(new ImpItemListRow(*pEntry));
 bRet = true;
 }
 return bRet;
@@ -520,8 +520,7 @@ void SdrItemBrowserControl::BreakChangeEntry()
 {
 if (pEditControl!=nullptr) {
 pEditControl.disposeAndClear();
-delete pCurrentChangeEntry;
-pCurrentChangeEntry=nullptr;
+pCurrentChangeEntry.reset();
 vcl::Window* pParent=GetParent();
 pParent->SetText(aWNameMemorized);
 SetMode(MYBROWSEMODE);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-04-07 Thread Johnny_M
 svx/inc/svdibrow.hxx   |2 +-
 svx/source/svdraw/svdibrow.cxx |   22 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit e819c33d248f0c03305fcd3fa3a1a9f5aef9c109
Author: Johnny_M 
Date:   Sat Mar 31 14:33:40 2018 +0200

Translate German variable names

aNeuNam -> aNewName
aWNamMerk -> aWNameMemorized

Change-Id: Iace4b6f84b40c3f989619331636ae059347e167f
Reviewed-on: https://gerrit.libreoffice.org/52192
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index c62289e83751..21104c99829d 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -36,7 +36,7 @@ friend class ImpItemEdit;
 std::vector aList;
 long nCurrentPaintRow;
 VclPtr pEditControl;
-OUString aWNamMerk;
+OUString aWNameMemorized;
 Link aEntryChangedHdl;
 Link aSetDirtyHdl;
 ImpItemListRow* pCurrentChangeEntry;
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index fc7c0c560658..0128792cfc4e 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -489,18 +489,18 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t 
nPos)
 pEditControl->GrabFocus();
 pEditControl->SetSelection(Selection(SELECTION_MIN,SELECTION_MAX));
 vcl::Window* pParent=GetParent();
-aWNamMerk=pParent->GetText();
-OUString aNeuNam(aWNamMerk);
-aNeuNam += " ";
-aNeuNam += pEntry->GetItemTypeStr();
+aWNameMemorized=pParent->GetText();
+OUString aNewName(aWNameMemorized);
+aNewName += " ";
+aNewName += pEntry->GetItemTypeStr();
 if (pEntry->bCanNum) {
-aNeuNam += ": ";
-aNeuNam += OUString::number(pEntry->nMin);
-aNeuNam += "..";
-aNeuNam += OUString::number(pEntry->nMax);
+aNewName += ": ";
+aNewName += OUString::number(pEntry->nMin);
+aNewName += "..";
+aNewName += OUString::number(pEntry->nMax);
 }
-aNeuNam += " - Type 'del' to reset to default.";
-pParent->SetText(aNeuNam);
+aNewName += " - Type 'del' to reset to default.";
+pParent->SetText(aNewName);
 pCurrentChangeEntry=new ImpItemListRow(*pEntry);
 bRet = true;
 }
@@ -523,7 +523,7 @@ void SdrItemBrowserControl::BreakChangeEntry()
 delete pCurrentChangeEntry;
 pCurrentChangeEntry=nullptr;
 vcl::Window* pParent=GetParent();
-pParent->SetText(aWNamMerk);
+pParent->SetText(aWNameMemorized);
 SetMode(MYBROWSEMODE);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-24 Thread Andrea Gelmini
 svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx|4 ++--
 svx/source/customshapes/EnhancedCustomShape2d.cxx |2 +-
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|2 +-
 sw/qa/uitest/writer_tests/insertFootEndnote.py|2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 4e2e1d04d8f9a38d76c259bb21fbf53b1088b813
Author: Andrea Gelmini 
Date:   Sat Mar 24 12:36:28 2018 +0100

Fix typos

Change-Id: I6c515e716b232fecfe1750b806f0a5624f648de5

diff --git a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx 
b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
index e165344b26c1..a9d86cb34481 100644
--- a/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx
@@ -42,10 +42,10 @@ namespace drawinglayer
 
 // OperationSmiley: Added to be able to define a FillGeometry 
different from local
 // geometry. It is ignored when empty and/or equal to 
UnitPolyPolygon.
-// If used and there is a fill, object's geomery 
(maUnitPolyPolygon) will be filled,
+// If used and there is a fill, the object's geometry 
(maUnitPolyPolygon) will be filled,
 // but UnitDefinitionPolyPolygon will be used to define the 
FillStyle. Thus when
 // using the 'same' UnitDefinitionPolyPolygon for multiple 
definitions,
-// all filled stuff using it will fit seamless together.
+// all filled stuff using it will fit seamlessly together.
 // 'same' is in quotes since it is a UnitPolygon, so being 
relative to the
 // unit polygon of the local geometry (UnitPolyPolygon). The 
definition is complete
 // when applying the also given transfomation (maTransform)
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 5ed79db32897..2386b5887d8f 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2318,7 +2318,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool 
bLineGeometryNeededOnly )
 
 // OperationSmiley: when we have access to the 
SdrObjCustomShape and the
 // CustomShape is built with more than a single filled 
Geometry, use it
-// to define that all helper geometites defined here 
(SdrObjects currently)
+// to define that all helper geometries defined here 
(SdrObjects currently)
 // will use the same FillGeometryDefinition (from the 
referenced SdrObjCustomShape).
 // This will all same-filled objects look like filled 
smoothly with the same style.
 pObj->setFillGeometryDefiningShape();
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 4ed36e31040c..14e03fbced9d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -284,7 +284,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107035, "tdf107035.docx")
 DECLARE_OOXMLEXPORT_TEST(testTdf112118_DOCX, "tdf112118.docx")
 {
 // The resulting left margin width (2081) differs from its DOC counterpart 
from ww8export2.cxx,
-// because DOCX import does two conversions between mm/100 and twips on 
the route, loosing one
+// because DOCX import does two conversions between mm/100 and twips on 
the route, losing one
 // twip on the road and arriving with a value that is 2 mm/100 less. I 
don't see an obvious way
 // to avoid that.
 struct {
diff --git a/sw/qa/uitest/writer_tests/insertFootEndnote.py 
b/sw/qa/uitest/writer_tests/insertFootEndnote.py
index 690096cd9271..397e98e5ff40 100644
--- a/sw/qa/uitest/writer_tests/insertFootEndnote.py
+++ b/sw/qa/uitest/writer_tests/insertFootEndnote.py
@@ -27,7 +27,7 @@ class insertFootEndnote(UITestCase):
 self.assertEqual(document.Footnotes.getCount(), 1)
 self.xUITest.executeCommand(".uno:Undo")
 self.assertEqual(document.Footnotes.getCount(), 0)
-#Automatic - Endtnote
+#Automatic - Endnote
 
self.ui_test.execute_dialog_through_command(".uno:InsertFootnoteDialog")
 xDialog = self.xUITest.getTopFocusWindow()
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-05 Thread Johnny_M
 svx/inc/svdibrow.hxx   |6 +++---
 svx/source/svdraw/svdibrow.cxx |   20 ++--
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 24491ce945f428f2da4a7c33d699604c3b5ae28a
Author: Johnny_M 
Date:   Sat Mar 3 22:47:53 2018 +0100

Translate German variable and function names

Akt -> Current in svdibrow

Change-Id: I099858e917dcc725cd02c1b99f0fa61d5c769ae1
Reviewed-on: https://gerrit.libreoffice.org/50703
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index a9cea4f085a9..c62289e83751 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -34,12 +34,12 @@ class SdrItemBrowserControl final : public BrowseBox
 {
 friend class ImpItemEdit;
 std::vector aList;
-long nAktPaintRow;
+long nCurrentPaintRow;
 VclPtr pEditControl;
 OUString aWNamMerk;
 Link aEntryChangedHdl;
 Link aSetDirtyHdl;
-ImpItemListRow* pAktChangeEntry;
+ImpItemListRow* pCurrentChangeEntry;
 long   nLastWhichOfs;
 sal_uInt16 nLastWhich;
 bool bWhichesButNames;
@@ -83,7 +83,7 @@ public:
 */
 virtual OUString  GetCellText(long _nRow, sal_uInt16 _nColId) const 
override;
 
-const ImpItemListRow* GetAktChangeEntry() const { return pAktChangeEntry; }
+const ImpItemListRow* GetCurrentChangeEntry() const { return 
pCurrentChangeEntry; }
 OUString GetNewEntryValue() const { return 
pEditControl->GetText(); }
 void SetEntryChangedHdl(const Link& rLink)
{ aEntryChangedHdl=rLink; }
 void SetSetDirtyHdl(const Link& rLink)
{ aSetDirtyHdl=rLink; }
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index e96176ed7071..7f98fbc746ae 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -220,7 +220,7 @@ void SdrItemBrowserControl::dispose()
 {
 pEditControl.disposeAndClear();
 
-delete pAktChangeEntry;
+delete pCurrentChangeEntry;
 
 Clear();
 BrowseBox::dispose();
@@ -229,7 +229,7 @@ void SdrItemBrowserControl::dispose()
 void SdrItemBrowserControl::ImpCtor()
 {
 pEditControl = nullptr;
-pAktChangeEntry = nullptr;
+pCurrentChangeEntry = nullptr;
 nLastWhichOfs = 0;
 nLastWhich = 0;
 bWhichesButNames = false;
@@ -284,7 +284,7 @@ long SdrItemBrowserControl::GetRowCount() const
 
 bool SdrItemBrowserControl::SeekRow(long nRow)
 {
-nAktPaintRow = nRow;
+nCurrentPaintRow = nRow;
 return true;
 }
 
@@ -329,12 +329,12 @@ OUString SdrItemBrowserControl::GetCellText(long _nRow, 
sal_uInt16 _nColId) cons
 
 void SdrItemBrowserControl::PaintField(OutputDevice& rDev, const 
tools::Rectangle& rRect, sal_uInt16 nColumnId) const
 {
-if (nAktPaintRow<0 || 
static_cast(nAktPaintRow)>=aList.size()) {
+if (nCurrentPaintRow<0 || 
static_cast(nCurrentPaintRow)>=aList.size()) {
 return;
 }
 tools::Rectangle aR(rRect);
 aR.AdjustBottom( 1 );
-auto& pEntry=aList[nAktPaintRow];
+auto& pEntry=aList[nCurrentPaintRow];
 if (pEntry->bComment)
 {
 if (nColumnId==ITEMBROWSER_NAMECOL_ID)
@@ -348,7 +348,7 @@ void SdrItemBrowserControl::PaintField(OutputDevice& rDev, 
const tools::Rectangl
 }
 } else {
 rDev.SetClipRegion(vcl::Region(aR));
-rDev.DrawText(aR.TopLeft(),GetCellText(nAktPaintRow,nColumnId));
+rDev.DrawText(aR.TopLeft(),GetCellText(nCurrentPaintRow,nColumnId));
 rDev.SetClipRegion();
 }
 }
@@ -501,7 +501,7 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t 
nPos)
 }
 aNeuNam += " - Type 'del' to reset to default.";
 pParent->SetText(aNeuNam);
-pAktChangeEntry=new ImpItemListRow(*pEntry);
+pCurrentChangeEntry=new ImpItemListRow(*pEntry);
 bRet = true;
 }
 return bRet;
@@ -520,8 +520,8 @@ void SdrItemBrowserControl::BreakChangeEntry()
 {
 if (pEditControl!=nullptr) {
 pEditControl.disposeAndClear();
-delete pAktChangeEntry;
-pAktChangeEntry=nullptr;
+delete pCurrentChangeEntry;
+pCurrentChangeEntry=nullptr;
 vcl::Window* pParent=GetParent();
 pParent->SetText(aWNamMerk);
 SetMode(MYBROWSEMODE);
@@ -1110,7 +1110,7 @@ IMPL_LINK_NOARG(SdrItemBrowser, IdleHdl, Timer *, void)
 
 IMPL_LINK(SdrItemBrowser, ChangedHdl, SdrItemBrowserControl&, rBrowse, void)
 {
-const ImpItemListRow* pEntry = rBrowse.GetAktChangeEntry();
+const ImpItemListRow* pEntry = rBrowse.GetCurrentChangeEntry();
 if (pEntry!=nullptr)
 {
 SfxItemSet aSet(pView->GetModel()->GetItemPool());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org

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

2017-11-01 Thread Stephan Bergmann
 svx/source/dialog/page.hrc |6 +++---
 svx/source/dialog/papersizelistbox.cxx |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 7124613c81a77d504b2b9de5dadb17ab736255e6
Author: Stephan Bergmann 
Date:   Wed Nov 1 18:12:06 2017 +0100

page.hrc is only included from svx/source/dialog

...but itself includes svx/source/dialog/page.h, which only happens to work
because of -I$(dir $(3)) in gb_CObject__command_pattern (in
solenv/gbuild/platform/com_{GCC,MSC}_class.mk).  Clean that up by moving the
file.

Change-Id: I9f5f4b6884d9ec7357caaffa050c7b516762d71a
Reviewed-on: https://gerrit.libreoffice.org/44172
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/svx/inc/page.hrc b/svx/source/dialog/page.hrc
similarity index 98%
rename from svx/inc/page.hrc
rename to svx/source/dialog/page.hrc
index 2907c6ee72f2..fc42b08e21f3 100644
--- a/svx/inc/page.hrc
+++ b/svx/source/dialog/page.hrc
@@ -17,10 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SVX_INC_PAGE_HRC
-#define INCLUDED_SVX_INC_PAGE_HRC
+#ifndef INCLUDED_SVX_SOURCE_DIALOG_PAGE_HRC
+#define INCLUDED_SVX_SOURCE_DIALOG_PAGE_HRC
 
-#include 
+#include "page.h"
 #include 
 
 #define NC_(Context, String) (Context "\004" u8##String)
diff --git a/svx/source/dialog/papersizelistbox.cxx 
b/svx/source/dialog/papersizelistbox.cxx
index 94d93aa92caa..1ec9c17c0da4 100644
--- a/svx/source/dialog/papersizelistbox.cxx
+++ b/svx/source/dialog/papersizelistbox.cxx
@@ -21,7 +21,7 @@
 #include 
 #include 
 #include 
-#include 
+#include "page.hrc"
 
 PaperSizeListBox::PaperSizeListBox(vcl::Window* pParent)
 : ListBox( pParent, WB_BORDER | WB_DROPDOWN)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-09-06 Thread Takeshi Abe
 svx/inc/svdibrow.hxx   |4 ++--
 svx/source/svdraw/svdibrow.cxx |   29 +
 2 files changed, 11 insertions(+), 22 deletions(-)

New commits:
commit a72f30e518883c9b2e20c6a0cf2f1e46eac1fbf9
Author: Takeshi Abe 
Date:   Wed Sep 6 12:05:11 2017 +0900

svx: Simplify code with std::unique_ptr

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

diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index 76b855564c93..c97671e2ffbe 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SfxItemSet;
 class ImpItemListRow;
@@ -32,7 +33,7 @@ class BrowserMouseEvent;
 class SdrItemBrowserControl: public BrowseBox
 {
 friend class ImpItemEdit;
-std::vector aList;
+std::vector aList;
 long nAktPaintRow;
 VclPtr pEditControl;
 OUString aWNamMerk;
@@ -48,7 +49,6 @@ friend class ImpItemEdit;
 private:
 void ImpCtor();
 void ImpSetEntry(const ImpItemListRow& rEntry, std::size_t nEntryNum);
-ImpItemListRow* ImpGetEntry(std::size_t nPos) const { return aList[nPos]; }
 void ImpSaveWhich();
 void ImpRestoreWhich();
 std::size_t GetCurrentPos() const;
diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx
index 270e95242182..5fdc614b7a10 100644
--- a/svx/source/svdraw/svdibrow.cxx
+++ b/svx/source/svdraw/svdibrow.cxx
@@ -206,8 +206,7 @@ void ImpItemEdit::KeyInput(const KeyEvent& rKEvt)
 #define MYBROWSEMODE 
(BrowserMode::THUMBDRAGGING|BrowserMode::KEEPHIGHLIGHT|BrowserMode::NO_HSCROLL|BrowserMode::HIDECURSOR)
 
 SdrItemBrowserControl::SdrItemBrowserControl(vcl::Window* pParent):
-BrowseBox(pParent, WB_3DLOOK | WB_BORDER | WB_TABSTOP, MYBROWSEMODE),
-aList()
+BrowseBox(pParent, WB_3DLOOK | WB_BORDER | WB_TABSTOP, MYBROWSEMODE)
 {
 ImpCtor();
 }
@@ -274,10 +273,6 @@ void SdrItemBrowserControl::ImpCtor()
 
 void SdrItemBrowserControl::Clear()
 {
-const std::size_t nCount=aList.size();
-for (std::size_t nNum=0; nNum= 0 && _nRow < (sal_Int32)aList.size() )
 {
-ImpItemListRow* pEntry = ImpGetEntry(_nRow);
-if ( pEntry )
-{
+auto& pEntry = aList[_nRow];
 if ( pEntry->bComment )
 {
 if (_nColId == ITEMBROWSER_NAMECOL_ID)
@@ -330,7 +323,6 @@ OUString SdrItemBrowserControl::GetCellText(long _nRow, 
sal_uInt16 _nColId) cons
 case ITEMBROWSER_VALUECOL_ID: sRet = pEntry->aValue; break;
 } // switch
 }
-}
 }
 return sRet;
 }
@@ -342,7 +334,7 @@ void SdrItemBrowserControl::PaintField(OutputDevice& rDev, 
const tools::Rectangl
 }
 tools::Rectangle aR(rRect);
 aR.Bottom()++;
-ImpItemListRow* pEntry=ImpGetEntry(nAktPaintRow);
+auto& pEntry=aList[nAktPaintRow];
 if (pEntry->bComment)
 {
 if (nColumnId==ITEMBROWSER_NAMECOL_ID)
@@ -378,7 +370,7 @@ sal_uInt16 SdrItemBrowserControl::GetCurrentWhich() const
 sal_uInt16 nRet=0;
 const std::size_t nPos=GetCurrentPos();
 if (nPos!=ITEM_NOT_FOUND) {
-nRet=ImpGetEntry(nPos)->nWhichId;
+nRet=aList[nPos]->nWhichId;
 }
 return nRet;
 }
@@ -459,7 +451,7 @@ void SdrItemBrowserControl::ImpRestoreWhich()
 const std::size_t nCount=aList.size();
 std::size_t nNum;
 for (nNum=0; nNumbComment) {
 sal_uInt16 nWh=pEntry->nWhichId;
 if (nWh==nLastWhich) bFnd = true;
@@ -480,8 +472,8 @@ bool SdrItemBrowserControl::BeginChangeEntry(std::size_t 
nPos)
 {
 BreakChangeEntry();
 bool bRet = false;
-ImpItemListRow* pEntry=ImpGetEntry(nPos);
-if (pEntry!=nullptr && !pEntry->bComment) {
+auto& pEntry=aList[nPos];
+if (!pEntry->bComment) {
 SetMode(MYBROWSEMODE & BrowserMode(~BrowserMode::KEEPHIGHLIGHT));
 pEditControl=VclPtr::Create((),this,0);
 tools::Rectangle aRect(GetFieldRectPixel(nPos, 
ITEMBROWSER_VALUECOL_ID, false));
@@ -541,10 +533,10 @@ void SdrItemBrowserControl::ImpSetEntry(const 
ImpItemListRow& rEntry, std::size_
 SAL_WARN_IF(nEntryNum > aList.size(), "svx", "trying to set item " << 
nEntryNum << "in a vector of size " << aList.size());
 if (nEntryNum >= aList.size()) {
 nEntryNum = aList.size();
-aList.push_back(new ImpItemListRow(rEntry));
+aList.emplace_back(new ImpItemListRow(rEntry));
 RowInserted(nEntryNum);
 } else {
-ImpItemListRow* pAktEntry=ImpGetEntry(nEntryNum);
+  

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

2017-08-21 Thread Jochen Nitschke
 svx/inc/sxonitm.hxx   |   31 ---
 svx/inc/sxraitm.hxx   |   31 ---
 svx/source/svdraw/svdattr.cxx |2 --
 svx/source/svdraw/svdobj.cxx  |6 ++
 4 files changed, 2 insertions(+), 68 deletions(-)

New commits:
commit 8f412d7445c3e8b7277757f454a97b84341e55e9
Author: Jochen Nitschke 
Date:   Sun Aug 20 22:25:23 2017 +0200

drop pointless headers

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

diff --git a/svx/inc/sxonitm.hxx b/svx/inc/sxonitm.hxx
deleted file mode 100644
index 820e398130a0..
--- a/svx/inc/sxonitm.hxx
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SVX_INC_SXONITM_HXX
-#define INCLUDED_SVX_INC_SXONITM_HXX
-
-#include 
-#include 
-
-inline SfxStringItem makeSdrObjectNameItem(const OUString& rStr) {
-return SfxStringItem(SDRATTR_OBJECTNAME,rStr);
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/sxraitm.hxx b/svx/inc/sxraitm.hxx
deleted file mode 100644
index e6b44c1d0d86..
--- a/svx/inc/sxraitm.hxx
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SVX_INC_SXRAITM_HXX
-#define INCLUDED_SVX_INC_SXRAITM_HXX
-
-#include 
-#include 
-
-inline SdrAngleItem makeSdrRotateAngleItem(long nAngle) {
-return SdrAngleItem(SDRATTR_ROTATEANGLE, nAngle);
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index d38a8e6bf5be..0a6d5a791472 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -86,9 +86,7 @@
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index c41aae438575..947f70a29f4e 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -98,9 +98,7 @@
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -2135,7 +2133,7 @@ void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr) 
const
 lcl_SetItem(rAttr,false,SdrYesNoItem(SDRATTR_OBJSIZEPROTECT, 
IsResizeProtect()));
 lcl_SetItem(rAttr,false,SdrObjPrintableItem(IsPrintable()));
 lcl_SetItem(rAttr,false,SdrObjVisibleItem(IsVisible()));
-lcl_SetItem(rAttr,false,makeSdrRotateAngleItem(GetRotateAngle()));
+lcl_SetItem(rAttr,false,SdrAngleItem(SDRATTR_ROTATEANGLE, 
GetRotateAngle()));
 lcl_SetItem(rAttr,false,SdrShearAngleItem(GetShearAngle()));
 lcl_SetItem(rAttr,false,SdrOneSizeWidthItem(rSnap.GetWidth()-1));
 lcl_SetItem(rAttr,false,SdrOneSizeHeightItem(rSnap.GetHeight()-1));
@@ -2151,7 +2149,7 @@ void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr) 
const
 
 if (!aName.isEmpty())
 {
-lcl_SetItem(rAttr, false, makeSdrObjectNameItem(aName));
+lcl_SetItem(rAttr, false, SfxStringItem(SDRATTR_OBJECTNAME, aName));
 }
 
 

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

2017-06-13 Thread Stephan Bergmann
 svx/inc/sdr/properties/emptyproperties.hxx|9 +
 svx/source/sdr/properties/emptyproperties.cxx |   11 +--
 svx/source/sdr/properties/pageproperties.cxx  |2 +-
 3 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit edda154f3eac2508b8aaa7991ad59f3580384b83
Author: Stephan Bergmann 
Date:   Tue Jun 13 13:04:01 2017 +0200

Use unique_ptr for EmptyProperties::mpEmptyItemSet

Change-Id: I167e6ee803ee5c81553e8a5f0d63f2a47195b46a

diff --git a/svx/inc/sdr/properties/emptyproperties.hxx 
b/svx/inc/sdr/properties/emptyproperties.hxx
index dad630be6fe9..2b431ec7b576 100644
--- a/svx/inc/sdr/properties/emptyproperties.hxx
+++ b/svx/inc/sdr/properties/emptyproperties.hxx
@@ -20,6 +20,10 @@
 #ifndef INCLUDED_SVX_SDR_PROPERTIES_EMPTYPROPERTIES_HXX
 #define INCLUDED_SVX_SDR_PROPERTIES_EMPTYPROPERTIES_HXX
 
+#include 
+
+#include 
+
 #include 
 
 
@@ -31,7 +35,7 @@ namespace sdr
 {
 protected:
 // the to be used ItemSet
-SfxItemSet* mpEmptyItemSet;
+std::unique_ptr mpEmptyItemSet;
 
 // create a new itemset
 virtual SfxItemSet* CreateObjectSpecificItemSet(SfxItemPool& 
rPool) override;
@@ -52,9 +56,6 @@ namespace sdr
 // basic constructor
 explicit EmptyProperties(SdrObject& rObj);
 
-// destructor
-virtual ~EmptyProperties() override;
-
 // Clone() operator, normally just calls the local copy constructor
 virtual BaseProperties& Clone(SdrObject& rObj) const override;
 
diff --git a/svx/source/sdr/properties/emptyproperties.cxx 
b/svx/source/sdr/properties/emptyproperties.cxx
index c872d6667ad1..25d7c04ee16b 100644
--- a/svx/source/sdr/properties/emptyproperties.cxx
+++ b/svx/source/sdr/properties/emptyproperties.cxx
@@ -43,15 +43,6 @@ namespace sdr
 {
 }
 
-EmptyProperties::~EmptyProperties()
-{
-if(mpEmptyItemSet)
-{
-delete mpEmptyItemSet;
-mpEmptyItemSet = nullptr;
-}
-}
-
 BaseProperties& EmptyProperties::Clone(SdrObject& rObj) const
 {
 return *(new EmptyProperties(rObj));
@@ -61,7 +52,7 @@ namespace sdr
 {
 if(!mpEmptyItemSet)
 {
-const_cast(this)->mpEmptyItemSet = 
const_cast(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool());
+
const_cast(this)->mpEmptyItemSet.reset(const_cast(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool()));
 }
 
 assert(mpEmptyItemSet);
diff --git a/svx/source/sdr/properties/pageproperties.cxx 
b/svx/source/sdr/properties/pageproperties.cxx
index f2ac2d192583..a4d57fc80602 100644
--- a/svx/source/sdr/properties/pageproperties.cxx
+++ b/svx/source/sdr/properties/pageproperties.cxx
@@ -60,7 +60,7 @@ namespace sdr
 {
 if(!mpEmptyItemSet)
 {
-const_cast(this)->mpEmptyItemSet = 
const_cast(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool());
+
const_cast(this)->mpEmptyItemSet.reset(const_cast(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool()));
 }
 
 DBG_ASSERT(mpEmptyItemSet, "Could not create an SfxItemSet(!)");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-27 Thread Johnny_M
 svx/inc/float3d.hrc   |2 
 svx/source/dialog/dlgctrl.cxx |2 
 svx/source/dialog/swframeexample.cxx  |4 
 svx/source/engine3d/dragmt3d.cxx  |2 
 svx/source/inc/fmitems.hxx|2 
 svx/source/inc/fmobj.hxx  |2 
 svx/source/inc/fmshimp.hxx|2 
 svx/source/items/algitem.cxx  |6 -
 svx/source/items/e3ditem.cxx  |2 
 svx/source/items/numfmtsh.cxx |  122 +-
 svx/source/sdr/contact/viewcontactofgraphic.cxx   |2 
 svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx |2 
 svx/source/svdraw/clonelist.cxx   |2 
 svx/source/svdraw/svdoole2.cxx|4 
 svx/source/svdraw/svdpage.cxx |2 
 svx/source/svdraw/svdtrans.cxx|2 
 svx/source/table/cell.cxx |6 -
 svx/source/table/svdotable.cxx|4 
 svx/source/table/tablecontroller.cxx  |4 
 svx/source/table/tablehandles.cxx |2 
 svx/source/tbxctrls/SvxColorChildWindow.cxx   |2 
 svx/source/tbxctrls/colrctrl.cxx  |   48 
 svx/source/tbxctrls/fontworkgallery.cxx   |8 -
 svx/source/tbxctrls/tbunocontroller.cxx   |   14 +-
 svx/source/toolbars/extrusionbar.cxx  |4 
 svx/source/toolbars/fontworkbar.cxx   |4 
 svx/source/unodraw/unoshape.cxx   |2 
 27 files changed, 122 insertions(+), 136 deletions(-)

New commits:
commit 063626b994960f7fe8426688203c8aa87e425cb4
Author: Johnny_M 
Date:   Fri Apr 21 21:27:09 2017 +0200

Translate German comments (rest of svx/ except svx/source/form/)

Change-Id: Ib0fccc41c71902861f450c6184f57be2c5da0811
Reviewed-on: https://gerrit.libreoffice.org/36804
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/svx/inc/float3d.hrc b/svx/inc/float3d.hrc
index 6d1eeceeff04..7d13a16189d8 100644
--- a/svx/inc/float3d.hrc
+++ b/svx/inc/float3d.hrc
@@ -18,7 +18,7 @@
  */
 #include 
 
-// Unterer Teil
+// Lower part
 #define CTL_PREVIEW 12
 #define CTL_LIGHT_PREVIEW   13
 
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 25e6f36006d9..760261e00a48 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -717,7 +717,7 @@ long SvxPixelCtl::ShowPosition( const Point )
 
 vcl::Window *pTabPage = getNonLayoutParent(this);
 if (pTabPage && WindowType::TABPAGE == pTabPage->GetType())
-static_cast(pTabPage)->PointChanged( this, RectPoint::MM 
); // RectPoint ist dummy
+static_cast(pTabPage)->PointChanged( this, RectPoint::MM 
); // RectPoint is dummy
 
 return GetFocusPosIndex();
 
diff --git a/svx/source/dialog/swframeexample.cxx 
b/svx/source/dialog/swframeexample.cxx
index 46303069cb86..ec7e38747d17 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -447,13 +447,13 @@ tools::Rectangle 
SvxSwFrameExample::DrawInnerFrame_Impl(vcl::RenderContext& rRen
 {
 DrawRect_Impl(rRenderContext, rRect, rFillColor, rBorderColor);
 
-// Bereich, zu dem relativ positioniert wird, bestimmen
+// determine the area relative to which the positioning happens
 tools::Rectangle aRect(rRect); // aPagePrtArea = Default
 CalcBoundRect_Impl(aRect);
 
 if (nAnchor == RndStdIds::FLY_AT_FLY &&  == )
 {
-// Testabsatz zeichnen
+// draw text paragraph
 tools::Rectangle aTxt(aTextLine);
 sal_Int32 nStep = aTxt.GetHeight() + 2;
 sal_uInt16 nLines = static_cast(aParaPrtArea.GetHeight() / 
(aTextLine.GetHeight() + 2));
diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx
index 8a3b4e8b8ae8..8488f13e3d60 100644
--- a/svx/source/engine3d/dragmt3d.cxx
+++ b/svx/source/engine3d/dragmt3d.cxx
@@ -611,7 +611,7 @@ void E3dDragMove::MoveSdrDrag(const Point& rPnt)
 break;
 case SdrHdlKind::Upper:
 case SdrHdlKind::Lower:
-// constrain to auf Y -> X equal
+// constrain to Y -> X equal
 aScNext.setX(aScFixPos.getX());
 break;
 default:
diff --git a/svx/source/inc/fmitems.hxx b/svx/source/inc/fmitems.hxx
index c017605d7fb5..884fc57e25ad 100644
--- a/svx/source/inc/fmitems.hxx
+++ b/svx/source/inc/fmitems.hxx
@@ -37,7 +37,7 @@ public:
 
 inline FmInterfaceItem&  operator=( const FmInterfaceItem  );
 
-// "pure virtual Methoden" vom SfxPoolItem
+// "purely virtual methods" of the SfxPoolItem
 virtual booloperator==( const 

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

2017-04-19 Thread Noel Grandin
 svx/inc/sdr/properties/itemsettools.hxx|7 +--
 svx/source/sdr/properties/itemsettools.cxx |   17 -
 2 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit d9e6002b70eadd47fe70ff5ef53a55e5fa32d846
Author: Noel Grandin 
Date:   Thu Apr 13 12:04:36 2017 +0200

use union instead of void*

vaguely more readable and typesafe

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

diff --git a/svx/inc/sdr/properties/itemsettools.hxx 
b/svx/inc/sdr/properties/itemsettools.hxx
index 0e1f760e0777..c9cb93261ad0 100644
--- a/svx/inc/sdr/properties/itemsettools.hxx
+++ b/svx/inc/sdr/properties/itemsettools.hxx
@@ -36,7 +36,10 @@ namespace sdr
 class ItemChangeBroadcaster
 {
 boolmbSingleRect;
-void*   mpData;
+union {
+RectangleVector*mpRectangleVector;
+tools::Rectangle*   mpRectangle;
+};
 
 public:
 explicit ItemChangeBroadcaster(const SdrObject& rObj);
@@ -44,7 +47,7 @@ namespace sdr
 
 sal_uInt32 GetRectangleCount() const
 {
-return mbSingleRect ? 1 : 
static_cast(mpData)->size();
+return mbSingleRect ? 1 : mpRectangleVector->size();
 }
 const tools::Rectangle& GetRectangle(sal_uInt32 nIndex) const;
 };
diff --git a/svx/source/sdr/properties/itemsettools.cxx 
b/svx/source/sdr/properties/itemsettools.cxx
index b3cc64875edc..c11c54dcf445 100644
--- a/svx/source/sdr/properties/itemsettools.cxx
+++ b/svx/source/sdr/properties/itemsettools.cxx
@@ -38,9 +38,8 @@ namespace sdr
 if (const SdrObjGroup* pGroupObj = dynamic_cast())
 {
 SdrObjListIter aIter(*pGroupObj, SdrIterMode::DeepNoGroups);
-mpData = new RectangleVector;
-DBG_ASSERT(mpData, "ItemChangeBroadcaster: No memory (!)");
-static_cast(mpData)->reserve(aIter.Count());
+mpRectangleVector = new RectangleVector;
+mpRectangleVector->reserve(aIter.Count());
 
 while(aIter.IsMore())
 {
@@ -48,7 +47,7 @@ namespace sdr
 
 if(pObj)
 {
-
static_cast(mpData)->push_back(pObj->GetLastBoundRect());
+mpRectangleVector->push_back(pObj->GetLastBoundRect());
 }
 }
 
@@ -56,7 +55,7 @@ namespace sdr
 }
 else
 {
-mpData = new tools::Rectangle(rObj.GetLastBoundRect());
+mpRectangle = new tools::Rectangle(rObj.GetLastBoundRect());
 mbSingleRect = true;
 }
 }
@@ -65,11 +64,11 @@ namespace sdr
 {
 if (!mbSingleRect)
 {
-delete static_cast(mpData);
+delete mpRectangleVector;
 }
 else
 {
-delete static_cast(mpData);
+delete mpRectangle;
 }
 }
 
@@ -77,11 +76,11 @@ namespace sdr
 {
 if (!mbSingleRect)
 {
-return (*static_cast(mpData))[nIndex];
+return (*mpRectangleVector)[nIndex];
 }
 else
 {
-return *static_cast(mpData);
+return *mpRectangle;
 }
 }
 } // end of namespace properties
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svx/inc svx/source svx/uiconfig svx/UIConfig_svx.mk

2017-04-14 Thread Caolán McNamara
 svx/UIConfig_svx.mk  |1 
 svx/inc/gallery.hrc  |   12 --
 svx/source/gallery2/galbrws1.cxx |  173 ++-
 svx/source/gallery2/galbrws1.hxx |4 
 svx/source/gallery2/gallery.src  |   48 --
 svx/uiconfig/ui/gallerymenu1.ui  |   63 ++
 6 files changed, 147 insertions(+), 154 deletions(-)

New commits:
commit 9df643781504e38c8a9f8f3ceda268677c1c4f02
Author: Caolán McNamara 
Date:   Fri Apr 14 14:52:44 2017 +0100

convert other gallery menu to .ui

Change-Id: Ib67c0e1822e32349ef5bc84fdf513276ad859e98

diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index ce4e14e9b62d..f68a66650128 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -43,6 +43,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/fontworkgallerydialog \
svx/uiconfig/ui/fontworkspacingdialog \
svx/uiconfig/ui/formlinkwarndialog \
+   svx/uiconfig/ui/gallerymenu1 \
svx/uiconfig/ui/gallerymenu2 \
svx/uiconfig/ui/headfootformatpage \
svx/uiconfig/ui/imapdialog \
diff --git a/svx/inc/gallery.hrc b/svx/inc/gallery.hrc
index 742e81391b24..dcba6fb87260 100644
--- a/svx/inc/gallery.hrc
+++ b/svx/inc/gallery.hrc
@@ -31,9 +31,6 @@
 #define RID_SVXSTR_GALLERY_ICONVIEW (RID_SVX_GALLERY_START + 86)
 #define RID_SVXSTR_GALLERY_LISTVIEW (RID_SVX_GALLERY_START + 87)
 
-// Controls for Gallery
-#define RID_SVXMN_GALLERY1  (RID_SVX_GALLERY_START + 36)
-
 // Images
 #define RID_SVXBMP_THEME_NORMAL (RID_SVX_GALLERY_START + 48)
 #define RID_SVXBMP_THEME_READONLY   (RID_SVX_GALLERY_START + 52)
@@ -51,15 +48,6 @@
 #define RID_SVXBMP_GALLERY_SOUND_7  (RID_SVX_GALLERY_START + 68)
 #define RID_SVXBMP_GALLERY_MEDIA(RID_SVX_GALLERY_START + 71)
 
-// local Defines
-#define MN_PREVIEW 10
-#define MN_DELETE 12
-
-#define MN_ACTUALIZE 21
-#define MN_RENAME 22
-#define MN_PROPERTIES 23
-#define MN_ASSIGN_ID 24
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 41b13b9402a2..e3a7afca7c4f 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -103,8 +103,8 @@ bool GalleryThemeListBox::PreNotify( NotifyEvent& rNEvt )
 GalleryBrowser1::GalleryBrowser1(
 vcl::Window* pParent,
 Gallery* pGallery,
-const ::std::function& 
rKeyInputHandler,
-const ::std::function& rThemeSlectionHandler)
+const std::function& rKeyInputHandler,
+const std::function& rThemeSlectionHandler)
 :
 Control   ( pParent, WB_TABSTOP ),
 maNewTheme( VclPtr::Create(this, WB_3DLOOK) ),
@@ -219,7 +219,7 @@ void GalleryBrowser1::ImplFillExchangeData( const 
GalleryTheme* pThm, ExchangeDa
 }
 }
 
-void GalleryBrowser1::ImplGetExecuteVector(::std::vector< sal_uInt16 >& 
o_aExec)
+void GalleryBrowser1::ImplGetExecuteVector(std::vector& o_aExec)
 {
 GalleryTheme*   pTheme = mpGallery->AcquireTheme( 
GetSelectedTheme(), *this );
 
@@ -239,18 +239,18 @@ void GalleryBrowser1::ImplGetExecuteVector(::std::vector< 
sal_uInt16 >& o_aExec)
 bUpdateAllowed = bRenameAllowed = bRemoveAllowed = true;
 
 if( bUpdateAllowed && pTheme->GetObjectCount() )
-o_aExec.push_back( MN_ACTUALIZE );
+o_aExec.push_back("update");
 
 if( bRenameAllowed )
-o_aExec.push_back( MN_RENAME );
+o_aExec.push_back("rename");
 
 if( bRemoveAllowed )
-o_aExec.push_back( MN_DELETE );
+o_aExec.push_back("delete");
 
 if( bIdDialog && !pTheme->IsReadOnly() )
-o_aExec.push_back( MN_ASSIGN_ID );
+o_aExec.push_back("assign");
 
-o_aExec.push_back( MN_PROPERTIES );
+o_aExec.push_back("properties");
 
 mpGallery->ReleaseTheme( pTheme, *this );
 }
@@ -340,94 +340,82 @@ IMPL_LINK( GalleryBrowser1, DestroyThemePropertiesDlgHdl, 
void*, /*p*/, void )
 mpThemePropsDlgItemSet = nullptr;
 }
 
-void GalleryBrowser1::ImplExecute( sal_uInt16 nId )
+void GalleryBrowser1::ImplExecute(const OString )
 {
-switch( nId )
+if (rIdent == "update")
 {
-case MN_ACTUALIZE:
-{
-GalleryTheme*   pTheme = mpGallery->AcquireTheme( 
GetSelectedTheme(), *this );
+GalleryTheme*   pTheme = mpGallery->AcquireTheme( 
GetSelectedTheme(), *this );
 
-SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
-if(pFact)
-{
-ScopedVclPtr 
aActualizeProgress(pFact->CreateActualizeProgressDialog( this, pTheme ));
-DBG_ASSERT(aActualizeProgress, "Dialog creation failed!");
+SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+if(pFact)
+{
+ScopedVclPtr 

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

2017-04-13 Thread Caolán McNamara
 svx/inc/sdr/properties/itemsettools.hxx|8 ++--
 svx/source/sdr/properties/itemsettools.cxx |   10 --
 2 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit f17489f80020dfd7a9de66c0d580dcf23f7d3c09
Author: Caolán McNamara 
Date:   Thu Apr 13 09:26:12 2017 +0100

ofz: fix leak

this is still an ugly beast, but at least its new/delete on the same
type now

Change-Id: I7560eb30c2a43f2cf56a956144fbec66d7d163a6

diff --git a/svx/inc/sdr/properties/itemsettools.hxx 
b/svx/inc/sdr/properties/itemsettools.hxx
index cef08ef4907f..0e1f760e0777 100644
--- a/svx/inc/sdr/properties/itemsettools.hxx
+++ b/svx/inc/sdr/properties/itemsettools.hxx
@@ -21,6 +21,7 @@
 #define INCLUDED_SVX_INC_SDR_PROPERTIES_ITEMSETTOOLS_HXX
 
 #include 
+#include 
 
 class SdrObject;
 class SfxItemSet;
@@ -34,14 +35,17 @@ namespace sdr
 {
 class ItemChangeBroadcaster
 {
-sal_uInt32  mnCount;
+boolmbSingleRect;
 void*   mpData;
 
 public:
 explicit ItemChangeBroadcaster(const SdrObject& rObj);
 ~ItemChangeBroadcaster();
 
-sal_uInt32 GetRectangleCount() const {  return mnCount; }
+sal_uInt32 GetRectangleCount() const
+{
+return mbSingleRect ? 1 : 
static_cast(mpData)->size();
+}
 const tools::Rectangle& GetRectangle(sal_uInt32 nIndex) const;
 };
 } // end of namespace properties
diff --git a/svx/source/sdr/properties/itemsettools.cxx 
b/svx/source/sdr/properties/itemsettools.cxx
index 942b5715ce68..b3cc64875edc 100644
--- a/svx/source/sdr/properties/itemsettools.cxx
+++ b/svx/source/sdr/properties/itemsettools.cxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -53,18 +52,18 @@ namespace sdr
 }
 }
 
-mnCount = static_cast(mpData)->size();
+mbSingleRect = false;
 }
 else
 {
 mpData = new tools::Rectangle(rObj.GetLastBoundRect());
-mnCount = 1L;
+mbSingleRect = true;
 }
 }
 
 ItemChangeBroadcaster::~ItemChangeBroadcaster()
 {
-if(mnCount > 1)
+if (!mbSingleRect)
 {
 delete static_cast(mpData);
 }
@@ -74,10 +73,9 @@ namespace sdr
 }
 }
 
-
 const tools::Rectangle& ItemChangeBroadcaster::GetRectangle(sal_uInt32 
nIndex) const
 {
-if(mnCount > 1)
+if (!mbSingleRect)
 {
 return (*static_cast(mpData))[nIndex];
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-04-07 Thread Marco Cecchetti
 svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx|2 ++
 svx/source/sdr/contact/viewcontactofsdrole2obj.cxx |7 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 5991304ede33b112b7700b2b9f0e18f6c523a0e8
Author: Marco Cecchetti 
Date:   Fri Apr 7 11:58:52 2017 +0200

LOK - Calc: charts are misplaced

We need to update the transformation primitive wrapping the chart when
the grid offset is changed.

Change-Id: I42179fdc7cc806c5757a125881f08279767ccbcc
Reviewed-on: https://gerrit.libreoffice.org/36255
Tested-by: Jenkins 
Reviewed-by: Jan Holesovsky 

diff --git a/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx 
b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
index 8d94c6115aa6..a00b95b1661d 100644
--- a/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
+++ b/svx/inc/sdr/contact/viewcontactofsdrole2obj.hxx
@@ -33,6 +33,8 @@ class ViewContactOfSdrOle2Obj : public ViewContactOfSdrRectObj
 private:
 // #i123539# allow local buffering of chart data (if chart)
 drawinglayer::primitive2d::Primitive2DReference mxChartContent;
+// used to check if we need to re-calc the transformation
+Point maGridOffset;
 
 protected:
 // Create a Object-Specific ViewObjectContact, set ViewContact and
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx 
b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
index 874b982c1dbf..d70b9b48761a 100644
--- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
@@ -100,12 +100,17 @@ drawinglayer::primitive2d::Primitive2DContainer 
ViewContactOfSdrOle2Obj::createP
 // #i123539# allow buffering and reuse of local chart data to not need 
to rebuild it
 // on every ViewObjectContact::getPrimitive2DSequence call. : Not 
needed for
 // aw080, there this mechanism alraedy works differently
-if(mxChartContent.is())
+if(mxChartContent.is()
+// check if we need to update the transformation primitive 
wrapping the chart
+&& maGridOffset == GetOle2Obj().GetGridOffset())
 {
 xContent = mxChartContent;
 }
 else
 {
+// update grid offset
+const_cast< ViewContactOfSdrOle2Obj* >(this)->maGridOffset = 
GetOle2Obj().GetGridOffset();
+
 // try to get chart primitives and chart range directly from 
xChartModel
 basegfx::B2DRange aChartContentRange;
 const drawinglayer::primitive2d::Primitive2DContainer 
aChartSequence(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-03-25 Thread Andrea Gelmini
 svx/inc/sdr/contact/viewcontactofgraphic.hxx|2 +-
 svx/inc/sdr/properties/attributeproperties.hxx  |2 +-
 svx/source/accessibility/AccessibleControlShape.cxx |2 +-
 svx/source/customshapes/EnhancedCustomShapeGeometry.cxx |2 +-
 svx/source/dialog/dlgctl3d.cxx  |2 +-
 svx/source/dialog/docrecovery.cxx   |2 +-
 svx/source/dialog/fntctrl.cxx   |2 +-
 svx/source/dialog/framelink.cxx |2 +-
 svx/source/engine3d/view3d.cxx  |2 +-
 svx/source/fmcomp/fmgridcl.cxx  |2 +-
 svx/source/fmcomp/fmgridif.cxx  |4 ++--
 svx/source/form/fmshell.cxx |2 +-
 svx/source/sdr/contact/viewcontactofvirtobj.cxx |2 +-
 svx/source/sdr/contact/viewobjectcontact.cxx|2 +-
 svx/source/sdr/overlay/overlaymanagerbuffered.cxx   |2 +-
 svx/source/svdraw/svdograf.cxx  |2 +-
 svx/source/unodraw/UnoGraphicExporter.cxx   |2 +-
 17 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 98f18df02357523a1c2c52efd36171f9328ab6d4
Author: Andrea Gelmini 
Date:   Fri Mar 24 12:52:52 2017 +0100

Fix typos

Change-Id: I77cf7fe3a57c031877facf5252b5a900526db48b
Reviewed-on: https://gerrit.libreoffice.org/35646
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/svx/inc/sdr/contact/viewcontactofgraphic.hxx 
b/svx/inc/sdr/contact/viewcontactofgraphic.hxx
index a64d392cdcdf..eee418387bd6 100644
--- a/svx/inc/sdr/contact/viewcontactofgraphic.hxx
+++ b/svx/inc/sdr/contact/viewcontactofgraphic.hxx
@@ -65,7 +65,7 @@ namespace sdr
 // #i102380#
 void flushGraphicObjects();
 
-// helpers for viusualisation state
+// helpers for visualisation state
 bool visualisationUsesPresObj() const;
 bool visualisationUsesDraft() const;
 
diff --git a/svx/inc/sdr/properties/attributeproperties.hxx 
b/svx/inc/sdr/properties/attributeproperties.hxx
index 87ec2975b8ae..b60794c05904 100644
--- a/svx/inc/sdr/properties/attributeproperties.hxx
+++ b/svx/inc/sdr/properties/attributeproperties.hxx
@@ -38,7 +38,7 @@ namespace sdr
 void ImpRemoveStyleSheet();
 
 protected:
-// the SytleSheet of this object
+// the StyleSheet of this object
 SfxStyleSheet*  mpStyleSheet;
 
 // create a new itemset
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx 
b/svx/source/accessibility/AccessibleControlShape.cxx
index c79a01a149c1..8a48a98faa6c 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -169,7 +169,7 @@ void AccessibleControlShape::Init()
 // way future-proof - as soon as an inner context appears which 
implements an additional interface,
 // we would need to adjust our implementation to support this new 
interface, too. Bad idea.
 
-// The usual solution for such a problem is aggregation. Aggregation 
means using UNO's own meachnisms
+// The usual solution for such a problem is aggregation. Aggregation 
means using UNO's own mechanism
 // for merging an inner with an outer component, and get a component 
which behaves as it is exactly one.
 // This is what XAggregation is for. Unfortunately, aggregation 
requires _exact_ control over the ref count
 // of the inner object, which we do not have at all.
diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx 
b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
index 9608dc454fed..c2f8109af231 100644
--- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
@@ -6743,7 +6743,7 @@ static const SvxMSDffCalculationData 
mso_sptTextArchCurveCalc[] =
 };
 static const sal_uInt16 mso_sptTextArchUpCurveSegm[] =
 {
-0xA504, 0x8000  // clockwíse arc
+0xA504, 0x8000  // clockwise arc
 };
 static const SvxMSDffHandle mso_sptTextArchUpCurveHandle[] =
 {
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index cd103ce9850e..80249e75f8eb 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -614,7 +614,7 @@ void Svx3DLightControl::Tracking( const TrackingEvent& 
rTEvt )
 }
 else
 {
-// intercation start, save values
+// interaction start, save values
 GetPosition(mfSaveActionStartHor, mfSaveActionStartVer);
 }
 
diff --git a/svx/source/dialog/docrecovery.cxx 
b/svx/source/dialog/docrecovery.cxx
index 

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

2016-11-08 Thread Gabor Kelemen
 svx/inc/galtheme.hrc |  117 
 svx/source/gallery2/galtheme.src |  520 ---
 2 files changed, 6 insertions(+), 631 deletions(-)

New commits:
commit bd93f1a5dd0bde62afa9066b417dc11789c789d2
Author: Gabor Kelemen 
Date:   Tue Nov 8 13:19:54 2016 +0100

Remove obsolete OxygenOffice strings

These belonged to extra galleries, introduced in
49d5bdcf4d516b21721f1ed6d313ea4a170d39eb
I missed to remove these in
8dc38d9ded92960eda46343b67da8a8b95404b5a

Change-Id: I32c649d56053b32f2c2993aeda51425d7586c9b7
Reviewed-on: https://gerrit.libreoffice.org/30698
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/svx/inc/galtheme.hrc b/svx/inc/galtheme.hrc
index 2ee93f7..68ec140 100644
--- a/svx/inc/galtheme.hrc
+++ b/svx/inc/galtheme.hrc
@@ -73,117 +73,12 @@
 #define RID_GALLERYSTR_THEME_FONTWORK   
(RID_GALLERYSTR_THEME_START + 37)
 #define RID_GALLERYSTR_THEME_FONTWORK_VERTICAL  
(RID_GALLERYSTR_THEME_START + 38)
 
-#define RID_GALLERYSTR_THEME_SHAPES_POLYGONS
(RID_GALLERYSTR_THEME_START + 39)
-#define RID_GALLERYSTR_THEME_SHAPES_1(RID_GALLERYSTR_THEME_START + 
40)
-#define RID_GALLERYSTR_THEME_SHAPES_2(RID_GALLERYSTR_THEME_START + 
41)
-#define RID_GALLERYSTR_THEME_ANIMALS(RID_GALLERYSTR_THEME_START + 
42)
-#define RID_GALLERYSTR_THEME_CARS(RID_GALLERYSTR_THEME_START + 43)
-#define RID_GALLERYSTR_THEME_BUGS(RID_GALLERYSTR_THEME_START + 44)
-#define RID_GALLERYSTR_THEME_CISCO_OTHER
(RID_GALLERYSTR_THEME_START + 45)
-#define RID_GALLERYSTR_THEME_CISCO_MEDIA
(RID_GALLERYSTR_THEME_START + 46)
-#define RID_GALLERYSTR_THEME_CISCO_PRODUCTS
(RID_GALLERYSTR_THEME_START + 47)
-#define RID_GALLERYSTR_THEME_CISCO_WAN_LAN
(RID_GALLERYSTR_THEME_START + 48)
-#define RID_GALLERYSTR_THEME_DOMINO_USUAL
(RID_GALLERYSTR_THEME_START + 49)
-#define RID_GALLERYSTR_THEME_DOMINO_NUMBERED
(RID_GALLERYSTR_THEME_START + 50)
-#define RID_GALLERYSTR_THEME_ELECTRONICS_PARTS_1
(RID_GALLERYSTR_THEME_START + 51)
-#define RID_GALLERYSTR_THEME_ELECTRONICS_PARTS_2
(RID_GALLERYSTR_THEME_START + 52)
-#define RID_GALLERYSTR_THEME_ELECTRONICS_PARTS_3
(RID_GALLERYSTR_THEME_START + 53)
-#define RID_GALLERYSTR_THEME_ELECTRONICS_PARTS_4
(RID_GALLERYSTR_THEME_START + 54)
-#define RID_GALLERYSTR_THEME_ELECTRONICS_CIRCUIT
(RID_GALLERYSTR_THEME_START + 55)
-#define RID_GALLERYSTR_THEME_ELECTRONICS_SIGNS
(RID_GALLERYSTR_THEME_START + 56)
-#define RID_GALLERYSTR_THEME_ELECTRONICS_GAUGES
(RID_GALLERYSTR_THEME_START + 57)
-#define RID_GALLERYSTR_THEME_PEOPLE_1(RID_GALLERYSTR_THEME_START + 
58)
-#define RID_GALLERYSTR_THEME_ARCHITECTURE_OVERLAY
(RID_GALLERYSTR_THEME_START + 59)
-#define RID_GALLERYSTR_THEME_ARCHITECTURE_FURNITURES
(RID_GALLERYSTR_THEME_START + 60)
-#define RID_GALLERYSTR_THEME_ARCHITECTURE_BUILDINGS
(RID_GALLERYSTR_THEME_START + 61)
-#define RID_GALLERYSTR_THEME_ARCHITECTURE_BATHROOM_KITCHEN
(RID_GALLERYSTR_THEME_START + 62)
-#define RID_GALLERYSTR_THEME_ARCHITECTURE_KITCHEN
(RID_GALLERYSTR_THEME_START + 63)
-#define RID_GALLERYSTR_THEME_ARCHITECTURE_WINDOWS_DOORS
(RID_GALLERYSTR_THEME_START + 64)
-#define RID_GALLERYSTR_THEME_FLOWCHARTS_1
(RID_GALLERYSTR_THEME_START + 65)
-#define RID_GALLERYSTR_THEME_FLOWCHARTS_2
(RID_GALLERYSTR_THEME_START + 66)
-#define RID_GALLERYSTR_THEME_FORALSTUDIOA
(RID_GALLERYSTR_THEME_START + 67)
-#define RID_GALLERYSTR_THEME_PHOTOS_FAUNA
(RID_GALLERYSTR_THEME_START + 68)
-#define RID_GALLERYSTR_THEME_PHOTOS_BUILDINGS
(RID_GALLERYSTR_THEME_START + 69)
-#define RID_GALLERYSTR_THEME_PHOTOS_PLANTS
(RID_GALLERYSTR_THEME_START + 70)
-#define RID_GALLERYSTR_THEME_PHOTOS_STATUES
(RID_GALLERYSTR_THEME_START + 71)
-#define RID_GALLERYSTR_THEME_PHOTOS_LANDSCAPES
(RID_GALLERYSTR_THEME_START + 72)
-#define RID_GALLERYSTR_THEME_PHOTOS_CITIES
(RID_GALLERYSTR_THEME_START + 73)
-#define RID_GALLERYSTR_THEME_PHOTOS_FLOWERS
(RID_GALLERYSTR_THEME_START + 74)
-#define RID_GALLERYSTR_THEME_THERAPEUTICS_GENERAL
(RID_GALLERYSTR_THEME_START + 75)
-#define RID_GALLERYSTR_THEME_WEATHER(RID_GALLERYSTR_THEME_START + 
76)
-#define RID_GALLERYSTR_THEME_VECHILES(RID_GALLERYSTR_THEME_START + 
77)
-#define RID_GALLERYSTR_THEME_SIGNS(RID_GALLERYSTR_THEME_START + 78)
-#define RID_GALLERYSTR_THEME_BLUE_MAN(RID_GALLERYSTR_THEME_START + 
79)
-#define RID_GALLERYSTR_THEME_CHEMISTRY_AMINO_ACIDS
(RID_GALLERYSTR_THEME_START + 80)
-#define RID_GALLERYSTR_THEME_LOGICAL_SIGNS 

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

2016-10-12 Thread Noel Grandin
 svx/inc/dragmt3d.hxx  |6 +++---
 svx/inc/sdr/overlay/overlayhelpline.hxx   |2 +-
 svx/inc/sdr/overlay/overlaymanagerbuffered.hxx|2 +-
 svx/inc/sdr/overlay/overlayrollingrectangle.hxx   |2 +-
 svx/inc/sdr/overlay/overlaytools.hxx  |4 ++--
 svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx |4 ++--
 svx/inc/sxmoitm.hxx   |2 +-
 svx/inc/xpolyimp.hxx  |2 +-
 svx/source/form/fmvwimp.cxx   |2 +-
 svx/source/inc/filtnav.hxx|4 ++--
 svx/source/inc/fmexpl.hxx |2 +-
 svx/source/inc/fmundo.hxx |2 +-
 svx/source/inc/gridcell.hxx   |2 +-
 svx/source/svdraw/svdibrow.cxx|2 +-
 svx/source/svdraw/svdmrkv.cxx |2 +-
 svx/source/table/celltypes.hxx|2 +-
 svx/source/tbxctrls/tbcontrl.cxx  |2 +-
 17 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit c2808e3178b28528c23557321683b10b6ab5371f
Author: Noel Grandin 
Date:   Tue Oct 11 11:27:13 2016 +0200

loplugin:countusersofdefaultparams in svx

Change-Id: I610d8347129ac25420730ed7bf2855a5bdd0120f
Reviewed-on: https://gerrit.libreoffice.org/29692
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/svx/inc/dragmt3d.hxx b/svx/inc/dragmt3d.hxx
index 5097e0a..1bf8f9b 100644
--- a/svx/inc/dragmt3d.hxx
+++ b/svx/inc/dragmt3d.hxx
@@ -66,7 +66,7 @@ public:
 E3dDragMethod(
 SdrDragView ,
 const SdrMarkList& rMark,
-E3dDragConstraint eConstr = E3dDragConstraint::XYZ,
+E3dDragConstraint eConstr,
 bool bFull = false);
 
 virtual void TakeSdrDragComment(OUString& rStr) const override;
@@ -88,7 +88,7 @@ public:
 E3dDragRotate(
 SdrDragView ,
 const SdrMarkList& rMark,
-E3dDragConstraint eConstr = E3dDragConstraint::XYZ,
+E3dDragConstraint eConstr,
 bool bFull = false);
 
 virtual void MoveSdrDrag(const Point& rPnt) override;
@@ -105,7 +105,7 @@ public:
 E3dDragMove(
 SdrDragView ,
 const SdrMarkList& rMark,
-SdrHdlKind eDrgHdl = SdrHdlKind::Move,
+SdrHdlKind eDrgHdl,
 E3dDragConstraint eConstr = E3dDragConstraint::XYZ,
 bool bFull = false);
 
diff --git a/svx/inc/sdr/overlay/overlayhelpline.hxx 
b/svx/inc/sdr/overlay/overlayhelpline.hxx
index 7329dcf..4778312 100644
--- a/svx/inc/sdr/overlay/overlayhelpline.hxx
+++ b/svx/inc/sdr/overlay/overlayhelpline.hxx
@@ -40,7 +40,7 @@ namespace sdr
 public:
 explicit OverlayHelplineStriped(
 const basegfx::B2DPoint& rBasePos,
-SdrHelpLineKind eNewKind = SdrHelpLineKind::Point);
+SdrHelpLineKind eNewKind);
 virtual ~OverlayHelplineStriped() override;
 
 // dat read access
diff --git a/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx 
b/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx
index 42fcf21..6712e49 100644
--- a/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx
+++ b/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx
@@ -62,7 +62,7 @@ namespace sdr
 
 OverlayManagerBuffered(
 OutputDevice& rOutputDevice,
-bool bRefreshWithPreRendering = false);
+bool bRefreshWithPreRendering);
 virtual ~OverlayManagerBuffered() override;
 
 public:
diff --git a/svx/inc/sdr/overlay/overlayrollingrectangle.hxx 
b/svx/inc/sdr/overlay/overlayrollingrectangle.hxx
index 2cab780..7b00d90 100644
--- a/svx/inc/sdr/overlay/overlayrollingrectangle.hxx
+++ b/svx/inc/sdr/overlay/overlayrollingrectangle.hxx
@@ -46,7 +46,7 @@ namespace sdr
 OverlayRollingRectangleStriped(
 const basegfx::B2DPoint& rBasePos,
 const basegfx::B2DPoint& rSecondPos,
-bool bExtendedLines = false,
+bool bExtendedLines,
 bool bShowBounds = true);
 virtual ~OverlayRollingRectangleStriped() override;
 
diff --git a/svx/inc/sdr/overlay/overlaytools.hxx 
b/svx/inc/sdr/overlay/overlaytools.hxx
index 224135b3..197cc71 100644
--- a/svx/inc/sdr/overlay/overlaytools.hxx
+++ b/svx/inc/sdr/overlay/overlaytools.hxx
@@ -95,8 +95,8 @@ namespace drawinglayer
 const basegfx::B2DPoint& rBasePosition,
 sal_uInt16 nCenterX,
 sal_uInt16 nCenterY,
-double fShearX = 0.0,
-double fRotation = 0.0);
+double fShearX,
+double fRotation);
 
 // data access
 const BitmapEx& getBitmapEx() const { return maBitmapEx; }
diff --git a/svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx 

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

2016-10-06 Thread Caolán McNamara
 svx/inc/helpid.hrc|   14 -
 svx/source/sidebar/EmptyPanel.cxx |1 
 svx/source/sidebar/area/AreaPropertyPanel.cxx |1 
 svx/source/sidebar/area/AreaPropertyPanel.hrc |   52 --
 svx/source/sidebar/area/AreaPropertyPanel.src |2 
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |1 
 6 files changed, 1 insertion(+), 70 deletions(-)

New commits:
commit 3e0fa1ebbc9fc002af3164b40f11239726920fd9
Author: Caolán McNamara 
Date:   Thu Oct 6 11:42:53 2016 +0100

drop unused hids and hrcs

Change-Id: Id9a49391de6283ee15cb6e12564c3f57762ddffc

diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc
index afa0645..276ec15 100644
--- a/svx/inc/helpid.hrc
+++ b/svx/inc/helpid.hrc
@@ -74,20 +74,6 @@
 #define HID_VALUESET_EXTRUSION_LIGHTING   
"SVX_HID_VALUESET_EXTRUSION_LIGHTING"
 #define HID_XMLSEC_CALL   
"SVX_HID_XMLSEC_CALL"
 
-#define HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES 
"SVX_HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES"
-#define HID_PPROPERTYPANEL_AREA_LB_FILL_ATTR 
"SVX_HID_PPROPERTYPANEL_AREA_LB_FILL_ATTR"
-#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_CENTER_X 
"SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_CENTER_X"
-#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_CENTER_Y 
"SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_CENTER_Y"
-#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_ANGLE 
"SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_ANGLE"
-#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_SVALUE 
"SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_SVALUE"
-#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_EVALUE 
"SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_EVALUE"
-#define HID_PPROPERTYPANEL_AREA_MTR_TRGR_BORDER 
"SVX_HID_PPROPERTYPANEL_AREA_MTR_TRGR_BORDER"
-#define HID_PPROPERTYPANEL_AREA_BTN_LEFT_SECOND 
"SVX_HID_PPROPERTYPANEL_AREA_BTN_LEFT_SECOND"
-#define HID_PPROPERTYPANEL_AREA_BTN_RIGHT_FIRST 
"SVX_HID_PPROPERTYPANEL_AREA_BTN_RIGHT_FIRST"
-
-#define HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES 
"SVX_HID_PPROPERTYPANEL_AREA_LB_FILL_TYPES"
-#define HID_PPROPERTYPANEL_AREA_LB_FILL_ATTR 
"SVX_HID_PPROPERTYPANEL_AREA_LB_FILL_ATTR"
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/sidebar/EmptyPanel.cxx 
b/svx/source/sidebar/EmptyPanel.cxx
index c5ef647..e436ba8 100644
--- a/svx/source/sidebar/EmptyPanel.cxx
+++ b/svx/source/sidebar/EmptyPanel.cxx
@@ -19,7 +19,6 @@
 
 #include "EmptyPanel.hxx"
 #include "EmptyPanel.hrc"
-#include "area/AreaPropertyPanel.hrc"
 #include "svx/dialogs.hrc"
 #include "svx/dialmgr.hxx"
 
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx 
b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index e5f762b..2535e56 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -20,7 +20,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hrc 
b/svx/source/sidebar/area/AreaPropertyPanel.hrc
deleted file mode 100644
index fabe373..000
--- a/svx/source/sidebar/area/AreaPropertyPanel.hrc
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "svx/dialogs.hrc"
-
-#define TBI_LEFT1
-#define TBI_RIGHT   1
-
-#define FT_TRGR_CENTER_X9
-#define MTR_TRGR_CENTER_X   10
-#define FT_TRGR_CENTER_Y11
-#define MTR_TRGR_CENTER_Y   12
-#define FT_TRGR_ANGLE   13
-#define MTR_TRGR_ANGLE  14
-#define FT_TRGR_START_VALUE 15
-#define MTR_TRGR_START_VALUE 16
-#define FT_TRGR_END_VALUE   17
-#define MTR_TRGR_END_VALUE  18
-#define FT_TRGR_BORDER  19
-#define MTR_TRGR_BORDER 20
-
-#define BTN_LEFT_SECOND 22
-#define BTN_RIGHT_FIRST 23
-
-#define FIXED_TEXT_HEIGHT   9
-#define CONTROL_WIDTH   45
-#define ROTATE_BUTTON_SPACING  15
-#define POP_WIDTH   
2*POPUPPANEL_MARGIN_HORIZONTAL+2*CONTROL_WIDTH+CONTROL_SPACING_HORIZONTAL
-#define POP_HEIGHT  2*POPUPPANEL_MARGIN_VERTICAL + 4*(FIXED_TEXT_HEIGHT + 
TEXT_CONTROL_SPACING_VERTICAL + MBOX_HEIGHT ) + 

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

2016-07-27 Thread Noel Grandin
 svx/inc/galbrws2.hxx  |4 ++--
 svx/inc/svdibrow.hxx  |2 +-
 svx/source/fmcomp/gridcell.cxx|2 +-
 svx/source/form/ParseContext.cxx  |6 +++---
 svx/source/form/filtnav.cxx   |2 +-
 svx/source/form/fmshell.cxx   |4 ++--
 svx/source/form/fmtextcontrolshell.cxx|2 +-
 svx/source/form/fmvwimp.cxx   |2 +-
 svx/source/form/navigatortree.cxx |4 ++--
 svx/source/form/navigatortreemodel.cxx|2 +-
 svx/source/gallery2/galbrws2.cxx  |2 +-
 svx/source/inc/filtnav.hxx|2 +-
 svx/source/inc/fmexpl.hxx |6 +++---
 svx/source/inc/fmshimp.hxx|4 ++--
 svx/source/inc/fmtextcontrolshell.hxx |2 +-
 svx/source/inc/fmvwimp.hxx|8 
 svx/source/inc/gridcell.hxx   |2 +-
 svx/source/svdraw/svdibrow.cxx|2 +-
 svx/source/table/tablelayouter.hxx|4 ++--
 svx/source/table/tablemodel.cxx   |2 +-
 svx/source/table/tablerow.hxx |2 +-
 svx/source/tbxctrls/extrusioncontrols.cxx |6 +++---
 svx/source/tbxctrls/extrusioncontrols.hxx |4 ++--
 svx/source/tbxctrls/tbunocontroller.cxx   |4 ++--
 24 files changed, 40 insertions(+), 40 deletions(-)

New commits:
commit cb4787c36a300d6783da28540da737dbad951070
Author: Noel Grandin 
Date:   Wed Jul 27 12:01:17 2016 +0200

loplugin:countusersofdefaultparams in svx

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

diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index dd3d0b0..d2dc8f0 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -169,8 +169,8 @@ public:
 
 void Execute( sal_uInt16 nId );
 void Dispatch( sal_uInt16 nId,
-   const css::uno::Reference< css::frame::XDispatch > 
 = css::uno::Reference< css::frame::XDispatch >(),
-   const css::util::URL  = css::util::URL() );
+   const css::uno::Reference< css::frame::XDispatch > 
,
+   const css::util::URL  );
 
 DECL_STATIC_LINK_TYPED( GalleryBrowser2, AsyncDispatch_Impl, void*, void );
 };
diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index c64a5e2..5e16c69 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -114,7 +114,7 @@ public:
 virtual void dispose() override;
 virtual void Resize() override;
 virtual void GetFocus() override;
-void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* 
p2ndSet=nullptr) { aBrowse->SetAttributes(pAttr,p2ndSet); }
+void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet) { 
aBrowse->SetAttributes(pAttr,p2ndSet); }
 SdrItemBrowserControl *GetBrowserControl() { return aBrowse.get(); }
 };
 
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 5381909..2b63e5a 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -604,7 +604,7 @@ void DbCellControl::implDoPropertyListening(const OUString& 
_rPropertyName, bool
 
 void DbCellControl::doPropertyListening(const OUString& _rPropertyName)
 {
-implDoPropertyListening( _rPropertyName );
+implDoPropertyListening( _rPropertyName, true );
 }
 
 static void 
lcl_clearBroadCaster(rtl::Reference<::comphelper::OPropertyChangeMultiplexer>& 
_pBroadcaster)
diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx
index 590b374..758412c 100644
--- a/svx/source/form/ParseContext.cxx
+++ b/svx/source/form/ParseContext.cxx
@@ -159,7 +159,7 @@ namespace
 return s_nCounter;
 }
 
-OSystemParseContext* getSharedContext(OSystemParseContext* _pContext = 
nullptr,bool _bSet = false)
+OSystemParseContext* getSharedContext(OSystemParseContext* _pContext, bool 
_bSet)
 {
 static OSystemParseContext* s_pSharedContext = nullptr;
 if ( _pContext && !s_pSharedContext )
@@ -183,7 +183,7 @@ OParseContextClient::OParseContextClient()
 ::osl::MutexGuard aGuard( getSafteyMutex() );
 if ( 1 == osl_atomic_increment( () ) )
 {   // first instance
-getSharedContext( new OSystemParseContext );
+getSharedContext( new OSystemParseContext, false );
 }
 }
 
@@ -199,7 +199,7 @@ OParseContextClient::~OParseContextClient()
 
 const OSystemParseContext* OParseContextClient::getParseContext() const
 {
-return getSharedContext();
+return getSharedContext(nullptr, false);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 2b9beba..eba73ac 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1767,7 +1767,7 @@ void FmFilterNavigator::KeyInput(const KeyEvent& rKEvt)
 
 

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

2016-06-30 Thread Samuel Mehrbrodt
 svx/inc/tbunosearchcontrollers.hxx |2 +
 svx/source/tbxctrls/tbunosearchcontrollers.cxx |   29 +++--
 2 files changed, 11 insertions(+), 20 deletions(-)

New commits:
commit 6f34143dfb061cb8dda76b9e4f449f1e6b4fc181
Author: Samuel Mehrbrodt 
Date:   Wed Jun 29 22:50:22 2016 +0200

tdf#89616 Find toolbar: Activate search arrows when input has text

Not only when input is modfified

Change-Id: Ic6b94dbfba34ec6eb88c9c385aaa36a7bac19de7
Reviewed-on: https://gerrit.libreoffice.org/26782
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/svx/inc/tbunosearchcontrollers.hxx 
b/svx/inc/tbunosearchcontrollers.hxx
index efa07be..5b38ff7 100644
--- a/svx/inc/tbunosearchcontrollers.hxx
+++ b/svx/inc/tbunosearchcontrollers.hxx
@@ -117,6 +117,8 @@ public:
 
 private:
 
+void textfieldChanged();
+
 VclPtr m_pFindTextFieldControl;
 
 sal_uInt16 m_nDownSearchId; // item position of findbar
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx 
b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index f050ca6..77c7474 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -450,15 +450,9 @@ void SAL_CALL FindTextToolbarController::initialize( const 
css::uno::Sequence< c
 {
 OUString sItemCommand = pToolBox->GetItemCommand(i);
 if ( sItemCommand == COMMAND_DOWNSEARCH )
-{
-pToolBox->EnableItem(i, false);
 m_nDownSearchId = i;
-}
 else if ( sItemCommand == COMMAND_UPSEARCH )
-{
-pToolBox->EnableItem(i, false);
 m_nUpSearchId = i;
-}
 }
 }
 
@@ -497,29 +491,24 @@ void SAL_CALL FindTextToolbarController::statusChanged( 
const css::frame::Featur
 {
 
m_pFindTextFieldControl->Remember_Impl(m_pFindTextFieldControl->GetText());
 }
+// enable up/down buttons in case there is already text (from the search 
history)
+textfieldChanged();
 }
 
 IMPL_LINK_NOARG_TYPED(FindTextToolbarController, EditModifyHdl, Edit&, void)
 {
+textfieldChanged();
+}
+
+void FindTextToolbarController::textfieldChanged() {
 // enable or disable item DownSearch/UpSearch of findbar
 vcl::Window* pWindow = VCLUnoHelper::GetWindow( getParent() );
 ToolBox* pToolBox = static_cast(pWindow);
 if ( pToolBox && m_pFindTextFieldControl )
 {
-if (!m_pFindTextFieldControl->GetText().isEmpty())
-{
-if ( !pToolBox->IsItemEnabled(m_nDownSearchId) )
-pToolBox->EnableItem(m_nDownSearchId);
-if ( !pToolBox->IsItemEnabled(m_nUpSearchId) )
-pToolBox->EnableItem(m_nUpSearchId);
-}
-else
-{
-if ( pToolBox->IsItemEnabled(m_nDownSearchId) )
-pToolBox->EnableItem(m_nDownSearchId, false);
-if ( pToolBox->IsItemEnabled(m_nUpSearchId) )
-pToolBox->EnableItem(m_nUpSearchId, false);
-}
+bool enableButtons = !m_pFindTextFieldControl->GetText().isEmpty();
+pToolBox->EnableItem(m_nDownSearchId, enableButtons);
+pToolBox->EnableItem(m_nUpSearchId, enableButtons);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-02-04 Thread Michael Stahl
 svx/inc/pch/precompiled_svx.hxx  |1 -
 svx/inc/pch/precompiled_svxcore.hxx  |1 -
 svx/source/core/extedit.cxx  |4 ++--
 svx/source/gallery2/GalleryControl.cxx   |9 -
 svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx |3 +--
 svx/source/sidebar/PanelFactory.cxx  |1 -
 svx/source/sidebar/area/AreaPropertyPanel.cxx|1 -
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx|3 +--
 svx/source/sidebar/line/LinePropertyPanel.cxx|1 -
 svx/source/sidebar/line/LinePropertyPanelBase.cxx|3 +--
 svx/source/sidebar/line/LineWidthPopup.cxx   |3 +--
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx   |2 +-
 svx/source/sidebar/shadow/ShadowPropertyPanel.cxx|1 -
 svx/source/sidebar/styles/StylesPropertyPanel.cxx|3 ---
 svx/source/sidebar/text/TextCharacterSpacingPopup.cxx|3 +--
 svx/source/sidebar/text/TextPropertyPanel.cxx|5 ++---
 svx/source/table/tabledesign.cxx |7 +++
 17 files changed, 17 insertions(+), 34 deletions(-)

New commits:
commit 0835f5b80cecee7ec4326e4ab295f520112052fb
Author: Michael Stahl 
Date:   Thu Feb 4 13:01:15 2016 +0100

svx: replace boost::bind with C++11 lambda

Change-Id: I68f9559fab9a344979dc39b81f3738877483b5fe
Reviewed-on: https://gerrit.libreoffice.org/22106
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 4c74ffb..b906f30 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -44,7 +44,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/inc/pch/precompiled_svxcore.hxx 
b/svx/inc/pch/precompiled_svxcore.hxx
index fbe508e..70a6671 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -52,7 +52,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx
index 3f9c22b..1267671 100644
--- a/svx/source/core/extedit.cxx
+++ b/svx/source/core/extedit.cxx
@@ -29,7 +29,7 @@
 #include 
 #include 
 #include 
-#include 
+
 #include 
 
 #include 
@@ -66,7 +66,7 @@ void ExternalToolEdit::StartListeningEvent()
 //Start an event listener implemented via VCL timeout
 assert(!m_pChecker.get());
 m_pChecker.reset(new FileChangedChecker(
-m_aFileName, ::boost::bind(, this)));
+m_aFileName, [this] () { return HandleCloseEvent(this); }));
 }
 
 // self-destructing thread to make shell execute async
diff --git a/svx/source/gallery2/GalleryControl.cxx 
b/svx/source/gallery2/GalleryControl.cxx
index 65a8629..f6c1136 100644
--- a/svx/source/gallery2/GalleryControl.cxx
+++ b/svx/source/gallery2/GalleryControl.cxx
@@ -29,8 +29,6 @@
 #include 
 #include 
 
-#include 
-
 namespace svx { namespace sidebar {
 
 static const sal_Int32 gnInitialVerticalSplitPosition (150);
@@ -44,13 +42,14 @@ GalleryControl::GalleryControl (
 
   this,
   WB_HSCROLL,
-  ::boost::bind(::InitSettings, this))),
+  [this] () { return this->InitSettings(); })),
   mpBrowser1(VclPtr::Create(
 
   this,
   mpGallery,
-  ::boost::bind(::GalleryKeyInput,this,_1,_2),
-  ::boost::bind(::ThemeSelectionHasChanged, this))),
+  [this] (KeyEvent const& rEvent, vcl::Window *const pWindow)
+  { return this->GalleryKeyInput(rEvent, pWindow); },
+  [this] () { return this->ThemeSelectionHasChanged(); })),
   mpBrowser2(VclPtr::Create(this, mpGallery)),
   maLastSize(GetOutputSizePixel()),
   mbIsInitialResize(true)
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx 
b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 5500bdf..cc57902 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -56,7 +56,6 @@
 #include 
 #include 
 
-#include 
 #include 
 
 /*
@@ -1036,7 +1035,7 @@ namespace sdr { namespace contact {
 }
 
 m_bCreatingControl = true;
-::comphelper::ScopeGuard aGuard( ::boost::bind( lcl_resetFlag, 
::boost::ref( m_bCreatingControl ) ) );
+::comphelper::ScopeGuard aGuard([&] () { 
lcl_resetFlag(m_bCreatingControl); });
 
 if ( m_aControl.is() )
 {
diff --git a/svx/source/sidebar/PanelFactory.cxx 
b/svx/source/sidebar/PanelFactory.cxx
index 8cc30e6..004d33b 100644
--- a/svx/source/sidebar/PanelFactory.cxx
+++ b/svx/source/sidebar/PanelFactory.cxx
@@ -43,7 +43,6 @@
 #include 
 #include 
 
-#include 
 #include 
 
 using namespace css;
diff 

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

2015-09-18 Thread Caolán McNamara
 svx/inc/GalleryControl.hxx   |2 --
 svx/inc/pch/precompiled_svx.hxx  |2 --
 svx/inc/pch/precompiled_svxcore.hxx  |2 --
 svx/source/customshapes/EnhancedCustomShape2d.cxx|1 -
 svx/source/dialog/docrecovery.cxx|1 -
 svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx |1 -
 svx/source/sidebar/area/AreaPropertyPanel.hxx|1 -
 svx/source/sidebar/graphic/GraphicPropertyPanel.hxx  |1 -
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx  |1 -
 svx/source/sidebar/shadow/ShadowPropertyPanel.hxx|1 -
 svx/source/sidebar/styles/StylesPropertyPanel.hxx|1 -
 svx/source/table/tablelayouter.hxx   |1 -
 svx/source/unodraw/recoveryui.cxx|1 -
 xmloff/inc/pch/precompiled_xo.hxx|1 -
 14 files changed, 17 deletions(-)

New commits:
commit dbe21eede3309a9a1b428122d7a661eff2d6b75b
Author: Caolán McNamara 
Date:   Fri Sep 18 09:02:28 2015 +0100

boost->std

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

diff --git a/svx/inc/GalleryControl.hxx b/svx/inc/GalleryControl.hxx
index 268aba4..3238db1 100644
--- a/svx/inc/GalleryControl.hxx
+++ b/svx/inc/GalleryControl.hxx
@@ -24,8 +24,6 @@
 #include 
 #include "svx/svxdllapi.h"
 
-#include 
-
 class SfxBindings;
 
 class Gallery;
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 886c285..9efff8a 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -65,8 +65,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/inc/pch/precompiled_svxcore.hxx 
b/svx/inc/pch/precompiled_svxcore.hxx
index 99fa0de..cf4860d 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -96,8 +96,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 900a720..97e75d7 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -47,7 +47,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/dialog/docrecovery.cxx 
b/svx/source/dialog/docrecovery.cxx
index 0a9bd0b..84a8a0e 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -57,7 +57,6 @@
 #include 
 #include "svtools/treelistentry.hxx"
 #include 
-#include 
 
 namespace svx{
 namespace DocRecovery{
diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx 
b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index fff348d..542198a 100644
--- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
@@ -28,7 +28,6 @@
 #include 
 #include 
 #include 
-#include 
 
 
 using namespace com::sun::star;
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hxx 
b/svx/source/sidebar/area/AreaPropertyPanel.hxx
index 45f6bce..0806ffa 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.hxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.hxx
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx 
b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
index 3f43d3c..244cfe6 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 
 class FixedText;
 class MetricField;
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index e24b41b..d058bbd 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx 
b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
index da12099..6274188 100644
--- a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
+++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
@@ -13,7 +13,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/sidebar/styles/StylesPropertyPanel.hxx 
b/svx/source/sidebar/styles/StylesPropertyPanel.hxx
index 7408bdf..01a8bcb 100644
--- a/svx/source/sidebar/styles/StylesPropertyPanel.hxx
+++ b/svx/source/sidebar/styles/StylesPropertyPanel.hxx
@@ -7,7 +7,6 @@
 #include 
 #include 
 #include 
-#include 
 

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

2015-09-17 Thread Caolán McNamara
 svx/inc/GalleryControl.hxx   |2 --
 svx/inc/pch/precompiled_svx.hxx  |2 --
 svx/inc/pch/precompiled_svxcore.hxx  |2 --
 svx/source/customshapes/EnhancedCustomShape2d.cxx|1 -
 svx/source/dialog/docrecovery.cxx|1 -
 svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx |1 -
 svx/source/sidebar/area/AreaPropertyPanel.hxx|1 -
 svx/source/sidebar/graphic/GraphicPropertyPanel.hxx  |1 -
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx  |1 -
 svx/source/sidebar/shadow/ShadowPropertyPanel.hxx|1 -
 svx/source/sidebar/styles/StylesPropertyPanel.hxx|1 -
 svx/source/table/tablelayouter.hxx   |1 -
 svx/source/unodraw/recoveryui.cxx|1 -
 13 files changed, 16 deletions(-)

New commits:
commit 6d221b92bba77b0aad32b401106fbe08bc771e79
Author: Caolán McNamara 
Date:   Thu Sep 17 17:04:15 2015 +0100

unused headers

Change-Id: I0a9c174c9b67361f1502769239405eaf0a00adba

diff --git a/svx/inc/GalleryControl.hxx b/svx/inc/GalleryControl.hxx
index 268aba4..3238db1 100644
--- a/svx/inc/GalleryControl.hxx
+++ b/svx/inc/GalleryControl.hxx
@@ -24,8 +24,6 @@
 #include 
 #include "svx/svxdllapi.h"
 
-#include 
-
 class SfxBindings;
 
 class Gallery;
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 886c285..9efff8a 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -65,8 +65,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/inc/pch/precompiled_svxcore.hxx 
b/svx/inc/pch/precompiled_svxcore.hxx
index 99fa0de..cf4860d 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -96,8 +96,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 900a720..97e75d7 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -47,7 +47,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/dialog/docrecovery.cxx 
b/svx/source/dialog/docrecovery.cxx
index 0a9bd0b..84a8a0e 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -57,7 +57,6 @@
 #include 
 #include "svtools/treelistentry.hxx"
 #include 
-#include 
 
 namespace svx{
 namespace DocRecovery{
diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx 
b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index fff348d..542198a 100644
--- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
@@ -28,7 +28,6 @@
 #include 
 #include 
 #include 
-#include 
 
 
 using namespace com::sun::star;
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.hxx 
b/svx/source/sidebar/area/AreaPropertyPanel.hxx
index 45f6bce..0806ffa 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.hxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.hxx
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx 
b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
index 3f43d3c..244cfe6 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.hxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 
 class FixedText;
 class MetricField;
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index e24b41b..d058bbd 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx 
b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
index da12099..6274188 100644
--- a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
+++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
@@ -13,7 +13,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/sidebar/styles/StylesPropertyPanel.hxx 
b/svx/source/sidebar/styles/StylesPropertyPanel.hxx
index 7408bdf..01a8bcb 100644
--- a/svx/source/sidebar/styles/StylesPropertyPanel.hxx
+++ b/svx/source/sidebar/styles/StylesPropertyPanel.hxx
@@ -7,7 +7,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/svx/source/table/tablelayouter.hxx 
b/svx/source/table/tablelayouter.hxx
index 6db1486..03ba998 100644
--- a/svx/source/table/tablelayouter.hxx
+++ b/svx/source/table/tablelayouter.hxx
@@ -26,7 +26,6 @@
 #include 
 

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

2015-02-18 Thread Stephan Bergmann
 svx/inc/getallcharpropids.hxx  |   35 +++
 svx/source/svdraw/svdedtv1.cxx |1 +
 svx/source/table/cell.cxx  |3 +--
 3 files changed, 37 insertions(+), 2 deletions(-)

New commits:
commit cb3518f331a99ff9a3187286e9e2b695df1c0292
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Feb 19 08:54:09 2015 +0100

loplugin:externandnotdefined

Change-Id: I94271681ea4ec7617eaf706fb443ebb9d1b0bc15

diff --git a/svx/inc/getallcharpropids.hxx b/svx/inc/getallcharpropids.hxx
new file mode 100644
index 000..c52d41b
--- /dev/null
+++ b/svx/inc/getallcharpropids.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the License); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SVX_INC_GETALLCHARPROPIDS_HXX
+#define INCLUDED_SVX_INC_GETALLCHARPROPIDS_HXX
+
+#include sal/config.h
+
+#include vector
+
+#include sal/types.h
+
+class SfxItemSet;
+
+std::vectorsal_uInt16 GetAllCharPropIds(const SfxItemSet rSet);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 62c4cff..4a3cb0f 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -28,6 +28,7 @@
 #include tools/bigint.hxx
 #include vcl/msgbox.hxx
 
+#include getallcharpropids.hxx
 #include svdglob.hxx
 #include svx/svditer.hxx
 #include svx/svdstr.hrc
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 3468283..595f90a 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -42,6 +42,7 @@
 #include svx/unoshtxt.hxx
 #include svx/svdmodel.hxx
 
+#include getallcharpropids.hxx
 #include tableundo.hxx
 #include cell.hxx
 #include svx/unoshprp.hxx
@@ -139,8 +140,6 @@ SdrText* CellTextProvider::getText(sal_Int32 nIndex) const
 
 }
 
-extern std::vectorsal_uInt16 GetAllCharPropIds(const SfxItemSet rSet);
-
 namespace sdr
 {
 namespace properties
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-12-27 Thread Caolán McNamara
 svx/inc/galbrws2.hxx|4 +--
 svx/inc/gallery.hrc |8 --
 svx/source/gallery2/GalleryControl.cxx  |9 ++-
 svx/source/gallery2/GallerySplitter.cxx |   12 ++
 svx/source/gallery2/GallerySplitter.hxx |5 +---
 svx/source/gallery2/galbrws1.cxx|3 --
 svx/source/gallery2/galbrws1.hxx|1 
 svx/source/gallery2/galbrws2.cxx|4 +--
 svx/source/gallery2/gallery.src |   38 
 9 files changed, 13 insertions(+), 71 deletions(-)

New commits:
commit 03c95abe6b748d1155a62a9febcec96219bc3818
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Dec 26 10:05:05 2014 +

de-resource RID_SVXDLG_GALLERYBROWSER

Change-Id: I33df0c65d230ed13a5121555c8cf26a7bd27969a

diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index e431fd2..4a77603 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -152,8 +152,8 @@ public:
 
 public:
 
-GalleryBrowser2( vcl::Window* pParent, const ResId 
rResId, Gallery* pGallery );
-virtual ~GalleryBrowser2();
+GalleryBrowser2(vcl::Window* pParent, Gallery* pGallery);
+virtual ~GalleryBrowser2();
 
 voidSelectTheme( const OUString rThemeName );
 
diff --git a/svx/inc/gallery.hrc b/svx/inc/gallery.hrc
index 47cd183..a9f2484 100644
--- a/svx/inc/gallery.hrc
+++ b/svx/inc/gallery.hrc
@@ -23,9 +23,6 @@
 #include svx/dialogs.hrc
 #include galtheme.hrc
 
-// Dialoge
-#define RID_SVXDLG_GALLERYBROWSER   (RID_SVX_GALLERY_START + 5)
-
 // Gallery-Strings
 #define RID_SVXSTR_EXTFORMAT1_SYS   (RID_SVX_GALLERY_START + 15)
 #define RID_SVXSTR_EXTFORMAT1_UI(RID_SVX_GALLERY_START + 16)
@@ -88,11 +85,6 @@
 #define MN_PROPERTIES 23
 #define MN_ASSIGN_ID 24
 
-// Gallery Browser
-#define GALLERY_BROWSER11
-#define GALLERY_BROWSER22
-#define GALLERY_SPLITTER1
-
 #endif // _SVX_GALLERY_HRC
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/gallery2/GalleryControl.cxx 
b/svx/source/gallery2/GalleryControl.cxx
index 1498a79..5c3679e 100644
--- a/svx/source/gallery2/GalleryControl.cxx
+++ b/svx/source/gallery2/GalleryControl.cxx
@@ -38,24 +38,21 @@ static const sal_Int32 gnInitialVerticalSplitPosition (150);
 GalleryControl::GalleryControl (
 SfxBindings* /*pBindings*/,
 vcl::Window* pParentWindow)
-: Window(pParentWindow, GAL_RES(RID_SVXDLG_GALLERYBROWSER)),
+: Window(pParentWindow, WB_SIZEABLE|WB_MOVEABLE|WB_CLOSEABLE|WB_HIDE),
   mpGallery (Gallery::GetGalleryInstance()),
   mpSplitter(new GallerySplitter(
   this,
-  GAL_RES(GALLERY_SPLITTER),
+  WB_HSCROLL,
   ::boost::bind(GalleryControl::InitSettings, this))),
   mpBrowser1(new GalleryBrowser1(
   this,
-  GAL_RES(GALLERY_BROWSER1),
   mpGallery,
   ::boost::bind(GalleryControl::GalleryKeyInput,this,_1,_2),
   ::boost::bind(GalleryControl::ThemeSelectionHasChanged, this))),
-  mpBrowser2(new GalleryBrowser2(this, GAL_RES(GALLERY_BROWSER2), 
mpGallery)),
+  mpBrowser2(new GalleryBrowser2(this, mpGallery)),
   maLastSize(GetOutputSizePixel()),
   mbIsInitialResize(true)
 {
-FreeResource();
-
 mpBrowser1-SelectTheme(0);
 mpBrowser1-Show(true);
 
diff --git a/svx/source/gallery2/GallerySplitter.cxx 
b/svx/source/gallery2/GallerySplitter.cxx
index 44b3c5e..cd8121a 100644
--- a/svx/source/gallery2/GallerySplitter.cxx
+++ b/svx/source/gallery2/GallerySplitter.cxx
@@ -19,18 +19,12 @@
 
 #include GallerySplitter.hxx
 
-
-
 GallerySplitter::GallerySplitter(
 vcl::Window* pParent,
-const ResId rResId,
+WinBits nStyle,
 const ::boost::functionvoid(void) rDataChangeFunctor)
-: Splitter( pParent, rResId ),
-  maDataChangeFunctor(rDataChangeFunctor)
-{
-}
-
-GallerySplitter::~GallerySplitter()
+: Splitter(pParent, nStyle)
+, maDataChangeFunctor(rDataChangeFunctor)
 {
 }
 
diff --git a/svx/source/gallery2/GallerySplitter.hxx 
b/svx/source/gallery2/GallerySplitter.hxx
index 1097b3b..f5c787d 100644
--- a/svx/source/gallery2/GallerySplitter.hxx
+++ b/svx/source/gallery2/GallerySplitter.hxx
@@ -25,11 +25,10 @@
 class GallerySplitter : public Splitter
 {
 public:
-GallerySplitter (
+GallerySplitter(
 vcl::Window* pParent,
-const ResId rResId,
+WinBits nStyle,
 const ::boost::functionvoid(void) rDataChangeFunctor);
-virtual ~GallerySplitter (void);
 
 protected:
 virtual voidDataChanged( const DataChangedEvent rDCEvt ) SAL_OVERRIDE;
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 86f5f07..183480d 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -114,12 +114,11 @@ bool GalleryThemeListBox::PreNotify( NotifyEvent rNEvt )
 
 

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

2014-12-10 Thread Daniel Sikeler
 svx/inc/sxmtaitm.hxx   |9 -
 svx/source/form/fmobj.cxx  |4 ++--
 svx/source/form/tabwin.cxx |8 
 3 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit a92c1939bf85ceb6e16ebc9fd8aa4c79eed20a2a
Author: Daniel Sikeler d.sikele...@gmail.com
Date:   Wed Dec 3 16:17:33 2014 +0100

fdo#39468: Translated some german comments

Change-Id: I3091ee19b6f05a4d6b7f1329f64c3be6886cc0b8
Reviewed-on: https://gerrit.libreoffice.org/13393
Reviewed-by: Noel Grandin noelgran...@gmail.com
Tested-by: Noel Grandin noelgran...@gmail.com

diff --git a/svx/inc/sxmtaitm.hxx b/svx/inc/sxmtaitm.hxx
index e191d79..c31723b 100644
--- a/svx/inc/sxmtaitm.hxx
+++ b/svx/inc/sxmtaitm.hxx
@@ -23,17 +23,16 @@
 #include svx/sdynitm.hxx
 #include svx/sdangitm.hxx
 
-// Den Text automatisch zurechtdrehen (Automatisches UpsideDown).
-// TextUpsideDown bleibt trotzdem weiterhin wirksam und dreht
-// den Text bei sal_True nochmal.
+// Turn text automatically in wright position (automatic UpsideDown).
+// TextUpsideDown stays active and turns the text again if sal_True.
 class SdrMeasureTextAutoAngleItem: public SdrYesNoItem {
 public:
 SdrMeasureTextAutoAngleItem(bool bOn=true): 
SdrYesNoItem(SDRATTR_MEASURETEXTAUTOANGLE,bOn) {}
 SdrMeasureTextAutoAngleItem(SvStream rIn): 
SdrYesNoItem(SDRATTR_MEASURETEXTAUTOANGLE,rIn) {}
 };
 
-// Der bevorzugte Blickwinkel zum lesen des Textes. Wird nur ausgewertet, wenn
-// TextAutoAngle=TRUE. Winkel in 1/100deg aus der Zeichnung zum Betrachter.
+// Preferred perspective for reading text is only evaluated if 
TextAutoAngle=TRUE.
+// Angle in 1/100deg from viewpoint of the user.
 class SdrMeasureTextAutoAngleViewItem: public SdrAngleItem {
 public:
 SdrMeasureTextAutoAngleViewItem(long nVal=31500): 
SdrAngleItem(SDRATTR_MEASURETEXTAUTOANGLEVIEW,nVal)  {}
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 80c508ae..e0b756c 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -383,8 +383,8 @@ FmFormObj FmFormObj::operator= (const FmFormObj rObj)
 return *this;
 SdrUnoObj::operator= (rObj);
 
-// liegt das UnoControlModel in einer Eventumgebung,
-// dann koennen noch Events zugeordnet sein
+// If UnoControlModel is part of an event environment,
+// events may assigned to it.
 Reference XFormComponent   xContent(rObj.xUnoControlModel, UNO_QUERY);
 if (xContent.is())
 {
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 2fd8ad0..60edd9b 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -309,7 +309,7 @@ void FmFieldWin::UpdateContent(const 
::com::sun::star::uno::Reference ::com::su
 {
 try
 {
-// ListBox loeschen
+// delete ListBox
 pListBox-Clear();
 OUString aTitle(SVX_RES(RID_STR_FIELDSELECTION));
 SetText(aTitle);
@@ -344,7 +344,7 @@ void FmFieldWin::UpdateContent(const 
::com::sun::star::uno::Reference ::com::su
 lcl_addToList(*pListBox,xColumns);
 }
 
-// Prefix setzen
+// set prefix
 OUString  aPrefix;
 StringListResource aPrefixes( SVX_RES( RID_RSC_TABWIN_PREFIX ) );
 
@@ -361,7 +361,7 @@ void FmFieldWin::UpdateContent(const 
::com::sun::star::uno::Reference ::com::su
 break;
 }
 
-// an dem PropertySet nach Aenderungen der ControlSource lauschen
+// listen for changes at ControlSource in PropertySet
 if (m_pChangeListener)
 {
 m_pChangeListener-dispose();
@@ -392,7 +392,7 @@ void FmFieldWin::Resize()
 
 
 
-// Groesse der ::com::sun::star::form::ListBox anpassen
+// adapt size of ::com::sun::star::form::ListBox
 Point aLBPos( LISTBOX_BORDER, LISTBOX_BORDER );
 Size aLBSize( aOutputSize );
 aLBSize.Width() -= (2*LISTBOX_BORDER);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-21 Thread Phyzer
 svx/inc/globlmn_tmpl.hrc  |6 +++---
 svx/source/core/graphichelper.cxx |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 125c3a18db51af68cb58438124a87e9953e23fb2
Author: Phyzer limji...@gmail.com
Date:   Sat Sep 13 11:30:24 2014 +0800

Changed some options from picture/graphics to image

Change-Id: If86fae691d4926c896c6d1da1863cd8397a38718
Reviewed-on: https://gerrit.libreoffice.org/11429
Reviewed-by: Samuel Mehrbrodt s.mehrbr...@gmail.com
Tested-by: Samuel Mehrbrodt s.mehrbr...@gmail.com

diff --git a/svx/inc/globlmn_tmpl.hrc b/svx/inc/globlmn_tmpl.hrc
index df839d5..b53f23a 100644
--- a/svx/inc/globlmn_tmpl.hrc
+++ b/svx/inc/globlmn_tmpl.hrc
@@ -256,17 +256,17 @@
 #define ITEM_COMPRESS_GRAPHIC \
 Identifier = SID_COMPRESS_GRAPHIC ; \
 Command = .uno:CompressGraphic ; \
-Text [ en-US ] = Compress Graphic... ; \
+Text [ en-US ] = Compress Image... ; \
 
 #define ITEM_SAVE_GRAPHIC \
 Identifier = SID_SAVE_GRAPHIC ; \
 Command = .uno:SaveGraphic ; \
-Text [ en-US ] = Save Graphic... ; \
+Text [ en-US ] = Save Image... ; \
 
 #define ITEM_CHANGE_PICTURE \
 Identifier = SID_CHANGE_PICTURE ; \
 Command = .uno:ChangePicture ; \
-Text [ en-US ] = Change Picture... ; \
+Text [ en-US ] = Change Image... ; \
 
 #define ITEM_VIEW_ATTR_ZOOM \
 Identifier = SID_ATTR_ZOOM ; \
diff --git a/svx/source/core/graphichelper.cxx 
b/svx/source/core/graphichelper.cxx
index 4878872..d275c31 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -217,7 +217,7 @@ void GraphicHelper::SaveShapeAsGraphic( const Reference 
drawing::XShape  xSha
 FileDialogHelper aDialogHelper( 
TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
 Reference  XFilePicker  xFilePicker = aDialogHelper.GetFilePicker();
 
-aDialogHelper.SetTitle( Save as Picture );
+aDialogHelper.SetTitle( Save as Image );
 
 INetURLObject aPath;
 aPath.SetSmartURL( sGraphicPath );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-08-25 Thread Stephan Bergmann
 svx/inc/sxraitm.hxx   |8 +++-
 svx/source/svdraw/svdattr.cxx |2 +-
 svx/source/svdraw/svdobj.cxx  |4 ++--
 3 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit fe04ce92cd5f32be8a7c8bf237d2f5b53ce0a849
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Aug 25 09:34:43 2014 +0200

Consistency around SdrAngleItem in svx/inc/sxraitm.hxx

...similar to what has been done for svx/sdtmfitm.hxx in
6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794 Remove unused ctors and
68969cc61adecac481ae9656978ef952f435b310 Consistency around SdrMetricItem.

Change-Id: If88f88cfe0144b83b3228650a34d9bf2c468b936

diff --git a/svx/inc/sxraitm.hxx b/svx/inc/sxraitm.hxx
index 8e913ff..e6b44c1 100644
--- a/svx/inc/sxraitm.hxx
+++ b/svx/inc/sxraitm.hxx
@@ -22,11 +22,9 @@
 #include svx/svddef.hxx
 #include svx/sdangitm.hxx
 
-class SdrRotateAngleItem: public SdrAngleItem {
-public:
-SdrRotateAngleItem(long nAngle=0): 
SdrAngleItem(SDRATTR_ROTATEANGLE,nAngle) {}
-SdrRotateAngleItem(SvStream rIn): SdrAngleItem(SDRATTR_ROTATEANGLE,rIn)   
 {}
-};
+inline SdrAngleItem makeSdrRotateAngleItem(long nAngle) {
+return SdrAngleItem(SDRATTR_ROTATEANGLE, nAngle);
+}
 
 #endif
 
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index cb790e5..dc43119 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -218,7 +218,7 @@ SdrItemPool::SdrItemPool(
 mppLocalPoolDefaults[SDRATTR_ONESIZEHEIGHT  -SDRATTR_START]=new 
SdrOneSizeHeightItem;
 mppLocalPoolDefaults[SDRATTR_LOGICSIZEWIDTH -SDRATTR_START]=new 
SdrLogicSizeWidthItem;
 mppLocalPoolDefaults[SDRATTR_LOGICSIZEHEIGHT-SDRATTR_START]=new 
SdrLogicSizeHeightItem;
-mppLocalPoolDefaults[SDRATTR_ROTATEANGLE-SDRATTR_START]=new 
SdrRotateAngleItem;
+mppLocalPoolDefaults[SDRATTR_ROTATEANGLE-SDRATTR_START]=new 
SdrAngleItem(SDRATTR_ROTATEANGLE, 0);
 mppLocalPoolDefaults[SDRATTR_SHEARANGLE -SDRATTR_START]=new 
SdrShearAngleItem;
 mppLocalPoolDefaults[SDRATTR_MOVEX  -SDRATTR_START]=new 
SdrMoveXItem;
 mppLocalPoolDefaults[SDRATTR_MOVEY  -SDRATTR_START]=new 
SdrMoveYItem;
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index dc2d8d8..acbd428 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -2179,7 +2179,7 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet 
rAttr)
 }
 }
 if (rAttr.GetItemState(SDRATTR_ROTATEANGLE,true,pPoolItem)==SFX_ITEM_SET) 
{
-long n=((const SdrRotateAngleItem*)pPoolItem)-GetValue();
+long n=((const SdrAngleItem*)pPoolItem)-GetValue();
 n-=GetRotateAngle();
 if (n!=0) {
 double nSin=sin(n*nPi180);
@@ -2289,7 +2289,7 @@ void SdrObject::TakeNotPersistAttr(SfxItemSet rAttr, 
bool bMerge) const
 lcl_SetItem(rAttr,bMerge,makeSdrObjSizeProtectItem(IsResizeProtect()));
 lcl_SetItem(rAttr,bMerge,SdrObjPrintableItem(IsPrintable()));
 lcl_SetItem(rAttr,bMerge,SdrObjVisibleItem(IsVisible()));
-lcl_SetItem(rAttr,bMerge,SdrRotateAngleItem(GetRotateAngle()));
+lcl_SetItem(rAttr,bMerge,makeSdrRotateAngleItem(GetRotateAngle()));
 lcl_SetItem(rAttr,bMerge,SdrShearAngleItem(GetShearAngle()));
 lcl_SetItem(rAttr,bMerge,SdrOneSizeWidthItem(rSnap.GetWidth()-1));
 lcl_SetItem(rAttr,bMerge,SdrOneSizeHeightItem(rSnap.GetHeight()-1));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-08-19 Thread Chris Laplante
 svx/inc/AccessibleTableShape.hxx  |4 
 svx/inc/dragmt3d.hxx  |   29 --
 svx/inc/sdr/contact/viewobjectcontactofunocontrol.hxx |3 
 svx/inc/sxallitm.hxx  |9 
 svx/inc/sxlayitm.hxx  |7 
 svx/inc/sxlogitm.hxx  |3 
 svx/inc/sxmovitm.hxx  |6 
 svx/inc/sxoneitm.hxx  |9 
 svx/inc/sxonitm.hxx   |3 
 svx/inc/sxopitm.hxx   |3 
 svx/inc/sxraitm.hxx   |3 
 svx/inc/sxreaitm.hxx  |6 
 svx/inc/sxreoitm.hxx  |6 
 svx/inc/sxroaitm.hxx  |3 
 svx/inc/sxrooitm.hxx  |3 
 svx/inc/sxsaitm.hxx   |3 
 svx/inc/sxsalitm.hxx  |6 
 svx/inc/sxsoitm.hxx   |6 
 svx/inc/sxtraitm.hxx  |   12 -
 svx/source/accessibility/AccessibleControlShape.cxx   |1 
 svx/source/accessibility/AccessibleGraphicShape.cxx   |   27 --
 svx/source/accessibility/AccessibleOLEShape.cxx   |   29 --
 svx/source/accessibility/AccessibleShape.cxx  |   75 +-
 svx/source/accessibility/AccessibleTextHelper.cxx |6 
 svx/source/accessibility/ChildrenManager.cxx  |6 
 svx/source/accessibility/ChildrenManagerImpl.cxx  |   36 ---
 svx/source/accessibility/ChildrenManagerImpl.hxx  |   18 -
 svx/source/accessibility/GraphCtlAccessibleContext.cxx|   38 +--
 svx/source/accessibility/svxpixelctlaccessiblecontext.cxx |   24 --
 svx/source/accessibility/svxrectctaccessiblecontext.cxx   |   44 +---
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx |   10 
 svx/source/customshapes/tbxcustomshapes.cxx   |   25 --
 svx/source/dialog/_contdlg.cxx|7 
 svx/source/dialog/charmap.cxx |4 
 svx/source/dialog/checklbx.cxx|2 
 svx/source/dialog/ctredlin.cxx|   22 --
 svx/source/dialog/databaseregistrationui.cxx  |4 
 svx/source/dialog/dialcontrol.cxx |4 
 svx/source/dialog/dlgctrl.cxx |   32 --
 svx/source/dialog/fntctrl.cxx |   10 
 svx/source/dialog/framelinkarray.cxx  |   24 --
 svx/source/dialog/frmsel.cxx  |   54 +---
 svx/source/dialog/hdft.cxx|4 
 svx/source/dialog/imapdlg.cxx |2 
 svx/source/dialog/pagectrl.cxx|4 
 svx/source/dialog/paraprev.cxx|2 
 svx/source/dialog/passwd.cxx  |2 
 svx/source/dialog/rlrcitem.cxx|2 
 svx/source/dialog/rlrcitem.hxx|2 
 svx/source/dialog/rulritem.cxx|5 
 svx/source/dialog/srchctrl.cxx|2 
 svx/source/dialog/srchctrl.hxx|2 
 svx/source/dialog/srchdlg.cxx |6 
 svx/source/dialog/stddlg.cxx  |5 
 svx/source/dialog/svxruler.cxx|2 
 svx/source/dialog/txencbox.cxx|4 
 svx/source/engine3d/dragmt3d.cxx  |6 
 svx/source/engine3d/e3dundo.cxx   |   10 
 svx/source/engine3d/float3d.cxx   |4 
 svx/source/engine3d/obj3d.cxx |4 
 svx/source/engine3d/polysc3d.cxx  |2 
 svx/source/fmcomp/dbaexchange.cxx |7 
 svx/source/fmcomp/dbaobjectex.cxx |4 
 svx/source/fmcomp/fmgridcl.cxx|2 
 svx/source/fmcomp/fmgridif.cxx|   24 --
 svx/source/fmcomp/gridcell.cxx|   62 -
 svx/source/fmcomp/xmlexchg.cxx|4 
 svx/source/form/ParseContext.cxx  |3 
 svx/source/form/dataaccessdescriptor.cxx  |7 
 svx/source/form/databaselocationinput.cxx |7 
 svx/source/form/datanavi.cxx  |   38 ---
 svx/source/form/dbcharsethelper.cxx   |5 
 svx/source/form/dbtoolsclient.cxx |8 
 svx/source/form/filtnav.cxx   

[Libreoffice-commits] core.git: svx/inc svx/source svx/uiconfig svx/UIConfig_svx.mk

2014-01-01 Thread Manal Alhassoun
 svx/UIConfig_svx.mk|2 +
 svx/inc/gallery.hrc|2 -
 svx/source/gallery2/galbrws1.cxx   |2 -
 svx/source/gallery2/galbrws2.cxx   |2 -
 svx/source/gallery2/gallery.src|8 --
 svx/uiconfig/ui/querydeleteobjectdialog.ui |   34 +
 svx/uiconfig/ui/querydeletethemedialog.ui  |   34 +
 7 files changed, 72 insertions(+), 12 deletions(-)

New commits:
commit dee757ad33b763180336240f27811d0d4e5aa130
Author: Manal Alhassoun malhass...@kacst.edu.sa
Date:   Wed Jan 1 13:32:52 2014 +0300

convert delete object and theme queryboxes to .ui

Change-Id: Id8d54c55ab1b8c7e618654874bc8b9af949ec970
Reviewed-on: https://gerrit.libreoffice.org/7245
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index c337ea5..9cb6a18 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -30,6 +30,8 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/optgridpage \
svx/uiconfig/ui/passwd \
svx/uiconfig/ui/querydeletecontourdialog \
+   svx/uiconfig/ui/querydeleteobjectdialog \
+   svx/uiconfig/ui/querydeletethemedialog \
svx/uiconfig/ui/querymodifyimagemapchangesdialog \
svx/uiconfig/ui/querynewcontourdialog \
svx/uiconfig/ui/querysavecontchangesdialog \
diff --git a/svx/inc/gallery.hrc b/svx/inc/gallery.hrc
index 526011f..1897612 100644
--- a/svx/inc/gallery.hrc
+++ b/svx/inc/gallery.hrc
@@ -35,7 +35,6 @@
 #define RID_SVXSTR_EXTFORMAT3_UI(RID_SVX_GALLERY_START + 20)
 #define RID_SVXSTR_GALLERY_FOPENERROR   (RID_SVX_GALLERY_START + 11)
 #define RID_SVXSTR_GALLERY_NOTHEME  (RID_SVX_GALLERY_START + 13)
-#define RID_SVXSTR_GALLERY_DELETEOBJ(RID_SVX_GALLERY_START + 14)
 #define RID_SVXSTR_GALLERY_ACTUALIZE_PROGRESS   (RID_SVX_GALLERY_START + 25)
 #define RID_SVXSTR_GALLERY_FILTER   (RID_SVX_GALLERY_START + 26)
 #define RID_SVXSTR_GALLERY_LENGTH   (RID_SVX_GALLERY_START + 27)
@@ -48,7 +47,6 @@
 #define RID_SVXSTR_GALLERY_IMPORTTHEME  (RID_SVX_GALLERY_START + 41)
 #define RID_SVXSTR_GALLERY_CREATETHEME  (RID_SVX_GALLERY_START + 42)
 #define RID_SVXSTR_GALLERY_DIALOGID (RID_SVX_GALLERY_START + 80)
-#define RID_SVXSTR_GALLERY_DELETETHEME  (RID_SVX_GALLERY_START + 83)
 #define RID_SVXSTR_GALLERY_TITLE(RID_SVX_GALLERY_START + 84)
 #define RID_SVXSTR_GALLERY_PATH (RID_SVX_GALLERY_START + 85)
 #define RID_SVXSTR_GALLERY_ICONVIEW (RID_SVX_GALLERY_START + 86)
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 7285b84..84fbb56 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -373,7 +373,7 @@ void GalleryBrowser1::ImplExecute( sal_uInt16 nId )
 
 case( MN_DELETE  ):
 {
-if( QueryBox( NULL, WB_YES_NO, 
GAL_RESSTR(RID_SVXSTR_GALLERY_DELETETHEME)).Execute() == RET_YES )
+if( MessageDialog( NULL, 
QueryDeleteThemeDialog,svx/ui/querydeletethemedialog.ui).Execute() == 
RET_YES )
 mpGallery-RemoveTheme( mpThemes-GetSelectEntry() );
 }
 break;
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 2767816..3574b7a 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1195,7 +1195,7 @@ void GalleryBrowser2::Execute( sal_uInt16 nId )
 case( MN_DELETE ):
 {
 if( !mpCurTheme-IsReadOnly() 
-QueryBox(NULL, WB_YES_NO, 
GAL_RESSTR(RID_SVXSTR_GALLERY_DELETEOBJ)).Execute() == RET_YES )
+MessageDialog(NULL, 
QueryDeleteObjectDialog,svx/ui/querydeleteobjectdialog.ui).Execute() == 
RET_YES )
 {
 mpCurTheme-RemoveObject( mnCurActionPos );
 }
diff --git a/svx/source/gallery2/gallery.src b/svx/source/gallery2/gallery.src
index b5f7767..bd3a976 100644
--- a/svx/source/gallery2/gallery.src
+++ b/svx/source/gallery2/gallery.src
@@ -73,14 +73,6 @@ String RID_SVXSTR_GALLERY_NOTHEME
 {
 Text [ en-US ] = Invalid Theme Name! ;
 };
-String RID_SVXSTR_GALLERY_DELETEOBJ
-{
-Text [ en-US ] = Do you really want to\ndelete this object? ;
-};
-String RID_SVXSTR_GALLERY_DELETETHEME
-{
-Text [ en-US ] = Do you really want to\ndelete this theme? ;
-};
 String RID_SVXSTR_EXTFORMAT1_SYS
 {
 Text = wav ;
diff --git a/svx/uiconfig/ui/querydeleteobjectdialog.ui 
b/svx/uiconfig/ui/querydeleteobjectdialog.ui
new file mode 100644
index 000..f49711b
--- /dev/null
+++ b/svx/uiconfig/ui/querydeleteobjectdialog.ui
@@ -0,0 +1,34 @@
+?xml version=1.0 encoding=UTF-8?
+interface
+  !-- interface-requires gtk+ 3.0 --
+  object class=GtkMessageDialog 

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

2013-04-23 Thread Caolán McNamara
 svx/inc/svx/svdotable.hxx  |2 ++
 svx/source/table/svdotable.cxx |   14 ++
 2 files changed, 16 insertions(+)

New commits:
commit 7c1ab3470333a642947421f4289d9a79d13970fb
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Apr 23 09:56:56 2013 +0100

restore SdrTableObj::getColumnCount

removed correctly by fe630f3b097ca2bf173f21de77ed1535c767d0b9 but
we will need it again

Change-Id: I07a44e25cfc0de01cfdfef10ae817c413b50b597

diff --git a/svx/inc/svx/svdotable.hxx b/svx/inc/svx/svdotable.hxx
index 2cc3ba8..6ec0334 100644
--- a/svx/inc/svx/svdotable.hxx
+++ b/svx/inc/svx/svdotable.hxx
@@ -146,6 +146,8 @@ public:
 
 void setActiveCell( const sdr::table::CellPos rPos );
 void getActiveCellPos( sdr::table::CellPos rPos ) const;
+sal_Int32 getRowCount() const;
+sal_Int32 getColumnCount() const;
 void getCellBounds( const sdr::table::CellPos rPos, ::Rectangle 
rCellRect );
 
 const SfxItemSet GetActiveCellItemSet() const;
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 85551b5..3717e46 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1504,6 +1504,20 @@ const CellRef SdrTableObj::getActiveCell() const
 
 // 
 
+sal_Int32 SdrTableObj::getRowCount() const
+{
+return mpImpl ? mpImpl-getRowCount() : 0;
+}
+
+// 
+
+sal_Int32 SdrTableObj::getColumnCount() const
+{
+return mpImpl ? mpImpl-getColumnCount() : 0;
+}
+
+// 
+
 void SdrTableObj::setActiveCell( const CellPos rPos )
 {
 if( mpImpl  mpImpl-mxTable.is() ) try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-04-22 Thread Caolán McNamara
 svx/inc/svx/dialcontrol.hxx   |7 +++
 svx/source/dialog/dialcontrol.cxx |   15 +++
 2 files changed, 22 insertions(+)

New commits:
commit 46283082a3a520d3b39a7b733c8a0858896da26c
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Apr 22 15:55:40 2013 +0100

restore DialControl Modify handlers

removed by a352018c76028b332ccc50be6ee12c16f75aac25 but we will
need them again soon

Change-Id: Ibeaa4aeeec3dc073592ecf7e8c53b8bb03e791b4

diff --git a/svx/inc/svx/dialcontrol.hxx b/svx/inc/svx/dialcontrol.hxx
index 26aa073..fbb4d27 100644
--- a/svx/inc/svx/dialcontrol.hxx
+++ b/svx/inc/svx/dialcontrol.hxx
@@ -81,6 +81,13 @@ public:
 
 /** Links the passed numeric edit field to the control (bi-directional). */
 voidSetLinkedField( NumericField* pField );
+/** Returns the linked numeric edit field, or 0. */
+NumericField*   GetLinkedField() const;
+
+/** The passed handler is called whenever the totation value changes. */
+voidSetModifyHdl( const Link rLink );
+/** Returns the current modify handler. */
+const Link GetModifyHdl() const;
 
 /** Save value for later comparison */
 voidSaveValue();
diff --git a/svx/source/dialog/dialcontrol.cxx 
b/svx/source/dialog/dialcontrol.cxx
index f96271f..1ffdfa2 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -458,6 +458,21 @@ bool DialControl::IsValueModified()
 return mpImpl-mnInitialAngle != mpImpl-mnAngle;
 }
 
+NumericField* DialControl::GetLinkedField() const
+{
+return mpImpl-mpLinkField;
+}
+
+void DialControl::SetModifyHdl( const Link rLink )
+{
+mpImpl-maModifyHdl = rLink;
+}
+
+const Link DialControl::GetModifyHdl() const
+{
+return mpImpl-maModifyHdl;
+}
+
 // private 
 
 void DialControl::Init( const Size rWinSize, const Font rWinFont )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-04-13 Thread Armin Le Grand
 svx/inc/svx/svddrgmt.hxx   |   10 ++-
 svx/inc/svx/svdoedge.hxx   |5 +
 svx/source/svdraw/svddrgmt.cxx |  112 +++--
 svx/source/svdraw/svdoedge.cxx |   89 
 4 files changed, 198 insertions(+), 18 deletions(-)

New commits:
commit c1a2f580f0a5a479282cfa7ffa538de6d30b216a
Author: Armin Le Grand a...@apache.org
Date:   Tue Jun 19 09:47:15 2012 +

Resolves: #i54102# added support for rotation, shear and mirror for 
SdrEdgeObj

i.e. Edges, Connectors

added interactive preview, allowed these actions for editing

(cherry picked from commit f8721f5f94f74522eae36dc6dc054b983384fac9)

Conflicts:
svx/source/svdraw/svddrgmt.cxx
svx/source/svdraw/svdoedge.cxx

Change-Id: I20b971674e683a25f70f6d2e2f4b5231f38638bc

Related: i#54102# Removed IsInserted() check...

for doing transformations to have them on interactions

(cherry picked from commit 3ca8c0e04015fcd945a66e254d845dc9081aa5e5)

Conflicts:
svx/source/svdraw/svdoedge.cxx

Change-Id: If55e5f0d4bb5aef7f602fdcd03d51014390e8d2a

diff --git a/svx/inc/svx/svddrgmt.hxx b/svx/inc/svx/svddrgmt.hxx
index da6715d..3fc7fbb 100644
--- a/svx/inc/svx/svddrgmt.hxx
+++ b/svx/inc/svx/svddrgmt.hxx
@@ -91,6 +91,12 @@ public:
 SdrDragEntrySdrObject(const SdrObject rOriginal, 
sdr::contact::ObjectContact rObjectContact, bool bModify);
 virtual ~SdrDragEntrySdrObject();
 
+// #i54102# Split createPrimitive2DSequenceInCurrentState in 
prepareCurrentState and processing,
+// added accessors to original and clone
+void prepareCurrentState(SdrDragMethod rDragMethod);
+const SdrObject getOriginal() const { return maOriginal; }
+SdrObject* getClone() { return mpClone; }
+
 virtual drawinglayer::primitive2d::Primitive2DSequence 
createPrimitive2DSequenceInCurrentState(SdrDragMethod rDragMethod);
 };
 
@@ -140,8 +146,8 @@ private:
 
 protected:
 // access for derivated classes to maSdrDragEntries
-void clearSdrDragEntries() { for(sal_uInt32 a(0); a  
maSdrDragEntries.size(); a++) { delete maSdrDragEntries[a]; } 
maSdrDragEntries.clear(); }
-void addSdrDragEntry(SdrDragEntry* pNew) { if(pNew) { 
maSdrDragEntries.push_back(pNew); }}
+void clearSdrDragEntries();
+void addSdrDragEntry(SdrDragEntry* pNew);
 virtual void createSdrDragEntries();
 virtual void createSdrDragEntryForSdrObject(const SdrObject rOriginal, 
sdr::contact::ObjectContact rObjectContact, bool bModify);
 
diff --git a/svx/inc/svx/svdoedge.hxx b/svx/inc/svx/svdoedge.hxx
index 70ca454..ea0968c 100644
--- a/svx/inc/svx/svdoedge.hxx
+++ b/svx/inc/svx/svdoedge.hxx
@@ -262,6 +262,11 @@ public:
 virtual void NbcMove(const Size aSize);
 virtual void NbcResize(const Point rRefPnt, const Fraction aXFact, const 
Fraction aYFact);
 
+// #i54102# added rotate, mirrorn and shear support
+virtual void NbcRotate(const Point rRef, long nWink, double sn, double 
cs);
+virtual void NbcMirror(const Point rRef1, const Point rRef2);
+virtual void NbcShear(const Point rRef, long nWink, double tn, bool 
bVShear);
+
 // #102344# Added missing implementation
 virtual void NbcSetAnchorPos(const Point rPnt);
 
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 35f4b9cb..bd0aaac 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -22,7 +22,6 @@
 
 #include tools/bigint.hxx
 #include vcl/svapp.hxx
-
 #include svx/xattr.hxx
 #include svx/xpoly.hxx
 #include svx/svdetc.hxx
@@ -68,6 +67,8 @@
 #include basegfx/matrix/b2dhommatrixtools.hxx
 #include drawinglayer/attribute/sdrlineattribute.hxx
 #include drawinglayer/attribute/sdrlinestartendattribute.hxx
+#include map
+#include vector
 
 

 
@@ -142,14 +143,12 @@ SdrDragEntrySdrObject::~SdrDragEntrySdrObject()
 }
 }
 
-drawinglayer::primitive2d::Primitive2DSequence 
SdrDragEntrySdrObject::createPrimitive2DSequenceInCurrentState(SdrDragMethod 
rDragMethod)
+void SdrDragEntrySdrObject::prepareCurrentState(SdrDragMethod rDragMethod)
 {
 // for the moment, i need to re-create the clone in all cases. I need to 
figure
 // out when clone and original have the same class, so that i can use 
operator=
 // in those cases
 
-const SdrObject* pSource = maOriginal;
-
 if(mpClone)
 {
 SdrObject::Free(mpClone);
@@ -165,7 +164,15 @@ drawinglayer::primitive2d::Primitive2DSequence 
SdrDragEntrySdrObject::createPrim
 
 // apply original transformation, implemented at the DragMethods
 rDragMethod.applyCurrentTransformationToSdrObject(*mpClone);
+}
+}
 
+drawinglayer::primitive2d::Primitive2DSequence 
SdrDragEntrySdrObject::createPrimitive2DSequenceInCurrentState(SdrDragMethod 
rDragMethod)
+{
+const SdrObject* pSource = maOriginal;

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

2013-04-03 Thread Takeshi Abe
 svx/inc/svx/svdedxv.hxx|2 -
 svx/source/svdraw/svdedxv.cxx  |   44 ++---
 svx/source/svdraw/svdetc.cxx   |2 -
 svx/source/svdraw/svdhdl.cxx   |   10 
 svx/source/svdraw/svdibrow.cxx |   18 +++
 svx/source/svdraw/svdlayer.cxx |2 -
 svx/source/svdraw/svdmodel.cxx |2 -
 svx/source/svdraw/svdmrkv.cxx  |   48 -
 8 files changed, 64 insertions(+), 64 deletions(-)

New commits:
commit 690b40af2d1e38e8a836b4c64b3fa3082fbac536
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Thu Apr 4 12:25:07 2013 +0900

sal_Bool to bool

Change-Id: I4f8a592404272f3ba2602aa1ef42d399d7faae78

diff --git a/svx/inc/svx/svdedxv.hxx b/svx/inc/svx/svdedxv.hxx
index b385aef..13cf6f0 100644
--- a/svx/inc/svx/svdedxv.hxx
+++ b/svx/inc/svx/svdedxv.hxx
@@ -117,7 +117,7 @@ protected:
 
 // Eine neue OutlinerView auf dem Heap anlegen und alle erforderlichen 
Parameter setzen.
 // pTextEditObj, pTextEditPV und pTextEditOutliner muessen initiallisiert 
sein.
-OutlinerView* ImpMakeOutlinerView(Window* pWin, sal_Bool bNoPaint, 
OutlinerView* pGivenView) const;
+OutlinerView* ImpMakeOutlinerView(Window* pWin, bool bNoPaint, 
OutlinerView* pGivenView) const;
 void ImpPaintOutlinerView(OutlinerView rOutlView, const Rectangle rRect, 
OutputDevice rTargetDevice) const;
 void ImpInvalidateOutlinerView(OutlinerView rOutlView) const;
 
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 06c3640..f671510 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -172,9 +172,9 @@ void SdrObjEditView::ModelHasChanged()
 SdrTextObj* pTextObj=dynamic_castSdrTextObj*( mxTextEditObj.get() );
 if (pTextObj!=NULL) {
 sal_uIntPtr nOutlViewAnz=pTextEditOutliner-GetViewCount();
-sal_Bool bAreaChg=sal_False;
-sal_Bool bAnchorChg=sal_False;
-sal_Bool bColorChg=sal_False;
+bool bAreaChg=false;
+bool bAnchorChg=false;
+bool bColorChg=false;
 bool bContourFrame=pTextObj-IsContourTextFrame();
 EVAnchorMode eNewAnchor(ANCHOR_VCENTER_HCENTER);
 Rectangle aOldArea(aMinTextEditArea);
@@ -228,7 +228,7 @@ void SdrObjEditView::ModelHasChanged()
 if (nStat!=nStat0) pOLV-SetControlWord(nStat);
 }
 pTextEditOutliner-SetUpdateMode(sal_True);
-bAreaChg=sal_True;
+bAreaChg=true;
 }
 }
 if (pTextEditOutlinerView!=NULL) { // check fill and anchor
@@ -433,13 +433,13 @@ void 
SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView rOutlView) const
 }
 }
 
-OutlinerView* SdrObjEditView::ImpMakeOutlinerView(Window* pWin, sal_Bool 
/*bNoPaint*/, OutlinerView* pGivenView) const
+OutlinerView* SdrObjEditView::ImpMakeOutlinerView(Window* pWin, bool 
/*bNoPaint*/, OutlinerView* pGivenView) const
 {
 // background
 Color aBackground(GetTextEditBackgroundColor(*this));
 SdrTextObj* pText = dynamic_cast SdrTextObj * ( mxTextEditObj.get() );
-sal_Bool bTextFrame=pText!=NULL  pText-IsTextFrame();
-sal_Bool bContourFrame=pText!=NULL  pText-IsContourTextFrame();
+bool bTextFrame=pText!=NULL  pText-IsTextFrame();
+bool bContourFrame=pText!=NULL  pText-IsContourTextFrame();
 // create OutlinerView
 OutlinerView* pOutlView=pGivenView;
 pTextEditOutliner-SetUpdateMode(sal_False);
@@ -540,12 +540,12 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
 bTextEditNewObj=bIsNewObj;
 const sal_uInt32 nWinAnz(PaintWindowCount());
 sal_uInt32 i;
-sal_Bool bBrk(sal_False);
+bool bBrk(false);
 // break, when no object given
 
 if(!pObj)
 {
-bBrk = sal_True;
+bBrk = true;
 }
 
 if(!bBrk  !pWin)
@@ -563,7 +563,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
 // break, when no window exists
 if(!pWin)
 {
-bBrk = sal_True;
+bBrk = true;
 }
 }
 
@@ -574,7 +574,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
 // break, when no PageView for the object exists
 if(!pPV)
 {
-bBrk = sal_True;
+bBrk = true;
 }
 }
 
@@ -583,7 +583,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
 // no TextEdit on objects in locked Layer
 if(pPV-GetLockedLayers().IsSet(pObj-GetLayer()))
 {
-bBrk = sal_True;
+bBrk = true;
 }
 }
 
@@ -608,7 +608,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
 pTextEditOutliner-ForceAutoColor( 
aOptions.GetIsAutomaticFontColor() );
 }
 
-sal_Bool bEmpty = mxTextEditObj-GetOutlinerParaObject()==NULL;
+bool bEmpty = mxTextEditObj-GetOutlinerParaObject()==NULL;
 
 aOldCalcFieldValueLink=pTextEditOutliner-GetCalcFieldValueHdl();
  

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

2013-04-02 Thread David Tardon
 svx/inc/svx/graphichelper.hxx |5 +
 svx/source/core/graphichelper.cxx |4 +++-
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit f38c4f138c6ec810b26fcf2064f64e64eb14129b
Author: David Tardon dtar...@redhat.com
Date:   Tue Apr 2 07:34:56 2013 +0200

try to fix windows tb with pch

C:/lo/gerrit_core/solver/wntmsci13.pro/inc\vcl/lineinfo.hxx(39) : error 
C2872: 'LineStyle' : ambiguous symbol
could be 
'C:/lo/gerrit_core/solver/wntmsci13.pro/inc\vcl/vclenum.hxx(80) : LineStyle'
or 'C:/lo/gerrit_core/solver/wntmsci13.pro/inc/offapi 
om/sun/star/drawing/LineStyle.hdl(13) : com::sun::star::drawing::LineStyle'
...
make[1]: *** 
[C:/lo/gerrit_core/workdir/wntmsci13.pro/PrecompiledHeader/nodebug/precompiled_sd.hxx.gch]
 Error 2

WTH do we have 'using namespace' in _new_ code, anyway?

Change-Id: If149653f0a7a4a0061f48e866b30ced120f8bc5e

diff --git a/svx/inc/svx/graphichelper.hxx b/svx/inc/svx/graphichelper.hxx
index 1d9e9e3..650a300 100644
--- a/svx/inc/svx/graphichelper.hxx
+++ b/svx/inc/svx/graphichelper.hxx
@@ -25,16 +25,13 @@
 
 #include com/sun/star/drawing/XShape.hpp
 
-using namespace css::uno;
-using namespace css::drawing;
-
 class SVX_DLLPUBLIC GraphicHelper
 {
 
 public:
 static void GetPreferedExtension( OUString rExtension, const Graphic 
rGraphic );
 static OUString ExportGraphic( const Graphic rGraphic, const OUString 
rGraphicName );
-static void SaveShapeAsGraphic( const Reference XShape  xShape );
+static void SaveShapeAsGraphic( const com::sun::star::uno::Reference 
com::sun::star::drawing::XShape  xShape );
 };
 
 
diff --git a/svx/source/core/graphichelper.cxx 
b/svx/source/core/graphichelper.cxx
index 4671c91..deb3397 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -56,6 +56,8 @@ using namespace css::ui::dialogs;
 
 using namespace sfx2;
 
+namespace drawing = com::sun::star::drawing;
+
 void GraphicHelper::GetPreferedExtension( OUString rExtension, const Graphic 
rGraphic )
 {
 OUString aExtension = png;
@@ -196,7 +198,7 @@ OUString GraphicHelper::ExportGraphic( const Graphic 
rGraphic, const OUString
 return OUString();
 }
 
-void GraphicHelper::SaveShapeAsGraphic( const Reference XShape  xShape )
+void GraphicHelper::SaveShapeAsGraphic( const Reference drawing::XShape  
xShape )
 {
 try
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-20 Thread Takeshi Abe
 svx/inc/svx/extrud3d.hxx |2 -
 svx/inc/svx/lathe3d.hxx  |2 -
 svx/inc/svx/obj3d.hxx|4 +-
 svx/inc/svx/scene3d.hxx  |2 -
 svx/inc/svx/view3d.hxx   |6 ++--
 svx/source/engine3d/extrud3d.cxx |4 +-
 svx/source/engine3d/float3d.cxx  |   54 +++
 svx/source/engine3d/lathe3d.cxx  |4 +-
 svx/source/engine3d/obj3d.cxx|   10 +++
 svx/source/engine3d/objfac3d.cxx |4 +-
 svx/source/engine3d/scene3d.cxx  |   24 -
 svx/source/engine3d/view3d.cxx   |   48 +-
 svx/source/svdraw/svdcrtv.cxx|2 -
 svx/source/svdraw/svdmrkv.cxx|4 +-
 14 files changed, 85 insertions(+), 85 deletions(-)

New commits:
commit 322257d53202f4d6bf3e7fa687c3902b4c61d794
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Thu Mar 21 12:04:56 2013 +0900

sal_Bool to bool

Change-Id: I9bdb9db8b38758117a6bad27a014376806841470

diff --git a/svx/inc/svx/extrud3d.hxx b/svx/inc/svx/extrud3d.hxx
index a05334b..60da908 100644
--- a/svx/inc/svx/extrud3d.hxx
+++ b/svx/inc/svx/extrud3d.hxx
@@ -93,7 +93,7 @@ public:
 void SetExtrudePolygon(const basegfx::B2DPolyPolygon rNew);
 const basegfx::B2DPolyPolygon GetExtrudePolygon() { return 
maExtrudePolygon; }
 
-virtual sal_Bool IsBreakObjPossible();
+virtual bool IsBreakObjPossible();
 virtual SdrAttrObj* GetBreakObj();
 };
 
diff --git a/svx/inc/svx/lathe3d.hxx b/svx/inc/svx/lathe3d.hxx
index 0848824..c43c426 100644
--- a/svx/inc/svx/lathe3d.hxx
+++ b/svx/inc/svx/lathe3d.hxx
@@ -105,7 +105,7 @@ private:
 const basegfx::B2DPolyPolygon GetPolyPoly2D() { return maPolyPoly2D; }
 
 // break up
-virtual sal_Bool IsBreakObjPossible();
+virtual bool IsBreakObjPossible();
 virtual SdrAttrObj* GetBreakObj();
 };
 
diff --git a/svx/inc/svx/obj3d.hxx b/svx/inc/svx/obj3d.hxx
index d282b1e..4743fe0 100644
--- a/svx/inc/svx/obj3d.hxx
+++ b/svx/inc/svx/obj3d.hxx
@@ -199,7 +199,7 @@ public:
 void SetSelected(bool bNew);
 
 // break up
-virtual sal_Bool IsBreakObjPossible();
+virtual bool IsBreakObjPossible();
 virtual SdrAttrObj* GetBreakObj();
 };
 
@@ -311,7 +311,7 @@ public :
 // material of the object
 const Color GetMaterialAmbientColor() const { return 
aMaterialAmbientColor; }
 
-sal_Bool IsAOrdNumRemapCandidate(E3dScene* prScene) const;
+bool IsAOrdNumRemapCandidate(E3dScene* prScene) const;
 };
 
 #endif  // _E3D_OBJ3D_HXX
diff --git a/svx/inc/svx/scene3d.hxx b/svx/inc/svx/scene3d.hxx
index dd90598c..c2e9f77 100644
--- a/svx/inc/svx/scene3d.hxx
+++ b/svx/inc/svx/scene3d.hxx
@@ -221,7 +221,7 @@ public:
 B3dCamera GetCameraSet() { return aCameraSet; }
 
 // break up
-virtual sal_Bool IsBreakObjPossible();
+virtual bool IsBreakObjPossible();
 
 // polygon which is built during creation
 virtual basegfx::B2DPolyPolygon TakeCreatePoly(const SdrDragStat rDrag) 
const;
diff --git a/svx/inc/svx/view3d.hxx b/svx/inc/svx/view3d.hxx
index aeb1390..72420f2 100644
--- a/svx/inc/svx/view3d.hxx
+++ b/svx/inc/svx/view3d.hxx
@@ -105,9 +105,9 @@ public:
 virtual sal_Bool Paste(const SdrModel rMod, const Point rPos, 
SdrObjList* pLst=NULL, sal_uInt32 nOptions=0);
 
 // #83403# Service routine used from local Clone() and from 
SdrCreateView::EndCreateObj(...)
-sal_Bool ImpCloneAll3DObjectsToDestScene(E3dScene* pSrcScene, E3dScene* 
pDstScene, Point aOffset);
+bool ImpCloneAll3DObjectsToDestScene(E3dScene* pSrcScene, E3dScene* 
pDstScene, Point aOffset);
 
-sal_Bool IsConvertTo3DObjPossible() const;
+bool IsConvertTo3DObjPossible() const;
 void ConvertMarkedObjTo3D(sal_Bool bExtrude=sal_True, basegfx::B2DPoint 
aPnt1 = basegfx::B2DPoint(0.0, 0.0), basegfx::B2DPoint aPnt2 = 
basegfx::B2DPoint(0.0, 1.0));
 
 // Nachtraeglichhe Korrekturmoeglichkeit um alle Extrudes in einer
@@ -244,7 +244,7 @@ public:
 long GetVDefaultSegments() const { return nVDefaultSegments; }
 void SetVDefaultSegments(long nSegs) { nVDefaultSegments = nSegs; }
 
-sal_Bool IsBreak3DObjPossible() const;
+bool IsBreak3DObjPossible() const;
 void Break3DObj();
 
 sal_Bool DoubleSided () const
diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx
index f89455f..724f45d 100644
--- a/svx/source/engine3d/extrud3d.cxx
+++ b/svx/source/engine3d/extrud3d.cxx
@@ -141,9 +141,9 @@ void E3dExtrudeObj::TakeObjNamePlural(XubString rName) 
const
 rName=ImpGetResStr(STR_ObjNamePluralExtrude3d);
 }
 
-sal_Bool E3dExtrudeObj::IsBreakObjPossible()
+bool E3dExtrudeObj::IsBreakObjPossible()
 {
-return sal_True;
+return true;
 }
 
 SdrAttrObj* E3dExtrudeObj::GetBreakObj()
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index e0089ed..acc7095 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -523,11 +523,11 @@ void Svx3DWin::Update( SfxItemSet 

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

2013-03-15 Thread Armin Le Grand
 svx/inc/svx/svdpntv.hxx   |9 +++
 svx/source/svdraw/svdfmtf.cxx |  109 +++---
 svx/source/svdraw/svdpntv.cxx |   30 ++-
 svx/source/svdraw/svdxcgv.cxx |   36 +
 vcl/inc/vcl/svgdata.hxx   |3 -
 vcl/source/gdi/impgraph.cxx   |4 -
 vcl/source/gdi/svgdata.cxx|5 +
 7 files changed, 126 insertions(+), 70 deletions(-)

New commits:
commit 33b4c9938ddcfb55088531cce3f2493c1459
Author: Armin Le Grand a...@apache.org
Date:   Mon May 14 14:21:26 2012 +

Resolves: #i119125# various actions implemented, clipping added.

Esp hard was ImpSdrGDIMetaFileImport, but working now. Needed to hand-craft
alpha addition for alpha in Metafile content and gradient of action. Also 
added
better BitmapEx creation for convert to bitmap for draw objects.

Conflicts:
svx/source/svdraw/svdxcgv.cxx
vcl/source/gdi/impgraph.cxx

Change-Id: Ic6ac9fb3132dd122e16a5cd8f9c5ddd155ec9882

diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx
index eca5710f..2e9bc25 100644
--- a/svx/inc/svx/svdpntv.hxx
+++ b/svx/inc/svx/svdpntv.hxx
@@ -113,6 +113,15 @@ private:
 class SdrPaintWindow;
 typedef ::std::vector SdrPaintWindow*  SdrPaintWindowVector;
 
+//
+// helper to convert any GDIMetaFile to a good quality BitmapEx,
+// using default parameters and graphic::XPrimitive2DRenderer
+
+BitmapEx SVX_DLLPUBLIC convertMetafileToBitmapEx(
+const GDIMetaFile rMtf,
+const basegfx::B2DRange rTargetRange,
+const sal_uInt32 nMaximumQuadraticPixels = 50);
+
 

 
 class SVX_DLLPUBLIC SdrPaintView : public SfxListener, public SfxRepeatTarget, 
public SfxBroadcaster, public ::utl::ConfigurationListener
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 4d9af43..583e54c 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -65,8 +65,9 @@
 #include svx/xbtmpit.hxx
 #include svx/xfltrit.hxx
 #include vcl/bmpacc.hxx
-#include vcl/svgdata.hxx
-#include drawinglayer/primitive2d/metafileprimitive2d.hxx
+#include svx/xflbmtit.hxx
+#include svx/xflbstit.hxx
+#include svx/svdpntv.hxx
 
 

 
@@ -513,6 +514,8 @@ void ImpSdrGDIMetaFileImport::InsertObj(SdrObject* pObj, 
bool bScale)
 
 pObj-SetMergedItem(XFillStyleItem(XFILL_BITMAP));
 pObj-SetMergedItem(XFillBitmapItem(String(), 
Graphic(aClippedBitmap)));
+pObj-SetMergedItem(XFillBmpTileItem(false));
+pObj-SetMergedItem(XFillBmpStretchItem(true));
 }
 }
 }
@@ -1399,21 +1402,16 @@ void 
ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction rAct)
 
 if(rMtf.GetActionSize())
 {
-Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
-aRect.Right()++; aRect.Bottom()++;
-
-// get metafile content as bitmap
-const basegfx::B2DRange aTargetRange(
-aRect.Left(), aRect.Top(), aRect.Right(), aRect.Bottom());
-const drawinglayer::primitive2d::Primitive2DReference aMtf(
-new drawinglayer::primitive2d::MetafilePrimitive2D(
-basegfx::tools::createScaleTranslateB2DHomMatrix(
-aTargetRange.getRange(),
-aTargetRange.getMinimum()),
-rMtf));
-BitmapEx aBitmapEx(convertPrimitive2DSequenceToBitmapEx(
-drawinglayer::primitive2d::Primitive2DSequence(aMtf, 1),
-aTargetRange));
+const Rectangle aRect(rAct.GetPoint(),rAct.GetSize());
+
+// convert metafile sub-content to BitmapEx
+BitmapEx aBitmapEx(
+convertMetafileToBitmapEx(
+rMtf,
+basegfx::B2DRange(
+aRect.Left(), aRect.Top(),
+aRect.Right(), aRect.Bottom()),
+125000));
 
 // handle colors
 const Gradient rGradient = rAct.GetGradient();
@@ -1435,12 +1433,14 @@ void 
ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction rAct)
 bool bCreateObject(true);
 bool bHasNewMask(false);
 AlphaMask aNewMask;
+double fTransparence(0.0);
+bool bFixedTransparence(false);
 
 if(bEqualColors || bNoSteps)
 {
 // single transparence
 const basegfx::BColor aMedium(basegfx::average(aStart, aEnd));
-const double fTransparence(aMedium.luminance());
+fTransparence = aMedium.luminance();
 
 if(basegfx::fTools::lessOrEqual(fTransparence, 0.0))
 {
@@ -1453,11 +1453,8 @@ void 
ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction rAct)
 }
 

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

2013-03-09 Thread Takeshi Abe
 svx/inc/svx/AccessibleControlShape.hxx  |   12 ++--
 svx/source/accessibility/AccessibleControlShape.cxx |   40 
 svx/source/accessibility/AccessibleFrameSelector.cxx|2 
 svx/source/accessibility/AccessibleTextHelper.cxx   |   10 ++--
 svx/source/accessibility/svxrectctaccessiblecontext.cxx |   14 ++---
 svx/source/inc/svxrectctaccessiblecontext.hxx   |   22 
 6 files changed, 50 insertions(+), 50 deletions(-)

New commits:
commit 95184c4c45b69915cd78e10c7f0b6fcd1245d738
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Sat Mar 9 19:43:50 2013 +0900

sal_Bool to bool

Change-Id: I76139eb5878deebefcf20efaa3be78e800a85c01

diff --git a/svx/inc/svx/AccessibleControlShape.hxx 
b/svx/inc/svx/AccessibleControlShape.hxx
index 79a5475..a1df3ff 100644
--- a/svx/inc/svx/AccessibleControlShape.hxx
+++ b/svx/inc/svx/AccessibleControlShape.hxx
@@ -139,7 +139,7 @@ protected:
 sal_Bool ensureControlModelAccess( ) SAL_THROW(( ));
 
 /// ensures that we're listening for the given property if(and only if!) 
necessary
-sal_Bool ensureListeningState( const sal_Bool _bCurrentlyListening, const 
sal_Bool _bNeedNewListening,
+bool ensureListeningState( const bool _bCurrentlyListening, const bool 
_bNeedNewListening,
 const ::rtl::OUString _rPropertyName );
 
 /// starts multiplexing the state changes of our aggregate context
@@ -184,11 +184,11 @@ private:
 ::comphelper::OWrappedAccessibleChildrenManager*
 m_pChildManager;
 
-sal_Boolm_bListeningForName : 1;// are we currently 
listening for changes of the Name property?
-sal_Boolm_bListeningForDesc : 1;// are we currently 
listening for changes of the HelpText property?
-sal_Boolm_bMultiplexingStates   : 1;// are we currently 
multiplexing state changes of the native context?
-sal_Boolm_bDisposeNativeContext : 1;// do we need to dispose 
mxNativeContextComponent?
-sal_Boolm_bWaitingForControl: 1;// if we are created 
before our control exists, we need to wait for it to appear ...
+boolm_bListeningForName : 1;// are we currently listening 
for changes of the Name property?
+boolm_bListeningForDesc : 1;// are we currently listening 
for changes of the HelpText property?
+boolm_bMultiplexingStates   : 1;// are we currently 
multiplexing state changes of the native context?
+boolm_bDisposeNativeContext : 1;// do we need to dispose 
mxNativeContextComponent?
+boolm_bWaitingForControl: 1;// if we are created before 
our control exists, we need to wait for it to appear ...
 
 private:
 /** Don't use the default constructor.  Use the public constructor that
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx 
b/svx/source/accessibility/AccessibleControlShape.cxx
index 17084fe..536967f 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -85,7 +85,7 @@ namespace
 //
 // determines whether or not a state which belongs to the inner context 
needs to be forwarded to the composed
 // context
-sal_BoolisComposedState( const sal_Int16 _nState )
+boolisComposedState( const sal_Int16 _nState )
 {
 return  (   ( AccessibleStateType::INVALID != _nState )
   ( AccessibleStateType::DEFUNC != _nState )
@@ -101,7 +101,7 @@ namespace
 //
 /** determines whether the given control is in alive mode
 */
-inline  sal_BoolisAliveMode( const Reference XControl  _rxControl )
+inline  boolisAliveMode( const Reference XControl  _rxControl )
 {
 OSL_PRECOND( _rxControl.is(), AccessibleControlShape::isAliveMode: 
invalid control );
 return _rxControl.is()  !_rxControl-isDesignMode();
@@ -117,11 +117,11 @@ AccessibleControlShape::AccessibleControlShape (
 const AccessibleShapeInfo rShapeInfo,
 const AccessibleShapeTreeInfo rShapeTreeInfo)
 :  AccessibleShape (rShapeInfo, rShapeTreeInfo)
-,   m_bListeningForName( sal_False )
-,   m_bListeningForDesc( sal_False )
-,   m_bMultiplexingStates( sal_False )
-,   m_bDisposeNativeContext( sal_False )
-,   m_bWaitingForControl( sal_False )
+,   m_bListeningForName( false )
+,   m_bListeningForDesc( false )
+,   m_bMultiplexingStates( false )
+,   m_bDisposeNativeContext( false )
+,   m_bWaitingForControl( false )
 {
 m_pChildManager = new OWrappedAccessibleChildrenManager( 
getProcessComponentContext() );
 m_pChildManager-acquire();
@@ -225,7 +225,7 @@ void AccessibleControlShape::Init()
 if ( xControlContainer.is() )
 {
 

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

2013-02-24 Thread Tomaž Vajngerl
 svx/inc/svx/compressgraphicdialog.hxx   |5 +
 svx/source/dialog/compressgraphicdialog.cxx |   95 +++-
 sw/sdi/_grfsh.sdi   |7 +-
 sw/source/ui/app/mn.src |1 
 sw/source/ui/shells/grfsh.cxx   |   45 +
 5 files changed, 124 insertions(+), 29 deletions(-)

New commits:
commit 44faceac60f9046e4827290a85f790a46ed1e227
Author: Tomaž Vajngerl qui...@gmail.com
Date:   Sun Feb 24 13:45:47 2013 +0100

Add Compress Graphic Dialog to Writer.

Change-Id: Icff16a86d217b2648ce588ca2b90abefcd1634d9

diff --git a/svx/inc/svx/compressgraphicdialog.hxx 
b/svx/inc/svx/compressgraphicdialog.hxx
index 20d15ab..a733fa2 100644
--- a/svx/inc/svx/compressgraphicdialog.hxx
+++ b/svx/inc/svx/compressgraphicdialog.hxx
@@ -80,9 +80,14 @@ private:
 
 public:
 CompressGraphicsDialog( Window* pParent, SdrGrafObj* pGraphicObj, 
SfxBindings rBindings );
+CompressGraphicsDialog( Window* pParent, Graphic rGraphic, Size 
rViewSize100mm, Rectangle rCropRectangle, SfxBindings rBindings );
+
 virtual ~CompressGraphicsDialog();
 
 SdrGrafObj* GetCompressedSdrGrafObj();
+Graphic GetCompressedGraphic();
+
+Rectangle GetScaledCropRectangle();
 };
 
 #endif
diff --git a/svx/source/dialog/compressgraphicdialog.cxx 
b/svx/source/dialog/compressgraphicdialog.cxx
index 4f86229..92749aa 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -43,7 +43,21 @@ CompressGraphicsDialog::CompressGraphicsDialog( Window* 
pParent, SdrGrafObj* pGr
 m_pGraphicObj ( pGraphicObj ),
 m_aGraphic( pGraphicObj-GetGraphicObject().GetGraphic() ),
 m_aViewSize100mm  ( pGraphicObj-GetLogicRect().GetSize() ),
-m_aCropRectangle  ( Rectangle() ),
+m_rBindings   ( rBindings ),
+m_dResolution ( 96.0 )
+{
+const SdrGrafCropItem rCrop = (const SdrGrafCropItem) 
m_pGraphicObj-GetMergedItem(SDRATTR_GRAFCROP);
+m_aCropRectangle = Rectangle(rCrop.GetLeft(), rCrop.GetTop(), 
rCrop.GetRight(), rCrop.GetBottom());
+
+Initialize();
+}
+
+CompressGraphicsDialog::CompressGraphicsDialog( Window* pParent, Graphic 
rGraphic, Size rViewSize100mm, Rectangle rCropRectangle, SfxBindings 
rBindings ) :
+ModalDialog   ( pParent, CompressGraphicDialog, 
svx/ui/compressgraphicdialog.ui ),
+m_pGraphicObj ( NULL ),
+m_aGraphic( rGraphic ),
+m_aViewSize100mm  ( rViewSize100mm ),
+m_aCropRectangle  ( rCropRectangle ),
 m_rBindings   ( rBindings ),
 m_dResolution ( 96.0 )
 {
@@ -184,15 +198,15 @@ sal_uLong 
CompressGraphicsDialog::GetSelectedInterpolationType()
 
 void CompressGraphicsDialog::Compress(SvStream aStream)
 {
-BitmapEx bitmap = m_aGraphic.GetBitmapEx();
+BitmapEx aBitmap = m_aGraphic.GetBitmapEx();
 if ( m_pReduceResolutionCB-IsChecked() )
 {
 long nPixelX = (long)( GetViewWidthInch() * m_dResolution );
 long nPixelY = (long)( GetViewHeightInch() * m_dResolution );
 
-bitmap.Scale( Size( nPixelX, nPixelY ), GetSelectedInterpolationType() 
);
+aBitmap.Scale( Size( nPixelX, nPixelY ), 
GetSelectedInterpolationType() );
 }
-Graphic aScaledGraphic = Graphic( bitmap );
+Graphic aScaledGraphic( aBitmap );
 GraphicFilter rFilter = GraphicFilter::GetGraphicFilter();
 
 Sequence PropertyValue  aFilterData( 3 );
@@ -206,7 +220,7 @@ void CompressGraphicsDialog::Compress(SvStream aStream)
 String aGraphicFormatName = m_pLosslessRB-IsChecked() ? String( png ) : 
String( jpg );
 
 sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName( 
aGraphicFormatName );
-rFilter.ExportGraphic( aScaledGraphic, String( test ), aStream, 
nFilterFormat, aFilterData );
+rFilter.ExportGraphic( aScaledGraphic, OUString( none ), aStream, 
nFilterFormat, aFilterData );
 }
 
 IMPL_LINK_NOARG( CompressGraphicsDialog, NewWidthModifiedHdl )
@@ -266,7 +280,7 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, CalculateClickHdl )
 {
 sal_Int32 aSize = 0;
 
-if ( m_dResolution  0  )
+if ( m_dResolution  0.0  )
 {
 SvMemoryStream aMemStream;
 aMemStream.SetVersion( SOFFICE_FILEFORMAT_CURRENT );
@@ -286,38 +300,63 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, 
CalculateClickHdl )
 return 0L;
 }
 
-SdrGrafObj* CompressGraphicsDialog::GetCompressedSdrGrafObj()
+Rectangle CompressGraphicsDialog::GetScaledCropRectangle()
 {
-if ( m_dResolution  0  )
+if ( m_pReduceResolutionCB-IsChecked() )
 {
-SdrGrafObj* pNewObject = (SdrGrafObj*) m_pGraphicObj-Clone();
-
-if ( m_pReduceResolutionCB-IsChecked() )
-{
-const SdrGrafCropItem rCrop = (const SdrGrafCropItem) 
m_pGraphicObj-GetMergedItem(SDRATTR_GRAFCROP);
-long nPixelX = (long)( GetViewWidthInch()  * m_dResolution );
-long nPixelY = (long)( GetViewHeightInch() * m_dResolution );
-Size size 

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

2013-02-13 Thread David Tardon
 svx/inc/svx/svdundo.hxx   |9 -
 svx/source/svdraw/svdundo.cxx |   20 
 2 files changed, 28 insertions(+), 1 deletion(-)

New commits:
commit e462a30d03c16aa4202f8d28ad52b15feb3d9255
Author: David Tardon dtar...@redhat.com
Date:   Wed Feb 13 08:52:52 2013 +0100

fdo#34558 don't crash on undoing text frame removal

Change-Id: I48b95c6c0cbfb2f4c4b09cc90b254b96de40b3e9

diff --git a/svx/inc/svx/svdundo.hxx b/svx/inc/svx/svdundo.hxx
index 0d3713e..8066c72 100644
--- a/svx/inc/svx/svdundo.hxx
+++ b/svx/inc/svx/svdundo.hxx
@@ -20,6 +20,7 @@
 #ifndef _SVDUNDO_HXX
 #define _SVDUNDO_HXX
 
+#include svl/lstner.hxx
 #include svl/solar.hrc
 #include svl/undo.hxx
 #include tools/gen.hxx
@@ -252,9 +253,12 @@ public:
 //
 //
 
-class SVX_DLLPUBLIC SdrUndoObjList : public SdrUndoObj {
+class SVX_DLLPUBLIC SdrUndoObjList : public SdrUndoObj, public SfxListener {
 boolbOwner;
 
+public:
+TYPEINFO();
+
 protected:
 SdrObjList* pObjList;
 SdrView*pView;  // um bei ObjDel, Undo die
@@ -270,6 +274,9 @@ protected:
 void SetView(SdrView* pView1, SdrPageView* pPageView1) { pView=pView1; 
pPageView=pPageView1; }
 bool IsOwner() { return bOwner; }
 void SetOwner(bool bNew);
+
+private:
+virtual void Notify(SfxBroadcaster rBroadcaster, const SfxHint rHint);
 };
 
 //
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 452761d..5e53ab1 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -655,6 +655,8 @@ OUString SdrUndoGeoObj::GetComment() const
 
 

 
+TYPEINIT1(SdrUndoObjList, SfxListener);
+
 SdrUndoObjList::SdrUndoObjList(SdrObject rNewObj, bool bOrdNumDirect)
 :   SdrUndoObj(rNewObj),
 bOwner(sal_False),
@@ -667,10 +669,14 @@ SdrUndoObjList::SdrUndoObjList(SdrObject rNewObj, bool 
bOrdNumDirect)
 } else {
 nOrdNum=pObj-GetOrdNum();
 }
+
+StartListening(*pObjList-GetModel());
 }
 
 SdrUndoObjList::~SdrUndoObjList()
 {
+EndListening(*pObjList-GetModel());
+
 if (pObj!=NULL  IsOwner())
 {
 // Attribute have to go back to the regular Pool
@@ -686,6 +692,20 @@ void SdrUndoObjList::SetOwner(bool bNew)
 bOwner = bNew;
 }
 
+void SdrUndoObjList::Notify(SfxBroadcaster, const SfxHint rHint)
+{
+const SdrHint* pSdrHint(dynamic_castconst SdrHint*(rHint));
+if (pSdrHint)
+{
+if ((pSdrHint-GetObject() == pObj)  (pSdrHint-GetKind() == 
HINT_OBJCHG))
+{
+const sal_uInt32 nNewOrdNum(pObj-GetOrdNum());
+if (nNewOrdNum != nOrdNum)
+nOrdNum = nNewOrdNum;
+}
+}
+}
+
 

 
 void SdrUndoRemoveObj::Undo()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits