[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source include/vcl vcl/source

2018-11-06 Thread Libreoffice Gerrit user
 desktop/source/lib/init.cxx |2 ++
 include/vcl/svapp.hxx   |3 +++
 vcl/source/app/svapp.cxx|7 +++
 3 files changed, 12 insertions(+)

New commits:
commit 6f076e75b2adb4628ee3cea311781c40f219bba7
Author: Andras Timar 
AuthorDate: Mon Nov 5 18:17:05 2018 +0100
Commit: Michael Meeks 
CommitDate: Tue Nov 6 15:55:00 2018 +0100

LOK: update main thread

Change-Id: I75df6ae9f9fb41b08a8774ce026f79fdd120b629
Reviewed-on: https://gerrit.libreoffice.org/62921
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 10e81de091e5..7637f764b46d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3630,6 +3630,8 @@ static void lo_startmain(void*)
 if (GetpApp())
 Application::GetSolarMutex().tryToAcquire();
 
+Application::UpdateMainThread();
+
 soffice_main();
 }
 
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 9b930b3127d9..014850eba019 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -1355,6 +1355,9 @@ public:
 static void ShowNativeErrorBox(const OUString& sTitle  ,
const OUString& sMessage);
 
+/** Update main thread identifier */
+static void UpdateMainThread();
+
 /** Do we have a native / system file selector available?
 
  @returns True if native file selector is available, false otherwise.
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index e08adff710e3..c412728cd6a4 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1383,6 +1383,13 @@ void Application::SetHelp( Help* pHelp )
 ImplGetSVData()->maAppData.mpHelp = pHelp;
 }
 
+void Application::UpdateMainThread()
+{
+ImplSVData* pSVData = ImplGetSVData();
+if (pSVData)
+pSVData->mnMainThreadId = osl::Thread::getCurrentIdentifier();
+}
+
 Help* Application::GetHelp()
 {
 return ImplGetSVData()->maAppData.mpHelp;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2018-07-09 Thread Ashod Nakashian
 desktop/source/lib/init.cxx |   50 ++--
 1 file changed, 26 insertions(+), 24 deletions(-)

New commits:
commit bbba0902fc1f1c6bb2a7f1e6ff2b682e2fbd3cc9
Author: Ashod Nakashian 
Date:   Fri Jul 6 16:49:29 2018 -0400

desktop: move font initialization into preloadData

Change-Id: I66840512b45e987cc7b08b07b65bdb24f2023a41
Reviewed-on: https://gerrit.libreoffice.org/57160
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fe1368376076..10e81de091e5 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3715,9 +3715,35 @@ static void preloadData()
 images.getImageUrl("forcefed.png", "style", "FO_oo");
 
 std::cerr << "Preload languages\n";
+
 // force load language singleton
 SvtLanguageTable::HasLanguageType(LANGUAGE_SYSTEM);
 LanguageTag::isValidBcp47("foo");
+
+std::cerr << "Preload fonts\n";
+
+// Initialize fonts.
+css::uno::Reference xLangSrv = 
css::linguistic2::LinguServiceManager::create(xContext);
+if (xLangSrv.is())
+{
+css::uno::Reference 
xSpell(xLangSrv->getSpellChecker(), css::uno::UNO_QUERY);
+css::uno::Reference 
xLocales(xSpell, css::uno::UNO_QUERY);
+if (xLocales.is())
+aLocales = xLocales->getLocales();
+}
+
+for (const auto& aLocale : aLocales)
+{
+//TODO: Add more types and cache more aggessively. For now this 
initializes the fontcache.
+using namespace ::com::sun::star::i18n::ScriptType;
+LanguageType nLang;
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), LATIN);
+OutputDevice::GetDefaultFont(DefaultFontType::LATIN_SPREADSHEET, 
nLang, GetDefaultFontFlags::OnlyOne);
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), ASIAN);
+OutputDevice::GetDefaultFont(DefaultFontType::CJK_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), COMPLEX);
+OutputDevice::GetDefaultFont(DefaultFontType::CTL_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
+}
 }
 
 static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const 
char* pUserProfileUrl)
@@ -3837,30 +3863,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 
 preloadData();
 
-// Initialize fonts.
-css::uno::Sequence< css::lang::Locale > aLocales;
-css::uno::Reference 
xLangSrv = css::linguistic2::LinguServiceManager::create(xContext);
-if (xLangSrv.is())
-{
-css::uno::Reference 
xSpell(xLangSrv->getSpellChecker(), css::uno::UNO_QUERY);
-css::uno::Reference 
xLocales(xSpell, css::uno::UNO_QUERY);
-if (xLocales.is())
-aLocales = xLocales->getLocales();
-}
-
-for (const auto& aLocale : aLocales)
-{
-//TODO: Add more types and cache more aggessively. For now 
this initializes the fontcache.
-using namespace ::com::sun::star::i18n::ScriptType;
-LanguageType nLang;
-nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), LATIN);
-
OutputDevice::GetDefaultFont(DefaultFontType::LATIN_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
-nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), ASIAN);
-
OutputDevice::GetDefaultFont(DefaultFontType::CJK_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
-nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), COMPLEX);
-
OutputDevice::GetDefaultFont(DefaultFontType::CTL_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
-}
-
 // Release Solar Mutex, lo_startmain thread should acquire it.
 Application::ReleaseSolarMutex();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2018-07-06 Thread Aron Budea
 desktop/source/lib/init.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bd88f41d53881fd1a3ad42268cd76d598bdd7838
Author: Aron Budea 
Date:   Fri Jul 6 15:32:49 2018 +0200

desktop: move dictionary preload before font init

spell-checker is initialized during font init

since e7f65920b12517b31f0c5cbfd0dcb8df96d20ba4

Change-Id: Ia5b5223aa8cc00d0e80451142ae18a7046ad00d4
Reviewed-on: https://gerrit.libreoffice.org/57064
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 687e37e7f29d..fe1368376076 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3835,6 +3835,8 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 // 3) InitVCL()
 aService->initialize({css::uno::makeAny("preload")});
 
+preloadData();
+
 // Initialize fonts.
 css::uno::Sequence< css::lang::Locale > aLocales;
 css::uno::Reference 
xLangSrv = css::linguistic2::LinguServiceManager::create(xContext);
@@ -3859,8 +3861,6 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 
OutputDevice::GetDefaultFont(DefaultFontType::CTL_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
 }
 
-preloadData();
-
 // Release Solar Mutex, lo_startmain thread should acquire it.
 Application::ReleaseSolarMutex();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2018-06-28 Thread Ashod Nakashian
 desktop/source/lib/init.cxx |   26 ++
 1 file changed, 26 insertions(+)

New commits:
commit e7f65920b12517b31f0c5cbfd0dcb8df96d20ba4
Author: Ashod Nakashian 
Date:   Thu Jun 28 01:07:32 2018 -0400

desktop: initialize fonts in pre-init

Change-Id: I5a3acc41196c7e0672514fa2dae00e5fc0f76a1f
Reviewed-on: https://gerrit.libreoffice.org/56573
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c8593b96859b..687e37e7f29d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -62,6 +62,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -104,6 +105,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -3833,6 +3835,30 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 // 3) InitVCL()
 aService->initialize({css::uno::makeAny("preload")});
 
+// Initialize fonts.
+css::uno::Sequence< css::lang::Locale > aLocales;
+css::uno::Reference 
xLangSrv = css::linguistic2::LinguServiceManager::create(xContext);
+if (xLangSrv.is())
+{
+css::uno::Reference 
xSpell(xLangSrv->getSpellChecker(), css::uno::UNO_QUERY);
+css::uno::Reference 
xLocales(xSpell, css::uno::UNO_QUERY);
+if (xLocales.is())
+aLocales = xLocales->getLocales();
+}
+
+for (const auto& aLocale : aLocales)
+{
+//TODO: Add more types and cache more aggessively. For now 
this initializes the fontcache.
+using namespace ::com::sun::star::i18n::ScriptType;
+LanguageType nLang;
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), LATIN);
+
OutputDevice::GetDefaultFont(DefaultFontType::LATIN_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), ASIAN);
+
OutputDevice::GetDefaultFont(DefaultFontType::CJK_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
+nLang = 
MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType(aLocale,
 false), COMPLEX);
+
OutputDevice::GetDefaultFont(DefaultFontType::CTL_SPREADSHEET, nLang, 
GetDefaultFontFlags::OnlyOne);
+}
+
 preloadData();
 
 // Release Solar Mutex, lo_startmain thread should acquire it.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source sc/inc sc/sdi sc/source

2018-06-27 Thread Jan Holesovsky
 desktop/source/lib/init.cxx|2 
 sc/inc/colorscale.hxx  |6 +-
 sc/sdi/scalc.sdi   |2 
 sc/source/core/data/colorscale.cxx |4 -
 sc/source/ui/view/cellsh1.cxx  |   92 ++---
 5 files changed, 73 insertions(+), 33 deletions(-)

New commits:
commit 5e3365e88c94450e6db687eb46425e07db6997f5
Author: Jan Holesovsky 
Date:   Mon Jun 25 22:58:30 2018 +0200

Conditional formatting: Allow to set the icon set CF via .uno: command.

When .uno:IconSetFormatDialog gets a parameter, it directly creates the
icon set conditional formatting with pre-selected values.

Change-Id: I75dda90e5ea9c191254acc24c564cda7b27243a5
Reviewed-on: https://gerrit.libreoffice.org/56429
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b0079d0f5f16..c8593b96859b 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -335,6 +335,8 @@ std::vector 
desktop::jsonToPropertyValuesVector(const char
 aValue.Value <<= OString(rValue.c_str()).toFloat();
 else if (rType == "long")
 aValue.Value <<= OString(rValue.c_str()).toInt32();
+else if (rType == "short")
+aValue.Value <<= 
static_cast(OString(rValue.c_str()).toInt32());
 else if (rType == "unsigned short")
 aValue.Value <<= 
static_cast(OString(rValue.c_str()).toUInt32());
 else if (rType == "[]any")
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 840b6824963d..8ae03f419b18 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -51,7 +51,7 @@ private:
 ScColorScaleEntryType meType;
 
 public:
-ScColorScaleEntry(double nVal, const Color& rCol);
+ScColorScaleEntry(double nVal, const Color& rCol, ScColorScaleEntryType 
eType = COLORSCALE_VALUE);
 ScColorScaleEntry();
 ScColorScaleEntry(const ScColorScaleEntry& rEntry);
 ScColorScaleEntry(ScDocument* pDoc, const ScColorScaleEntry& rEntry);
@@ -329,8 +329,8 @@ struct ScIconSetFormatData
 // std..pair::second == -1 means no image
 std::vector > maCustomVector;
 
-ScIconSetFormatData():
-eIconSetType(IconSet_3Arrows),
+ScIconSetFormatData(ScIconSetType eType = IconSet_3Arrows):
+eIconSetType(eType),
 mbShowValue(true),
 mbReverse(false),
 mbCustom(false)
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index 544655e5fe4f..56d68d0799fd 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -829,7 +829,7 @@ SfxVoidItem DataBarFormatDialog SID_OPENDLG_DATABAR
 
 
 SfxVoidItem IconSetFormatDialog SID_OPENDLG_ICONSET
-()
+(SfxInt16Item IconSet FN_PARAM_1)
 [
 AutoUpdate = FALSE,
 FastCall = FALSE,
diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index cb7599e0db53..7c6bb46aa8a2 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -158,10 +158,10 @@ ScColorScaleEntry::ScColorScaleEntry():
 {
 }
 
-ScColorScaleEntry::ScColorScaleEntry(double nVal, const Color& rCol):
+ScColorScaleEntry::ScColorScaleEntry(double nVal, const Color& rCol, 
ScColorScaleEntryType eType):
 mnVal(nVal),
 maColor(rCol),
-meType(COLORSCALE_VALUE)
+meType(eType)
 {
 }
 
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index e8a5fecaf609..efe07dbccd94 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -48,6 +48,7 @@
 #include 
 
 #include "cellsh.hxx"
+#include 
 #include "sc.hrc"
 #include "document.hxx"
 #include "patattr.hxx"
@@ -77,6 +78,7 @@
 #include "cliputil.hxx"
 #include "markdata.hxx"
 #include "docpool.hxx"
+#include 
 #include "condformatdlg.hxx"
 #include "attrib.hxx"
 #include "condformatdlgitem.hxx"
@@ -100,6 +102,7 @@
 #include 
 #include 
 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -1984,15 +1987,16 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 aRangeList.push_back(pRange);
 }
 
+// try to find an existing conditional format
 const ScConditionalFormat* pCondFormat = nullptr;
 const ScPatternAttr* pPattern = pDoc->GetPattern(aPos.Col(), 
aPos.Row(), aPos.Tab());
+ScConditionalFormatList* pList = 
pDoc->GetCondFormList(aPos.Tab());
 const std::vector& rCondFormats = 
static_cast(pPattern->GetItem(ATTR_CONDITIONAL)).GetCondFormatData();
 bool bContainsCondFormat = !rCondFormats.empty();
 bool bCondFormatDlg = false;
+bool bContainsExistingCondFormat = false;
 if(bContainsCondFormat)
 {
-bool bContainsExistingCondFormat = false;
-ScConditionalFormatList* pList = 
pDoc->GetCondFormList(aPos.Tab());
 for 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2018-04-09 Thread Marco Cecchetti
 desktop/source/lib/init.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 1cd76097043a5ece899dd7c9468755dcd961b0eb
Author: Marco Cecchetti 
Date:   Sun Apr 8 12:12:27 2018 +0200

lok: sc: clicking outside a pop-up or context menu doesn't close it

Change-Id: Iecf0659467264d921c7c9faddc98fd5519e7db93
Reviewed-on: https://gerrit.libreoffice.org/52617
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 1b2a95416081..d8c229aef7c2 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -80,6 +80,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -3372,10 +3373,12 @@ static void doc_postWindow(LibreOfficeKitDocument* 
/*pThis*/, unsigned nLOKWindo
 return;
 }
 
-if (Dialog* pDialog = dynamic_cast(pWindow.get()))
+if (nAction == LOK_WINDOW_CLOSE)
 {
-if (nAction == LOK_WINDOW_CLOSE)
+if (Dialog* pDialog = dynamic_cast(pWindow.get()))
 pDialog->Close();
+else if (FloatingWindow* pFloatWin = 
dynamic_cast(pWindow.get()))
+pFloatWin->EndPopupMode(FloatWinPopupEndFlags::Cancel | 
FloatWinPopupEndFlags::CloseAll);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2018-04-03 Thread Tor Lillqvist
 desktop/source/lib/init.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit 5c06f1eb53f818bbf1d25eeac10201168a67e52e
Author: Tor Lillqvist 
Date:   Fri Jan 19 17:44:52 2018 +0200

Handle also []any in unoAnyToPropertyTree()

We add it as a subtree where each element in the sequence has as its
name its number.

Change-Id: I9422777d887d899f76ad6d259631d15c2db53f03
Reviewed-on: https://gerrit.libreoffice.org/51967
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 
(cherry picked from commit 1bf2ed44a18666843d6c1b4a92966fd78cda07bf)
Reviewed-on: https://gerrit.libreoffice.org/52091
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 25b66ab08480..a3b77270aaa9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -291,6 +291,20 @@ static boost::property_tree::ptree 
unoAnyToPropertyTree(const uno::Any& anyItem)
 aTree.put("value", 
OString::number(anyItem.get()).getStr());
 else if (aType == "long")
 aTree.put("value", OString::number(anyItem.get()).getStr());
+else if (aType == "[]any")
+{
+uno::Sequence aSeq;
+if (anyItem >>= aSeq)
+{
+boost::property_tree::ptree aSubTree;
+
+for (auto i = 0; i < aSeq.getLength(); ++i)
+{
+aSubTree.add_child(OString::number(i).getStr(), 
unoAnyToPropertyTree(aSeq[i]));
+}
+aTree.add_child("value", aSubTree);
+}
+}
 
 // TODO: Add more as required
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source include/vcl sc/qa sc/source vcl/source

2018-02-23 Thread Pranav Kant
 desktop/source/lib/init.cxx  |   79 ---
 include/vcl/IDialogRenderable.hxx|2 
 include/vcl/ITiledRenderable.hxx |   61 
 sc/qa/unit/tiledrendering/tiledrendering.cxx |2 
 sc/source/ui/unoobj/docuno.cxx   |6 +-
 vcl/source/window/mouse.cxx  |   17 +
 6 files changed, 85 insertions(+), 82 deletions(-)

New commits:
commit 7e8d9f156fc6650c49c3312f6f7a7a57abf1f285
Author: Pranav Kant 
Date:   Fri Feb 23 21:27:33 2018 +0530

lok sc: Post mouse events to main thread

Change-Id: I1311938d7c01d0e3bfd239743e6cb2148da56cdf
Reviewed-on: https://gerrit.libreoffice.org/50253
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 1bf6d00674a8..45cd0a0c18b2 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -211,66 +211,6 @@ static const ExtensionMap aDrawExtensionMap[] =
 { nullptr, nullptr }
 };
 
