core.git: 2 commits - sc/source svx/source

2024-04-23 Thread Noel Grandin (via logerrit)
 sc/source/ui/unoobj/cellvaluebinding.cxx|   23 +++
 svx/source/sdr/overlay/overlayselection.cxx |   10 ++
 2 files changed, 33 insertions(+)

New commits:
commit 1f86fdd4b5428a8c7b253051cca93429dc71f894
Author: Noel Grandin 
AuthorDate: Tue Apr 23 16:10:48 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue Apr 23 18:50:35 2024 +0200

tdf#160787 Calc active cell cursor has small transparent corners

clearly I don't understand something about B2DPolyPolygon, revert part
of

commit 7b1405689d4246e0e37e8759f03e1962af964cec
Author: Noel Grandin 
Date:   Fri Apr 19 22:56:04 2024 +0200
reduce the number of drawing primitives we create in
OverlaySelection

Change-Id: If8f07d021543e2686a3acfc6a0d38b2ebc962de4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166543
Reviewed-by: Noel Grandin 

diff --git a/svx/source/sdr/overlay/overlayselection.cxx 
b/svx/source/sdr/overlay/overlayselection.cxx
index d4a7b45beb8f..a5598c1d2125 100644
--- a/svx/source/sdr/overlay/overlayselection.cxx
+++ b/svx/source/sdr/overlay/overlayselection.cxx
@@ -214,6 +214,16 @@ namespace sdr::overlay
 aRGBColor = basegfx::BColor(1.0, 1.0, 1.0);
 }
 
+aRetval.resize(nCount);
+for(sal_uInt32 a(0);a < nCount; a++)
+{
+basegfx::B2DPolygon 
aPolygon(basegfx::utils::createPolygonFromRect(maRanges[a]));
+aRetval[a] =
+new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
+basegfx::B2DPolyPolygon(std::move(aPolygon)),
+aRGBColor);
+}
+
 basegfx::B2DPolyPolygon aPolyPolygon;
 aPolyPolygon.reserve(nCount);
 for(sal_uInt32 a(0);a < nCount; a++)
commit 979164938007e4774b7718abcb20fded9a00839f
Author: Noel Grandin 
AuthorDate: Tue Apr 23 15:31:37 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue Apr 23 18:50:20 2024 +0200

tdf#160768 Changing value in a text box control with a link cell set up, 
Crash

regression from
commit 7510cca63690ea97eb02a43f698fc183c3d0434a
Author: Noel Grandin 
Date:   Tue Mar 26 15:56:02 2024 +0200
convert OCellValueBinding to comphelper::WeakComponentImplHelper

Change-Id: I36ec4cca7a48992b29d6c2ff5c87fb0fed1c8c3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166540
Reviewed-by: Noel Grandin 

diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx 
b/sc/source/ui/unoobj/cellvaluebinding.cxx
index d1fa61175557..c728f503a856 100644
--- a/sc/source/ui/unoobj/cellvaluebinding.cxx
+++ b/sc/source/ui/unoobj/cellvaluebinding.cxx
@@ -286,7 +286,12 @@ namespace calc
 OUString sText;
 aValue >>= sText;
 if ( m_xCellText.is() )
+{
+// might call back into us via modified(EventObject&)
+aGuard.unlock();
 m_xCellText->setString( sText );
+aGuard.lock();
+}
 }
 break;
 
@@ -302,7 +307,12 @@ namespace calc
 double nCellValue = bValue ? 1.0 : 0.0;
 
 if ( m_xCell.is() )
+{
+// might call back into us via modified(EventObject&)
+aGuard.unlock();
 m_xCell->setValue( nCellValue );
+aGuard.lock();
+}
 
 setBooleanFormat();
 }
@@ -315,7 +325,12 @@ namespace calc
 double nValue = 0;
 aValue >>= nValue;
 if ( m_xCell.is() )
+{
+// might call back into us via modified(EventObject&)
+aGuard.unlock();
 m_xCell->setValue( nValue );
+aGuard.lock();
+}
 }
 break;
 
@@ -327,7 +342,12 @@ namespace calc
 aValue >>= nValue;  // list index from control layer 
(0-based)
 ++nValue;   // the list position value in the cell 
is 1-based
 if ( m_xCell.is() )
+{
+// might call back into us via modified(EventObject&)
+aGuard.unlock();
 m_xCell->setValue( nValue );
+aGuard.lock();
+}
 }
 break;
 