-/*
- * Map directly to css cursor styles to avoid further mapping in the client.
- * Gtk (via gdk_cursor_new_from_name) also supports the same css cursor styles.
- *
- * This was created partially with help of the mappings in gtkdata.cxx.
- * The list is incomplete as some cursor style simply aren't supported
- * by css, it might turn out to be worth mapping some of these missing cursors
- * to available cursors?
- */
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning( disable : 4592)
-#endif
-static const std::map  aPointerMap {
-{ PointerStyle::Arrow, "default" },
-// PointerStyle::Null ?
-{ PointerStyle::Wait, "wait" },
-{ PointerStyle::Text, "text" },
-{ PointerStyle::Help, "help" },
-{ PointerStyle::Cross, "crosshair" },
-{ PointerStyle::Fill, "fill" },
-{ PointerStyle::Move, "move" },
-{ PointerStyle::NSize, "n-resize" },
-{ PointerStyle::SSize, "s-resize" },
-{ PointerStyle::WSize, "w-resize" },
-{ PointerStyle::ESize, "e-resize" },
-{ PointerStyle::NWSize, "ne-resize" },
-{ PointerStyle::NESize, "ne-resize" },
-{ PointerStyle::SWSize, "sw-resize" },
-{ PointerStyle::SESize, "se-resize" },
-// WindowNSize through WindowSESize
-{ PointerStyle::HSplit, "col-resize" },
-{ PointerStyle::VSplit, "row-resize" },
-{ PointerStyle::HSizeBar, "col-resize" },
-{ PointerStyle::VSizeBar, "row-resize" },
-{ PointerStyle::Hand, "grab" },
-{ PointerStyle::RefHand, "grabbing" },
-// Pen, Magnify, Fill, Rotate
-// HShear, VShear
-// Mirror, Crook, Crop, MovePoint, MoveBezierWeight
-// MoveData
-{ PointerStyle::CopyData, "copy" },
-{ PointerStyle::LinkData, "alias" },
-// MoveDataLink, CopyDataLink
-//MoveFile, CopyFile, LinkFile
-// MoveFileLink, CopyFileLink, MoveFiless, CopyFiles
-{ PointerStyle::NotAllowed, "not-allowed" },
-// DrawLine through DrawCaption
-// Chart, Detective, PivotCol, PivotRow, PivotField, Chain, ChainNotAllowed
-// TimeEventMove, TimeEventSize
-// AutoScrollN through AutoScrollNSWE
-// Airbrush
-{ PointerStyle::TextVertical, "vertical-text" }
-// Pivot Delete, TabSelectS through TabSelectSW
-// PaintBrush, HideWhiteSpace, ShowWhiteSpace
-};
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
 static OUString getUString(const char* pString)
 {
 if (pString == nullptr)
@@ -2511,25 +2451,6 @@ static void doc_postMouseEvent(LibreOfficeKitDocument* 
pThis, int nType, int nX,
 }
 
 pDoc->postMouseEvent(nType, nX, nY, nCount, nButtons, nModifier);
-
-Pointer aPointer = pDoc->getPointer();
-// We don't map all possible pointers hence we need a default
-OString aPointerString = "default";
-auto aIt = aPointerMap.find(aPointer.GetStyle());
-if (aIt != aPointerMap.end())
-{
-aPointerString = aIt->second;
-}
-
-LibLODocument_Impl* pLib = static_cast(pThis);
-int nView = SfxLokHelper::getView();
-if (nView < 0)
-return;
-
-if (pLib->mpCallbackFlushHandlers[nView])
-{
-
pLib->mpCallbackFlushHandlers[nView]->queue(LOK_CALLBACK_MOUSE_POINTER, 
aPointerString.getStr());
-}
 }
 
 static void doc_postWindowMouseEvent(LibreOfficeKitDocument* /*pThis*/, 
unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int 
nModifier)
diff --git a/include/vcl/IDialogRenderable.hxx 
b/include/vcl/IDialogRenderable.hxx
index ef8d42a4a46c..a2c9b8416ccd 100644
--- a/include/vcl/IDialogRenderable.hxx
+++ b/include/vcl/IDialogRenderable.hxx
@@ -34,6 +34,8 @@ public:
 virtual void notifyWindow(vcl::LOKWindowId nLOKWindowId,
   const OUString& rAction,
   const std::vector& rPayload = 
std::vector()) const = 0;
+
+virtual void 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source sfx2/source

2018-02-21 Thread Andras Timar
 desktop/source/lib/init.cxx  |3 ++-
 sfx2/source/control/unoctitm.cxx |1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 58f2da6af5e772bd01f75a00753a42cfd70af917
Author: Andras Timar 
Date:   Tue Feb 20 23:21:34 2018 +0100

lok: support of AutoCorrect -> While Typing menu in Writer

Change-Id: I7c07f3a6269cd4b92cc50f7aaf847faf04665029
Reviewed-on: https://gerrit.libreoffice.org/50068
Tested-by: Jenkins 
Reviewed-by: Andras Timar 
(cherry picked from commit e73cba0cea07eedee5507535f585e89e42ea0124)
Reviewed-on: https://gerrit.libreoffice.org/50076
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8c51972b861d..6309802f6971 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1779,7 +1779,8 @@ static void doc_iniUnoCommands ()
 OUString(".uno:DocumentRepair"),
 OUString(".uno:TransformDialog"),
 OUString(".uno:InsertPageHeader"),
-OUString(".uno:InsertPageFooter")
+OUString(".uno:InsertPageFooter"),
+OUString(".uno:OnlineAutoFormat")
 };
 
 util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 668f5c65b222..a09e20c7c8e4 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -994,6 +994,7 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
 aEvent.FeatureURL.Path == "RightPara" ||
 aEvent.FeatureURL.Path == "Shadowed" ||
 aEvent.FeatureURL.Path == "SpellOnline" ||
+aEvent.FeatureURL.Path == "OnlineAutoFormat" ||
 aEvent.FeatureURL.Path == "SubScript" ||
 aEvent.FeatureURL.Path == "SuperScript" ||
 aEvent.FeatureURL.Path == "Strikeout" ||
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source include/LibreOfficeKit include/vcl sc/inc sc/qa sc/source sd/qa sd/source sw/inc sw/qa sw/source vcl/source

2018-02-14 Thread Pranav Kant
 desktop/source/lib/init.cxx|   36 +
 include/LibreOfficeKit/LibreOfficeKit.h|1 
 include/LibreOfficeKit/LibreOfficeKit.hxx  |6 ++--
 include/vcl/ITiledRenderable.hxx   |   12 +++-
 sc/inc/docuno.hxx  |6 ++--
 sc/qa/unit/tiledrendering/tiledrendering.cxx   |6 ++--
 sc/source/ui/unoobj/docuno.cxx |   34 ++-
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |6 ++--
 sd/source/ui/inc/unomodel.hxx  |3 --
 sd/source/ui/unoidl/unomodel.cxx   |   36 ++---
 sw/inc/unotxdoc.hxx|4 +-
 sw/qa/extras/tiledrendering/tiledrendering.cxx |6 ++--
 sw/source/uibase/uno/unotxdoc.cxx  |   30 ++--
 vcl/source/window/window.cxx   |8 -
 14 files changed, 96 insertions(+), 98 deletions(-)

New commits:
commit 5024d7dbb364dec4fc90979251e5f29bc5ed3f5b
Author: Pranav Kant 
Date:   Wed Feb 14 17:33:16 2018 +0530

lok IME: support dialogs as well

Change-Id: Ic78da45dadaa5a4e1ca78e20d04974108581121e
(cherry picked from commit 44fa8ae7d9bb3a28d860b2cc5871d6a6ccfc8411)
Reviewed-on: https://gerrit.libreoffice.org/49728
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index eafdf21f88ce..8c51972b861d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -569,6 +569,7 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* pThis,
  int nCharCode,
  int nKeyCode);
 static void doc_postExtTextInputEvent(LibreOfficeKitDocument* pThis,
+  unsigned nWindowId,
   int nType,
   const char* pText);
 static void doc_postWindowKeyEvent(LibreOfficeKitDocument* pThis,
@@ -2285,18 +2286,43 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* 
pThis, int nType, int nChar
 pDoc->postKeyEvent(nType, nCharCode, nKeyCode);
 }
 
-static void doc_postExtTextInputEvent(LibreOfficeKitDocument* pThis, int 
nType, const char* pText)
+static void doc_postExtTextInputEvent(LibreOfficeKitDocument* pThis, unsigned 
nWindowId, int nType, const char* pText)
 {
 SolarMutexGuard aGuard;
+VclPtr pWindow;
+if (nWindowId == 0)
+{
+ITiledRenderable* pDoc = getTiledRenderable(pThis);
+if (!pDoc)
+{
+gImpl->maLastExceptionMsg = "Document doesn't support tiled 
rendering";
+return;
+}
+pWindow = pDoc->getDocWindow();
+}
+else
+{
+pWindow = vcl::Window::FindLOKWindow(nWindowId);
+}
 
-ITiledRenderable* pDoc = getTiledRenderable(pThis);
-if (!pDoc)
+if (!pWindow)
 {
-gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
+gImpl->maLastExceptionMsg = "No window found for window id: " + 
OUString::number(nWindowId);
 return;
 }
 
-pDoc->postExtTextInputEvent(nType, OUString::fromUtf8(OString(pText, 
strlen(pText;
+switch (nType)
+{
+case LOK_EXT_TEXTINPUT:
+pWindow->PostExtTextInputEvent(VCLEVENT_WINDOW_EXTTEXTINPUT,
+   OUString::fromUtf8(OString(pText, 
strlen(pText;
+break;
+case LOK_EXT_TEXTINPUT_END:
+pWindow->PostExtTextInputEvent(VCLEVENT_WINDOW_ENDEXTTEXTINPUT, "");
+break;
+default:
+assert(false && "Unhandled External Text input event!");
+}
 }
 
 static void doc_postWindowKeyEvent(LibreOfficeKitDocument* /*pThis*/, unsigned 
nLOKWindowId, int nType, int nCharCode, int nKeyCode)
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index bb99e04abe17..2af965e4a45d 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -291,6 +291,7 @@ struct _LibreOfficeKitDocumentClass
 
 /// @see lok::Document::postExtTextInputEvent
 void (*postExtTextInputEvent) (LibreOfficeKitDocument* pThis,
+   unsigned nWindowId,
int nType,
const char* pText);
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index c076c0f0b58f..fabd3b29e687 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -539,12 +539,14 @@ public:
 /**
  * Post the text input from external input window, like IME
  *
+ * @param nWindowId Specify the window id to post the input event to. If
+ * nWindow is 0, the event is posted into the document
  * @param nType see 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2018-02-14 Thread Henry Castro
 desktop/source/lib/init.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 0df89c0fdaaff10272fb74b196ade0bcc9ea1ff6
Author: Henry Castro 
Date:   Tue Feb 13 20:54:05 2018 -0400

lok: check if an element exists in the container

Change-Id: I5987e90d92a2ebff654a993fb77e389bd036a8f8
Reviewed-on: https://gerrit.libreoffice.org/49693
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/49712
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2598da695e0a..eafdf21f88ce 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2819,11 +2819,12 @@ static char* getStyles(LibreOfficeKitDocument* pThis, 
const char* pCommand)
 OUString sName;
 bool bIsPhysical;
 boost::property_tree::ptree aChild;
-uno::Reference xProperty;
 boost::property_tree::ptree aChildren;
+const OUString sPageStyles("PageStyles");
+uno::Reference xProperty;
 uno::Reference xContainer;
 
-if (xStyleFamilies->getByName("PageStyles") >>= xContainer)
+if (xStyleFamilies->hasByName(sPageStyles) && 
(xStyleFamilies->getByName(sPageStyles) >>= xContainer))
 {
 uno::Sequence aSeqNames = xContainer->getElementNames();
 for (sal_Int32 itName = 0; itName < aSeqNames.getLength(); 
itName++)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source svx/source

2018-01-26 Thread Mike Kaganski
 desktop/source/app/app.cxx |   34 ++---
 desktop/source/app/officeipcthread.cxx |   19 +---
 svx/source/inc/docrecovery.hxx |1 
 svx/source/unodraw/recoveryui.cxx  |   38 +
 4 files changed, 85 insertions(+), 7 deletions(-)

New commits:
commit 88a37944f55949c122fb4d5b7e504e40f25ed3a8
Author: Mike Kaganski 
Date:   Sun Jan 21 22:10:09 2018 +0300

tdf#38915: set cProcessed condition on any process outcome

When application is initializing, initially request handler is not
processing requests (its state is Starting). Requests processing is
enabled in Desktop::OpenClients() after recovery had been processed.

If another soffice process is started, it communicates over already
established pipe, and sends a request to the first process. In
IpcThread::process(), it is decided if the request needs to be checked
for completion (e.g., if a file or specific module was requested to be
open). After that, the prepared request is posted for processing. In
case when the completion should be checked, PipeIpcThread::execute()
then waits for Processed condition indefinitely.

Request is processed in RequestHandler::ExecuteCmdLineRequests, which
first checks that handler's state is RequestsEnabled, and if it isn't,
then returns. Otherwise, after processing, Processed condition is set.

The problem is, thus, in case when the request comes before requests
processing is enabled (e.g., when recovery dialog is open): request
handler thread waits indefinitely, but the processed condition will
not be set. This will not allow to close the pipe to second process,
and it will hang indefinitely. The IPC thread will be hung even after
user closes recovery dialog, and continues working with program. So,
subsequent attempts to open files from file manager (launching new
process) will fail, and new zombie soffice processes will wait the
first indefinitely. Also, when first process will be closed by user,
the deinit sequence will attempt to wait for the IPC thread to finish
(in RequestHandler::Disable(), after all visible windows had been
closed), which will leave the first process hung, preventing all
subsequent attempts to open LibreOffice.

This patch ensures that the Processed condition is set at any outcome
in RequestHandler::ExecuteCmdLineRequests. Also, it brings (possibly
hidden) recovery dialog to front, making the reason why following
attempts to open files fail apparent to user.

Change-Id: Ibddf7483e5b1d6167ac7f307ea2442119f446129
Reviewed-on: https://gerrit.libreoffice.org/48280
Tested-by: Jenkins 
Reviewed-by: Aron Budea 
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/48292
Tested-by: Aron Budea 

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index e4570545295c..53934e47a050 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1137,6 +1137,15 @@ void impl_checkRecoveryState(bool& bCrashed   ,
 bSessionDataExists = elements && session;
 }
 
+Reference< css::frame::XSynchronousDispatch > g_xRecoveryUI;
+
+template 
+struct RefClearGuard
+{
+Ref& m_Ref;
+RefClearGuard(Ref& ref) : m_Ref(ref) {}
+~RefClearGuard() { m_Ref.clear(); }
+};
 
 /*  @short  start the recovery wizard.
 
@@ -1151,12 +1160,13 @@ bool impl_callRecoveryUI(bool bEmergencySave ,
 
 css::uno::Reference< css::uno::XComponentContext > xContext = 
::comphelper::getProcessComponentContext();
 
-Reference< css::frame::XSynchronousDispatch > xRecoveryUI(
+g_xRecoveryUI.set(
 
xContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.svx.RecoveryUI",
 xContext),
 css::uno::UNO_QUERY_THROW);
+RefClearGuard> 
refClearGuard(g_xRecoveryUI);
 
 Reference< css::util::XURLTransformer > xURLParser =
-
css::util::URLTransformer::create(::comphelper::getProcessComponentContext());
+css::util::URLTransformer::create(xContext);
 
 css::util::URL aURL;
 if (bEmergencySave)
@@ -1168,6 +1178,24 @@ bool impl_callRecoveryUI(bool bEmergencySave ,
 
 xURLParser->parseStrict(aURL);
 
+css::uno::Any aRet = g_xRecoveryUI->dispatchWithReturnValue(aURL, 
css::uno::Sequence< css::beans::PropertyValue >());
+bool bRet = false;
+aRet >>= bRet;
+return bRet;
+}
+
+bool impl_bringToFrontRecoveryUI()
+{
+Reference< css::frame::XSynchronousDispatch > xRecoveryUI(g_xRecoveryUI);
+if (!xRecoveryUI.is())
+return false;
+
+css::util::URL aURL;
+aURL.Complete = "vnd.sun.star.autorecovery:/doBringToFront";
+Reference< 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source sfx2/source

2018-01-24 Thread Jan Holesovsky
 desktop/source/lib/init.cxx  |1 +
 sfx2/source/control/unoctitm.cxx |3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 10c55f5c73f91ed56f3eae7952d1fff14039c3ca
Author: Jan Holesovsky 
Date:   Wed Jan 24 20:07:40 2018 +0100

lok: Send the enabled / disabled state of .uno:TransformDialog.

Change-Id: If2d8e0da6c289deb65dc8a6b38a21dfd5bbfc1bd
Reviewed-on: https://gerrit.libreoffice.org/48535
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6961cca8e29c..873ee9e85443 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1772,6 +1772,7 @@ static void doc_iniUnoCommands ()
 OUString(".uno:OutlineBullet"),
 OUString(".uno:InsertIndexesEntry"),
 OUString(".uno:DocumentRepair"),
+OUString(".uno:TransformDialog"),
 OUString(".uno:InsertPageHeader"),
 OUString(".uno:InsertPageFooter")
 };
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index bb90866246e9..b74f971d6a07 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1081,7 +1081,8 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
  aEvent.FeatureURL.Path == "FontDialog" ||
  aEvent.FeatureURL.Path == "ParagraphDialog" ||
  aEvent.FeatureURL.Path == "OutlineBullet" ||
- aEvent.FeatureURL.Path == "InsertIndexesEntry")
+ aEvent.FeatureURL.Path == "InsertIndexesEntry" ||
+ aEvent.FeatureURL.Path == "TransformDialog")
 
 {
 aBuffer.append(aEvent.IsEnabled ? OUString("enabled") : 
OUString("disabled"));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2018-01-24 Thread Jan Holesovsky
 desktop/source/lib/init.cxx |   19 ---
 1 file changed, 16 insertions(+), 3 deletions(-)

New commits:
commit ca86867d21bc9ef423ecdbf7931eaffd06ef1bab
Author: Jan Holesovsky 
Date:   Wed Jan 24 13:32:24 2018 +0100

lok: Preload thesauri too.

Change-Id: If2bfd3a024fc61900d3c12ff976df136d4e61bf6
Reviewed-on: https://gerrit.libreoffice.org/48503
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a6e40937de00..6961cca8e29c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3538,13 +3538,13 @@ static void lo_status_indicator_callback(void *data, 
comphelper::LibreOfficeKit:
 /// Used only by LibreOfficeKit when used by Online to pre-initialize
 static void preloadData()
 {
-// First: sit down and read all dictionaries: yum.
+// preload all available dictionaries
 css::uno::Reference xLngSvcMgr =
 
css::linguistic2::LinguServiceManager::create(comphelper::getProcessComponentContext());
 css::uno::Reference 
xSpellChecker(xLngSvcMgr->getSpellChecker());
 
-css::uno::Reference 
xLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
-uno::Sequence< css::lang::Locale > aLocales = xLocales->getLocales();
+css::uno::Reference 
xSpellLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
+uno::Sequence< css::lang::Locale > aLocales = xSpellLocales->getLocales();
 std::cerr << "Preloading dictionaries: ";
 for (auto  : aLocales)
 {
@@ -3554,6 +3554,19 @@ static void preloadData()
 }
 std::cerr << "\n";
 
+// preload all available thesauri
+css::uno::Reference 
xThesaurus(xLngSvcMgr->getThesaurus());
+css::uno::Reference 
xThesLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
+aLocales = xThesLocales->getLocales();
+std::cerr << "Preloading thesauri: ";
+for (auto  : aLocales)
+{
+std::cerr << it.Language << "_" << it.Country << " ";
+css::beans::PropertyValues aNone;
+xThesaurus->queryMeanings("forcefed", it, aNone);
+}
+std::cerr << "\n";
+
 css::uno::Reference< css::ui::XAcceleratorConfiguration > xGlobalCfg;
 xGlobalCfg = css::ui::GlobalAcceleratorConfiguration::create(
 comphelper::getProcessComponentContext());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source sfx2/source sw/qa sw/source

2018-01-18 Thread Henry Castro
 desktop/source/lib/init.cxx|4 +
 sfx2/source/control/unoctitm.cxx   |4 +
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   75 -
 sw/source/uibase/shells/textsh1.cxx|   36 +++-
 4 files changed, 115 insertions(+), 4 deletions(-)

New commits:
commit d8be925640a142315bcf73c25f85fb8eefeba79a
Author: Henry Castro 
Date:   Mon Jul 10 17:33:38 2017 -0400

sw lok: enable Page Header/Footer

Reviewed-on: https://gerrit.libreoffice.org/39782
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
(cherry picked from commit 3ba914c229adfed5c917d1ee23d35b9184b092c4)

Change-Id: I5e0d080c53079069a086f06c2a314b6372bf6391
Reviewed-on: https://gerrit.libreoffice.org/47830
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9cd6337fc395..a6e40937de00 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1771,7 +1771,9 @@ static void doc_iniUnoCommands ()
 OUString(".uno:ParagraphDialog"),
 OUString(".uno:OutlineBullet"),
 OUString(".uno:InsertIndexesEntry"),
-OUString(".uno:DocumentRepair")
+OUString(".uno:DocumentRepair"),
+OUString(".uno:InsertPageHeader"),
+OUString(".uno:InsertPageFooter")
 };
 
 util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 60c55bdeb3d6..bb90866246e9 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1006,7 +1006,9 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
 aEvent.FeatureURL.Path == "AlignLeft" ||
 aEvent.FeatureURL.Path == "AlignHorizontalCenter" ||
 aEvent.FeatureURL.Path == "AlignRight" ||
-aEvent.FeatureURL.Path == "DocumentRepair")
+aEvent.FeatureURL.Path == "DocumentRepair" ||
+aEvent.FeatureURL.Path == "InsertPageHeader" ||
+aEvent.FeatureURL.Path == "InsertPageFooter")
 {
 bool bTemp = false;
 aEvent.State >>= bTemp;
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 91cc2140716b..804f77073803 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -89,6 +90,8 @@ public:
 void testDisableUndoRepair();
 void testAllTrackedChanges();
 void testDocumentRepair();
+void testPageHeader();
+void testPageFooter();
 
 CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
 CPPUNIT_TEST(testRegisterCallback);
@@ -136,7 +139,8 @@ public:
 CPPUNIT_TEST(testDisableUndoRepair);
 CPPUNIT_TEST(testAllTrackedChanges);
 CPPUNIT_TEST(testDocumentRepair);
-
+CPPUNIT_TEST(testPageHeader);
+CPPUNIT_TEST(testPageFooter);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1921,6 +1925,75 @@ void SwTiledRenderingTest::testDocumentRepair()
 comphelper::LibreOfficeKit::setActive(false);
 }
 
+namespace {
+void checkPageHeaderOrFooter(const SfxViewShell* pViewShell, sal_uInt16 
nWhich, bool bValue)
+{
+const SfxPoolItem* pState = nullptr;
+pViewShell->GetDispatcher()->QueryState(nWhich, pState);
+CPPUNIT_ASSERT(dynamic_cast< const SfxBoolItem * >(pState));
+CPPUNIT_ASSERT_EQUAL(bValue, dynamic_cast< const SfxBoolItem * 
>(pState)->GetValue());
+};
+
+}
+
+void SwTiledRenderingTest::testPageHeader()
+{
+comphelper::LibreOfficeKit::setActive();
+
+createDoc("dummy.fodt");
+SfxViewShell* pViewShell = SfxViewShell::Current();
+// Check Page Header State
+checkPageHeaderOrFooter(pViewShell, FN_INSERT_PAGEHEADER, false);
+// Insert Page Header
+{
+SfxBoolItem aItem(FN_PARAM_1, true);
+pViewShell->GetDispatcher()->ExecuteList(FN_INSERT_PAGEHEADER, 
SfxCallMode::SYNCHRON, {});
+}
+// Check Page Header State
+checkPageHeaderOrFooter(pViewShell, FN_INSERT_PAGEHEADER, true);
+
+// Remove Page Header
+{
+SfxBoolItem aItem(FN_PARAM_1, false);
+pViewShell->GetDispatcher()->ExecuteList(FN_INSERT_PAGEHEADER, 
SfxCallMode::SYNCHRON, {});
+}
+// Check Page Header State
+checkPageHeaderOrFooter(pViewShell, FN_INSERT_PAGEHEADER, false);
+
+mxComponent->dispose();
+mxComponent.clear();
+comphelper::LibreOfficeKit::setActive(false);
+}
+
+void SwTiledRenderingTest::testPageFooter()
+{
+comphelper::LibreOfficeKit::setActive();
+
+createDoc("dummy.fodt");
+SfxViewShell* pViewShell = SfxViewShell::Current();
+// Check Page Footer State
+checkPageHeaderOrFooter(pViewShell, FN_INSERT_PAGEFOOTER, false);
+// Insert Page Footer
+{
+SfxBoolItem 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source include/sfx2 include/svl include/svx sc/qa sc/source sd/qa sd/source sfx2/sdi sfx2/source svl/source svx/source sw/qa

2018-01-18 Thread Henry Castro
 desktop/source/lib/init.cxx|3 -
 include/sfx2/sfxsids.hrc   |2 
 include/svl/hint.hxx   |1 
 include/svl/undo.hxx   |   10 +++-
 include/svx/sdrundomanager.hxx |5 ++
 sc/qa/unit/tiledrendering/tiledrendering.cxx   |   51 +
 sc/source/core/data/document.cxx   |5 +-
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |   51 +
 sd/source/ui/docshell/docshell.cxx |6 ++
 sfx2/sdi/docslots.sdi  |4 +
 sfx2/sdi/sfx.sdi   |   19 +
 sfx2/source/control/unoctitm.cxx   |3 -
 sfx2/source/doc/objserv.cxx|   10 
 sfx2/source/view/viewfrm.cxx   |6 ++
 svl/source/undo/undo.cxx   |   39 +++
 svx/source/svdraw/sdrundomanager.cxx   |   16 +++
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   48 +++
 sw/source/core/inc/UndoManager.hxx |3 +
 sw/source/core/undo/docundo.cxx|8 +++
 19 files changed, 280 insertions(+), 10 deletions(-)

New commits:
commit e3c1713807499fdbe63fad0944d0ce3b91b28637
Author: Henry Castro 
Date:   Sat Jun 17 13:52:15 2017 -0400

lokit: add .uno:DocumentRepair command

Change-Id: I5b13ea6f4785bc91c29111fa63c4a1b0ea9b2660
Reviewed-on: https://gerrit.libreoffice.org/38908
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/47915
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a993a3a30a90..9cd6337fc395 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1770,7 +1770,8 @@ static void doc_iniUnoCommands ()
 OUString(".uno:FontDialog"),
 OUString(".uno:ParagraphDialog"),
 OUString(".uno:OutlineBullet"),
-OUString(".uno:InsertIndexesEntry")
+OUString(".uno:InsertIndexesEntry"),
+OUString(".uno:DocumentRepair")
 };
 
 util::URL aCommandURL;
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 20afe0808bc2..d5620c01e9dd 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -258,7 +258,7 @@
 //  SID_SFX_free_END(SID_SFX_START + 3999)
 
 #define SID_OPEN_NEW_VIEW   (SID_SFX_START + 520)
-// FREE, was SID_VIEW_ZOOM_MODE
+#define SID_DOC_REPAIR  (SID_SFX_START + 521)
 // FREE, was SID_VIEW_POS_SIZE
 #define SID_VIEW_ID (SID_SFX_START + 523)
 // FREE, was SID_USER_DATA
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index e3f0e2672ef4..3e7b748c3b49 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -32,6 +32,7 @@
 #define SFX_HINT_MODECHANGED0x0080
 #define SFX_HINT_LANGUAGECHANGED0x0100
 #define SFX_HINT_REDLINECHANGED 0x0200
+#define SFX_HINT_DOCREPAIR  0x0400
 // unused, formerly SFX_HINT_CANCELLABLE
 // unused, formerly SFX_HINT_DATAAVAILABLE
 // unused, formerly SFX_HINT_SAVECOMPLETED
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 52a2918afd36..532d2f161db2 100644
--- a/include/svl/undo.hxx
+++ b/include/svl/undo.hxx
@@ -291,6 +291,7 @@ namespace svl
 /// adds a new listener to be notified about changes in the 
UndoManager's state
 virtual voidAddUndoListener( SfxUndoListener& i_listener ) 
= 0;
 virtual voidRemoveUndoListener( SfxUndoListener& 
i_listener ) = 0;
+virtual boolIsEmptyActions() const = 0;
};
 }
 
@@ -342,6 +343,8 @@ public:
 virtual boolIsUndoEnabled() const override;
 virtual voidAddUndoListener( SfxUndoListener& i_listener ) 
override;
 virtual voidRemoveUndoListener( SfxUndoListener& i_listener ) 
override;
+virtual boolIsEmptyActions() const override;
+
 
 /** marks the current top-level element of the Undo stack, and returns a 
unique ID for it
 */
@@ -378,6 +381,7 @@ protected:
 undo actions on the then-current level are removed, too. This is 
continued until the top level is reached.
 */
 voidClearAllLevels();
+virtual void EmptyActionsChanged();
 
 private:
 size_t  ImplLeaveListAction( const bool i_merge, 
::svl::undo::impl::UndoManagerGuard& i_guard );
@@ -390,8 +394,10 @@ private:
 boolImplIsInListAction_Lock() const;
 voidImplEnableUndo_Lock( bool const i_enable );
 
-bool ImplUndo( SfxUndoContext* i_contextOrNull );
-bool ImplRedo( SfxUndoContext* i_contextOrNull );
+boolImplUndo( SfxUndoContext* 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source include/vcl vcl/source

2018-01-02 Thread Pranav Kant
 desktop/source/lib/init.cxx  |   11 +++---
 include/vcl/window.hxx   |7 
 vcl/source/window/window.cxx |   68 ---
 3 files changed, 6 insertions(+), 80 deletions(-)

New commits:
commit 34372e6e849519c30461f70d94748295412dcb2b
Author: Pranav Kant 
Date:   Wed Dec 20 17:58:05 2017 +0530

lokdialog: Use Post(Mouse,Key)Event() to post to main thread

... instead of custom machinery there to post to main thread. This also
now posts window key events to the main thread instead of processing
them on the lok thread.

Change-Id: Ided1efb3f237a1838fa50bb8d74752be714c3032
(cherry picked from commit 7dab9f9b50d83d2bcadcdd7e852f805739371cd1)
Reviewed-on: https://gerrit.libreoffice.org/46858
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2f385341e939..a993a3a30a90 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -74,6 +74,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2291,10 +2292,10 @@ static void 
doc_postWindowKeyEvent(LibreOfficeKitDocument* /*pThis*/, unsigned n
 switch (nType)
 {
 case LOK_KEYEVENT_KEYINPUT:
-pWindow->LOKKeyInput(aEvent);
+Application::PostKeyEvent(VCLEVENT_WINDOW_KEYINPUT, pWindow, 
);
 break;
 case LOK_KEYEVENT_KEYUP:
-pWindow->LOKKeyUp(aEvent);
+Application::PostKeyEvent(VCLEVENT_WINDOW_KEYUP, pWindow, );
 break;
 default:
 assert(false);
@@ -2476,13 +2477,13 @@ static void 
doc_postWindowMouseEvent(LibreOfficeKitDocument* /*pThis*/, unsigned
 switch (nType)
 {
 case LOK_MOUSEEVENT_MOUSEBUTTONDOWN:
-pWindow->LogicMouseButtonDown(aEvent);
+Application::PostMouseEvent(VCLEVENT_WINDOW_MOUSEBUTTONDOWN, 
pWindow, );
 break;
 case LOK_MOUSEEVENT_MOUSEBUTTONUP:
-pWindow->LogicMouseButtonUp(aEvent);
+Application::PostMouseEvent(VCLEVENT_WINDOW_MOUSEBUTTONUP, 
pWindow, );
 break;
 case LOK_MOUSEEVENT_MOUSEMOVE:
-pWindow->LogicMouseMove(aEvent);
+Application::PostMouseEvent(VCLEVENT_WINDOW_MOUSEMOVE, pWindow, 
);
 break;
 default:
 assert(false);
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 7fbb39df9d0e..a46e7569e74f 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1221,13 +1221,6 @@ public:
 /// Dialog / window tunneling related methods.
 Size PaintActiveFloatingWindow(VirtualDevice& rDevice) const;
 
-void LogicMouseButtonDown(const MouseEvent& rMouseEvent);
-void LogicMouseButtonUp(const MouseEvent& rMouseEvent);
-void LogicMouseMove(const MouseEvent& rMouseEvent);
-
-void LOKKeyInput(const KeyEvent& rKeyEvent);
-void LOKKeyUp(const KeyEvent& rKeyEvent);
-
 /** @name Accessibility
  */
 ///@{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 7c1591c42a06..77f6c28d168e 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3250,74 +3250,6 @@ VclPtr Window::GetParentWithLOKNotifier()
 return pWindow;
 }
 
-struct LOKAsyncEvent
-{
-VclPtr mpWindow;
-SalEvent mnEvent;
-MouseEvent maMouseEvent;
-};
-
-static void LOKAsyncEventLink( void* pEvent, void* )
-{
-LOKAsyncEvent* pLOKEv = static_cast(pEvent);
-if (!pLOKEv->mpWindow->IsDisposed())
-{
-ImplWindowFrameProc(pLOKEv->mpWindow, pLOKEv->mnEvent, 
>maMouseEvent);
-}
-delete pLOKEv;
-}
-
-void Window::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
-{
-// When we're not doing tiled rendering, then positions must be passed as 
pixels.
-assert(comphelper::LibreOfficeKit::isActive());
-
-LOKAsyncEvent* pEv = new LOKAsyncEvent;
-pEv->mpWindow = ImplIsFloatingWindow() ? ImplGetBorderWindow() : this;
-pEv->mnEvent = SalEvent::ExternalMouseButtonDown;
-pEv->maMouseEvent = rMouseEvent;
-Application::PostUserEvent( Link(pEv, LOKAsyncEventLink) );
-
-}
-
-void Window::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
-{
-// When we're not doing tiled rendering, then positions must be passed as 
pixels.
-assert(comphelper::LibreOfficeKit::isActive());
-
-LOKAsyncEvent* pEv = new LOKAsyncEvent;
-pEv->mpWindow = ImplIsFloatingWindow() ? ImplGetBorderWindow() : this;
-pEv->mnEvent = SalEvent::ExternalMouseButtonUp;
-pEv->maMouseEvent = rMouseEvent;
-Application::PostUserEvent( Link(pEv, LOKAsyncEventLink) );
-}
-
-void Window::LogicMouseMove(const MouseEvent& rMouseEvent)
-{
-// When we're not doing tiled rendering, then positions must be passed as 
pixels.
-

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2018-01-02 Thread Pranav Kant
 desktop/source/lib/init.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 96b365709ca1c8922cecd1516f895f64b5e380b3
Author: Pranav Kant 
Date:   Tue Dec 19 22:51:00 2017 +0530

lokdialog: Handle closing of modeless dialogs too

Change-Id: I87ed60e940fad199b14a2e2179cc1f10008bfe93
(cherry picked from commit 2bed0b64d2766121b9eed46c7cdcfb01efa0ac10)
Reviewed-on: https://gerrit.libreoffice.org/46804
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index dd843e83e68d..2f385341e939 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3335,7 +3335,7 @@ static void doc_postWindow(LibreOfficeKitDocument* 
/*pThis*/, unsigned nLOKWindo
 if (Dialog* pDialog = dynamic_cast(pWindow.get()))
 {
 if (nAction == LOK_WINDOW_CLOSE)
-pDialog->EndDialog( RET_CANCEL );
+pDialog->Close();
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source framework/source

2017-12-13 Thread Michael Meeks
 desktop/source/lib/init.cxx  |   17 
++
 framework/source/accelerators/globalacceleratorconfiguration.cxx |3 +
 2 files changed, 20 insertions(+)

New commits:
commit d83b5a462412acbad86ecb31685159015374ffbb
Author: Michael Meeks 
Date:   Fri Dec 1 21:56:55 2017 +

Initialize more for sharing during pre-init.

Change-Id: I12b90504ec9161318683ebad8f8e4dd1e614da89
Reviewed-on: https://gerrit.libreoffice.org/46120
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index e169c768e430..3cd8e1220753 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -54,6 +54,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -83,6 +84,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -94,6 +96,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -3546,6 +3549,20 @@ static void preloadData()
 xSpellChecker->isValid("forcefed", it, aNone);
 }
 std::cerr << "\n";
+
+css::uno::Reference< css::ui::XAcceleratorConfiguration > xGlobalCfg;
+xGlobalCfg = css::ui::GlobalAcceleratorConfiguration::create(
+comphelper::getProcessComponentContext());
+xGlobalCfg->getAllKeyEvents();
+
+std::cerr << "Preload icons\n";
+ImageTree  = ImageTree::get();
+images.getImageUrl("forcefed.png", "style", "FO_oo");
+
+std::cerr << "Preload languages\n";
+// force load language singleton
+SvtLanguageTable::HasLanguageType(LANGUAGE_SYSTEM);
+LanguageTag::isValidBcp47("foo");
 }
 
 static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const 
char* pUserProfileUrl)
diff --git a/framework/source/accelerators/globalacceleratorconfiguration.cxx 
b/framework/source/accelerators/globalacceleratorconfiguration.cxx
index 5104c242c791..6db06f656edf 100644
--- a/framework/source/accelerators/globalacceleratorconfiguration.cxx
+++ b/framework/source/accelerators/globalacceleratorconfiguration.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -90,6 +91,8 @@ private:
 GlobalAcceleratorConfiguration::GlobalAcceleratorConfiguration(const 
css::uno::Reference< css::uno::XComponentContext >& xContext)
 : GlobalAcceleratorConfiguration_BASE(xContext)
 {
+// force keyboard string registration.
+KeyMapping::get();
 }
 
 void GlobalAcceleratorConfiguration::fillCache()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-12-13 Thread Henry Castro
 desktop/source/lib/init.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit e8400fb18cfc3f8f09ee1e13b4a6fd1eec11d9ba
Author: Henry Castro 
Date:   Thu Dec 7 08:49:12 2017 -0400

lok: discard name languages not registered

there is a STR_ARR_SVT_LANGUAGE_TABLE table that all language names are 
registered

But not all, like locale "es"

{ LANGUAGE_SPANISH_LATIN_AMERICA,   "es", ""  , k0 }

Avoid that names until get registered appropriately

Change-Id: I148f2c30f72c82c978f5e9a1e977bf4b5e923a9c
Reviewed-on: https://gerrit.libreoffice.org/46027
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/46064
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d6f8d8646f8f..e169c768e430 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2612,10 +2612,15 @@ static char* getLanguages(const char* pCommand)
 boost::property_tree::ptree aTree;
 aTree.put("commandName", pCommand);
 boost::property_tree::ptree aValues;
+boost::property_tree::ptree aChild;
+OUString sLanguage;
 for ( sal_Int32 itLocale = 0; itLocale < aLocales.getLength(); itLocale++ )
 {
-boost::property_tree::ptree aChild;
-aChild.put("", 
SvtLanguageTable::GetLanguageString(LanguageTag::convertToLanguageType(aLocales[itLocale])).toUtf8());
+sLanguage = 
SvtLanguageTable::GetLanguageString(LanguageTag::convertToLanguageType(aLocales[itLocale]));
+if (sLanguage.startsWith("{") && sLanguage.endsWith("}"))
+continue;
+
+aChild.put("", sLanguage.toUtf8());
 aValues.push_back(std::make_pair("", aChild));
 }
 aTree.add_child("commandValues", aValues);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source sfx2/source

2017-12-13 Thread Pranav Kant
 desktop/source/lib/init.cxx  |8 +++-
 sfx2/source/control/unoctitm.cxx |8 +++-
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit d895dc24654b6dd356dbdf16c8b3e3bd4878e33d
Author: Pranav Kant 
Date:   Wed Dec 6 17:32:53 2017 +0530

lokdialog: State change events for dialogs uno commands

Change-Id: I92f60e717cd2a0695c8b86b103076d26c0c22cef
(cherry picked from commit 98da350c7c9bcb96937f1397a34c2c68ede44011)
Reviewed-on: https://gerrit.libreoffice.org/45941
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 17a731837656..d6f8d8646f8f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1760,7 +1760,13 @@ static void doc_iniUnoCommands ()
 OUString(".uno:NextTrackedChange"),
 OUString(".uno:PreviousTrackedChange"),
 OUString(".uno:AcceptAllTrackedChanges"),
-OUString(".uno:RejectAllTrackedChanges")
+OUString(".uno:RejectAllTrackedChanges"),
+OUString(".uno:TableDialog"),
+OUString(".uno:FormatCellDialog"),
+OUString(".uno:FontDialog"),
+OUString(".uno:ParagraphDialog"),
+OUString(".uno:OutlineBullet"),
+OUString(".uno:InsertIndexesEntry")
 };
 
 util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index c55005d8433d..25bdbbf8788d 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1072,7 +1072,13 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
  aEvent.FeatureURL.Path == "SortAscending" ||
  aEvent.FeatureURL.Path == "SortDescending" ||
  aEvent.FeatureURL.Path == "AcceptAllTrackedChanges" ||
- aEvent.FeatureURL.Path == "RejectAllTrackedChanges")
+ aEvent.FeatureURL.Path == "RejectAllTrackedChanges" ||
+ aEvent.FeatureURL.Path == "TableDialog" ||
+ aEvent.FeatureURL.Path == "FormatCellDialog" ||
+ aEvent.FeatureURL.Path == "FontDialog" ||
+ aEvent.FeatureURL.Path == "ParagraphDialog" ||
+ aEvent.FeatureURL.Path == "OutlineBullet" ||
+ aEvent.FeatureURL.Path == "InsertIndexesEntry")
 
 {
 aBuffer.append(aEvent.IsEnabled ? OUString("enabled") : 
OUString("disabled"));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-11-30 Thread Pranav Kant
 desktop/source/lib/init.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 24f908d9a1833779497f36f9f006c29f47986571
Author: Pranav Kant 
Date:   Wed Nov 29 19:54:15 2017 +0530

lokdialog: Compress DIALOG_CHILD callbacks

In complex dialogs, they flood the lok client otherwise with duplicate
callbacks.

Change-Id: I6ab1ef12b90caed22dfc464e18068f5830cb9532
Reviewed-on: https://gerrit.libreoffice.org/45542
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 82f76bafe2c1..f0c970905a39 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -810,6 +810,7 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 case LOK_CALLBACK_TEXT_VIEW_SELECTION:
 case LOK_CALLBACK_INVALIDATE_HEADER:
 case LOK_CALLBACK_DIALOG:
+case LOK_CALLBACK_DIALOG_CHILD:
 {
 const auto& pos = std::find_if(m_queue.rbegin(), m_queue.rend(),
 [type] (const queue_type::value_type& elem) { return 
(elem.first == type); });
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source include/LibreOfficeKit include/vcl sc/source

2017-11-30 Thread Marco Cecchetti
 desktop/source/lib/init.cxx   |   33 ++
 include/LibreOfficeKit/LibreOfficeKit.h   |4 +++
 include/LibreOfficeKit/LibreOfficeKit.hxx |   13 +++
 include/vcl/ITiledRenderable.hxx  |   26 +++
 sc/source/ui/unoobj/docuno.cxx|   26 +++
 sc/source/ui/view/tabview.cxx |4 +--
 6 files changed, 61 insertions(+), 45 deletions(-)

New commits:
commit e74fc612fb87d942a5ad74b882b211dcafb3967d
Author: Marco Cecchetti 
Date:   Tue Nov 28 23:08:34 2017 +0100

lok: calc: set outline state

use a specific message from the client for set the visibility state of
a group instead of hijacking the update row/column header message

Change-Id: I9634c24bbffaddc916c8ad716ac6d5d31e735a55
Reviewed-on: https://gerrit.libreoffice.org/45471
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 62e2def43b8f..82f76bafe2c1 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -619,6 +619,7 @@ static void doc_setClientZoom(LibreOfficeKitDocument* pThis,
 int nTileTwipWidth,
 int nTileTwipHeight);
 static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, 
int nY, int nWidth, int nHeight);
+static void doc_setOutlineState(LibreOfficeKitDocument* pThis, bool bColumn, 
int nLevel, int nIndex, bool bHidden);
 static int doc_createView(LibreOfficeKitDocument* pThis);
 static void doc_destroyView(LibreOfficeKitDocument* pThis, int nId);
 static void doc_setView(LibreOfficeKitDocument* pThis, int nId);
@@ -676,6 +677,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
getCommandValues = doc_getCommandValues;
 m_pDocumentClass->setClientZoom = doc_setClientZoom;
 m_pDocumentClass->setClientVisibleArea = doc_setClientVisibleArea;
+m_pDocumentClass->setOutlineState = doc_setOutlineState;
 
 m_pDocumentClass->createView = doc_createView;
 m_pDocumentClass->destroyView = doc_destroyView;
@@ -3018,10 +3020,6 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 int nY = 0;
 int nWidth = 0;
 int nHeight = 0;
-bool bColumn = false;
-int nLevel = -1;
-int nGroupIndex = -2;
-bool bHidden = false;
 OString aArguments = 
aCommand.copy(aViewRowColumnHeaders.getLength() + 1);
 sal_Int32 nParamIndex = 0;
 do
@@ -3047,23 +3045,10 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 nWidth = aValue.toInt32();
 else if (aKey == "height")
 nHeight = aValue.toInt32();
-else if (aKey == "columnOutline")
-bColumn = aValue.toBoolean();
-else if (aKey == "groupLevel")
-nLevel = aValue.toInt32();
-else if (aKey == "groupIndex")
-nGroupIndex = aValue.toInt32();
-else if (aKey == "groupHidden")
-bHidden = aValue.toBoolean();
 }
 while (nParamIndex >= 0);
 
 aRectangle = Rectangle(nX, nY, nX + nWidth, nY + nHeight);
-
-if (nGroupIndex != -2)
-{
-pDoc->setOutlineState(bColumn, nLevel, nGroupIndex, bHidden);
-}
 }
 
 OUString aHeaders = pDoc->getRowColumnHeaders(aRectangle);
@@ -3165,6 +3150,20 @@ static void 
doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, int
 pDoc->setClientVisibleArea(aRectangle);
 }
 
+static void doc_setOutlineState(LibreOfficeKitDocument* pThis, bool bColumn, 
int nLevel, int nIndex, bool bHidden)
+{
+SolarMutexGuard aGuard;
+
+ITiledRenderable* pDoc = getTiledRenderable(pThis);
+if (!pDoc)
+{
+gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering";
+return;
+}
+
+pDoc->setOutlineState(bColumn, nLevel, nIndex, bHidden);
+}
+
 static int doc_createView(LibreOfficeKitDocument* /*pThis*/)
 {
 SolarMutexGuard aGuard;
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 355c44579933..40f74f4f8f1a 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -213,9 +213,13 @@ struct _LibreOfficeKitDocumentClass
 int nTilePixelHeight,
 int nTileTwipWidth,
 int nTileTwipHeight);
+
 /// @see lok::Document::setVisibleArea).
 void (*setClientVisibleArea) (LibreOfficeKitDocument* pThis, int nX, int 
nY, int nWidth, int nHeight);
 
+/// @see lok::Document::setOutlineState).
+void 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-11-30 Thread Ashod Nakashian
 desktop/source/lib/lokinteractionhandler.cxx |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 82fb0abc37320fb1157b21efbf31954190353d41
Author: Ashod Nakashian 
Date:   Thu Nov 30 00:56:43 2017 -0500

LOK: support password-protected PDF docs

Change-Id: I1a1177ae7eb5af4ade2863dedf8bab7188152c5e
Reviewed-on: https://gerrit.libreoffice.org/45547
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit dc773e81bd360316a96b1b61c552d263e1d87e89)
Reviewed-on: https://gerrit.libreoffice.org/45563
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/lokinteractionhandler.cxx 
b/desktop/source/lib/lokinteractionhandler.cxx
index 58d4052324d7..b4fef17266c5 100644
--- a/desktop/source/lib/lokinteractionhandler.cxx
+++ b/desktop/source/lib/lokinteractionhandler.cxx
@@ -250,14 +250,22 @@ bool LOKInteractionHandler::handlePasswordRequest(const 
uno::Sequence>= passwordRequest)
 {
-bIsRequestPasswordToModify = passwordRequest.IsRequestPasswordToModify;
+bIsRequestPasswordToModify = false;
 sUrl = passwordRequest.Name.toUtf8();
 bPasswordRequestFound = true;
 }
 
+task::DocumentPasswordRequest2 passwordRequest2;
+if (rRequest >>= passwordRequest2)
+{
+bIsRequestPasswordToModify = 
passwordRequest2.IsRequestPasswordToModify;
+sUrl = passwordRequest2.Name.toUtf8();
+bPasswordRequestFound = true;
+}
+
 task::DocumentMSPasswordRequest2 passwordMSRequest;
 if (rRequest >>= passwordMSRequest)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source include/svl officecfg/registry sfx2/source sw/inc sw/qa sw/sdi sw/source sw/uiconfig

2017-11-28 Thread Henry Castro
 desktop/source/lib/init.cxx |4 
 include/svl/hint.hxx|1 
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |   28 +++
 sfx2/source/control/unoctitm.cxx|5 
 sw/inc/IDocumentRedlineAccess.hxx   |2 
 sw/inc/cmdid.h  |2 
 sw/qa/extras/tiledrendering/tiledrendering.cxx  |   74 
++
 sw/sdi/docsh.sdi|   10 +
 sw/sdi/swriter.sdi  |   36 
 sw/source/core/doc/DocumentRedlineManager.cxx   |   32 
 sw/source/core/inc/DocumentRedlineManager.hxx   |2 
 sw/source/uibase/app/docsh.cxx  |7 
 sw/source/uibase/app/docsh2.cxx |   27 +++
 sw/source/uibase/uiview/view.cxx|   16 ++
 sw/uiconfig/swriter/menubar/menubar.xml |2 
 15 files changed, 246 insertions(+), 2 deletions(-)

New commits:
commit af44e1547121f0292cd43fb8db6545e44594020d
Author: Henry Castro 
Date:   Sat Nov 4 12:18:53 2017 -0400

sw lok: add Accept/Reject All tracked changes, tdf#101977

Change-Id: I04d747343e24cb498a621c965d034d0791411d83
Reviewed-on: https://gerrit.libreoffice.org/44311
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/44486
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fe046459751f..515e148c1f04 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1761,7 +1761,9 @@ static void doc_iniUnoCommands ()
 OUString(".uno:TrackChanges"),
 OUString(".uno:ShowTrackedChanges"),
 OUString(".uno:NextTrackedChange"),
-OUString(".uno:PreviousTrackedChange")
+OUString(".uno:PreviousTrackedChange"),
+OUString(".uno:AcceptAllTrackedChanges"),
+OUString(".uno:RejectAllTrackedChanges")
 };
 
 util::URL aCommandURL;
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index 70f5fc74e8d6..31404cf31748 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -31,6 +31,7 @@
 #define SFX_HINT_DEINITIALIZING 0x0040
 #define SFX_HINT_MODECHANGED0x0080
 #define SFX_HINT_LANGUAGECHANGED0x0100
+#define SFX_HINT_REDLINECHANGED 0x0200
 // unused, formerly SFX_HINT_CANCELLABLE
 // unused, formerly SFX_HINT_DATAAVAILABLE
 // unused, formerly SFX_HINT_SAVECOMPLETED
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index a93ed1e2318a..3e127c10d1ee 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -236,6 +236,20 @@
   1
 
   
+  
+
+  Reject All
+
+
+  Reject All Tracked Changes
+
+
+  Reject All Changes
+
+
+  1
+
+  
   
 
   Accept
@@ -250,6 +264,20 @@
   1
 
   
+  
+
+  Accept All
+
+
+  Accept All Tracked Changes
+
+
+  Accept All Changes
+
+
+  1
+
+  
   
 
   Next
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 394653cd582f..c55005d8433d 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1070,7 +1070,10 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
  aEvent.FeatureURL.Path == "EntireColumn" ||
  aEvent.FeatureURL.Path == "EntireCell" ||
  aEvent.FeatureURL.Path == "SortAscending" ||
- aEvent.FeatureURL.Path == "SortDescending")
+ aEvent.FeatureURL.Path == "SortDescending" ||
+ aEvent.FeatureURL.Path == "AcceptAllTrackedChanges" ||
+ aEvent.FeatureURL.Path == "RejectAllTrackedChanges")
+
 {
 aBuffer.append(aEvent.IsEnabled ? OUString("enabled") : 
OUString("disabled"));
 }
diff --git a/sw/inc/IDocumentRedlineAccess.hxx 
b/sw/inc/IDocumentRedlineAccess.hxx
index 5488f7fcd66d..647f0980e631 100644
--- a/sw/inc/IDocumentRedlineAccess.hxx
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -204,6 +204,8 @@ public:
 
 virtual const SwRangeRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const = 
0;
 
+

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source include/vcl sc/inc sc/source

2017-11-28 Thread Marco Cecchetti
 desktop/source/lib/init.cxx|   18 +++
 include/vcl/ITiledRenderable.hxx   |   13 ++
 sc/inc/docuno.hxx  |3 
 sc/source/ui/docshell/olinefun.cxx |   30 -
 sc/source/ui/inc/dbfunc.hxx|3 
 sc/source/ui/inc/tabvwsh.hxx   |   10 +
 sc/source/ui/undo/undoblk.cxx  |9 -
 sc/source/ui/undo/undoblk2.cxx |6 -
 sc/source/ui/undo/undodat.cxx  |   10 +
 sc/source/ui/unoobj/docuno.cxx |   13 ++
 sc/source/ui/view/cellsh1.cxx  |5 
 sc/source/ui/view/dbfunc3.cxx  |   53 +
 sc/source/ui/view/gridwin.cxx  |   12 +-
 sc/source/ui/view/tabview.cxx  |  208 -
 sc/source/ui/view/tabvwshc.cxx |   38 +-
 sc/source/ui/view/viewfunc.cxx |   14 --
 16 files changed, 408 insertions(+), 37 deletions(-)

New commits:
commit 6964953c5a86ef02fa9320e1db4d6bd81cee5001
Author: Marco Cecchetti 
Date:   Mon Nov 27 17:50:26 2017 +0100

lok - calc: outline and group handling

Change-Id: Ibb287468653bc381acf034dcb8531c5faf61aef3
Reviewed-on: https://gerrit.libreoffice.org/45416
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 307418fcd55c..fe046459751f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3009,6 +3009,10 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 int nY = 0;
 int nWidth = 0;
 int nHeight = 0;
+bool bColumn = false;
+int nLevel = -1;
+int nGroupIndex = -2;
+bool bHidden = false;
 OString aArguments = 
aCommand.copy(aViewRowColumnHeaders.getLength() + 1);
 sal_Int32 nParamIndex = 0;
 do
@@ -3034,9 +3038,23 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 nWidth = aValue.toInt32();
 else if (aKey == "height")
 nHeight = aValue.toInt32();
+else if (aKey == "columnOutline")
+bColumn = aValue.toBoolean();
+else if (aKey == "groupLevel")
+nLevel = aValue.toInt32();
+else if (aKey == "groupIndex")
+nGroupIndex = aValue.toInt32();
+else if (aKey == "groupHidden")
+bHidden = aValue.toBoolean();
 }
 while (nParamIndex >= 0);
+
 aRectangle = Rectangle(nX, nY, nX + nWidth, nY + nHeight);
+
+if (nGroupIndex != -2)
+{
+pDoc->setOutlineState(bColumn, nLevel, nGroupIndex, bHidden);
+}
 }
 
 OUString aHeaders = pDoc->getRowColumnHeaders(aRectangle);
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index ae3ba9e76c3c..95676d751244 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -151,6 +151,19 @@ public:
 }
 
 /**
+ * Show/Hide a single row/column header outline for Calc dosuments.
+ *
+ * @param bColumn - if we are dealing with a column or row group
+ * @param nLevel - the level to which the group belongs
+ * @param nIndex - the group entry index
+ * @param bHidden - the new group state (collapsed/expanded)
+ */
+virtual void setOutlineState(bool /*bColumn*/, int /*nLevel*/, int 
/*nIndex*/, bool /*bHidden*/)
+{
+return;
+}
+
+/**
  * Get position and content of row/column headers of Calc documents.
  *
  * @param rRectangle - if not empty, then limit the output only to the 
area of this rectangle
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 917b211a82a1..e37f11a9ba49 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -409,6 +409,9 @@ public:
 /// @see vcl::ITiledRenderable::setClientZoom().
 virtual void setClientZoom(int nTilePixelWidth, int nTilePixelHeight, int 
nTileTwipWidth, int nTileTwipHeight) override;
 
+/// @see vcl::ITiledRenderable::setOutlineState().
+virtual void setOutlineState(bool bColumn, int nLevel, int nIndex, bool 
bHidden) override;
+
 /// @see vcl::ITiledRenderable::getRowColumnHeaders().
 virtual OUString getRowColumnHeaders(const Rectangle& rRectangle) override;
 
diff --git a/sc/source/ui/docshell/olinefun.cxx 
b/sc/source/ui/docshell/olinefun.cxx
index a96eadf2d964..c2e56231cc74 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -27,6 +27,10 @@
 #include "globstr.hrc"
 #include "sc.hrc"
 
+#include 
+#include 
+#include 
+
 static void lcl_InvalidateOutliner( SfxBindings* pBindings )
 {
 if ( pBindings )
@@ -402,6 +406,10 @@ bool ScOutlineDocFunc::SelectLevel( SCTAB nTab, bool 
bColumns, sal_uInt16 nLevel
 rDocShell.SetDocumentModified();
 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-10-03 Thread Jan Holesovsky
 desktop/source/lib/init.cxx |   19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

New commits:
commit b8ad0fc55baa69724e90dc3bb7d96fbd7149b163
Author: Jan Holesovsky 
Date:   Tue Oct 3 10:48:26 2017 +0200

lok: Fix declaration of ‘xContext’ shadows a global declaration.

Change-Id: Iab3c142cd85ca54bf3c37a0710ce7da7a5d77a35
Reviewed-on: https://gerrit.libreoffice.org/43067
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 65d5b43ce14b..3bbb7b98043d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2364,11 +2364,20 @@ static void doc_resetSelection(LibreOfficeKitDocument* 
pThis)
 
 static char* getLanguages(const char* pCommand)
 {
-css::uno::Reference< css::uno::XComponentContext> xContext = 
::comphelper::getProcessComponentContext();
-css::uno::Reference< css::linguistic2::XLinguServiceManager2 > xLangSrv = 
css::linguistic2::LinguServiceManager::create(xContext);
-css::uno::Reference< css::linguistic2::XSpellChecker > 
xSpell(xLangSrv.is() ? xLangSrv->getSpellChecker() : nullptr, 
css::uno::UNO_QUERY);
-css::uno::Reference< css::linguistic2::XSupportedLocales > 
xLocales(xSpell, css::uno::UNO_QUERY);
-css::uno::Sequence< css::lang::Locale > aLocales(xLocales.is() ? 
xLocales->getLocales() : css::uno::Sequence< css::lang::Locale >());
+css::uno::Sequence< css::lang::Locale > aLocales;
+
+if (xContext.is())
+{
+css::uno::Reference xLangSrv 
= css::linguistic2::LinguServiceManager::create(xContext);
+if (xLangSrv.is())
+{
+css::uno::Reference 
xSpell(xLangSrv->getSpellChecker(), css::uno::UNO_QUERY);
+css::uno::Reference 
xLocales(xSpell, css::uno::UNO_QUERY);
+
+if (xLocales.is())
+aLocales = xLocales->getLocales();
+}
+}
 
 boost::property_tree::ptree aTree;
 aTree.put("commandName", pCommand);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source sfx2/source

2017-10-03 Thread Henry Castro
 desktop/source/lib/init.cxx  |   37 +++--
 sfx2/source/control/unoctitm.cxx |8 
 2 files changed, 43 insertions(+), 2 deletions(-)

New commits:
commit 7197e1072076ce8054932dd4856a4d017e843fc6
Author: Henry Castro 
Date:   Sun Oct 1 11:11:18 2017 -0400

lok: handle .uno:LanguageStatus command

Contains also:

LOK: getSpellLanguages() is not necessary in comphelper in the end.

Change-Id: I3828113bce3b7d32e90e461a299986e363115a83

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b687175fd599..65d5b43ce14b 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -76,6 +76,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1541,6 +1542,7 @@ static void doc_iniUnoCommands ()
 OUString(".uno:JustifyPara"),
 OUString(".uno:OutlineFont"),
 OUString(".uno:LeftPara"),
+OUString(".uno:LanguageStatus"),
 OUString(".uno:RightPara"),
 OUString(".uno:Shadowed"),
 OUString(".uno:SubScript"),
@@ -1992,7 +1994,6 @@ static void 
doc_initializeForRendering(LibreOfficeKitDocument* pThis,
 if (pDoc)
 {
 doc_iniUnoCommands();
-
 pDoc->initializeForTiledRendering(
 
comphelper::containerToSequence(jsonToPropertyValuesVector(pArguments)));
 }
@@ -2048,7 +2049,9 @@ static void doc_registerCallback(LibreOfficeKitDocument* 
pThis,
 }
 
 if (SfxViewShell* pViewShell = SfxViewShell::Current())
+{
 
pViewShell->registerLibreOfficeKitViewCallback(CallbackFlushHandler::callback, 
pDocument->mpCallbackFlushHandlers[nView].get());
+}
 }
 
 /// Returns the JSON representation of all the comments in the document
@@ -2359,6 +2362,32 @@ static void doc_resetSelection(LibreOfficeKitDocument* 
pThis)
 pDoc->resetSelection();
 }
 
+static char* getLanguages(const char* pCommand)
+{
+css::uno::Reference< css::uno::XComponentContext> xContext = 
::comphelper::getProcessComponentContext();
+css::uno::Reference< css::linguistic2::XLinguServiceManager2 > xLangSrv = 
css::linguistic2::LinguServiceManager::create(xContext);
+css::uno::Reference< css::linguistic2::XSpellChecker > 
xSpell(xLangSrv.is() ? xLangSrv->getSpellChecker() : nullptr, 
css::uno::UNO_QUERY);
+css::uno::Reference< css::linguistic2::XSupportedLocales > 
xLocales(xSpell, css::uno::UNO_QUERY);
+css::uno::Sequence< css::lang::Locale > aLocales(xLocales.is() ? 
xLocales->getLocales() : css::uno::Sequence< css::lang::Locale >());
+
+boost::property_tree::ptree aTree;
+aTree.put("commandName", pCommand);
+boost::property_tree::ptree aValues;
+for ( sal_Int32 itLocale = 0; itLocale < aLocales.getLength(); itLocale++ )
+{
+boost::property_tree::ptree aChild;
+aChild.put("", 
SvtLanguageTable::GetLanguageString(LanguageTag::convertToLanguageType(aLocales[itLocale])).toUtf8());
+aValues.push_back(std::make_pair("", aChild));
+}
+aTree.add_child("commandValues", aValues);
+std::stringstream aStream;
+boost::property_tree::write_json(aStream, aTree);
+char* pJson = static_cast(malloc(aStream.str().size() + 1));
+strcpy(pJson, aStream.str().c_str());
+pJson[aStream.str().size()] = '\0';
+return pJson;
+}
+
 static char* getFonts (const char* pCommand)
 {
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
@@ -2664,7 +2693,11 @@ static char* 
doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 static const OString aCellCursor(".uno:CellCursor");
 static const OString aFontSubset(".uno:FontSubset=");
 
-if (!strcmp(pCommand, ".uno:CharFontName"))
+if (!strcmp(pCommand, ".uno:LanguageStatus"))
+{
+return getLanguages(pCommand);
+}
+else if (!strcmp(pCommand, ".uno:CharFontName"))
 {
 return getFonts(pCommand);
 }
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 23002fe9dcc7..72edd1fabd15 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1155,6 +1155,14 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
 aBuffer.append(OUString::number(aSize.Width) + " x " + 
OUString::number(aSize.Height));
 }
 }
+else if (aEvent.FeatureURL.Path == "LanguageStatus")
+{
+css::uno::Sequence< OUString > aSeq;
+if (aEvent.IsEnabled && (aEvent.State >>= aSeq))
+{
+aBuffer.append(aSeq[0]);
+}
+}
 else
 {
 return;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source sfx2/source

2017-09-19 Thread Jan Holesovsky
 desktop/source/lib/init.cxx  |1 +
 sfx2/source/control/unoctitm.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit d51941110dbe82ad953d4f41003a8de3ab11b0cb
Author: Jan Holesovsky 
Date:   Tue Sep 19 16:47:17 2017 +0200

lok: Expose the automatic spell checking state in the UI.

Change-Id: I5c22ff70d3895b0f4a86eb8be85dde971604874a
Reviewed-on: https://gerrit.libreoffice.org/42479
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5153ba980ca6..b687175fd599 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1577,6 +1577,7 @@ static void doc_iniUnoCommands ()
 OUString(".uno:RowColSelCount"),
 OUString(".uno:StatusPageStyle"),
 OUString(".uno:InsertMode"),
+OUString(".uno:SpellOnline"),
 OUString(".uno:StatusSelectionMode"),
 OUString(".uno:StateTableCell"),
 OUString(".uno:StatusBarFunc"),
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 68a1cff0dd83..23002fe9dcc7 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -993,6 +993,7 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
 aEvent.FeatureURL.Path == "OutlineFont" ||
 aEvent.FeatureURL.Path == "RightPara" ||
 aEvent.FeatureURL.Path == "Shadowed" ||
+aEvent.FeatureURL.Path == "SpellOnline" ||
 aEvent.FeatureURL.Path == "SubScript" ||
 aEvent.FeatureURL.Path == "SuperScript" ||
 aEvent.FeatureURL.Path == "Strikeout" ||
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-09-07 Thread Marco Cecchetti
 desktop/source/lib/init.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2a443e6d9d793c3f5cb61a5343f326c214d7a496
Author: Marco Cecchetti 
Date:   Thu Sep 7 15:01:29 2017 +0200

lok - support for watermark - fix namespace problem

Change-Id: I76426f11c3155263652d786c62eb32f823ee1f18

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 45fca4fdc8d3..4e7f9210a83e 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2950,7 +2950,7 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* 
/*pThis*/,
 DrawTextFlags::Center
 | DrawTextFlags::VCenter
 | DrawTextFlags::MultiLine