@@ -341,7 +361,10 @@ namespace calc
 {
 Sequence aInner(1);// one 
empty element
 Sequence< Sequence > aOuter( , 1 ); // one 
row
+// might call back into us via modified(EventObject&)
+aGuard.unlock();
 xData->setDataArray( aOuter );
+aGuard.lock();
 }
 }

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

2023-07-03 Thread Tomaž Vajngerl (via logerrit)
 sc/source/ui/drawfunc/drawsh.cxx   |6 +++---
 svx/source/tbxctrls/PaletteManager.cxx |2 --
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 548e5b6d825606bd218ef18591df642872e6acd0
Author: Tomaž Vajngerl 
AuthorDate: Tue Jul 4 00:38:01 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 4 03:51:41 2023 +0200

sc: fix failed assert in when setting a color on a shape

When setting a color with a colorpicker, and assert failed,
because it's not possible to clone a SfxItemSet by value - use
a plane Clone instead, which clones into a SfxItemSet.

Change-Id: I8780ed42d3807e9802d3f4fa1d68e16bd5d5a5e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153937
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 52ec9d9d438a..fde34e9d6686 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -260,9 +260,9 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 
 if( pView->AreObjectsMarked() )
 {
-SfxItemSet aNewArgs = rReq.GetArgs()->CloneAsValue();
-lcl_convertStringArguments(aNewArgs);
-pView->SetAttrToMarked( aNewArgs, false );
+std::unique_ptr aNewArgs = 
rReq.GetArgs()->Clone();
+lcl_convertStringArguments(*aNewArgs);
+pView->SetAttrToMarked(*aNewArgs, false);
 }
 else
 pView->SetDefaultAttr( *rReq.GetArgs(), false);
commit cbc45a7f713ea1f2c44ed27b371e342ed7547e05
Author: Tomaž Vajngerl 
AuthorDate: Tue Jul 4 00:37:30 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 4 03:51:33 2023 +0200

svx: PaletteManager - remove printf

Change-Id: I7d631352d423b6465d8bea4b09561f33d2ad98f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153936
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/svx/source/tbxctrls/PaletteManager.cxx 
b/svx/source/tbxctrls/PaletteManager.cxx
index 7735e09d44e8..607bd60df921 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -430,8 +430,6 @@ void PaletteManager::DispatchColorCommand(const OUString& 
aCommand, const NamedC
 comphelper::makePropertyValue(aObj.GetURLPath()+ ".Color", 
sal_Int32(rColor.m_aColor)),
 };
 
-printf ("Sending: %s\n", aObj.GetURLPath().toUtf8().getStr());
-
 if (rColor.m_nThemeIndex != -1)
 {
 model::ComplexColor aComplexColor;


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

2023-04-14 Thread Szymon Kłos (via logerrit)
 sc/source/ui/inc/tabview.hxx   |2 ++
 sc/source/ui/view/tabview2.cxx |9 +
 svx/source/svdraw/svdpntv.cxx  |2 +-
 3 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 5a4fa04d9b161cdfc6d77f942aa38b8a73d025e8
Author: Szymon Kłos 
AuthorDate: Tue Feb 14 10:50:46 2023 +0100
Commit: Szymon Kłos 
CommitDate: Fri Apr 14 09:06:56 2023 +0200

lok: draw textboxes under edit

This fixes bug in impress:
- open in 2 views
- start editing textbox in 2. view on 2. slide
- start editing textbox in 1. view on 1. slide
Result: slide 2 textbox was dissapearing

We need to allow drawing textboxes edited by other views
so if we select non-editor for rendering we will see the
full content.

It was regression from
commit e496b55a592caf0ca07f5477285a72d50cee6501
lok: masterpage: don't render text edits from different mode

Change-Id: I7645496aec77d11d16621129dd6644d3b54a6010
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146999
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150096
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150348
Tested-by: Jenkins

diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index c9a0df5291e9..825129b716b5 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -645,7 +645,7 @@ void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& 
rPaintWindow, bool bPaintFo
 static_cast< SdrView* >(this)->TextEditDrawing(rPaintWindow);
 }
 