-| DrawTextFlags::WordBreakHyphenation;// | 
DrawTextFlags::WordBreak ;
+| DrawTextFlags::WordBreakHyphenation;
 
 aDevice->DrawText(aRect, aText, nStyle);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-09-06 Thread Andras Timar
 desktop/source/lib/init.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4e80c53e20845e0ffcdbd890bd0c3730c15dff42
Author: Andras Timar 
Date:   Wed Sep 6 21:25:02 2017 +0200

build fix

Change-Id: Ic364e27f8ad4996ae1756ec57222cf37fd7ca814
(cherry picked from commit a1ab6d4ec05c5d091db6f3f1ebafe38438efc5ba)

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 174649ec6072..45fca4fdc8d3 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2927,7 +2927,7 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* 
/*pThis*/,
 aDevice->SetFont(aFont);
 }
 
-aRect = tools::Rectangle(0, 0, *pFontWidth, *pFontHeight);
+aRect = Rectangle(0, 0, *pFontWidth, *pFontHeight);
 
 nFontWidth = *pFontWidth;
 nFontHeight = *pFontHeight;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-09-06 Thread Marco Cecchetti
 desktop/source/lib/init.cxx |   49 +++-
 1 file changed, 44 insertions(+), 5 deletions(-)

New commits:
commit 8d2c21e31220540af83665b5e8ad2d9b66be6b3e
Author: Marco Cecchetti 
Date:   Sun Sep 3 20:29:05 2017 +0200

lok - support for watermark

Extends doc_renderFont in order to generate text of requested size.

Change-Id: I0ebd48f8714b7772b764f3aba3e13754869c5117
Reviewed-on: https://gerrit.libreoffice.org/42015
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 748f409437ff..174649ec6072 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2881,6 +2881,8 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* 
/*pThis*/,
 pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
 const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
 
+const int nDefaultFontSize = 25;
+
 if ( pList )
 {
 sal_uInt16 nFontCount = pList->GetFontNameCount();
@@ -2899,30 +2901,67 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* 
/*pThis*/,
 nullptr, Size(1, 1), DeviceFormat::DEFAULT));
 ::Rectangle aRect;
 vcl::Font aFont(rFontMetric);
-aFont.SetFontSize(Size(0, 25));
+aFont.SetFontSize(Size(0, nDefaultFontSize));
 aDevice->SetFont(aFont);
 aDevice->GetTextBoundRect(aRect, aText);
 if (aRect.IsEmpty())
 break;
 
 int nFontWidth = aRect.BottomRight().X() + 1;
-*pFontWidth = nFontWidth;
 int nFontHeight = aRect.BottomRight().Y() + 1;
-*pFontHeight = nFontHeight;
+
 if (!(nFontWidth > 0 && nFontHeight > 0))
 break;
 