-if (comphelper::LibreOfficeKit::isActive() && mbPaintTextEdit && 
pPageView)
+if (comphelper::LibreOfficeKit::isActive() && pPageView)
 {
 // Look for active text edits in other views showing the same page,
 // and show them as well. Show only if Page/MasterPage mode is 
matching.
commit 6c62b5a994b9045d1d7228fef655be1a8d3b5452
Author: Szymon Kłos 
AuthorDate: Fri Feb 17 10:47:53 2023 +0100
Commit: Szymon Kłos 
CommitDate: Fri Apr 14 09:06:47 2023 +0200

lok: setup LOK notifier for invalid range error

Change-Id: I63fc6fcdec873a9d0c8d54dd6a6f3783f2c15251
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147200
Reviewed-by: Henry Castro 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150043
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150347

diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index ca3918aae325..3f270770ec89 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -260,6 +260,8 @@ private:
 
 voidSetZoomPercentFromCommand(sal_uInt16 nZoomPercent);
 
+DECL_STATIC_LINK(ScTabView, InstallLOKNotifierHdl, void*, 
vcl::ILibreOfficeKitNotifier*);
+
 protected:
 voidUpdateHeaderWidth( const ScVSplitPos* pWhich = nullptr,
 const SCROW* pPosY = nullptr );
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 400ea89b6106..6b1cfef156f7 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -1443,6 +1443,11 @@ void ScTabView::MakeDrawLayer()
 }
 }
 
+IMPL_STATIC_LINK_NOARG(ScTabView, InstallLOKNotifierHdl, void*, 
vcl::ILibreOfficeKitNotifier*)
+{
+return GetpApp();
+}
+
 void ScTabView::ErrorMessage(TranslateId pGlobStrId)
 {
 if ( SC_MOD()->IsInExecuteDrop() )
@@ -1468,6 +1473,10 @@ void ScTabView::ErrorMessage(TranslateId pGlobStrId)
 m_xMessageBox.reset(Application::CreateMessageDialog(pParent,
  VclMessageType::Info, 
VclButtonsType::Ok,
  ScResId(pGlobStrId)));
+
+if (comphelper::LibreOfficeKit::isActive())
+m_xMessageBox->SetInstallLOKNotifierHdl(LINK(this, ScTabView, 
InstallLOKNotifierHdl));
+
 weld::Window* pGrabOnClose = bFocus ? pParent : nullptr;
 m_xMessageBox->runAsync(m_xMessageBox, [this, pGrabOnClose](sal_Int32 
/*nResult*/) {
 m_xMessageBox.reset();


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

2022-03-04 Thread Caolán McNamara (via logerrit)
 sc/source/ui/undo/undodat.cxx |2 ++
 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx |2 ++
 2 files changed, 4 insertions(+)

New commits:
commit 5541b7b1dd0d683a7018f7499aec4dbe6626a25a
Author: Caolán McNamara 
AuthorDate: Fri Mar 4 15:22:45 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 4 22:37:15 2022 +0100

cid#1500546 silence Explicit null dereferenced

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

diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx 
b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index 7ec09e455d90..f7aa223f4997 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -901,6 +901,8 @@ public:
 std::shared_ptr pFirstArg( std::move(rNodeStack.top()) 
);
 rNodeStack.pop();
 
+assert(pThirdArg && pSecondArg && pFirstArg);
+
 // create combined ExpressionNode
 auto pNode = std::make_shared( pFirstArg, pSecondArg, 
pThirdArg );
 // check for constness
commit b35571c348eb8816098f7c8786d8cc8ff9082f19
Author: Caolán McNamara 
AuthorDate: Fri Mar 4 15:20:48 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Mar 4 22:36:58 2022 +0100

cid#1500566 Uninitialized scalar field

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

diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 006527d7bacd..1ab89a8b543f 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -1707,6 +1707,8 @@ ScUndoChartData::ScUndoChartData( ScDocShell* 
pNewDocShell, const OUString& rNam
 bool bAdd ) :
 ScSimpleUndo( pNewDocShell ),
 aChartName( rName ),
+bOldColHeaders(false),
+bOldRowHeaders(false),
 aNewRangeListRef( rNew ),
 bNewColHeaders( bColHdr ),
 bNewRowHeaders( bRowHdr ),


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

2021-07-19 Thread Szymon Kłos (via logerrit)
 sc/source/ui/cctrl/cbnumberformat.cxx   |2 +-
 svx/source/tbxctrls/StylesPreviewWindow.cxx |2 +-
 vcl/source/window/toolbox2.cxx  |   13 +
 3 files changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 9dd28785c7d0d1604c85e00247782e1ebd2d69f8
Author: Szymon Kłos 
AuthorDate: Wed Apr 28 15:20:35 2021 +0200
Commit: Szymon Kłos 
CommitDate: Mon Jul 19 09:01:25 2021 +0200

jsdialog: dump toolbox item's window if present

Change-Id: Ia882bcadb844993f2b761bd91c6f6f60c9e1b2ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114807
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119016
Tested-by: Jenkins

diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 291cad218c37..c7c1934270d5 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1739,11 +1739,16 @@ void ToolBox::DumpAsPropertyTree(tools::JsonWriter& 
rJsonWriter)
 auto childrenNode = rJsonWriter.startArray("children");
 for (ToolBox::ImplToolItems::size_type i = 0; i < GetItemCount(); ++i)
 {
-ToolBoxItemType type = GetItemType(i);
-if (type == ToolBoxItemType::BUTTON)
+auto childNode = rJsonWriter.startStruct();
+ToolBoxItemId nId = GetItemId(i);
+
+vcl::Window* pWindow = GetItemWindow(nId);
+if (pWindow)
+{
+pWindow->DumpAsPropertyTree(rJsonWriter);
+}
+else
 {
-auto childNode = rJsonWriter.startStruct();
-ToolBoxItemId nId = GetItemId(i);
 if (!IsItemVisible(nId))
 continue;
 rJsonWriter.put("type", "toolitem");
commit 37192a6f87a82e83eab03c06258d455f16694154
Author: Szymon Kłos 
AuthorDate: Wed Apr 28 13:48:08 2021 +0200
Commit: Szymon Kłos 
CommitDate: Mon Jul 19 09:01:10 2021 +0200

notebookbar: fix welded controls in online

Additional parameter was introduced for InterimItemWindow
and value for it was missing.

Change-Id: I9dad0e4d60205db0c8cabfcf5c98fabc2d8fdefe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114801
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119015
Tested-by: Jenkins

diff --git a/sc/source/ui/cctrl/cbnumberformat.cxx 
b/sc/source/ui/cctrl/cbnumberformat.cxx
index 32bc0d76d0e1..29ab64e84e75 100644
--- a/sc/source/ui/cctrl/cbnumberformat.cxx
+++ b/sc/source/ui/cctrl/cbnumberformat.cxx
@@ -27,7 +27,7 @@
 #include 
 
 ScNumberFormat::ScNumberFormat(vcl::Window* pParent)
-: InterimItemWindow(pParent, "modules/scalc/ui/numberbox.ui", "NumberBox",
+: InterimItemWindow(pParent, "modules/scalc/ui/numberbox.ui", "NumberBox", 
true,
 reinterpret_cast(SfxViewShell::Current()))
 , m_xWidget(m_xBuilder->weld_combo_box("numbertype"))
 {
diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx 
b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index eef8bba791e5..2051e2479a84 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -479,7 +479,7 @@ void StylesPreviewWindow_Base::UpdateStylesList()
 StylesPreviewWindow_Impl::StylesPreviewWindow_Impl(
 vcl::Window* pParent, std::vector>& 
aDefaultStyles,
 const css::uno::Reference& 
xDispatchProvider)
-: InterimItemWindow(pParent, "svx/ui/stylespreview.ui", "ApplyStyleBox",
+: InterimItemWindow(pParent, "svx/ui/stylespreview.ui", "ApplyStyleBox", 
true,
 reinterpret_cast(SfxViewShell::Current()))
 , StylesPreviewWindow_Base(*m_xBuilder, aDefaultStyles, xDispatchProvider)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-14 Thread Heiko Tietze (via logerrit)
 sc/source/ui/drawfunc/drawsh2.cxx |1 
 svx/source/gallery2/galbrws1.cxx  |   15 +
 svx/source/gallery2/galbrws1.hxx  |2 
 svx/uiconfig/ui/sidebargallery.ui |  316 --
 4 files changed, 252 insertions(+), 82 deletions(-)

New commits:
commit 13838d4cc83dd69c5b1679eb62ee36ba3237f6b2
Author: Heiko Tietze 
AuthorDate: Tue Oct 13 18:10:55 2020 +0200
Commit: Heiko Tietze 
CommitDate: Wed Oct 14 19:43:02 2020 +0200

Resolves tdf#137447 - Access galleries via tight extensions

Button and code added to galbrws1

Change-Id: Ic599cc32980f9a3ee297891f80cefe478c28c302
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104248
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 3ac8bd8ff46b..6cf14753e524 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -38,7 +38,8 @@
 #include 
 #include 
 #include 
-
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -52,6 +53,7 @@ GalleryBrowser1::GalleryBrowser1(
 :
 mxNewTheme(rBuilder.weld_button("insert")),
 mxThemes(rBuilder.weld_tree_view("themelist")),
+mxMoreGalleries(rBuilder.weld_button("btnMoreGalleries")),
 mpGallery ( pGallery ),
 mpExchangeData( new ExchangeData ),
 aImgNormal( RID_SVXBMP_THEME_NORMAL ),
@@ -69,6 +71,9 @@ GalleryBrowser1::GalleryBrowser1(
 mxThemes->connect_key_press(LINK(this, GalleryBrowser1, KeyInputHdl));
 mxThemes->set_size_request(-1, mxThemes->get_height_rows(6));
 
+mxMoreGalleries->set_from_icon_name("cmd/sc_additionsdialog.png");
+mxMoreGalleries->connect_clicked(LINK(this, GalleryBrowser1, 
OnMoreGalleriesClick));
+
 // disable creation of new themes if a writable directory is not available
 if( mpGallery->GetUserURL().GetProtocol() == INetProtocol::NotValid )
 mxNewTheme->set_sensitive(false);
@@ -367,6 +372,14 @@ void GalleryBrowser1::Notify( SfxBroadcaster&, const 
SfxHint& rHint )
 }
 }
 
+IMPL_STATIC_LINK_NOARG( GalleryBrowser1, OnMoreGalleriesClick, weld::Button&, 
void)
+{
+css::uno::Sequence aArgs(1);
+aArgs[0].Name = "AdditionsTag";
+aArgs[0].Value <<= OUString("Gallery");
+comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs);
+}
+
 IMPL_LINK(GalleryBrowser1, KeyInputHdl, const KeyEvent&, rKEvt, bool)
 {
 bool bRet = false;
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
index 835a0db4ec9a..37a72a74 100644
--- a/svx/source/gallery2/galbrws1.hxx
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -45,6 +45,7 @@ private:
 
 std::unique_ptr mxNewTheme;
 std::unique_ptr mxThemes;
+std::unique_ptr mxMoreGalleries;
 Gallery* mpGallery;
 std::unique_ptr mpExchangeData;
 std::unique_ptr mpThemePropsDlgItemSet;
@@ -71,6 +72,7 @@ private:
 DECL_LINK( SelectThemeHdl, weld::TreeView&, void );
 DECL_LINK( PopupMenuHdl, const CommandEvent&, bool 
);
 DECL_LINK( KeyInputHdl, const KeyEvent&, bool );
+DECL_STATIC_LINK( GalleryBrowser1, 
OnMoreGalleriesClick, weld::Button&, void );
 
 public:
 
diff --git a/svx/uiconfig/ui/sidebargallery.ui 
b/svx/uiconfig/ui/sidebargallery.ui
index 6beedd59a5cd..247c396bb355 100644
--- a/svx/uiconfig/ui/sidebargallery.ui
+++ b/svx/uiconfig/ui/sidebargallery.ui
@@ -1,16 +1,16 @@
 
-
+
 
   
   
 True
-False
-svx/res/galicon.png
+False
+svx/res/galicon.png
   
   
 True
-False
-svx/res/gallist.png
+False
+svx/res/gallist.png
   
   
 
@@ -32,51 +32,54 @@
   
 
   
+  
   
 True
-False
+False
 True
 True
-6
+6
 
+  
   
 True
-False
+False
 True
 True
-3
-6
+3
+6
 
   
 True
-True
+True
 True
 True
 vertical
-True
+True
 
+  
   
 True
-False
+False
 True
 True
 
   
 True
-True
+True
 True
 True
-in
+in
 
   
 True
-True
+True
 True
 True
 liststore1
-False
-1
-False
+False
+1
+False
 
   
   

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

2015-02-22 Thread Julien Nabet
 sc/source/ui/navipi/navipi.cxx |2 +-
 svx/source/svdraw/svdmrkv1.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4cc958ec34c390e9b8c0ac9b000a8448f0c4bfc4
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Feb 22 21:55:16 2015 +0100

Simplify erase iterator management

Change-Id: I3822566e01d3c8f5e880264f4dba495d6e467e02

diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx
index 06580da..473b86d 100644
--- a/svx/source/svdraw/svdmrkv1.cxx
+++ b/svx/source/svdraw/svdmrkv1.cxx
@@ -355,7 +355,7 @@ void SdrMarkView::UndirtyMrkPnt() const
 {
 sal_uInt16 nId=*it;
 if (pGPL-FindGluePoint(nId)==SDRGLUEPOINT_NOTFOUND) {
-pPts-erase(it++);
+it = pPts-erase(it);
 bChg=true;
 }
 else
commit c0d31015ae5da39440d98b8e568a66eb1b97c6c1
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Feb 22 17:27:48 2015 +0100

Typo: widht-width

Change-Id: Iaa803ee9082c434b86295561cb205e7d4b7169b8

diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 5acbf26..3b25f7f 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -772,7 +772,7 @@ void ScNavigatorDlg::DoResize()
 }
 
 //  even if the content is not visible, adapt the size,
-//  so the widht fit
+//  so the width fit
 
 Point aEntryPos = aLbEntries.GetPosPixel();
 Point aListPos = aLbDocuments.GetPosPixel();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-29 Thread Eike Rathke
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx |   31 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |   28 ++
 2 files changed, 42 insertions(+), 17 deletions(-)

New commits:
commit 1884c0bbd40f0ded41d7a1656cb64fb1f6368c36
Author: Eike Rathke er...@redhat.com
Date:   Thu Jan 29 17:14:51 2015 +0100

parse with locale decimal separator, tdf#88740 related

And use a proper string to double conversion and early bail out
conditions.

Change-Id: I6c89dd850405ad74ebd175800131cdcac19a8c86

diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx 
b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
index 80b103e..4d03553 100644
--- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx
@@ -113,16 +113,35 @@ void AlignmentPropertyPanel::Initialize()
 IMPL_LINK( AlignmentPropertyPanel, AngleModifiedHdl, void *, EMPTYARG )
 {
 OUString sTmp = mpMtrAngle-GetText();
+if (sTmp.isEmpty())
+return 0;
+sal_Unicode nChar = sTmp[0];
+if( nChar == '-' )
+{
+if (sTmp.getLength()  2)
+return 0;
+nChar = sTmp[1];
+}
+
+if( (nChar  '0') || (nChar  '9') )
+return 0;
 
-sal_Unicode nChar = sTmp.isEmpty() ? 0 : sTmp[0];
-if((sTmp.getLength()== 1   nChar == '-') ||
-(nChar != '-'  ((nChar  '0') || (nChar  '9') ) ))   modify
+const LocaleDataWrapper rLocaleWrapper( 
Application::GetSettings().GetLocaleDataWrapper() );
+const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
+
+// Do not check that the entire string was parsed up to its end, there may
+// be a degree symbol following the number. Note that this also means that
+// the number recognized just stops at any non-matching character.
+/* TODO: we could check for the degree symbol stop if there are no other
+ * cases with different symbol characters in any language? */
+rtl_math_ConversionStatus eStatus;
+double fTmp = rtl::math::stringToDouble( sTmp, cSep, 0, eStatus);
+if (eStatus != rtl_math_ConversionStatus_Ok)
 return 0;
 
-double dTmp = sTmp.toDouble();
-FormatDegrees(dTmp);
+FormatDegrees(fTmp);
 
-sal_Int64 nTmp = (sal_Int64)dTmp*100;
+sal_Int64 nTmp = (sal_Int64)fTmp*100;
 SfxInt32Item aAngleItem( SID_ATTR_ALIGN_DEGREES,(sal_uInt32) nTmp);
 
 GetBindings()-GetDispatcher()-Execute(
commit 3ba5ac834780fc2565aff99e42dd8c3b2202fba3
Author: Eike Rathke er...@redhat.com
Date:   Thu Jan 29 17:04:48 2015 +0100

use a less ugly string to double conversion, tdf#88740 follow-up

And check string length before accessing characters..

Change-Id: Iac3c2bf2f67f0cc7fc106515a875512771676e01

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 63de7bb..6f6dceb 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -477,12 +477,13 @@ IMPL_LINK( PosSizePropertyPanel, ClickAutoHdl, void *, 
EMPTYARG )
 IMPL_LINK( PosSizePropertyPanel, AngleModifiedHdl, void *, EMPTYARG )
 {
 OUString sTmp = mpMtrAngle-GetText();
-boolbNegative = false;
+if (sTmp.isEmpty())
+return 0;
 sal_Unicode nChar = sTmp[0];
-
 if( nChar == '-' )
 {
-bNegative = true;
+if (sTmp.getLength()  2)
+return 0;
 nChar = sTmp[1];
 }
 
@@ -492,15 +493,20 @@ IMPL_LINK( PosSizePropertyPanel, AngleModifiedHdl, void 
*, EMPTYARG )
 const LocaleDataWrapper rLocaleWrapper( 
Application::GetSettings().GetLocaleDataWrapper() );
 const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
 
-sTmp = sTmp.replace(cSep,'.'); // toDouble() expects decimal point
+// Do not check that the entire string was parsed up to its end, there may
+// be a degree symbol following the number. Note that this also means that
+// the number recognized just stops at any non-matching character.
+/* TODO: we could check for the degree symbol stop if there are no other
+ * cases with different symbol characters in any language? */
+rtl_math_ConversionStatus eStatus;
+double fTmp = rtl::math::stringToDouble( sTmp, cSep, 0, eStatus);
+if (eStatus != rtl_math_ConversionStatus_Ok)
+return 0;
+
+while (fTmp  0)
+fTmp += 360;
 
-double dTmp = sTmp.toDouble();
-if(bNegative)
-{
-while(dTmp0)
-dTmp += 360;
-}
-sal_Int64 nTmp = dTmp*100;
+sal_Int64 nTmp = fTmp*100;
 
 // #i123993# Need to take UIScale into account when executing rotations
 const double fUIScale(mpView  mpView-GetModel() ? 
double(mpView-GetModel()-GetUIScale()) : 1.0);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org

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

2013-03-29 Thread Julien Nabet
 sc/source/ui/view/pfuncache.cxx |4 ++--
 svx/source/sdr/properties/defaultproperties.cxx |1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit da3150eeff531811dbb44f7a3cbb025855d2
Author: Julien Nabet serval2...@yahoo.fr
Date:   Fri Mar 29 08:31:39 2013 +0100

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

Change-Id: Id2b6118727d00a0dd5249b3f3a14efd18150fffa

diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx
index e7b3273..9f6a92dc 100644
--- a/sc/source/ui/view/pfuncache.cxx
+++ b/sc/source/ui/view/pfuncache.cxx
@@ -133,8 +133,8 @@ void ScPrintFuncCache::InitLocations( const ScMarkData 
rMark, OutputDevice* pDe
 
 bool ScPrintFuncCache::FindLocation( const ScAddress rCell, 
ScPrintPageLocation rLocation ) const
 {
-for ( std::vectorScPrintPageLocation::const_iterator 
aIter(aLocations.begin());
-  aIter != aLocations.end(); aIter++ )
+for ( std::vectorScPrintPageLocation::const_iterator 
aIter(aLocations.begin()), aEnd(aLocations.end());
+  aIter != aEnd; ++aIter )
 {
 if ( aIter-aCellRange.In( rCell ) )
 {
commit b2f7633977da7a0093c26a2d7fbc0d2d93c54226
Author: Julien Nabet serval2...@yahoo.fr
Date:   Fri Mar 29 08:31:02 2013 +0100

Oups ++aIter had to be removed here

Change-Id: I9ac0b5e0f74f7f211d074095fe82e93595d2f55a

diff --git a/svx/source/sdr/properties/defaultproperties.cxx 
b/svx/source/sdr/properties/defaultproperties.cxx
index cb11d13..ff05b6a 100644
--- a/svx/source/sdr/properties/defaultproperties.cxx
+++ b/svx/source/sdr/properties/defaultproperties.cxx
@@ -171,7 +171,6 @@ namespace sdr
 for (std::vector sal_uInt16 ::const_iterator 
aIter(aPostItemChangeList.begin()), aEnd(aPostItemChangeList.end()); aIter != 
aEnd; ++aIter)
 {
 PostItemChange(*aIter);
-++aIter;
 }
 
 ItemSetChanged(aSet);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-09 Thread Markus Mohrhard
 sc/source/ui/drawfunc/fusel.cxx  |   28 +++---
 sc/source/ui/drawfunc/futext.cxx |   41 ++-
 svx/source/dialog/rubydialog.cxx |1 
 3 files changed, 16 insertions(+), 54 deletions(-)

New commits:
commit d2157548221e28d8f702cc81991f7aef198b523e
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Sat Mar 9 20:32:25 2013 +0100

fix fdo#61025, Revert fdo#55430 switches off text mode when ...

This reverts commit e80a8b6f14fac6bb6cc7ea55b118f95472d5b654.

Change-Id: I30305abb212907690933ff27899b0ad7b6793360

diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index a3568b0..4968f15 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -53,8 +53,6 @@
 //  Maximal erlaubte Mausbewegung um noch DragDrop zu starten
 //! fusel,fuconstr,futext - zusammenfassen!
 #define SC_MAXDRAGMOVE  3
-// Min necessary mouse motion for normal dragging
-#define SC_MINDRAGMOVE 2
 
 // ---
 
@@ -383,14 +381,11 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent 
rMEvt)
 sal_Bool bReturn = FuDraw::MouseButtonUp(rMEvt);
 sal_Bool bOle = pViewShell-GetViewFrame()-GetFrame().IsInPlace();
 
-SdrObject* pObj = NULL;
-SdrPageView* pPV = NULL;
 if (aDragTimer.IsActive() )
 {
 aDragTimer.Stop();
 }
 
-sal_uInt16 nDrgLog = sal_uInt16 ( 
pWindow-PixelToLogic(Size(SC_MINDRAGMOVE,0)).Width() );
 Point aPnt( pWindow-PixelToLogic( rMEvt.GetPosPixel() ) );
 
 bool bCopy = false;
@@ -421,7 +416,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent rMEvt)
 for ( sal_uLong i = 0; i  nMarkCount; ++i )
 {
 SdrMark* pMark = rSdrMarkList.GetMark( i );
-pObj = ( pMark ? pMark-GetMarkedSdrObj() : NULL );
+SdrObject* pObj = ( pMark ? pMark-GetMarkedSdrObj() : 
NULL );
 if ( pObj )
 {
 ScChartHelper::AddRangesIfProtectedChart( 
aProtectedChartRangesVector, pDocument, pObj );
@@ -431,21 +426,6 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent 
rMEvt)
 bCopy = true;
 }
 
-if (!rMEvt.IsShift()  !rMEvt.IsMod1()  !rMEvt.IsMod2() 
-Abs(aPnt.X() - aMDPos.X())  nDrgLog 
-Abs(aPnt.Y() - aMDPos.Y())  nDrgLog)
-{
-/*
-* If a user wants to click on an object in front of a marked
-* one, he releases the mouse button immediately
-**/
-if (pView-PickObj(aMDPos, pView-getHitTolLog(), pObj, pPV, 
SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK))
-{
-pView-UnmarkAllObj();
-pView-MarkObj(pObj,pPV,false,false);
-return (sal_True);
-}
-}
 pView-EndDragObj( rMEvt.IsMod1() );
 pView-ForceMarkedToAnotherPage();
 
@@ -453,7 +433,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent rMEvt)
 if (rMarkList.GetMarkCount() == 1)
 {
   SdrMark* pMark = rMarkList.GetMark(0);
-  pObj = pMark-GetMarkedSdrObj();
+  SdrObject* pObj = pMark-GetMarkedSdrObj();
   FuPoor* pPoor = 
pViewShell-GetViewData()-GetView()-GetDrawFuncPtr();
   FuText* pText = static_castFuText*(pPoor);
 pText-StopDragMode(pObj );
@@ -478,7 +458,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent rMEvt)
 bool bFound = false;
 for( sal_uLong nIdx = 0; !bFound  (nIdx  nCount); 
++nIdx )
 {
-pObj = rMarkList.GetMark( nIdx )-GetMarkedSdrObj();
+SdrObject* pObj = rMarkList.GetMark( nIdx 
)-GetMarkedSdrObj();
 bFound = ScDrawLayer::IsNoteCaption( pObj );
 if( bFound )
 {
@@ -514,7 +494,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent rMEvt)
 if (rMarkList.GetMarkCount() == 1)
 {
 SdrMark* pMark = rMarkList.GetMark(0);
-pObj = pMark-GetMarkedSdrObj();
+SdrObject* pObj = pMark-GetMarkedSdrObj();
 
 //  aktivieren nur, wenn die Maus auch (noch) ueber dem
 //  selektierten Objekt steht
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 61fdf0a..71e4561 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -125,7 +125,6 @@ sal_Bool FuText::MouseButtonDown(const MouseEvent rMEvt)
 {