+if (*pFontWidth > 0 && *pFontHeight > 0)
+{
+double fScaleX = *pFontWidth / static_cast(nFontWidth);
+double fScaleY = *pFontHeight / 
static_cast(nFontHeight);
+
+double fScale = std::min(fScaleX, fScaleY);
+
+if (fScale >= 1.0)
+{
+int nFontSize = fScale * nDefaultFontSize;
+aFont.SetFontSize(Size(0, nFontSize));
+aDevice->SetFont(aFont);
+}
+
+aRect = tools::Rectangle(0, 0, *pFontWidth, *pFontHeight);
+
+nFontWidth = *pFontWidth;
+nFontHeight = *pFontHeight;
+
+}
+
 unsigned char* pBuffer = static_cast(malloc(4 * 
nFontWidth * nFontHeight));
 if (!pBuffer)
 break;
 
 memset(pBuffer, 0, nFontWidth * nFontHeight * 4);
-
 aDevice->SetBackground(Wallpaper(COL_TRANSPARENT));
 aDevice->SetOutputSizePixelScaleOffsetAndBuffer(
 Size(nFontWidth, nFontHeight), Fraction(1.0), Point(),
 pBuffer);
-aDevice->DrawText(Point(0,0), aText);
+
+if (*pFontWidth > 0 && *pFontHeight > 0)
+{
+DrawTextFlags nStyle =
+DrawTextFlags::Center
+| DrawTextFlags::VCenter
+| DrawTextFlags::MultiLine
+| DrawTextFlags::WordBreakHyphenation;// | 
DrawTextFlags::WordBreak ;
+
+aDevice->DrawText(aRect, aText, nStyle);
+}
+else
+{
+*pFontWidth = nFontWidth;
+*pFontHeight = nFontHeight;
+
+aDevice->DrawText(Point(0,0), aText);
+}
+
 
 return pBuffer;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-08-09 Thread Michael Meeks
 desktop/source/app/dispatchwatcher.cxx |   36 -
 1 file changed, 27 insertions(+), 9 deletions(-)

New commits:
commit b703550bb0c42b49ec7ab6d44135b5a538c34c0e
Author: Michael Meeks 
Date:   Sat Jul 29 16:45:39 2017 +0100

tdf#109262 - load libraries, and handle exceptions for --script-cat

Change-Id: I928ec885f445615fa1fb8a7cfb4ccc0015381d67
Reviewed-on: https://gerrit.libreoffice.org/40550
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/40694
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/desktop/source/app/dispatchwatcher.cxx 
b/desktop/source/app/dispatchwatcher.cxx
index da9a31930b17..639aef032ead 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -196,8 +196,18 @@ void scriptCat(const Reference< XModel >& xDoc )
 for ( sal_Int32 i = 0 ; i < aLibNames.getLength() ; ++i )
 {
 std::cout << "Library: '" << aLibNames[i] << "' children: ";
-Reference< XNameContainer > xContainer(
-xLibraries->getByName( aLibNames[i] ), UNO_QUERY );
+Reference< XNameContainer > xContainer;
+try {
+if (!xLibraries->isLibraryLoaded( aLibNames[i] ))
+xLibraries->loadLibrary( aLibNames[i] );
+xContainer = Reference< XNameContainer >(
+xLibraries->getByName( aLibNames[i] ), UNO_QUERY );
+}
+catch (const css::uno::Exception )
+{
+std::cout << "[" << aLibNames[i] << "] - failed to load library: " 
<< e.Message << "\n";
+continue;
+}
 if( !xContainer.is() )
 std::cout << "0\n";
 else
@@ -210,14 +220,22 @@ void scriptCat(const Reference< XModel >& xDoc )
 rtl::OUString  = aObjectNames[j];
 
 rtl::OUString aCodeString;
-Any aCode = xContainer->getByName( rObjectName );
+try
+{
+Any aCode = xContainer->getByName( rObjectName );
+
+if (! (aCode >>= aCodeString ) )
+std::cout << "[" << rObjectName << "] - error fetching 
code\n";
+else
+std::cout << "[" << rObjectName << "]\n"
+  << aCodeString.trim()
+  << "\n[/" << rObjectName << "]\n";
+}
+catch (const css::uno::Exception )
+{
+std::cout << "[" << rObjectName << "] - exception " << 
e.Message << " fetching code\n";
+}
 
-if (! (aCode >>= aCodeString ) )
-std::cout << "[" << rObjectName << "] - error fetching 
code\n";
-else
-std::cout << "[" << rObjectName << "]\n"
-  << aCodeString.trim()
-  << "\n[/" << rObjectName << "]\n";
 if (j < aObjectNames.getLength() - 1)
 std::cout << 
"\n--\n";
 std::cout << "\n";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-08-04 Thread Markus Mohrhard
 desktop/source/minidump/minidump.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4de6140c395a099df75d8e03306ab05322a887f4
Author: Markus Mohrhard 
Date:   Tue Aug 1 18:54:30 2017 +0200

tdf#109347: don't verify SSL certificate for crashreport upload

Seems that on Windows we can not rely on the CA information to include
the necessary info to verify the connection to the server.

Change-Id: Ieed639c438f5a66e538d1126bb1e8ec1ea02b168
Reviewed-on: https://gerrit.libreoffice.org/40642
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 7457079b85b05dca2a35dc29e0dac1204e6eda00)

diff --git a/desktop/source/minidump/minidump.cxx 
b/desktop/source/minidump/minidump.cxx
index e44fc4ccfb2f..ac63bd41096c 100644
--- a/desktop/source/minidump/minidump.cxx
+++ b/desktop/source/minidump/minidump.cxx
@@ -108,6 +108,7 @@ bool uploadContent(std::map& 
parameters, std::string&
 
 curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
 curl_easy_setopt(curl, CURLOPT_USERAGENT, kUserAgent);
+curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false);
 // Set proxy information if necessary.
 if (!proxy.empty())
 curl_easy_setopt(curl, CURLOPT_PROXY, proxy.c_str());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-08-02 Thread Jan Holesovsky
 desktop/source/lib/init.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9a5c39ea56bbac48f30a1a4966caa68697d8b318
Author: Jan Holesovsky 
Date:   Wed Aug 2 18:45:22 2017 +0200

lok: Support RTF as output format.

Change-Id: Ifea2d1dbf3d4424af557c18e31404e07f8ae89c2
Reviewed-on: https://gerrit.libreoffice.org/40690
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9d9749469420..748f409437ff 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -143,6 +143,7 @@ static const ExtensionMap aWriterExtensionMap[] =
 { "odt",   "writer8" },
 { "ott",   "writer8_template" },
 { "pdf",   "writer_pdf_Export" },
+{ "rtf",   "Rich Text Format" },
 { "txt",   "Text" },
 { "xhtml", "XHTML Writer File" },
 { "png",   "writer_png_Export" },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-07-28 Thread Szymon Kłos
 desktop/source/app/app.cxx |   18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

New commits:
commit f9393801b72751c0f1822498520270adcabfba37
Author: Szymon Kłos 
Date:   Mon Jul 17 22:43:12 2017 +0200

Added SAL_NOLOCK_PROFILE variable to ignore lockfile

Change-Id: I4fb250468fc17fc8be94d666ef231636b4609c1d
Reviewed-on: https://gerrit.libreoffice.org/40100
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 819bcde64954..7c70eca66101 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1448,16 +1448,18 @@ int Desktop::Main()
 // check user installation directory for lockfile so we can be sure
 // there is no other instance using our data files from a remote host
 
-/* tdf#109085 temporary don't show warning about another instance 
running
-m_xLockfile.reset(new Lockfile);
-
-if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsInvisible() &&
- !rCmdLineArgs.IsNoLockcheck() && !m_xLockfile->check( 
Lockfile_execWarning ))
+bool bMustLockProfile = ( getenv( "SAL_NOLOCK_PROFILE" ) == nullptr );
+if ( bMustLockProfile )
 {
-// Lockfile exists, and user clicked 'no'
-return EXIT_FAILURE;
+m_xLockfile.reset(new Lockfile);
+
+if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsInvisible() &&
+ !rCmdLineArgs.IsNoLockcheck() && !m_xLockfile->check( 
Lockfile_execWarning ))
+{
+// Lockfile exists, and user clicked 'no'
+return EXIT_FAILURE;
+}
 }
-*/
 
 // check if accessibility is enabled but not working and allow to quit
 if( 
Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-07-20 Thread Jan Holesovsky
 desktop/source/lib/init.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 274f47003198c058ad974b74bc60c4954d49654d
Author: Jan Holesovsky 
Date:   Wed Jul 19 08:46:22 2017 +0200

lok: Add docm/xlsm/pptm filters to be known by LOK.

Change-Id: I4995498132b832ce783efc9740f1d7129f085a01
Reviewed-on: https://gerrit.libreoffice.org/40196
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 32034e72f229..9d9749469420 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -136,6 +136,7 @@ typedef struct
 static const ExtensionMap aWriterExtensionMap[] =
 {
 { "doc",   "MS Word 97" },
+{ "docm",  "MS Word 2007 XML VBA" },
 { "docx",  "MS Word 2007 XML" },
 { "fodt",  "OpenDocument Text Flat XML" },
 { "html",  "HTML (StarWriter)" },
@@ -158,6 +159,7 @@ static const ExtensionMap aCalcExtensionMap[] =
 { "pdf",   "calc_pdf_Export" },
 { "xhtml", "XHTML Calc File" },
 { "xls",   "MS Excel 97" },
+{ "xlsm",  "Calc MS Excel 2007 VBA XML" },
 { "xlsx",  "Calc MS Excel 2007 XML" },
 { "png",   "calc_png_Export" },
 { nullptr, nullptr }
@@ -173,6 +175,7 @@ static const ExtensionMap aImpressExtensionMap[] =
 { "pdf",   "impress_pdf_Export" },
 { "potm",  "Impress MS PowerPoint 2007 XML Template" },
 { "pot",   "MS PowerPoint 97 Vorlage" },
+{ "pptm",  "Impress MS PowerPoint 2007 XML VBA" },
 { "pptx",  "Impress MS PowerPoint 2007 XML" },
 { "pps",   "MS PowerPoint 97 Autoplay" },
 { "ppt",   "MS PowerPoint 97" },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-07-15 Thread Aron Budea
 desktop/source/app/app.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ca5b71fc2a2d214c453657b6b8a76025f78944a3
Author: Aron Budea 
Date:   Fri Jul 14 16:46:29 2017 +0200

tdf#109085: don't create lock file in profile

Change-Id: I7b6fd9da8c0280a2ee22494aa9bcc38b81f66111
Reviewed-on: https://gerrit.libreoffice.org/39972
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 39474b850d24..819bcde64954 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1447,9 +1447,10 @@ int Desktop::Main()
 #if HAVE_FEATURE_DESKTOP
 // check user installation directory for lockfile so we can be sure
 // there is no other instance using our data files from a remote host
-m_xLockfile.reset(new Lockfile);
 
 /* tdf#109085 temporary don't show warning about another instance 
running
+m_xLockfile.reset(new Lockfile);
+
 if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsInvisible() &&
  !rCmdLineArgs.IsNoLockcheck() && !m_xLockfile->check( 
Lockfile_execWarning ))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-07-14 Thread Szymon Kłos
 desktop/source/app/app.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8c5f8fcb4a192cdbb92a70a24eeef173ab2f76b3
Author: Szymon Kłos 
Date:   Thu Jul 13 16:40:31 2017 +0200

tdf#109085 run LO with --nolockcheck

Change-Id: Ia184d6e9653e008ce56e51aa0a2cb1f0a49988ef
Reviewed-on: https://gerrit.libreoffice.org/39916
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 796cc71df6b8..39474b850d24 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1449,12 +1449,14 @@ int Desktop::Main()
 // there is no other instance using our data files from a remote host
 m_xLockfile.reset(new Lockfile);
 
+/* tdf#109085 temporary don't show warning about another instance 
running
 if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsInvisible() &&
  !rCmdLineArgs.IsNoLockcheck() && !m_xLockfile->check( 
Lockfile_execWarning ))
 {
 // Lockfile exists, and user clicked 'no'
 return EXIT_FAILURE;
 }
+*/
 
 // check if accessibility is enabled but not working and allow to quit
 if( 
Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-06-09 Thread Michael Meeks
 desktop/source/app/app.cxx |1 
 desktop/source/app/cmdlineargs.cxx |7 +
 desktop/source/app/cmdlineargs.hxx |2 
 desktop/source/app/cmdlinehelp.cxx |3 
 desktop/source/app/dispatchwatcher.cxx |  229 ++---
 desktop/source/app/dispatchwatcher.hxx |   14 +-
 desktop/source/app/officeipcthread.cxx |   20 ++
 desktop/source/app/officeipcthread.hxx |5 
 8 files changed, 191 insertions(+), 90 deletions(-)

New commits:
commit 0f1d081a3c3ad44b07e02d98b75e6c41696ead22
Author: Michael Meeks 
Date:   Thu Jun 8 14:25:50 2017 +0100

Add --script-cat parameter to dump scripts content.

Also factor out over-long print method into its own helper.

Change-Id: Ica98dc9c999d5655e78662774e0140d70369d0b7
Reviewed-on: https://gerrit.libreoffice.org/38579
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 
Reviewed-on: https://gerrit.libreoffice.org/38602
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 1f9307d0c26f..796cc71df6b8 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2187,6 +2187,7 @@ void Desktop::OpenClients()
 aRequest.aConversionOut = rArgs.GetConversionOut();
 aRequest.aInFilter = rArgs.GetInFilter();
 aRequest.bTextCat = rArgs.IsTextCat();
+aRequest.bScriptCat = rArgs.IsScriptCat();
 
 if ( !aRequest.aOpenList.empty() ||
  !aRequest.aViewList.empty() ||
diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 07dee1b60aa8..cefcaa55a625 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -339,6 +339,12 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& 
supplier )
 eCurrentEvent = CommandLineEvent::Conversion;
 setHeadless();
 }
+else if ( oArg == "script-cat" )
+{
+m_scriptcat = true;
+eCurrentEvent = CommandLineEvent::Conversion;
+setHeadless();
+}
 else if ( oArg == "quickstart" )
 {
 #if defined(ENABLE_QUICKSTART_APPLET)
@@ -706,6 +712,7 @@ void CommandLineArgs::InitParamValues()
 m_bEmpty = true;
 m_bDocumentArgs  = false;
 m_textcat = false;
+m_scriptcat = false;
 m_safemode = false;
 }
 
diff --git a/desktop/source/app/cmdlineargs.hxx 
b/desktop/source/app/cmdlineargs.hxx
index 7a52e042016d..78c5057a3d54 100644
--- a/desktop/source/app/cmdlineargs.hxx
+++ b/desktop/source/app/cmdlineargs.hxx
@@ -93,6 +93,7 @@ class CommandLineArgs
 boolHasModuleParam() const;
 boolWantsToLoadDocument() const { return 
m_bDocumentArgs;}
 boolIsTextCat() const { return m_textcat;}
+boolIsScriptCat() const { return m_scriptcat;}
 boolIsSafeMode() const { return m_safemode; }
 
 const OUString& GetUnknown() const { return m_unknown;}
@@ -157,6 +158,7 @@ class CommandLineArgs
 bool m_version;
 bool m_splashpipe;
 bool m_textcat;
+bool m_scriptcat;
 bool m_safemode;
 
 OUString m_unknown;
diff --git a/desktop/source/app/cmdlinehelp.cxx 
b/desktop/source/app/cmdlinehelp.cxx
index aaa6af9830b9..e3e4539e9ab0 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -133,6 +133,9 @@ namespace desktop
 "--cat files\n"\
 "  Dump text content of the files to console\n"\
 "  Eg. --cat *.odt\n"\
+"--script-cat\n"\
+"  Dump text content of any scripts embedded in the files to 
console\n"
+"  Eg. --script-cat *.xls\n"
 "--pidfile=file\n"\
 "  Store soffice.bin pid to file.\n"\
 "-env:[=]\n"\
diff --git a/desktop/source/app/dispatchwatcher.cxx 
b/desktop/source/app/dispatchwatcher.cxx
index 3bbb191da359..da9a31930b17 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -50,6 +50,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 
 #include 
 #include 
@@ -69,6 +73,7 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::view;
 using namespace ::com::sun::star::task;
+using namespace ::com::sun::star::document;
 
 namespace document = ::com::sun::star::document;
 
@@ -129,32 +134,31 @@ std::shared_ptr 
impl_lookupExportFilterForUrl( const rtl::OUStr
 std::shared_ptr impl_getExportFilterFromUrl(
 const rtl::OUString& rUrl, const rtl::OUString& rFactory)
 {
-try
-{
-const Reference< XComponentContext > xContext( 
comphelper::getProcessComponentContext() 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source sfx2/source

2017-05-29 Thread Jan Holesovsky
 desktop/source/lib/init.cxx  |1 +
 sfx2/source/control/unoctitm.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit 5d2091029b6e51318e296d092dcd92b7a5f14ff5
Author: Jan Holesovsky 
Date:   Mon May 29 16:55:49 2017 +0200

lok: Notify about the Formatting Marks changes.

Change-Id: Ibcbd370c99cf63789637ad6642c91775066ecfad
Reviewed-on: https://gerrit.libreoffice.org/38156
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 35908f96dff3..32034e72f229 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1521,6 +1521,7 @@ static void doc_iniUnoCommands ()
 OUString(".uno:CharBackgroundExt"),
 OUString(".uno:CharFontName"),
 OUString(".uno:Color"),
+OUString(".uno:ControlCodes"),
 OUString(".uno:DecrementIndent"),
 OUString(".uno:DefaultBullet"),
 OUString(".uno:DefaultNumbering"),
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 43bc6aa47882..af13d3d33698 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -984,6 +984,7 @@ static void InterceptLOKStateChangeEvent(const 
SfxViewFrame* pViewFrame, const c
 if (aEvent.FeatureURL.Path == "Bold" ||
 aEvent.FeatureURL.Path == "CenterPara" ||
 aEvent.FeatureURL.Path == "CharBackgroundExt" ||
+aEvent.FeatureURL.Path == "ControlCodes" ||
 aEvent.FeatureURL.Path == "DefaultBullet" ||
 aEvent.FeatureURL.Path == "DefaultNumbering" ||
 aEvent.FeatureURL.Path == "Italic" ||
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-05-16 Thread Aron Budea
 desktop/source/app/app.cxx |   24 +++-
 1 file changed, 15 insertions(+), 9 deletions(-)

New commits:
commit d2f69fc9011c0f4360710629783e800b60cedd65
Author: Aron Budea 
Date:   Sun May 7 01:49:08 2017 +0200

tdf#104312, tdf#105428: use static vars in ReplaceStringHookProc

And use call_once to initialize them once.

Reviewed-on: https://gerrit.libreoffice.org/37318
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 
(cherry picked from commit f9f511317fa5f1c655d189a8507f8a5492a3b08d)

Change-Id: Ic2f97a51ccc6ee400eb1af56da2c8fd88e226a9d
Reviewed-on: https://gerrit.libreoffice.org/37528
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 879369714580..1f9307d0c26f 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -23,6 +23,7 @@
 #include 
 
 #include 
+#include 
 #if defined UNX
 #include 
 #endif
@@ -473,16 +474,17 @@ namespace
 
 OUString ReplaceStringHookProc( const OUString& rStr )
 {
-OUString sRet(rStr);
+const static OUString 
sBuildId(utl::Bootstrap::getBuildIdData("development"));
+static OUString sBrandName, sVersion, sAboutBoxVersion, 
sAboutBoxVersionSuffix, sExtension;
 
-if (sRet.indexOf("%PRODUCT") != -1 || sRet.indexOf("%ABOUTBOX") != -1)
+static std::once_flag aInitOnce;
+std::call_once(aInitOnce, []
 {
-OUString sBrandName = BrandName::get();
-OUString sVersion = Version::get();
-OUString sBuildId = utl::Bootstrap::getBuildIdData("development");
-OUString sAboutBoxVersion = AboutBoxVersion::get();
-OUString sAboutBoxVersionSuffix = AboutBoxVersionSuffix::get();
-OUString sExtension = Extension::get();
+sBrandName = BrandName::get();
+sVersion = Version::get();
+sAboutBoxVersion = AboutBoxVersion::get();
+sAboutBoxVersionSuffix = AboutBoxVersionSuffix::get();
+sExtension = Extension::get();
 
 if ( sBrandName.isEmpty() )
 {
@@ -490,12 +492,16 @@ OUString ReplaceStringHookProc( const OUString& rStr )
 sVersion = utl::ConfigManager::getProductVersion();
 sAboutBoxVersion = utl::ConfigManager::getAboutBoxProductVersion();
 sAboutBoxVersionSuffix = 
utl::ConfigManager::getAboutBoxProductVersionSuffix();
-if ( sExtension.isEmpty() )
+if (sExtension.isEmpty())
 {
 sExtension = utl::ConfigManager::getProductExtension();
 }
 }
+} );
 
+OUString sRet(rStr);
+if (sRet.indexOf("%PRODUCT") != -1 || sRet.indexOf("%ABOUTBOX") != -1)
+{
 sRet = sRet.replaceAll( "%PRODUCTNAME", sBrandName );
 sRet = sRet.replaceAll( "%PRODUCTVERSION", sVersion );
 sRet = sRet.replaceAll( "%BUILDID", sBuildId );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-05-05 Thread Andras Timar
 desktop/source/app/crashreport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c069b3dce295905a8f309c44419409c238e25b10
Author: Andras Timar 
Date:   Fri May 5 15:44:49 2017 +0200

prefer https

Change-Id: Ib9920a0f56c04625c3b9690a19c2dc5595c6519e

diff --git a/desktop/source/app/crashreport.cxx 
b/desktop/source/app/crashreport.cxx
index 27e2f97d1f4b..ef8e856b9199 100644
--- a/desktop/source/app/crashreport.cxx
+++ b/desktop/source/app/crashreport.cxx
@@ -73,7 +73,7 @@ void CrashReporter::writeCommonInfo()
 std::ofstream minidump_file(ini_path, std::ios_base::trunc);
 minidump_file << "ProductName=LibreOffice\n";
 minidump_file << "Version=" LIBO_VERSION_DOTTED "\n";
-minidump_file << "URL=http://crashreport.collaboraoffice.com/submit/\n;;
+minidump_file << "URL=https://crashreport.collaboraoffice.com/submit/\n;;
 for (auto& keyValue : maKeyValues)
 {
 writeToStream(minidump_file, keyValue.first, keyValue.second);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-04-25 Thread Jan Holesovsky
 desktop/source/lib/init.cxx |   13 -
 1 file changed, 13 deletions(-)

New commits:
commit 3762a86f694e742cd0cf7f4ad89cb8d2a5235a4d
Author: Jan Holesovsky 
Date:   Tue Apr 25 16:11:25 2017 +0200

The debugging rectangles are not needed any more.

We have the debugging console in the loleafleat instead these days.

Change-Id: I316fa6d101a14e1bc7f2a8fab554f516ec55644d
Reviewed-on: https://gerrit.libreoffice.org/36949
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fdedff280e4b..971d43548611 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1842,19 +1842,6 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis,
 
 pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
 nTilePosX, nTilePosY, nTileWidth, nTileHeight);
-
-static bool bDebug = getenv("LOK_DEBUG") != nullptr;
-if (bDebug)
-{
-// Draw a small red rectangle in the top left corner so that it's easy 
to see where a new tile begins.
-Rectangle aRect(0, 0, 5, 5);
-aRect = pDevice->PixelToLogic(aRect);
-pDevice->Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
-pDevice->SetFillColor(COL_LIGHTRED);
-pDevice->SetLineColor();
-pDevice->DrawRect(aRect);
-pDevice->Pop();
-}
 #endif
 
 #else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source include/LibreOfficeKit include/sfx2 sc/inc sc/source sfx2/source

2017-04-21 Thread Marco Cecchetti
 desktop/source/lib/init.cxx  |1 
 include/LibreOfficeKit/LibreOfficeKitEnums.h |   10 +
 include/sfx2/lokhelper.hxx   |3 
 sc/inc/address.hxx   |3 
 sc/inc/markarr.hxx   |3 
 sc/inc/markdata.hxx  |5 
 sc/inc/markmulti.hxx |2 
 sc/source/core/data/markarr.cxx  |  117 ++-
 sc/source/core/data/markdata.cxx |   27 
 sc/source/core/data/markmulti.cxx|   74 
 sc/source/core/tool/address.cxx  |   40 ++
 sc/source/ui/view/viewfunc.cxx   |  166 +--
 sfx2/source/view/lokhelper.cxx   |   11 +
 13 files changed, 445 insertions(+), 17 deletions(-)

New commits:
commit 8b929a7124ae42d019ea902a4a54f9911f0b2867
Author: Marco Cecchetti 
Date:   Wed Apr 19 22:37:13 2017 +0200

LOK - Calc: header, cursor and selection misplaced by other view actions

The row header, the cell cursor and the currect cell selection become
misplaced when another user inserts, deletes or resizes a row.

The same is true for columns.

This patch provides to invalidate cached position values in all views
when one of the listed action is performed in any view.

It also introduce 2 new LOK callbacks for informing the client that
the row/col header is no more valid and needs to be updated.

Finally, when a new row/col is inserted or removed in one view, the
cell cursor position and the current selection (if any) in other views
may need to be shifted lower by one row/col.

Change-Id: I7002a9adf971929b3e38ff58fa0429e792a1e7c4
Reviewed-on: https://gerrit.libreoffice.org/36716
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9fcea7a1c5a5..fdedff280e4b 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -764,6 +764,7 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 case LOK_CALLBACK_VIEW_CURSOR_VISIBLE:
 case LOK_CALLBACK_SET_PART:
 case LOK_CALLBACK_TEXT_VIEW_SELECTION:
+case LOK_CALLBACK_INVALIDATE_HEADER:
 {
 const auto& pos = std::find_if(m_queue.rbegin(), m_queue.rend(),
 [type] (const queue_type::value_type& elem) { return 
(elem.first == type); });
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 8a59b4cc8ad1..dffc728eb641 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -492,7 +492,15 @@ typedef enum
  * - 'action' can be 'Add', 'Remove' or 'Modify' depending on whether
  *comment has been added, removed or modified.
  */
-LOK_CALLBACK_COMMENT = 32
+LOK_CALLBACK_COMMENT = 32,
+
+/**
+ * The column/row header is no more valid because of a column/row insertion
+ * or a similar event. Clients must query a new column/row header set.
+ *
+ * The payload says if we are invalidating a row or column header.
+ */
+LOK_CALLBACK_INVALIDATE_HEADER = 33
 }
 LibreOfficeKitCallbackType;
 
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index a6de41cb880d..4f7b45065fd5 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -42,7 +42,8 @@ public:
 static void notifyOtherView(SfxViewShell* pThisView, SfxViewShell* 
pOtherView, int nType, const OString& rKey, const OString& rPayload);
 /// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to 
setOptionalFeatures() if needed.
 static void notifyInvalidation(SfxViewShell* pThisView, const OString& 
rPayload);
-
+/// Emits a LOK_CALLBACK_INVALIDATE_HEADER for all views.
+static void notifyAllViewsHeaderInvalidation(const OString& rPayload);
 /// A special value to signify 'infinity'.
 /// This value is chosen such that sal_Int32 will not overflow when 
manipulated.
 static const long MaxTwips = 1e9;
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index 43cad11ef409..df2a25020f94 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -587,6 +587,9 @@ public:
 SC_DLLPUBLIC SAL_WARN_UNUSED_RESULT bool MoveSticky( SCsCOL aDeltaX, 
SCsROW aDeltaY, SCsTAB aDeltaZ,
 ScRange& rErrorRange );
 
+SC_DLLPUBLIC void IncColIfNotLessThan(SCCOL nStartCol, SCsCOL nOffset);
+SC_DLLPUBLIC void IncRowIfNotLessThan(SCROW nStartRow, SCsROW nOffset);
+
 SC_DLLPUBLIC void ExtendTo( const ScRange& rRange );
 SC_DLLPUBLIC bool Intersects( const ScRange& rRange ) const;// do two 
ranges intersect?
 
diff --git a/sc/inc/markarr.hxx b/sc/inc/markarr.hxx
index 0fd826cad395..2f2e27984486 100644
--- 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source scp2/inc scp2/source setup_native/source solenv/bin

2017-04-06 Thread Mike Kaganski
 desktop/source/app/cmdlineargs.cxx  |1 +
 scp2/inc/macros.inc |9 
++---
 scp2/source/calc/registryitem_calc.scp  |1 +
 scp2/source/calc/registryitem_calc.ulf  |3 +++
 setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx |7 
---
 solenv/bin/modules/installer/windows/property.pm|1 +
 6 files changed, 16 insertions(+), 6 deletions(-)

New commits:
commit 14f3ca72d9f3bfb76f22e566cc4109ca38b3493c
Author: Mike Kaganski 
Date:   Thu Apr 6 10:02:33 2017 +0300

tdf#106359: register .iqy in MSI and treat them as templates

Change-Id: I7ae94c7717fbea03d96c539e05eeb565bafefd9f
Reviewed-on: https://gerrit.libreoffice.org/36188
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
(cherry picked from commit 0c547776340c3983a867890b34f4a931215f8f52)
Reviewed-on: https://gerrit.libreoffice.org/36203
Tested-by: Mike Kaganski 

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 10ef770af9c8..07dee1b60aa8 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -244,6 +244,7 @@ CommandLineEvent CheckWebQuery(/* in,out */ OUString& arg, 
CommandLineEvent curE
 xInput->closeInput();
 
 arg = OUString::createFromAscii(aResult.getStr());
+return CommandLineEvent::ForceNew;
 }
 catch (...)
 {
diff --git a/scp2/inc/macros.inc b/scp2/inc/macros.inc
index 4de35db91e2e..da09c7c2c3d0 100644
--- a/scp2/inc/macros.inc
+++ b/scp2/inc/macros.inc
@@ -368,7 +368,7 @@ End
 Styles = (); \
 End
 
-#define 
CONDITIONAL_REGISTER_DOC_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type)
 \
+#define 
CONDITIONAL_REGISTER_DOC_OPEN_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type)
 \
 CONDITIONAL_MODULE_ENTRY(name,modid) \
 REGISTRY_ENTRY_OPEN_WITH(name,cond,doc_type,modid,key) \
 CONDITIONAL_REGISTRY_ENTRY_EXT(name,cond,key) \
@@ -376,11 +376,14 @@ End
 REGISTRY_ENTRY_APPUSERMODELID(name,modid,doc_type) \
 REGISTRY_ENTRY_ICON(name,modid,icon_id) \
 REGISTRY_ENTRY_SHELL(name,default,modid) \
-REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
 REGISTRY_ENTRY_OPEN_CMD(name,modid,app) \
+REGISTRY_ENTRY_CAPABILITIES(name,modid,key,doc_type) \
+
+#define 
CONDITIONAL_REGISTER_DOC_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type)
 \
+
CONDITIONAL_REGISTER_DOC_OPEN_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type)
 \
+REGISTRY_ENTRY_NEW_CMD(name,modid,app) \
 REGISTRY_ENTRY_PRINT_CMD(name,modid,app) \
 REGISTRY_ENTRY_PRINTTO_CMD(name,modid,app) \
-REGISTRY_ENTRY_CAPABILITIES(name,modid,key,doc_type) \
 
 #define 
CONDITIONAL_REGISTER_DOCTEMPLATE_EXTENSION(name,modid,key,cond,disp_name,icon_id,app,default,doc_type)
 \
 CONDITIONAL_MODULE_ENTRY(name,modid) \
diff --git a/scp2/source/calc/registryitem_calc.scp 
b/scp2/source/calc/registryitem_calc.scp
index 7259226eb9ff..2cb78210a2fa 100644
--- a/scp2/source/calc/registryitem_calc.scp
+++ b/scp2/source/calc/registryitem_calc.scp
@@ -1249,6 +1249,7 @@ CONDITIONAL_REGISTER_DOC_EXTENSION( Xls,  
gid_Module_Prg_Calc_MSO_Reg, xls,  XLS
 CONDITIONAL_REGISTER_DOC_EXTENSION( Xlsx, gid_Module_Prg_Calc_MSO_Reg, xlsx, 
XLSX, MS_EXCEL_WORKSHEET, 3, scalc.exe, open, Calc )
 CONDITIONAL_REGISTER_DOC_EXTENSION( Xlsm, gid_Module_Prg_Calc_MSO_Reg, xlsm, 
XLSM, MS_EXCEL_WORKSHEET, 3, scalc.exe, open, Calc )
 CONDITIONAL_REGISTER_DOC_EXTENSION( Xlsb, gid_Module_Prg_Calc_MSO_Reg, xlsb, 
XLSB, MS_EXCEL_WORKSHEET, 3, scalc.exe, open, Calc )
+CONDITIONAL_REGISTER_DOC_OPEN_EXTENSION( Iqy, gid_Module_Prg_Calc_MSO_Reg, 
iqy, IQY, MS_EXCEL_WEBQUERY, 0, scalc.exe, open, Calc )
 CONDITIONAL_REGISTER_DOCTEMPLATE_EXTENSION( Xlt,  gid_Module_Prg_Calc_MSO_Reg, 
xlt,  XLT,  MS_EXCEL_TEMPLATE_OLD, 4, scalc.exe, new, Calc )
 CONDITIONAL_REGISTER_DOCTEMPLATE_EXTENSION( Xltx, gid_Module_Prg_Calc_MSO_Reg, 
xltx, XLTX, MS_EXCEL_TEMPLATE, 4, scalc.exe, new, Calc )
 CONDITIONAL_REGISTER_DOCTEMPLATE_EXTENSION( Xltm, gid_Module_Prg_Calc_MSO_Reg, 
xltm, XLTM, MS_EXCEL_TEMPLATE, 4, scalc.exe, new, Calc )
diff --git a/scp2/source/calc/registryitem_calc.ulf 
b/scp2/source/calc/registryitem_calc.ulf
index b7fe2c36609e..fb115e6a2235 100644
--- a/scp2/source/calc/registryitem_calc.ulf
+++ b/scp2/source/calc/registryitem_calc.ulf
@@ -37,6 +37,9 @@ en-US = "Microsoft Excel 97-2003 Worksheet"
 [STR_REG_VAL_MS_EXCEL_WORKSHEET]
 en-US = "Microsoft Excel Worksheet"
 
+[STR_REG_VAL_MS_EXCEL_WEBQUERY]
+en-US = "Microsoft Excel Web Query File"
+
 [STR_REG_VAL_MS_EXCEL_TEMPLATE_OLD]
 en-US = "Microsoft Excel 97-2003 Template"
 
diff --git 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source libreofficekit/qa

2017-03-20 Thread Jan Holesovsky
 desktop/source/lib/init.cxx   |   24 ++
 libreofficekit/qa/unit/tiledrendering.cxx |   32 ++
 2 files changed, 52 insertions(+), 4 deletions(-)

New commits:
commit a15a3a1bacf79a42857e9a4e7cae853d6d6ebad2
Author: Jan Holesovsky 
Date:   Mon Mar 20 23:05:22 2017 +0100

lok: Fix crash in paintPartTile() when the current view was destroyed.

Change-Id: I59b71ee6815cbcfa4c8b5f68ae6dc9299856d49e

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fde12fcdf63a..dcadea6426bb 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1822,11 +1822,27 @@ static void doc_paintPartTile(LibreOfficeKitDocument* 
pThis,
<< nTilePosX << ", " << nTilePosY << ") to ["
<< nCanvasWidth << "x" << nCanvasHeight << "]px" );
 
-// Disable callbacks while we are painting.
 LibLODocument_Impl* pDocument = static_cast(pThis);
-const int nOrigViewId = doc_getView(pThis);
+int nOrigViewId = doc_getView(pThis);
+
+if (nOrigViewId < 0)
+{
+// tile painting always needs a SfxViewShell::Current(), but actually
+// it does not really matter which one - all of them should paint the
+// same thing.
+int viewCount = doc_getViewsCount(pThis);
+if (viewCount == 0)
+return;
 
-if (nOrigViewId >= 0)
+std::vector viewIds(viewCount);
+doc_getViewIds(pThis, viewIds.data(), viewCount);
+
+nOrigViewId = viewIds[0];
+doc_setView(pThis, nOrigViewId);
+}
+
+// Disable callbacks while we are painting.
+if (nOrigViewId >= 0 && pDocument->mpCallbackFlushHandlers[nOrigViewId])
 
pDocument->mpCallbackFlushHandlers[nOrigViewId]->setPartTilePainting(true);
 
 try
@@ -1877,7 +1893,7 @@ static void doc_paintPartTile(LibreOfficeKitDocument* 
pThis,
 // Nothing to do but restore the PartTilePainting flag.
 }
 
-if (nOrigViewId >= 0)
+if (nOrigViewId >= 0 && pDocument->mpCallbackFlushHandlers[nOrigViewId])
 
pDocument->mpCallbackFlushHandlers[nOrigViewId]->setPartTilePainting(false);
 }
 
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx 
b/libreofficekit/qa/unit/tiledrendering.cxx
index 1df2eff37f54..f201f766ca7b 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -72,6 +72,7 @@ public:
 void testDocumentTypes( Office* pOffice );
 void testImpressSlideNames( Office* pOffice );
 void testCalcSheetNames( Office* pOffice );
+void testPaintPartTile( Office* pOffice );
 #if 0
 void testOverlay( Office* pOffice );
 #endif
@@ -98,6 +99,7 @@ void TiledRenderingTest::runAllTests()
 testDocumentTypes( pOffice.get() );
 testImpressSlideNames( pOffice.get() );
 testCalcSheetNames( pOffice.get() );
+testPaintPartTile( pOffice.get() );
 #if 0
 testOverlay( pOffice.get() );
 #endif
@@ -186,6 +188,36 @@ void TiledRenderingTest::testCalcSheetNames( Office* 
pOffice )
 CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 2 ), "Sheet3" ) == 0 );
 }
 
+void TiledRenderingTest::testPaintPartTile(Office* pOffice)
+{
+const string sTextDocPath = m_sSrcRoot + 
"/libreofficekit/qa/data/blank_text.odt";
+const string sTextLockFile = m_sSrcRoot 
+"/libreofficekit/qa/data/.~lock.blank_text.odt#";
+
+// FIXME: same comment as below wrt lockfile removal.
+remove(sTextLockFile.c_str());
+
+std::unique_ptr pDocument(pOffice->documentLoad( 
sTextDocPath.c_str()));
+CPPUNIT_ASSERT(pDocument.get());
+CPPUNIT_ASSERT_EQUAL(LOK_DOCTYPE_TEXT, 
static_cast(pDocument->getDocumentType()));
+
+// Create two views.
+pDocument->getView();
+pDocument->createView();
+
+int nView2 = pDocument->getView();
+
+// Destroy the current view
+pDocument->destroyView(nView2);
+
+int nCanvasWidth = 256;
+int nCanvasHeight = 256;
+std::vector aBuffer(nCanvasWidth * nCanvasHeight * 4);
+
+// And try to paintPartTile() - this used to crash when the current viewId
+// was destroyed
+pDocument->paintPartTile(aBuffer.data(), /*nPart=*/0, nCanvasWidth, 
nCanvasHeight, /*nTilePosX=*/0, /*nTilePosY=*/0, /*nTileWidth=*/3840, 
/*nTileHeight=*/3840);
+}
+
 #if 0
 static void dumpRGBABitmap( const OUString& rPath, const unsigned char* 
pBuffer,
 const int nWidth, const int nHeight )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - desktop/source

2017-03-17 Thread Jan Holesovsky
 desktop/source/lib/init.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 9eb05864a2262e841aff2bbf7d0825c9b326efa5
Author: Jan Holesovsky 
Date:   Fri Mar 17 12:21:34 2017 +0100

lok: It's not that important to skip some of the messages.

More important is always to perform the paint.

Change-Id: I392dd6cea4a5f43a646fca04d284b365b5fb5b78

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 936ca6b554a0..fde12fcdf63a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1824,17 +1824,16 @@ static void doc_paintPartTile(LibreOfficeKitDocument* 
pThis,
 
 // Disable callbacks while we are painting.
 LibLODocument_Impl* pDocument = static_cast(pThis);
-int nView = SfxLokHelper::getView();
-if (nView < 0)
-return;
+const int nOrigViewId = doc_getView(pThis);
+
+if (nOrigViewId >= 0)
+
pDocument->mpCallbackFlushHandlers[nOrigViewId]->setPartTilePainting(true);
 
-pDocument->mpCallbackFlushHandlers[nView]->setPartTilePainting(true);
 try
 {
 // Text documents have a single coordinate system; don't change part.
 int nOrigPart = 0;
 const bool isText = (doc_getDocumentType(pThis) == LOK_DOCTYPE_TEXT);
-int nOrigViewId = doc_getView(pThis);
 int nViewId = nOrigViewId;
 if (!isText)
 {
@@ -1878,7 +1877,8 @@ static void doc_paintPartTile(LibreOfficeKitDocument* 
pThis,
 // Nothing to do but restore the PartTilePainting flag.
 }
 
-pDocument->mpCallbackFlushHandlers[nView]->setPartTilePainting(false);
+if (nOrigViewId >= 0)
+
pDocument->mpCallbackFlushHandlers[nOrigViewId]->setPartTilePainting(false);
 }
 
 static int doc_getTileMode(LibreOfficeKitDocument* /*pThis*/)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits