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

2017-01-01 Thread Justin Luth
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx|3 +++
 writerfilter/source/dmapper/DomainMapperTableManager.cxx |4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit e73c961a7fb23246dc4a9c27d7ed0808b9ba74b5
Author: Justin Luth 
Date:   Fri Dec 23 17:52:46 2016 +0300

tdf#104876 writerfilter: m_bTableSizeTypeInserted = false here

fixes commit cbd0fbc287051f918e4adb32b3e9b58dfbf8059d
which removed the insertion code with the explanation saying
  we should simply not do anything,
  and that'll lead to the right behavior,
  don't try to be smart and try to set TABLE_WIDTH here
but still left the flag set, falsely indicating that the
tableSizeType had been inserted.

Change-Id: I0720083c992d1d03a5fe259d5b4b177a0c8108f8
TODO: the table size still isn't correct.
Reviewed-on: https://gerrit.libreoffice.org/32385
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 6987e38..7e0b03f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -1732,6 +1732,9 @@ DECLARE_OOXMLEXPORT_TEST(testHidemark, "hidemark.docx")
 CPPUNIT_ASSERT_EQUAL(convertTwipToMm100(MINLAY), 
getProperty(xTableRows->getByIndex(1), "Height"));
 // Size type was MIN, should be FIX to avoid considering the end of 
paragraph marker.
 CPPUNIT_ASSERT_EQUAL(text::SizeType::FIX, 
getProperty(xTableRows->getByIndex(1), "SizeType"));
+
+//tdf#104876: Width was not recognized during import when table size was 
'auto'
+CPPUNIT_ASSERT_MESSAGE("table size is less than 7000?",sal_Int32(7000) > 
getProperty(xTextTable, "Width"));
 }
 
 DECLARE_OOXMLEXPORT_TEST(testBnc891663, "bnc891663.docx")
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx 
b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index ef71cdc..1c1a3c1 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -157,6 +157,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
 {
 pPropMap->setValue( 
TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::FIX );
 pPropMap->setValue( TablePropertyMap::TABLE_WIDTH, 
m_nTableWidth );
+m_bTableSizeTypeInserted = true;
 }
 else if( 
sal::static_int_cast(pMeasureHandler->getUnit()) == 
NS_ooxml::LN_Value_ST_TblWidth_pct )
 {
@@ -165,6 +166,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
 nPercent = 100;
 pPropMap->setValue( 
TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::VARIABLE );
 pPropMap->setValue( TablePropertyMap::TABLE_WIDTH, 
nPercent );
+m_bTableSizeTypeInserted = true;
 }
 else if( 
sal::static_int_cast(pMeasureHandler->getUnit()) == 
NS_ooxml::LN_Value_ST_TblWidth_auto )
 {
@@ -192,9 +194,9 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
 // Set the width type of table with 'Auto' and 
set the width value to 0 (as per grid values)
 pPropMap->setValue( 
TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::VARIABLE );
 pPropMap->setValue( 
TablePropertyMap::TABLE_WIDTH, 0 );
+m_bTableSizeTypeInserted = true;
 }
 }
-m_bTableSizeTypeInserted = true;
 }
 #ifdef DEBUG_WRITERFILTER
 pPropMap->dumpXml();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2017-01-01 Thread Gabor Kelemen
 source/text/scalc/01/0406.xhp |   63 --
 1 file changed, 34 insertions(+), 29 deletions(-)

New commits:
commit e48a6195fb176f3823ab5c0d9f700b50b9867486
Author: Gabor Kelemen 
Date:   Mon Jan 2 05:53:20 2017 +0100

Update the Formula Wizard page

Fix bookmarks and ahelps
Mention the new Search box
Remove an extra link to the list of categories and functions
Reorder the OK and Cancel button descriptions to match the UI

Change-Id: Id4cabf36c28fce1e22d51d8342fafea6e6516754
Reviewed-on: https://gerrit.libreoffice.org/32599
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/source/text/scalc/01/0406.xhp 
b/source/text/scalc/01/0406.xhp
index 2dcb28a..a2825fa 100644
--- a/source/text/scalc/01/0406.xhp
+++ b/source/text/scalc/01/0406.xhp
@@ -32,12 +32,12 @@
 functions;Function Wizard
 wizards; functions
 
+
 
 
-
 Function Wizard
 
-Opens the Function Wizard, which helps 
you to interactively create formulas.
+Opens the 
Function Wizard, which helps you to interactively create 
formulas.
  Before you start the Wizard, select a cell or a range of cells 
from the current sheet, in order to determine the position at which the formula 
will be inserted.
 
 
@@ -45,58 +45,63 @@
 You can 
download the complete ODFF (OpenDocument Format Formula) specification from the 
http://www.oasis-open.org/committees/documents.php?wg_abbrev=office-formula";>OASIS
 web site.
 The Function Wizard has two tabs: 
Functions is used to create formulas, and Structure 
is used to check the formula build.
 Functions Tab
-List of Categories and Functions
-
+
+Search
+Search for a part of the function 
name.
+
 Category
-Lists all the categories to 
which the different functions are assigned. Select a category to view the 
appropriate functions in the list field below. Select "All" to view all 
functions in alphabetical order, irrespective of category. "Last Used" lists 
the functions you have most recently used. 
+Lists all the categories to which the 
different functions are assigned. Select a category to view the appropriate 
functions in the list field below. Select "All" to view all functions 
in alphabetical order, irrespective of category. "Last Used" lists the 
functions you have most recently used. 
 
-
+You can browse 
the full List of Categories and Functions
+
 Function
-Displays the 
functions found under the selected category. Double-click to select a 
function. A single-click displays a short function 
description.
-
+Displays the functions 
found under the selected category. Double-click to select a function. A 
single-click displays a short function description.
+
 Array
-Specifies that 
the selected function is inserted into the selected cell range as an array 
formula.  Array formulas operate on multiple cells. Each cell in the 
array contains the formula, not as a copy but as a common formula shared by all 
matrix cells.
+Specifies that the 
selected function is inserted into the selected cell range as an array formula. 
 Array formulas operate on multiple cells. Each cell in the array 
contains the formula, not as a copy but as a common formula shared by all 
matrix cells.
 The Array option is identical to the CommandCtrl+Shift+Enter
 command, which is used to enter and confirm formulas in the sheet. The formula 
is inserted as a matrix formula indicated by two braces { }.
 The maximum size of an array range is 128 by 128 cells.
 Argument Input Fields
 When you double-click a function, the argument input field(s) 
appear on the right side of the dialog. To select a cell reference as an 
argument, click directly into the cell, or drag across the required range on 
the sheet while holding down the mouse button. You can also enter numerical and 
other values or references directly into the corresponding fields in the 
dialog. When using date entries, make sure you use the correct format. Click OK to 
insert the result into the spreadsheet.
 
+
 Function Result
 As soon you enter arguments in the function, the result is 
calculated. This preview informs you if the calculation can be carried out with 
the arguments given. If the arguments result in an error, the corresponding 
error code is 
displayed.
 The required arguments are indicated by names in bold 
print.
-
-
-
-
+
+
+
+
 f(x) (depending on the selected function)
-Allows you to access a subordinate 
level of the Function Wizard in order to nest another function 
within the function, instead of a value or reference.
-
+Allows you to access a subordinate level of the 
Function Wizard in order to nest another function within the 
function, instead of a value or reference.
 Argument/Parameter/Cell Reference (depending on the 
selected function)
-The number of visible 
text fields depends on the function. Enter arguments either directly into the 
argument fields or by clicking a cell in the table.
+The number of visible text fields depends on the function.

[Libreoffice-commits] core.git: helpcontent2

2017-01-01 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7241c14d95f01ef4db9da94b3e6588bd917b14cb
Author: Gabor Kelemen 
Date:   Mon Jan 2 05:53:20 2017 +0100

Updated core
Project: help  e48a6195fb176f3823ab5c0d9f700b50b9867486

Update the Formula Wizard page

Fix bookmarks and ahelps
Mention the new Search box
Remove an extra link to the list of categories and functions
Reorder the OK and Cancel button descriptions to match the UI

Change-Id: Id4cabf36c28fce1e22d51d8342fafea6e6516754
Reviewed-on: https://gerrit.libreoffice.org/32599
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index 0333438..e48a619 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 0333438951822fdb3300fdfffca07697aca108c1
+Subproject commit e48a6195fb176f3823ab5c0d9f700b50b9867486
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: tools/Stress.cpp

2017-01-01 Thread Pranav Kant
 tools/Stress.cpp |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 9680a13af37b598efd31d574a22daa35a578bf27
Author: Pranav Kant 
Date:   Mon Jan 2 12:06:32 2017 +0530

fix build - std::accumulate not member of std

Fallback from ba9ffb47753cc1323fc9ebce2c4d403b4fdd9800

Previously, std::accumulate was included indirectly through
 header

Change-Id: I7e481d87bf390c52e9bf87a9f1040ae4b5974b16

diff --git a/tools/Stress.cpp b/tools/Stress.cpp
index fac3fd0..06bbeb1 100644
--- a/tools/Stress.cpp
+++ b/tools/Stress.cpp
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: test/TileCacheTests.cpp

2017-01-01 Thread Ashod Nakashian
 test/TileCacheTests.cpp |   18 +-
 1 file changed, 13 insertions(+), 5 deletions(-)

New commits:
commit 6f6f308895cdd687897f1e14d2b48bb8495468cd
Author: Ashod Nakashian 
Date:   Mon Jan 2 00:45:21 2017 -0500

wsd: more robust canceltiles unittest

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

diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index df8e336..4acd29e 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -282,10 +282,10 @@ void TileCacheTests::testCancelTilesMultiView()
 sendTextFrame(socket2, "tilecombine part=0 width=256 height=256 
tileposx=0,3840,7680,0 tileposy=0,0,0,22520 tilewidth=3840 tileheight=3840", 
"cancelTilesMultiView-2 ");
 
 sendTextFrame(socket1, "canceltiles");
-auto res = getResponseString(socket1, "tile:", "cancelTilesMultiView-1 
", 1000);
-if (!res.empty() && j == repeat)
+const auto res1 = getResponseString(socket1, "tile:", 
"cancelTilesMultiView-1 ", 1000);
+if (!res1.empty() && j == repeat)
 {
-CPPUNIT_ASSERT_MESSAGE("Did not expect getting message [" + res + 
"].", res.empty());
+CPPUNIT_ASSERT_MESSAGE("Did not expect getting message [" + res1 + 
"].", res1.empty());
 }
 
 for (auto i = 0; i < 4; ++i)
@@ -294,8 +294,16 @@ void TileCacheTests::testCancelTilesMultiView()
 }
 
 // Should never get more than 4 tiles on socket2.
-assertNotInResponse(socket2, "tile:", "cancelTilesMultiView-2 ");
-if (res.empty())
+// Though in practice we get the rendering result from socket1's 
request and ours.
+// This happens because we currently always send back tiles even if 
they are of old version
+// because we want to be responsive, since we've rendered them anyway.
+const auto res2 = getResponseString(socket2, "tile:", 
"cancelTilesMultiView-2 ", 1000);
+if (!res2.empty() && j == repeat)
+{
+CPPUNIT_ASSERT_MESSAGE("Did not expect getting message [" + res2 + 
"].", res2.empty());
+}
+
+if (res1.empty() && res2.empty())
 {
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/TileCache.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/TileCache.cpp |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 85102cf76aa43beb525ed5342d690798bd598a99
Author: Ashod Nakashian 
Date:   Sun Jan 1 23:20:50 2017 -0500

wsd: log the session name when subscribing for tiles

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

diff --git a/wsd/TileCache.cpp b/wsd/TileCache.cpp
index 0ee368f..4de0fa2 100644
--- a/wsd/TileCache.cpp
+++ b/wsd/TileCache.cpp
@@ -454,9 +454,9 @@ void TileCache::subscribeToTileRendering(const TileDesc& 
tile, const std::shared
 }
 }
 
-Log::debug() << "Subscribing to tile " << name << " which has "
+Log::debug() << "Subscribing " << subscriber->getName() << " to tile " 
<< name << " which has "
  << tileBeingRendered->_subscribers.size()
- << " subscribers already. Adding one more." << Log::end;
+ << " subscribers already." << Log::end;
 tileBeingRendered->_subscribers.push_back(subscriber);
 
 const auto duration = (std::chrono::steady_clock::now() - 
tileBeingRendered->getStartTime());
@@ -468,8 +468,8 @@ void TileCache::subscribeToTileRendering(const TileDesc& 
tile, const std::shared
 }
 else
 {
-Log::debug() << "Subscribing to tile " << name << " which has no 
subscribers. Subscribing for ver: "
- << tile.getVersion() << "." << Log::end;
+Log::debug() << "Subscribing " << subscriber->getName() << " to tile " 
<< name
+ << " ver=" << tile.getVersion() << " which has no 
subscribers." << Log::end;
 
 const std::string cachedName = cacheFileName(tile);
 
@@ -508,7 +508,7 @@ std::string TileCache::cancelTiles(const 
std::shared_ptr &subscri
 [sub](std::weak_ptr& 
ptr){ return ptr.lock().get() == sub; });
 if (itRem != subscribers.end())
 {
-Log::trace("Tile " + it->first + " has " + 
std::to_string(subscribers.size()) + " subscribers. Removing one.");
+Log::trace("Tile " + it->first + " has " + 
std::to_string(subscribers.size()) + " subscribers. Removing " + 
subscriber->getName() + ".");
 subscribers.erase(itRem, itRem + 1);
 if (subscribers.empty())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: test/helpers.hpp test/TileCacheTests.cpp

2017-01-01 Thread Ashod Nakashian
 test/TileCacheTests.cpp |   71 +---
 test/helpers.hpp|2 -
 2 files changed, 51 insertions(+), 22 deletions(-)

New commits:
commit 7dad1c5f6a64445bbefa2821e06beda8716bbc05
Author: Ashod Nakashian 
Date:   Sun Jan 1 23:18:44 2017 -0500

wsd: more forgiving canceltiles unittests

canceltiles is not guaranteed to prevent
tiles from getting sent back to the client.

There is an obvious race between receiving
tile requets and cancelling them.

This reduces failures by repeating the
unittest when there is spurious failure.

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

diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index 30897a0..df8e336 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -236,13 +236,30 @@ void TileCacheTests::testPerformance()
 void TileCacheTests::testCancelTiles()
 {
 const auto testName = "cancelTiles ";
-auto socket = loadDocAndGetSocket("setclientpart.ods", _uri, testName);
 
-// Request a huge tile, and cancel immediately.
-sendTextFrame(socket, "tilecombine part=0 width=2560 height=2560 
tileposx=0 tileposy=0 tilewidth=38400 tileheight=38400");
-sendTextFrame(socket, "canceltiles");
+// The tile response can race past the canceltiles,
+// so be forgiving to avoid spurious failures.
+const size_t repeat = 4;
+for (size_t i = 1; i <= repeat; ++i)
+{
+std::cerr << "cancelTiles try #" << i << std::endl;
+
+auto socket = loadDocAndGetSocket("setclientpart.ods", _uri, testName);
 
-assertNotInResponse(socket, "tile:", testName);
+// Request a huge tile, and cancel immediately.
+sendTextFrame(socket, "tilecombine part=0 width=2560 height=2560 
tileposx=0 tileposy=0 tilewidth=38400 tileheight=38400");
+sendTextFrame(socket, "canceltiles");
+
+const auto res = getResponseString(socket, "tile:", testName, 1000);
+if (res.empty())
+{
+break;
+}
+else if (i == repeat)
+{
+CPPUNIT_ASSERT_MESSAGE("Did not expect getting message [" + res + 
"].", res.empty());
+}
+}
 }
 
 void TileCacheTests::testCancelTilesMultiView()
@@ -250,27 +267,39 @@ void TileCacheTests::testCancelTilesMultiView()
 std::string documentPath, documentURL;
 getDocumentPathAndURL("setclientpart.ods", documentPath, documentURL);
 
-auto socket1 = loadDocAndGetSocket(_uri, documentURL, 
"cancelTilesMultiView-1 ");
-auto socket2 = loadDocAndGetSocket(_uri, documentURL, 
"cancelTilesMultiView-2 ", true);
+// The tile response can race past the canceltiles,
+// so be forgiving to avoid spurious failures.
+const size_t repeat = 4;
+for (size_t j = 1; j <= repeat; ++j)
+{
+std::cerr << "cancelTilesMultiView try #" << j << std::endl;
 
-sendTextFrame(socket1, "tilecombine part=0 width=256 height=256 
tileposx=0,3840,7680,11520,0,3840,7680,11520 
tileposy=0,0,0,0,3840,3840,3840,3840 tilewidth=3840 tileheight=3840", 
"cancelTilesMultiView-1 ");
-sendTextFrame(socket2, "tilecombine part=0 width=256 height=256 
tileposx=0,3840,7680,0 tileposy=0,0,0,22520 tilewidth=3840 tileheight=3840", 
"cancelTilesMultiView-2 ");
+// Request a huge tile, and cancel immediately.
+auto socket1 = loadDocAndGetSocket(_uri, documentURL, 
"cancelTilesMultiView-1 ");
+auto socket2 = loadDocAndGetSocket(_uri, documentURL, 
"cancelTilesMultiView-2 ", true);
 
-sendTextFrame(socket1, "canceltiles");
+sendTextFrame(socket1, "tilecombine part=0 width=256 height=256 
tileposx=0,3840,7680,11520,0,3840,7680,11520 
tileposy=0,0,0,0,3840,3840,3840,3840 tilewidth=3840 tileheight=3840", 
"cancelTilesMultiView-1 ");
+sendTextFrame(socket2, "tilecombine part=0 width=256 height=256 
tileposx=0,3840,7680,0 tileposy=0,0,0,22520 tilewidth=3840 tileheight=3840", 
"cancelTilesMultiView-2 ");
 
-for (auto i = 0; i < 4; ++i)
-{
-getTileMessage(*socket2, "cancelTilesMultiView-2 ");
-}
+sendTextFrame(socket1, "canceltiles");
+auto res = getResponseString(socket1, "tile:", "cancelTilesMultiView-1 
", 1000);
+if (!res.empty() && j == repeat)
+{
+CPPUNIT_ASSERT_MESSAGE("Did not expect getting message [" + res + 
"].", res.empty());
+}
 
-// FIXME: Note that especially when this is run on a loaded machine, the 
server might not honor
-// the 'canceltiles' but still send out a tile, or it has already sent the 
tile before it even
-// gets the 'canceltiles'. That is not an error. It is a bit silly to have 
it cause an assertion
-// failure here. Transient failures make a unit test worse than no unit 
test. Should we remove
-// this testCancelTilesMultiView altogether?
+for (a

[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit aebfccd2ca06c9a8c2b474188846dd19fe740ba9
Author: Ashod Nakashian 
Date:   Sun Jan 1 20:28:07 2017 -0500

wsd: force forking children when none is outstanding

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index f8e2c3c..3c43672 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -377,7 +377,7 @@ static bool rebalanceChildren(int balance, const bool force)
 balance -= available;
 balance -= OutstandingForks;
 
-if (balance > 0 && (force || rebalance || durationMs >= CHILD_TIMEOUT_MS))
+if (balance > 0 && (force || rebalance || OutstandingForks == 0))
 {
 LOG_DBG("prespawnChildren: Have " << available << " spare " <<
 (available == 1 ? "child" : "children") <<
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

2017-01-01 Thread Ashod Nakashian
 wsd/DocumentBroker.cpp |   17 +++--
 wsd/DocumentBroker.hpp |   18 +-
 2 files changed, 16 insertions(+), 19 deletions(-)

New commits:
commit 28db46a59c1dd07ef1cbcc928f4de408e15bf0f3
Author: Ashod Nakashian 
Date:   Sun Jan 1 19:42:19 2017 -0500

wsd: always update the last save time to detect failures

When saving we need to differentiate between no-op
and failure. The lastSaveTime must always be updated
when saving didn't fail (i.e. no modification or saved).

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

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index dd15f06..a9a2dac 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -372,6 +372,7 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 if (!success && result == "unmodified")
 {
 LOG_DBG("Save skipped as document [" << _docKey << "] was not 
modified.");
+_lastSaveTime = std::chrono::steady_clock::now();
 _saveCV.notify_all();
 return true;
 }
@@ -395,6 +396,7 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 // Nothing to do.
 LOG_DBG("Skipping unnecessary saving to URI [" << uri << "] with 
docKey [" << _docKey <<
 "]. File last modified " << _lastFileModifiedTime.elapsed() / 
100 << " seconds ago.");
+_lastSaveTime = std::chrono::steady_clock::now();
 _saveCV.notify_all();
 return true;
 }
@@ -483,16 +485,11 @@ bool DocumentBroker::autoSave(const bool force, const 
size_t waitTimeoutMs, std:
 }
 else if (_isModified)
 {
-// Find the most recent activity.
-double inactivityTimeMs = std::numeric_limits::max();
-for (const auto& sessionIt : _sessions)
-{
-inactivityTimeMs = std::min(sessionIt.second->getInactivityMS(), 
inactivityTimeMs);
-}
-
-const auto timeSinceLastSaveMs = getTimeSinceLastSaveMs();
+const auto now = std::chrono::steady_clock::now();
+const auto inactivityTimeMs = 
std::chrono::duration_cast(now - 
_lastActivityTime).count();
+const auto timeSinceLastSaveMs = 
std::chrono::duration_cast(now - 
_lastSaveTime).count();
 LOG_TRC("Time since last save of docKey [" << _docKey << "] is " << 
timeSinceLastSaveMs <<
-" ms and most recent activity was " << inactivityTimeMs << "ms 
ago.");
+"ms and most recent activity was " << inactivityTimeMs << "ms 
ago.");
 
 // Either we've been idle long enough, or it's auto-save time.
 if (inactivityTimeMs >= IdleSaveDurationMs ||
@@ -1089,7 +1086,7 @@ void DocumentBroker::closeDocument(const std::string& 
reason)
 
 void DocumentBroker::updateLastActivityTime()
 {
-_lastActivity = std::chrono::steady_clock::now();
+_lastActivityTime = std::chrono::steady_clock::now();
 Admin::instance().updateLastActivityTime(_docKey);
 }
 
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 54eb3be..0c2457a 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -226,13 +226,6 @@ public:
 return _sessions.size();
 }
 
-/// @eturn the time in milliseconds since last save.
-double getTimeSinceLastSaveMs() const
-{
-const auto duration = (std::chrono::steady_clock::now() - 
_lastSaveTime);
-return 
std::chrono::duration_cast(duration).count();
-}
-
 std::string getJailRoot() const;
 
 /// Add a new session. Returns the new number of sessions.
@@ -303,7 +296,7 @@ public:
 
 std::size_t getIdleTimeSecs() const
 {
-const auto duration = (std::chrono::steady_clock::now() - 
_lastActivity);
+const auto duration = (std::chrono::steady_clock::now() - 
_lastActivityTime);
 return 
std::chrono::duration_cast(duration).count();
 }
 
@@ -326,8 +319,15 @@ private:
 Poco::URI _uriJailed;
 std::string _jailId;
 std::string _filename;
+
+/// The last time we tried saving, regardless of whether the
+/// document was modified and saved or not.
 std::chrono::steady_clock::time_point _lastSaveTime;
+
+/// The document's last-modified time on storage.
 Poco::Timestamp _documentLastModifiedTime;
+
+/// The jailed file last-modified time.
 Poco::Timestamp _lastFileModifiedTime;
 std::map > _sessions;
 std::unique_ptr _storage;
@@ -350,7 +350,7 @@ private:
 
 int _debugRenderedTileCount;
 
-std::chrono::steady_clock::time_point _lastActivity;
+std::chrono::steady_clock::time_point _lastActivityTime;
 
 static constexpr auto IdleSaveDurationMs = 30 * 1000;
 static constexpr auto AutoSaveDurationMs = 300 * 1000;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists

[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   70 +++-
 1 file changed, 34 insertions(+), 36 deletions(-)

New commits:
commit 228eb98f4c757288e011a4af5dc6bc1d4770be5c
Author: Ashod Nakashian 
Date:   Sun Jan 1 18:25:19 2017 -0500

wsd: move rebalanceChildren and avoid declaration

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 0268407..f8e2c3c 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -353,7 +353,40 @@ static bool cleanupChildren()
 return removed;
 }
 
-static bool rebalanceChildren(int balance, const bool force);
+/// Decides how many children need spawning and spanws.
+/// When force is true, no check of elapsed time since last request is done.
+/// Returns true only if at least one child was requested to spawn.
+static bool rebalanceChildren(int balance, const bool force)
+{
+Util::assertIsLocked(DocBrokersMutex);
+Util::assertIsLocked(NewChildrenMutex);
+
+// Do the cleanup first.
+const bool rebalance = cleanupChildren();
+
+const auto duration = (std::chrono::steady_clock::now() - 
LastForkRequestTime);
+const auto durationMs = 
std::chrono::duration_cast(duration).count();
+if (durationMs >= CHILD_TIMEOUT_MS)
+{
+// Children taking too long to spawn.
+// Forget we had requested any, and request anew.
+OutstandingForks = 0;
+}
+
+const auto available = NewChildren.size();
+balance -= available;
+balance -= OutstandingForks;
+
+if (balance > 0 && (force || rebalance || durationMs >= CHILD_TIMEOUT_MS))
+{
+LOG_DBG("prespawnChildren: Have " << available << " spare " <<
+(available == 1 ? "child" : "children") <<
+", forking " << balance << " more.");
+return forkChildren(balance);
+}
+
+return false;
+}
 
 /// Called on startup only.
 static void preForkChildren()
@@ -392,41 +425,6 @@ static bool prespawnChildren(const bool force)
 return rebalanceChildren(numPreSpawn, force);
 }
 
-/// Decides how many children need spawning and spanws.
-/// When force is true, no check of elapsed time since last request is done.
-/// Returns true only if at least one child was requested to spawn.
-static bool rebalanceChildren(int balance, const bool force)
-{
-Util::assertIsLocked(DocBrokersMutex);
-Util::assertIsLocked(NewChildrenMutex);
-
-// Do the cleanup first.
-const bool rebalance = cleanupChildren();
-
-const auto duration = (std::chrono::steady_clock::now() - 
LastForkRequestTime);
-const auto durationMs = 
std::chrono::duration_cast(duration).count();
-if (durationMs >= CHILD_TIMEOUT_MS)
-{
-// Children taking too long to spawn.
-// Forget we had requested any, and request anew.
-OutstandingForks = 0;
-}
-
-const auto available = NewChildren.size();
-balance -= available;
-balance -= OutstandingForks;
-
-if (balance > 0 && (force || rebalance || durationMs >= CHILD_TIMEOUT_MS))
-{
-LOG_DBG("prespawnChildren: Have " << available << " spare " <<
-(available == 1 ? "child" : "children") <<
-", forking " << balance << " more.");
-return forkChildren(balance);
-}
-
-return false;
-}
-
 static size_t addNewChild(const std::shared_ptr& child)
 {
 std::unique_lock lock(NewChildrenMutex);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/DocumentBroker.cpp |2 +-
 wsd/DocumentBroker.hpp |8 ++--
 wsd/LOOLWSD.cpp|   10 ++
 3 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit 65d2036d63fa9304b1c8a88f18f946ba02bb1001
Author: Ashod Nakashian 
Date:   Sun Jan 1 18:16:56 2017 -0500

wsd: use chrono instead of time_t

While time_t is much simpler, it's too
opaque. The new chrono library is type-safe
and does conversion correctly, as well as
guarantees monotonity and other desirable
properties.

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

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index af13b73..dd15f06 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1089,7 +1089,7 @@ void DocumentBroker::closeDocument(const std::string& 
reason)
 
 void DocumentBroker::updateLastActivityTime()
 {
-_lastActivity = std::time(nullptr);
+_lastActivity = std::chrono::steady_clock::now();
 Admin::instance().updateLastActivityTime(_docKey);
 }
 
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index d913adc..54eb3be 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -301,7 +301,11 @@ public:
 
 void updateLastActivityTime();
 
-std::time_t getIdleTime() const { return std::time(nullptr) - 
_lastActivity; }
+std::size_t getIdleTimeSecs() const
+{
+const auto duration = (std::chrono::steady_clock::now() - 
_lastActivity);
+return 
std::chrono::duration_cast(duration).count();
+}
 
 private:
 /// Sends the .uno:Save command to LoKit.
@@ -346,7 +350,7 @@ private:
 
 int _debugRenderedTileCount;
 
-std::time_t _lastActivity;
+std::chrono::steady_clock::time_point _lastActivity;
 
 static constexpr auto IdleSaveDurationMs = 30 * 1000;
 static constexpr auto AutoSaveDurationMs = 300 * 1000;
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 3a07668..0268407 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -274,7 +274,7 @@ bool cleanupDocBrokers()
 auto lock = docBroker->getLock();
 
 // Remove idle documents after 1 hour.
-const bool idle = (docBroker->getIdleTime() >= 3600);
+const bool idle = (docBroker->getIdleTimeSecs() >= 3600);
 
 // Cleanup used and dead entries.
 if (docBroker->isLoaded() &&
@@ -2086,11 +2086,12 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 LOG_INF("Starting master server listening on " << ClientPortNumber);
 srv.start();
 
+
 #if ENABLE_DEBUG
 time_t startTimeSpan = time(nullptr);
 #endif
 
-time_t last30SecCheck = time(nullptr);
+auto last30SecCheckTime = std::chrono::steady_clock::now();
 int status = 0;
 while (!TerminationFlag && !SigUtil::isShuttingDown())
 {
@@ -2173,7 +2174,8 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 // Nothing more to do this round.
 }
 else if (!std::getenv("LOOL_NO_AUTOSAVE") &&
- (time(nullptr) >= last30SecCheck + 30))
+ std::chrono::duration_cast
+(std::chrono::steady_clock::now() - 
last30SecCheckTime).count() >= 30)
 {
 try
 {
@@ -2190,7 +2192,7 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 LOG_ERR("Exception: " << exc.what());
 }
 
-last30SecCheck = time(nullptr);
+last30SecCheckTime = std::chrono::steady_clock::now();
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   36 
 1 file changed, 8 insertions(+), 28 deletions(-)

New commits:
commit a4868edb41273c82a61c3fdb8093327978272421
Author: Ashod Nakashian 
Date:   Sun Jan 1 17:31:49 2017 -0500

wsd: merge idle document killing with document cleanup

Since we already enumerate the DocumentBrokers and
remove dead ones before every autosave (every 30 seconds)
as well as when loading/unloading documents, there
is little reason to have a separate timeout and loop
for idle documents.

In addition, the previous code only killed the child
but didn't remove the dead DocumentBroker entry from
DocBrokers. Not clear if this was intentional, but it
would have been removed on the next cleanup anyway.

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 2c8b8d9..3a07668 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -260,7 +260,8 @@ void alertAllUsersInternal(const std::string& msg)
 }
 }
 
-/// Remove dead DocBrokers.
+/// Remove dead and idle DocBrokers.
+/// The client of idle document should've greyed-out long ago.
 /// Returns true if at least one is removed.
 bool cleanupDocBrokers()
 {
@@ -272,11 +273,15 @@ bool cleanupDocBrokers()
 auto docBroker = it->second;
 auto lock = docBroker->getLock();
 
+// Remove idle documents after 1 hour.
+const bool idle = (docBroker->getIdleTime() >= 3600);
+
 // Cleanup used and dead entries.
 if (docBroker->isLoaded() &&
-(docBroker->getSessionsCount() == 0 || !docBroker->isAlive()))
+(docBroker->getSessionsCount() == 0 || !docBroker->isAlive() || 
idle))
 {
-LOG_DBG("Removing dead DocumentBroker for docKey [" << it->first 
<< "].");
+LOG_INF("Removing " << (idle ? "idle" : "dead") <<
+" DocumentBroker for docKey [" << it->first << "].");
 it = DocBrokers.erase(it);
 docBroker->terminateChild(lock);
 }
@@ -2086,7 +2091,6 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 #endif
 
 time_t last30SecCheck = time(nullptr);
-time_t lastOneHourCheck = time(nullptr);
 int status = 0;
 while (!TerminationFlag && !SigUtil::isShuttingDown())
 {
@@ -2188,30 +2192,6 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 
 last30SecCheck = time(nullptr);
 }
-else if (time(nullptr) >= lastOneHourCheck + 900) // Every 15 
minutes
-{
-// Bluntly close documents that have been idle over an hour. 
(By that time
-// loleaflet's greying-out has already also kicked in.)
-try
-{
-std::unique_lock 
docBrokersLock(DocBrokersMutex);
-for (auto& pair : DocBrokers)
-{
-auto docLock = pair.second->getLock();
-if (pair.second->getIdleTime() >= 3600)
-{
-LOG_INF("Terminating idle document " + 
pair.second->getDocKey());
-pair.second->terminateChild(docLock);
-}
-}
-}
-catch (const std::exception& exc)
-{
-LOG_ERR("Exception: " << exc.what());
-}
-
-lastOneHourCheck = time(nullptr);
-}
 else
 {
 // Wait if we had done no work.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   52 ++--
 1 file changed, 26 insertions(+), 26 deletions(-)

New commits:
commit 9b99f64772fe14a3cee09495fc99e0a7e03ad077
Author: Ashod Nakashian 
Date:   Sun Jan 1 17:16:49 2017 -0500

wsd: don't sleep after autosaving or spawning children

Between waits on forkit we shouldn't spend too much time.
This is to recover from forkit crashes.

Now we first spawn children, and only when not successful
(i.e. no more spare children needed) we check for autosave
and DocBrokers cleanup. Only when none of the above is done
do we sleep.

This gives the best balance between forkit waits and reduces
the unittests by a good 25 seconds (crash tests down from 34s
to about 10s only).

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 34bc044..2c8b8d9 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2163,8 +2163,13 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 }
 else // pid == 0, no children have died
 {
-if (!std::getenv("LOOL_NO_AUTOSAVE") &&
-(time(nullptr) >= last30SecCheck + 30))
+// Make sure we have sufficient reserves.
+if (prespawnChildren(false))
+{
+// Nothing more to do this round.
+}
+else if (!std::getenv("LOOL_NO_AUTOSAVE") &&
+ (time(nullptr) >= last30SecCheck + 30))
 {
 try
 {
@@ -2183,40 +2188,35 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 
 last30SecCheck = time(nullptr);
 }
-else
+else if (time(nullptr) >= lastOneHourCheck + 900) // Every 15 
minutes
 {
-// Every 15 minutes
-if (time(nullptr) >= lastOneHourCheck + 900)
+// Bluntly close documents that have been idle over an hour. 
(By that time
+// loleaflet's greying-out has already also kicked in.)
+try
 {
-// Bluntly close documents that have been idle over an 
hour. (By that time
-// loleaflet's greying-out has already also kicked in.)
-try
+std::unique_lock 
docBrokersLock(DocBrokersMutex);
+for (auto& pair : DocBrokers)
 {
-std::unique_lock 
docBrokersLock(DocBrokersMutex);
-for (auto& pair : DocBrokers)
+auto docLock = pair.second->getLock();
+if (pair.second->getIdleTime() >= 3600)
 {
-auto docLock = pair.second->getLock();
-if (pair.second->getIdleTime() >= 3600)
-{
-LOG_INF("Terminating idle document " + 
pair.second->getDocKey());
-pair.second->terminateChild(docLock);
-}
+LOG_INF("Terminating idle document " + 
pair.second->getDocKey());
+pair.second->terminateChild(docLock);
 }
 }
-catch (const std::exception& exc)
-{
-LOG_ERR("Exception: " << exc.what());
-}
-
-lastOneHourCheck = time(nullptr);
+}
+catch (const std::exception& exc)
+{
+LOG_ERR("Exception: " << exc.what());
 }
 
-// Don't wait if we had been saving, which takes a while 
anyway.
+lastOneHourCheck = time(nullptr);
+}
+else
+{
+// Wait if we had done no work.
 
std::this_thread::sleep_for(std::chrono::milliseconds(CHILD_REBALANCE_INTERVAL_MS));
 }
-
-// Make sure we have sufficient reserves.
-prespawnChildren(false);
 }
 
 #if ENABLE_DEBUG
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: test/httpcrashtest.cpp

2017-01-01 Thread Ashod Nakashian
 test/httpcrashtest.cpp |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 94b2262e27841015a37a62a068757e292fe36210
Author: Ashod Nakashian 
Date:   Sun Jan 1 17:20:35 2017 -0500

wsd: don't test for pathological Poco behavior in our unittests

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

diff --git a/test/httpcrashtest.cpp b/test/httpcrashtest.cpp
index 55bad24..3db2dc0 100644
--- a/test/httpcrashtest.cpp
+++ b/test/httpcrashtest.cpp
@@ -177,8 +177,15 @@ void HTTPCrashTest::testCrashKit()
 
 // no more messages is received.
 bytes = socket->receiveFrame(buffer, sizeof(buffer), flags);
-CPPUNIT_ASSERT_MESSAGE("Expected no more data", bytes <= 2); // The 
2-byte marker is ok.
-CPPUNIT_ASSERT_EQUAL(0x88, flags);
+std::cerr << testname << "Got " << 
LOOLProtocol::getAbbreviatedFrameDump(buffer, bytes, flags) << std::endl;
+
+// While we expect no more messages after shutdown call, apparently
+// sometimes we _do_ get data. Even when the receiveFrame in the loop
+// returns a CLOSE frame (with 2 bytes) the one after shutdown 
sometimes
+// returns a BINARY frame with the next payload sent by wsd.
+// This is an oddity of Poco and is not something we need to validate 
here.
+//CPPUNIT_ASSERT_MESSAGE("Expected no more data", bytes <= 2); // The 
2-byte marker is ok.
+//CPPUNIT_ASSERT_EQUAL(0x88, flags);
 }
 catch (const Poco::Exception& exc)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   25 ++---
 1 file changed, 18 insertions(+), 7 deletions(-)

New commits:
commit d716428f710906f266d07f0a21ad4f047e6c9197
Author: Ashod Nakashian 
Date:   Sun Jan 1 16:52:36 2017 -0500

wsd: return child forking status

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 2fb7987..34bc044 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -300,7 +300,9 @@ bool cleanupDocBrokers()
 return false;
 }
 
-static void forkChildren(const int number)
+/// Forks as many children as requested.
+/// Returns true only if at least one child was requested to spawn.
+static bool forkChildren(const int number)
 {
 Util::assertIsLocked(DocBrokersMutex);
 Util::assertIsLocked(NewChildrenMutex);
@@ -320,7 +322,10 @@ static void forkChildren(const int number)
 ++OutstandingForks;
 IoUtil::writeToPipe(LOOLWSD::ForKitWritePipe, aMessage);
 LastForkRequestTime = std::chrono::steady_clock::now();
+return true;
 }
+
+return false;
 }
 
 /// Cleans up dead children.
@@ -343,7 +348,7 @@ static bool cleanupChildren()
 return removed;
 }
 
-static void rebalanceChildren(int balance, const bool force);
+static bool rebalanceChildren(int balance, const bool force);
 
 /// Called on startup only.
 static void preForkChildren()
@@ -364,7 +369,8 @@ static void preForkChildren()
 
 /// Proactively spawn children processes
 /// to load documents with alacrity.
-static void prespawnChildren(const bool force)
+/// Returns true only if at least one child was requested to spawn.
+static bool prespawnChildren(const bool force)
 {
 // First remove dead DocBrokers, if possible.
 std::unique_lock docBrokersLock(DocBrokersMutex);
@@ -374,14 +380,17 @@ static void prespawnChildren(const bool force)
 if (!lock.try_lock())
 {
 // We are forking already? Try later.
-return;
+return false;
 }
 
 const int numPreSpawn = LOOLWSD::NumPreSpawnedChildren;
-rebalanceChildren(numPreSpawn, force);
+return rebalanceChildren(numPreSpawn, force);
 }
 
-static void rebalanceChildren(int balance, const bool force)
+/// Decides how many children need spawning and spanws.
+/// When force is true, no check of elapsed time since last request is done.
+/// Returns true only if at least one child was requested to spawn.
+static bool rebalanceChildren(int balance, const bool force)
 {
 Util::assertIsLocked(DocBrokersMutex);
 Util::assertIsLocked(NewChildrenMutex);
@@ -407,8 +416,10 @@ static void rebalanceChildren(int balance, const bool 
force)
 LOG_DBG("prespawnChildren: Have " << available << " spare " <<
 (available == 1 ? "child" : "children") <<
 ", forking " << balance << " more.");
-forkChildren(balance);
+return forkChildren(balance);
 }
+
+return false;
 }
 
 static size_t addNewChild(const std::shared_ptr& child)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 46ef41a6874ad6acc1a1761dc0e54483acd6dceb
Author: Ashod Nakashian 
Date:   Sun Jan 1 16:02:38 2017 -0500

wsd: force spawning children on startup

Otherwise we throttle spawning to allow
time to fork the process. If we don't wait
we can bomb a loaded server and bring it down.

However during startup this is not necessary
as there are no in-flight spawn requests.

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 02a27c9..2fb7987 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -343,7 +343,7 @@ static bool cleanupChildren()
 return removed;
 }
 
-static void rebalanceChildren(int balance);
+static void rebalanceChildren(int balance, const bool force);
 
 /// Called on startup only.
 static void preForkChildren()
@@ -355,7 +355,7 @@ static void preForkChildren()
 UnitWSD::get().preSpawnCount(numPreSpawn);
 
 --numPreSpawn; // ForKit always spawns one child at startup.
-rebalanceChildren(numPreSpawn);
+rebalanceChildren(numPreSpawn, true); // Force on startup.
 
 // Wait until we have at least one child.
 const auto timeout = std::chrono::milliseconds(CHILD_TIMEOUT_MS);
@@ -364,7 +364,7 @@ static void preForkChildren()
 
 /// Proactively spawn children processes
 /// to load documents with alacrity.
-static void prespawnChildren()
+static void prespawnChildren(const bool force)
 {
 // First remove dead DocBrokers, if possible.
 std::unique_lock docBrokersLock(DocBrokersMutex);
@@ -378,10 +378,10 @@ static void prespawnChildren()
 }
 
 const int numPreSpawn = LOOLWSD::NumPreSpawnedChildren;
-rebalanceChildren(numPreSpawn);
+rebalanceChildren(numPreSpawn, force);
 }
 
-static void rebalanceChildren(int balance)
+static void rebalanceChildren(int balance, const bool force)
 {
 Util::assertIsLocked(DocBrokersMutex);
 Util::assertIsLocked(NewChildrenMutex);
@@ -402,7 +402,7 @@ static void rebalanceChildren(int balance)
 balance -= available;
 balance -= OutstandingForks;
 
-if (balance > 0 && (rebalance || durationMs >= CHILD_TIMEOUT_MS))
+if (balance > 0 && (force || rebalance || durationMs >= CHILD_TIMEOUT_MS))
 {
 LOG_DBG("prespawnChildren: Have " << available << " spare " <<
 (available == 1 ? "child" : "children") <<
@@ -437,7 +437,7 @@ static std::shared_ptr getNewChild()
 {
 int numPreSpawn = LOOLWSD::NumPreSpawnedChildren;
 ++numPreSpawn; // Replace the one we'll dispatch just now.
-rebalanceChildren(numPreSpawn);
+rebalanceChildren(numPreSpawn, false);
 
 const auto timeout = chrono::milliseconds(CHILD_TIMEOUT_MS);
 if (NewChildrenCV.wait_for(lock, timeout, []() { return 
!NewChildren.empty(); }))
@@ -2205,7 +2205,7 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 }
 
 // Make sure we have sufficient reserves.
-prespawnChildren();
+prespawnChildren(false);
 }
 
 #if ENABLE_DEBUG
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   26 --
 1 file changed, 4 insertions(+), 22 deletions(-)

New commits:
commit e55be929b0f36e3b85e73db40a1d10fede67004e
Author: Ashod Nakashian 
Date:   Sun Jan 1 15:54:56 2017 -0500

wsd: reuse rebalanceChildren in getNewChild

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index ac62fcf..02a27c9 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -435,34 +435,16 @@ static std::shared_ptr getNewChild()
 const auto startTime = chrono::steady_clock::now();
 do
 {
-// Do the cleanup first.
-cleanupChildren();
-
-const int available = NewChildren.size();
-int balance = LOOLWSD::NumPreSpawnedChildren;
-if (available == 0)
-{
-LOG_WRN("getNewChild: No available child. Sending spawn request to 
forkit and failing.");
-}
-else
-{
-balance -= available - 1; // Minus the one we'll dispatch just now.
-balance = std::max(balance, 0);
-}
-
-if (balance > 0)
-{
-LOG_DBG("getNewChild: Have " << available << " spare " <<
-(available == 1 ? "child" : "children") <<
-", forking " << balance << " more.");
-forkChildren(balance);
-}
+int numPreSpawn = LOOLWSD::NumPreSpawnedChildren;
+++numPreSpawn; // Replace the one we'll dispatch just now.
+rebalanceChildren(numPreSpawn);
 
 const auto timeout = chrono::milliseconds(CHILD_TIMEOUT_MS);
 if (NewChildrenCV.wait_for(lock, timeout, []() { return 
!NewChildren.empty(); }))
 {
 auto child = NewChildren.back();
 NewChildren.pop_back();
+const auto available = NewChildren.size();
 LOG_DBG("getNewChild: Have " << available << " spare " <<
 (available == 1 ? "child" : "children") << " after poping 
[" << child->getPid() << "].");
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   16 +---
 1 file changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 78f3a4d9b9df3e3aa216fdfb22404e221873e346
Author: Ashod Nakashian 
Date:   Sun Jan 1 15:53:29 2017 -0500

wsd: refactor and reuse child forking

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index f46df92..ac62fcf 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -343,6 +343,8 @@ static bool cleanupChildren()
 return removed;
 }
 
+static void rebalanceChildren(int balance);
+
 /// Called on startup only.
 static void preForkChildren()
 {
@@ -353,14 +355,14 @@ static void preForkChildren()
 UnitWSD::get().preSpawnCount(numPreSpawn);
 
 --numPreSpawn; // ForKit always spawns one child at startup.
-forkChildren(numPreSpawn);
+rebalanceChildren(numPreSpawn);
 
 // Wait until we have at least one child.
 const auto timeout = std::chrono::milliseconds(CHILD_TIMEOUT_MS);
 NewChildrenCV.wait_for(lock, timeout, []() { return !NewChildren.empty(); 
});
 }
 
-/// Proatively spawn children processes
+/// Proactively spawn children processes
 /// to load documents with alacrity.
 static void prespawnChildren()
 {
@@ -375,6 +377,15 @@ static void prespawnChildren()
 return;
 }
 
+const int numPreSpawn = LOOLWSD::NumPreSpawnedChildren;
+rebalanceChildren(numPreSpawn);
+}
+
+static void rebalanceChildren(int balance)
+{
+Util::assertIsLocked(DocBrokersMutex);
+Util::assertIsLocked(NewChildrenMutex);
+
 // Do the cleanup first.
 const bool rebalance = cleanupChildren();
 
@@ -388,7 +399,6 @@ static void prespawnChildren()
 }
 
 const auto available = NewChildren.size();
-int balance = LOOLWSD::NumPreSpawnedChildren;
 balance -= available;
 balance -= OutstandingForks;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   26 +-
 1 file changed, 17 insertions(+), 9 deletions(-)

New commits:
commit fb1e8eb63ae6a0b8626e6e798fa45176e4f6e713
Author: Ashod Nakashian 
Date:   Sun Jan 1 15:42:22 2017 -0500

wsd: flag for shutdown when we fail to create forkit

And say 'forkit' in the logs where we recognize it
instead of the generic 'child'.

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index f30edf0..f46df92 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -464,7 +464,7 @@ static std::shared_ptr getNewChild()
 }
 }
 
-LOG_DBG("getNewChild: No live child, forking more.");
+LOG_WRN("getNewChild: No available child. Sending spawn request to 
forkit and failing.");
 }
 while 
(chrono::duration_cast(chrono::steady_clock::now() - 
startTime).count() <
CHILD_TIMEOUT_MS * 4);
@@ -2102,12 +2102,12 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 {
 if (WIFEXITED(status))
 {
-LOG_INF("Child process [" << pid << "] exited with 
code: " <<
+LOG_INF("Forkit process [" << pid << "] exited with 
code: " <<
 WEXITSTATUS(status) << ".");
 }
 else
 {
-LOG_ERR("Child process [" << pid << "] " <<
+LOG_ERR("Forkit process [" << pid << "] " <<
 (WCOREDUMP(status) ? "core-dumped" : "died") <<
 " with " << 
SigUtil::signalName(WTERMSIG(status)));
 }
@@ -2118,17 +2118,18 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 if (forKitPid < 0)
 {
 LOG_FTL("Failed to spawn forkit instance. Shutting 
down.");
+SigUtil::requestShutdown();
 break;
 }
 }
 else if (WIFSTOPPED(status))
 {
-LOG_INF("Child process [" << pid << "] stopped with " <<
+LOG_INF("Forkit process [" << pid << "] stopped with " <<
 SigUtil::signalName(WSTOPSIG(status)));
 }
 else if (WIFCONTINUED(status))
 {
-LOG_INF("Child process [" << pid << "] resumed with 
SIGCONT.");
+LOG_INF("Forkit process [" << pid << "] resumed with 
SIGCONT.");
 }
 else
 {
@@ -2137,17 +2138,24 @@ int LOOLWSD::main(const std::vector& 
/*args*/)
 }
 else
 {
-LOG_ERR("An unknown child process died, pid: " << pid);
+LOG_ERR("An unknown child process [" << pid << "] died.");
 }
 }
 else if (pid < 0)
 {
-LOG_SYS("waitpid failed.");
+LOG_SYS("Forkit waitpid failed.");
 if (errno == ECHILD)
 {
 // No child processes.
-LOG_FTL("No Forkit instance. Terminating.");
-break;
+// Spawn a new forkit and try to dust it off and resume.
+close(ForKitWritePipe);
+forKitPid = createForKit();
+if (forKitPid < 0)
+{
+LOG_FTL("Failed to spawn forkit instance. Shutting down.");
+SigUtil::requestShutdown();
+break;
+}
 }
 }
 else // pid == 0, no children have died
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/DocumentBroker.cpp |   31 ---
 1 file changed, 16 insertions(+), 15 deletions(-)

New commits:
commit 401c7e54c7b10b2098b52ab098207139ac87
Author: Ashod Nakashian 
Date:   Sun Jan 1 15:39:23 2017 -0500

wsd: cleanup document saving logs and include the DocKey

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

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 7140e34..af13b73 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -371,7 +371,7 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 // notify the waiting thread, if any.
 if (!success && result == "unmodified")
 {
-LOG_DBG("Save skipped as document was not modified.");
+LOG_DBG("Save skipped as document [" << _docKey << "] was not 
modified.");
 _saveCV.notify_all();
 return true;
 }
@@ -379,7 +379,7 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 const auto it = _sessions.find(sessionId);
 if (it == _sessions.end())
 {
-LOG_ERR("Session with sessionId [" << sessionId << "] not found while 
saving.");
+LOG_ERR("Session with sessionId [" << sessionId << "] not found while 
saving docKey [" << _docKey << "].");
 _saveCV.notify_all();
 return false;
 }
@@ -393,13 +393,13 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 if (!_lastEditableSession && newFileModifiedTime == _lastFileModifiedTime)
 {
 // Nothing to do.
-LOG_DBG("Skipping unnecessary saving to URI [" << uri << "]. File last 
modified " <<
-_lastFileModifiedTime.elapsed() / 100 << " seconds ago.");
+LOG_DBG("Skipping unnecessary saving to URI [" << uri << "] with 
docKey [" << _docKey <<
+"]. File last modified " << _lastFileModifiedTime.elapsed() / 
100 << " seconds ago.");
 _saveCV.notify_all();
 return true;
 }
 
-LOG_DBG("Saving to URI [" << uri << "].");
+LOG_DBG("Persisting [" << _docKey << "] after saving to URI [" << uri << 
"].");
 
 // FIXME: We should check before persisting the document that it hasn't 
been updated in its
 // storage behind our backs.
@@ -430,15 +430,15 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 // So set _documentLastModifiedTime then
 _documentLastModifiedTime = _storage->getFileInfo()._modifiedTime;
 
-LOG_DBG("Saved to URI [" << uri << "] and updated tile cache.");
-LOG_DBG("Timestamp now: " << 
Poco::DateTimeFormatter::format(Poco::DateTime(_documentLastModifiedTime),
- 
Poco::DateTimeFormat::ISO8601_FORMAT));
+LOG_DBG("Saved docKey [" << _docKey << "] to URI [" << uri << "] and 
updated tile cache. Document modified timestamp: " <<
+
Poco::DateTimeFormatter::format(Poco::DateTime(_documentLastModifiedTime),
+   
Poco::DateTimeFormat::ISO8601_FORMAT));
 _saveCV.notify_all();
 return true;
 }
 else if (storageSaveResult == StorageBase::SaveResult::DISKFULL)
 {
-LOG_WRN("Disk full while saving [" << uri <<
+LOG_WRN("Disk full while saving docKey [" << _docKey << "] to URI [" 
<< uri <<
 "]. Making all sessions on doc read-only and notifying 
clients.");
 
 // Make everyone readonly and tell everyone that storage is low on 
diskspace.
@@ -451,7 +451,7 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 else if (storageSaveResult == StorageBase::SaveResult::FAILED)
 {
 //TODO: Should we notify all clients?
-LOG_ERR("Failed to save to URI [" << uri << "]. Notifying client.");
+LOG_ERR("Failed to save docKey [" << _docKey << "] to URI [" << uri << 
"]. Notifying client.");
 it->second->sendTextFrame("error: cmd=storage kind=savefailed");
 }
 
@@ -485,14 +485,14 @@ bool DocumentBroker::autoSave(const bool force, const 
size_t waitTimeoutMs, std:
 {
 // Find the most recent activity.
 double inactivityTimeMs = std::numeric_limits::max();
-for (auto& sessionIt : _sessions)
+for (const auto& sessionIt : _sessions)
 {
 inactivityTimeMs = std::min(sessionIt.second->getInactivityMS(), 
inactivityTimeMs);
 }
 
-LOG_TRC("Most recent activity was " << inactivityTimeMs << " ms ago.");
 const auto timeSinceLastSaveMs = getTimeSinceLastSaveMs();
-LOG_TRC("Time since last save is " << timeSinceLastSaveMs << " ms.");
+LOG_TRC("Time since last save of docKey [" << _docKey << "] is " << 
timeSinceLastSaveMs <<
+ 

[Libreoffice-commits] online.git: kit/Kit.cpp

2017-01-01 Thread Ashod Nakashian
 kit/Kit.cpp |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f0524b3ac945dd98b5106f961cc48de9e4a79bee
Author: Ashod Nakashian 
Date:   Sun Jan 1 13:06:13 2017 -0500

wsd: must have document lock when accessing LoKit instance

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

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 4b67507..fb1464a 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -552,6 +552,8 @@ public:
 " passwordProvided=" << _haveDocPassword <<
 " password='" << _docPassword <<  "'");
 
+Util::assertIsLocked(_documentMutex);
+
 if (_isDocPasswordProtected && _haveDocPassword)
 {
 // it means this is the second attempt with the wrong password; 
abort the load operation
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: common/MessageQueue.hpp kit/Kit.cpp

2017-01-01 Thread Ashod Nakashian
 common/MessageQueue.hpp |8 
 kit/Kit.cpp |   12 +++-
 2 files changed, 11 insertions(+), 9 deletions(-)

New commits:
commit 7f08cf53876ac55f4ed4668135937c576a7c0348
Author: Ashod Nakashian 
Date:   Sun Jan 1 13:05:52 2017 -0500

wsd: cleanup TileQueue accessing in Kit

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

diff --git a/common/MessageQueue.hpp b/common/MessageQueue.hpp
index 8bbe56a..6eb07c0 100644
--- a/common/MessageQueue.hpp
+++ b/common/MessageQueue.hpp
@@ -100,18 +100,18 @@ public:
 
 void updateCursorPosition(int viewId, int part, int x, int y, int width, 
int height)
 {
-auto cursorPosition = CursorPosition({ part, x, y, width, height });
+const auto cursorPosition = CursorPosition({ part, x, y, width, height 
});
 
 auto lock = getLock();
 
-auto it = _cursorPositions.find(viewId);
-if (it != _cursorPositions.end())
+auto it = _cursorPositions.lower_bound(viewId);
+if (it != _cursorPositions.end() && it->first == viewId)
 {
 it->second = cursorPosition;
 }
 else
 {
-_cursorPositions[viewId] = cursorPosition;
+_cursorPositions.insert(it, std::make_pair(viewId, 
cursorPosition));
 }
 
 // Move to front, so the current front view
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 286760d..4b67507 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -792,6 +792,9 @@ public:
 assert(pDescr && "Null callback data.");
 assert(pDescr->Doc && "Null Document instance.");
 
+auto tileQueue = pDescr->Doc->getTileQueue();
+assert(tileQueue && "Null TileQueue.");
+
 const std::string payload = pPayload ? pPayload : "(nil)";
 LOG_TRC("Document::ViewCallback [" << pDescr->ViewId <<
 "] [" << LOKitHelper::kitCallbackTypeToString(nType) <<
@@ -809,7 +812,7 @@ public:
 auto cursorWidth = std::stoi(tokens[2]);
 auto cursorHeight = std::stoi(tokens[3]);
 
-pDescr->Doc->getTileQueue()->updateCursorPosition(0, 0, 
cursorX, cursorY, cursorWidth, cursorHeight);
+tileQueue->updateCursorPosition(0, 0, cursorX, cursorY, 
cursorWidth, cursorHeight);
 }
 }
 else if (nType == LOK_CALLBACK_INVALIDATE_VIEW_CURSOR ||
@@ -830,11 +833,11 @@ public:
 auto cursorWidth = std::stoi(tokens[2]);
 auto cursorHeight = std::stoi(tokens[3]);
 
-
pDescr->Doc->getTileQueue()->updateCursorPosition(std::stoi(viewId), 
std::stoi(part), cursorX, cursorY, cursorWidth, cursorHeight);
+tileQueue->updateCursorPosition(std::stoi(viewId), 
std::stoi(part), cursorX, cursorY, cursorWidth, cursorHeight);
 }
 }
 
-pDescr->Doc->getTileQueue()->put("callback " + 
std::to_string(pDescr->ViewId) + " " + std::to_string(nType) + " " + payload);
+tileQueue->put("callback " + std::to_string(pDescr->ViewId) + ' ' + 
std::to_string(nType) + ' ' + payload);
 }
 
 private:
@@ -843,7 +846,7 @@ private:
 void broadcastCallbackToClients(const int nType, const std::string& 
payload)
 {
 // "-1" means broadcast
-_tileQueue->put("callback -1 " + std::to_string(nType) + " " + 
payload);
+_tileQueue->put("callback -1 " + std::to_string(nType) + ' ' + 
payload);
 }
 
 /// Load a document (or view) and register callbacks.
@@ -909,7 +912,6 @@ private:
 const auto viewId = session.getViewId();
 _tileQueue->removeCursorPosition(viewId);
 
-
 std::unique_lock lockLokDoc(_documentMutex);
 if (_loKitDocument == nullptr)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: common/MessageQueue.hpp kit/Kit.cpp

2017-01-01 Thread Ashod Nakashian
 common/MessageQueue.hpp |   18 ++
 kit/Kit.cpp |4 
 2 files changed, 14 insertions(+), 8 deletions(-)

New commits:
commit 1a6098b92500864b6bda525625ed6372caae8607
Author: Ashod Nakashian 
Date:   Sun Jan 1 13:04:24 2017 -0500

wsd: TileQueue should be fully threadsafe

There should be no need to take a lock to
access it. However there were cases where it
wasn't thread-safe. Now we can remove unncessary
locking before invoking it.

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

diff --git a/common/MessageQueue.hpp b/common/MessageQueue.hpp
index afea17f..8bbe56a 100644
--- a/common/MessageQueue.hpp
+++ b/common/MessageQueue.hpp
@@ -51,10 +51,6 @@ public:
 /// Thread safe remove_if.
 void remove_if(const std::function& pred);
 
-private:
-std::mutex _mutex;
-std::condition_variable _cv;
-
 protected:
 virtual void put_impl(const Payload& value);
 
@@ -64,7 +60,16 @@ protected:
 
 void clear_impl();
 
+/// Get the queue lock when accessing members of derived classes.
+std::unique_lock getLock() { return 
std::unique_lock(_mutex); }
+
+protected:
 std::vector _queue;
+
+private:
+std::mutex _mutex;
+std::condition_variable _cv;
+
 };
 
 /** MessageQueue specialized for priority handling of tiles.
@@ -96,6 +101,9 @@ public:
 void updateCursorPosition(int viewId, int part, int x, int y, int width, 
int height)
 {
 auto cursorPosition = CursorPosition({ part, x, y, width, height });
+
+auto lock = getLock();
+
 auto it = _cursorPositions.find(viewId);
 if (it != _cursorPositions.end())
 {
@@ -119,6 +127,8 @@ public:
 
 void removeCursorPosition(int viewId)
 {
+auto lock = getLock();
+
 const auto view = std::find(_viewOrder.begin(), _viewOrder.end(), 
viewId);
 if (view != _viewOrder.end())
 {
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index ecc8dc7..286760d 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -797,8 +797,6 @@ public:
 "] [" << LOKitHelper::kitCallbackTypeToString(nType) <<
 "] [" << payload << "].");
 
-std::unique_lock lock(pDescr->Doc->getMutex());
-
 if (nType == LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR ||
 nType == LOK_CALLBACK_CELL_CURSOR)
 {
@@ -844,8 +842,6 @@ private:
 /// Helper method to broadcast callback and its payload to all clients
 void broadcastCallbackToClients(const int nType, const std::string& 
payload)
 {
-std::unique_lock lock(_mutex);
-
 // "-1" means broadcast
 _tileQueue->put("callback -1 " + std::to_string(nType) + " " + 
payload);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |   13 +
 1 file changed, 1 insertion(+), 12 deletions(-)

New commits:
commit d67437735f6962fd000e0b2eeb2afae307c18fa8
Author: Ashod Nakashian 
Date:   Fri Dec 30 17:20:45 2016 -0500

wsd: cleanup all DocBrokers when one is removed

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 6161eb7..f30edf0 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1021,18 +1021,7 @@ private:
 // order and check again. We can't take the DocBrokersMutex 
while
 // holding the docBroker lock as that can deadlock with 
autoSave below.
 std::unique_lock docBrokersLock2(DocBrokersMutex);
-it = DocBrokers.find(docKey);
-if (it != DocBrokers.end() && it->second)
-{
-auto lock = it->second->getLock();
-if (it->second->getSessionsCount() == 0)
-{
-LOG_INF("Removing DocumentBroker for docKey [" << 
docKey << "].");
-DocBrokers.erase(docKey);
-docBroker->terminateChild(lock);
-LOG_TRC("Have " << DocBrokers.size() << " DocBrokers 
after removing [" << docKey << "].");
-}
-}
+cleanupDocBrokers();
 }
 
 if (SigUtil::isShuttingDown())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/LOOLWSD.cpp |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 15a6c02f707fa8596922f280a4aa21156765717b
Author: Ashod Nakashian 
Date:   Fri Dec 30 17:19:53 2016 -0500

wsd: remove DocumentBroker instances without sessions

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

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index faa5a7f..6161eb7 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -269,11 +269,16 @@ bool cleanupDocBrokers()
 const auto count = DocBrokers.size();
 for (auto it = DocBrokers.begin(); it != DocBrokers.end(); )
 {
+auto docBroker = it->second;
+auto lock = docBroker->getLock();
+
 // Cleanup used and dead entries.
-if (it->second->isLoaded() && !it->second->isAlive())
+if (docBroker->isLoaded() &&
+(docBroker->getSessionsCount() == 0 || !docBroker->isAlive()))
 {
-LOG_DBG("Removing dead DocBroker [" << it->first << "].");
+LOG_DBG("Removing dead DocumentBroker for docKey [" << it->first 
<< "].");
 it = DocBrokers.erase(it);
+docBroker->terminateChild(lock);
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/DocumentBroker.cpp |   22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

New commits:
commit f3a90ef77a55a2a2efafeb20bb873779b4a65e1f
Author: Ashod Nakashian 
Date:   Sun Jan 1 12:08:12 2017 -0500

wsd: always notify threads waiting on save

And check for save-failed first before finding
the session, as otherwise the session is useless.

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

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 6c42fd2..e1242b4 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -367,25 +367,26 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 {
 std::unique_lock lock(_saveMutex);
 
+// If save requested, but core didn't save because document was unmodified
+// notify the waiting thread, if any.
+if (!success && result == "unmodified")
+{
+LOG_DBG("Save skipped as document was not modified.");
+_saveCV.notify_all();
+return true;
+}
+
 const auto it = _sessions.find(sessionId);
 if (it == _sessions.end())
 {
 LOG_ERR("Session with sessionId [" << sessionId << "] not found while 
saving.");
+_saveCV.notify_all();
 return false;
 }
 
 const Poco::URI& uriPublic = it->second->getPublicUri();
 const auto uri = uriPublic.toString();
 
-// If save requested, but core didn't save because document was unmodified
-// notify the waiting thread, if any.
-if (!success && result == "unmodified")
-{
-LOG_DBG("Save skipped as document was not modified");
-_saveCV.notify_all();
-return true;
-}
-
 // If we aren't destroying the last editable session just yet, and the file
 // timestamp hasn't changed, skip saving.
 const auto newFileModifiedTime = 
Poco::File(_storage->getLocalRootPath()).getLastModified();
@@ -394,6 +395,7 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 // Nothing to do.
 LOG_DBG("Skipping unnecessary saving to URI [" << uri << "]. File last 
modified " <<
 _lastFileModifiedTime.elapsed() / 100 << " seconds ago.");
+_saveCV.notify_all();
 return true;
 }
 
@@ -432,7 +434,6 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 LOG_DBG("Timestamp now: " << 
Poco::DateTimeFormatter::format(Poco::DateTime(_documentLastModifiedTime),
  
Poco::DateTimeFormat::ISO8601_FORMAT));
 _saveCV.notify_all();
-
 return true;
 }
 else if (storageSaveResult == StorageBase::SaveResult::DISKFULL)
@@ -454,6 +455,7 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 it->second->sendTextFrame("error: cmd=storage kind=savefailed");
 }
 
+_saveCV.notify_all();
 return false;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

2017-01-01 Thread Ashod Nakashian
 wsd/DocumentBroker.cpp |2 +-
 wsd/DocumentBroker.hpp |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3844f5934e06273067e7da562f2dd53f409ada30
Author: Ashod Nakashian 
Date:   Fri Dec 30 17:17:07 2016 -0500

wsd: use isAlive before sending message to child

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

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index e1242b4..7140e34 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1055,7 +1055,7 @@ void 
DocumentBroker::terminateChild(std::unique_lock& lock, const st
 LOG_INF("Terminating child [" << getPid() << "] of doc [" << _docKey << 
"].");
 
 // Close all running sessions
-for (auto& pair : _sessions)
+for (const auto& pair : _sessions)
 {
 try
 {
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 9d227f1..d913adc 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -75,7 +75,7 @@ public:
 
 try
 {
-if (_pid != -1 && _ws)
+if (isAlive())
 {
 sendTextFrame("exit");
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp wsd/PrisonerSession.cpp

2017-01-01 Thread Ashod Nakashian
 wsd/DocumentBroker.cpp  |   14 +-
 wsd/PrisonerSession.cpp |4 ++--
 2 files changed, 11 insertions(+), 7 deletions(-)

New commits:
commit 38bf731a9883f1d5ef4c086e72995f9b6d47c822
Author: Ashod Nakashian 
Date:   Sun Jan 1 12:06:05 2017 -0500

wsd: simplify logging during save

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

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index edfcb42..6c42fd2 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -370,7 +370,7 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 const auto it = _sessions.find(sessionId);
 if (it == _sessions.end())
 {
-LOG_ERR("Session with sessionId [" << sessionId << "] not found while 
saving");
+LOG_ERR("Session with sessionId [" << sessionId << "] not found while 
saving.");
 return false;
 }
 
@@ -437,8 +437,11 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 }
 else if (storageSaveResult == StorageBase::SaveResult::DISKFULL)
 {
-// Make everyone readonly and tell everyone that storage is low on 
diskspace
-for (auto& sessionIt : _sessions)
+LOG_WRN("Disk full while saving [" << uri <<
+"]. Making all sessions on doc read-only and notifying 
clients.");
+
+// Make everyone readonly and tell everyone that storage is low on 
diskspace.
+for (const auto& sessionIt : _sessions)
 {
 sessionIt.second->setReadOnly();
 sessionIt.second->sendTextFrame("error: cmd=storage 
kind=savediskfull");
@@ -446,10 +449,11 @@ bool DocumentBroker::save(const std::string& sessionId, 
bool success, const std:
 }
 else if (storageSaveResult == StorageBase::SaveResult::FAILED)
 {
+//TODO: Should we notify all clients?
+LOG_ERR("Failed to save to URI [" << uri << "]. Notifying client.");
 it->second->sendTextFrame("error: cmd=storage kind=savefailed");
 }
 
-LOG_ERR("Failed to save to URI [" << uri << "].");
 return false;
 }
 
@@ -502,7 +506,7 @@ bool DocumentBroker::autoSave(const bool force, const 
size_t waitTimeoutMs, std:
 LOG_TRC("Waiting for save event for [" << _docKey << "].");
 if (_saveCV.wait_for(lock, std::chrono::milliseconds(waitTimeoutMs)) 
== std::cv_status::no_timeout)
 {
-LOG_DBG("Successfully persisted document [" << _docKey << "] or 
document was not modified");
+LOG_DBG("Successfully persisted document [" << _docKey << "] or 
document was not modified.");
 return true;
 }
 
diff --git a/wsd/PrisonerSession.cpp b/wsd/PrisonerSession.cpp
index c0d21a8..749ba79 100644
--- a/wsd/PrisonerSession.cpp
+++ b/wsd/PrisonerSession.cpp
@@ -84,8 +84,8 @@ bool PrisonerSession::_handleInput(const char *buffer, int 
length)
 result = resultObj->get("value").toString();
 }
 
-if (!_docBroker->save(getId(), success, result))
-LOG_ERR("Saving document to storage failed.");
+// Save to Storage and log result.
+_docBroker->save(getId(), success, result);
 return true;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/Kit.cpp

2017-01-01 Thread Ashod Nakashian
 kit/Kit.cpp |   41 -
 1 file changed, 12 insertions(+), 29 deletions(-)

New commits:
commit d907c6b55437bfb32ff63ed4c6b7a30be6a81a07
Author: Ashod Nakashian 
Date:   Sat Dec 24 22:51:23 2016 -0500

wsd: exit Kit immediately after unloading last view

Also kill canDiscard and hasSessions, instead call
purgeSessions directly.

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

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index c2c674e..ecc8dc7 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -531,7 +531,7 @@ public:
 num_sessions = _sessions.size();
 if (num_sessions == 0)
 {
-LOG_INF("No more sessions, exiting bluntly");
+LOG_INF("Document [" << _url << "] has no more views, exiting 
bluntly.");
 std::_Exit(Application::EXIT_OK);
 }
 }
@@ -545,22 +545,6 @@ public:
 return num_sessions;
 }
 
-/// Returns true if at least one *live* connection exists.
-/// Does not consider user activity, just socket status.
-bool hasSessions()
-{
-// -ve values for failure.
-return purgeSessions() != 0;
-}
-
-/// Returns true if there is no activity and
-/// the document is saved.
-bool canDiscard()
-{
-//TODO: Implement proper time-out on inactivity.
-return !hasSessions();
-}
-
 /// Set Document password for given URL
 void setDocumentPassword(int nPasswordType)
 {
@@ -941,18 +925,22 @@ private:
 _loKitDocument->registerCallback(nullptr, nullptr);
 _loKitDocument->destroyView(viewId);
 _viewIdToCallbackDescr.erase(viewId);
-LOG_DBG("Destroyed view [" << viewId << "] with session [" <<
-sessionId << "] on url [" << _url << "].");
 
-// Get the list of view ids from the core
 const int viewCount = _loKitDocument->getViewsCount();
-std::vector viewIds(viewCount);
-_loKitDocument->getViewIds(viewIds.data(), viewCount);
-
 LOG_INF("Document [" << _url << "] session [" <<
 sessionId << "] unloaded view [" << viewId << "]. Have " <<
 viewCount << " view" << (viewCount != 1 ? "s." : "."));
 
+if (viewCount <= 0)
+{
+LOG_INF("Document [" << _url << "] has no more views, exiting 
bluntly.");
+std::_Exit(Application::EXIT_OK);
+}
+
+// Get the list of view ids from the core
+std::vector viewIds(viewCount);
+_loKitDocument->getViewIds(viewIds.data(), viewCount);
+
 lockLokDoc.unlock();
 
 // Broadcast updated view info
@@ -1703,11 +1691,6 @@ void lokit_main(const std::string& childRoot,
 LOG_WRN("No document while processing " << 
tokens[0] << " request.");
 }
 }
-else if (document && document->canDiscard())
-{
-LOG_INF("Last session discarded. Terminating.");
-TerminationFlag = true;
-}
 else
 {
 LOG_ERR("Bad or unknown token [" << tokens[0] << "]");
@@ -1718,7 +1701,7 @@ void lokit_main(const std::string& childRoot,
 []() {},
 []()
 {
-if (document && document->canDiscard())
+if (document && document->purgeSessions() == 0)
 {
 LOG_INF("Last session discarded. Terminating.");
 TerminationFlag = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/Kit.cpp

2017-01-01 Thread Ashod Nakashian
 kit/Kit.cpp |   72 
 1 file changed, 39 insertions(+), 33 deletions(-)

New commits:
commit 9de86cc0aefde0637dea12e78498ae08708076e5
Author: Ashod Nakashian 
Date:   Sat Dec 24 12:47:29 2016 -0500

wsd: refactor render options handling

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

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index f654b34..c2c674e 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -1179,39 +1179,7 @@ private:
 LOG_TRC("View to url [" << uri << "] created.");
 }
 
-Object::Ptr renderOptsObj;
-
-// Fill the object with renderoptions, if any
-if (!_renderOpts.empty())
-{
-Parser parser;
-Poco::Dynamic::Var var = parser.parse(_renderOpts);
-renderOptsObj = var.extract();
-}
-else if (!userName.empty())
-{
-renderOptsObj = new Object();
-}
-
-// Append name of the user, if any, who opened the document to 
rendering options
-if (!userName.empty())
-{
-Object::Ptr authorObj = new Object();
-authorObj->set("type", "string");
-std::string decodedUserName;
-URI::decode(userName, decodedUserName);
-authorObj->set("value", decodedUserName);
-renderOptsObj->set(".uno:Author", authorObj);
-}
-
-std::string renderParams;
-if (renderOptsObj)
-{
-std::ostringstream ossRenderOpts;
-renderOptsObj->stringify(ossRenderOpts);
-renderParams = ossRenderOpts.str();
-}
-
+const std::string renderParams = makeRenderParams(userName);
 LOG_INF("Initializing for rendering session [" << sessionId << "] on 
document url [" <<
 _url << "] with: [" << renderParams << "].");
 
@@ -1295,6 +1263,44 @@ private:
 return false;
 }
 
+std::string makeRenderParams(const std::string& userName)
+{
+Object::Ptr renderOptsObj;
+
+// Fill the object with renderoptions, if any
+if (!_renderOpts.empty())
+{
+Parser parser;
+Poco::Dynamic::Var var = parser.parse(_renderOpts);
+renderOptsObj = var.extract();
+}
+else if (!userName.empty())
+{
+renderOptsObj = new Object();
+}
+
+// Append name of the user, if any, who opened the document to 
rendering options
+if (!userName.empty())
+{
+Object::Ptr authorObj = new Object();
+authorObj->set("type", "string");
+std::string decodedUserName;
+URI::decode(userName, decodedUserName);
+authorObj->set("value", decodedUserName);
+renderOptsObj->set(".uno:Author", authorObj);
+}
+
+std::string renderParams;
+if (renderOptsObj)
+{
+std::ostringstream ossRenderOpts;
+renderOptsObj->stringify(ossRenderOpts);
+renderParams = ossRenderOpts.str();
+}
+
+return renderParams;
+}
+
 void run() override
 {
 Util::setThreadName("lok_handler");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/Kit.cpp

2017-01-01 Thread Ashod Nakashian
 kit/Kit.cpp |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit b4c4b29ecc06dd7461f88c865e336a9ca484f114
Author: Ashod Nakashian 
Date:   Fri Dec 23 17:34:46 2016 -0500

wsd: remove unnecessary checks of _loKitDocument

Since load() returns _loKitDocument, there is no
point in checking it again.

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

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 4a1ae08..f654b34 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -901,8 +901,7 @@ private:
 
 try
 {
-load(session, uri, userName, docPassword, renderOpts, 
haveDocPassword);
-if (!_loKitDocument || !_loKitDocument->get())
+if (!load(session, uri, userName, docPassword, renderOpts, 
haveDocPassword))
 {
 return false;
 }
@@ -916,10 +915,6 @@ private:
 
 // Retake the lock (technically, not needed).
 lock.lock();
-
-// Done loading, let the next one in (if any).
-LOG_CHECK_RET(_loKitDocument && _loKitDocument->get() && 
"Uninitialized lok::Document instance", false);
-
 --_isLoading;
 _cvLoading.notify_one();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/Kit.cpp

2017-01-01 Thread Ashod Nakashian
 kit/Kit.cpp |   18 +-
 1 file changed, 5 insertions(+), 13 deletions(-)

New commits:
commit 02b69738cae872aba095113831915daa999471a5
Author: Ashod Nakashian 
Date:   Fri Dec 23 17:33:37 2016 -0500

wsd: always lock documentMutex around loKitDocument

The _documentMutex used to be a member of _loKitDocument,
so it couldn't be locked when _loKitDocument was null.

However this has long since changed and is independent.
So no good reason not to lock it at every access point
of _loKitDocument, which is simpler and safer.

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

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 5dcd695..4a1ae08 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -612,13 +612,13 @@ public:
 std::vector pixmap;
 pixmap.resize(output.capacity());
 
+std::unique_lock lock(_documentMutex);
 if (!_loKitDocument)
 {
 LOG_ERR("Tile rendering requested before loading document.");
 return;
 }
 
-std::unique_lock lock(_documentMutex);
 if (_loKitDocument->getViewsCount() <= 0)
 {
 LOG_ERR("Tile rendering requested without views.");
@@ -685,13 +685,13 @@ public:
 const size_t pixmapSize = 4 * area;
 std::vector pixmap(pixmapSize, 0);
 
+std::unique_lock lock(_documentMutex);
 if (!_loKitDocument)
 {
 LOG_ERR("Tile rendering requested before loading document.");
 return;
 }
 
-std::unique_lock lock(_documentMutex);
 if (_loKitDocument->getViewsCount() <= 0)
 {
 LOG_ERR("Tile rendering requested without views.");
@@ -934,14 +934,14 @@ private:
 const auto viewId = session.getViewId();
 _tileQueue->removeCursorPosition(viewId);
 
+
+std::unique_lock lockLokDoc(_documentMutex);
 if (_loKitDocument == nullptr)
 {
 LOG_ERR("Unloading session [" << sessionId << "] without 
loKitDocument.");
 return;
 }
 
-std::unique_lock lockLokDoc(_documentMutex);
-
 _loKitDocument->setView(viewId);
 _loKitDocument->registerCallback(nullptr, nullptr);
 _loKitDocument->destroyView(viewId);
@@ -1098,7 +1098,7 @@ private:
 {
 const std::string sessionId = session->getId();
 
-std::unique_lock lockLokDoc;
+std::unique_lock lock(_documentMutex);
 
 if (!_loKitDocument)
 {
@@ -1123,9 +1123,6 @@ private:
 _loKitDocument.reset(_loKit->documentLoad(uri.c_str()));
 LOG_DBG("Returned lokit::documentLoad(" << uri << ") in " << 
(timestamp.elapsed()  / 1000.) << "ms.");
 
-std::unique_lock l(_documentMutex);
-lockLokDoc.swap(l);
-
 if (!_loKitDocument || !_loKitDocument->get())
 {
 LOG_ERR("Failed to load: " << uri << ", error: " << 
_loKit->getError());
@@ -1160,9 +1157,6 @@ private:
 }
 else
 {
-std::unique_lock l(_documentMutex);
-lockLokDoc.swap(l);
-
 LOG_INF("Document with url [" << uri << "] already loaded. Need to 
create new view for session [" << sessionId << "].");
 
 // Check if this document requires password
@@ -1190,8 +1184,6 @@ private:
 LOG_TRC("View to url [" << uri << "] created.");
 }
 
-Util::assertIsLocked(lockLokDoc);
-
 Object::Ptr renderOptsObj;
 
 // Fill the object with renderoptions, if any
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/Kit.cpp

2017-01-01 Thread Ashod Nakashian
 kit/Kit.cpp |   22 +-
 1 file changed, 17 insertions(+), 5 deletions(-)

New commits:
commit a1dd40eaadfaa9e9bbfc023ff96046cb25f80830
Author: Ashod Nakashian 
Date:   Fri Dec 23 16:18:10 2016 -0500

wsd: cleanup renderopts json creation and merging

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

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 92a097b..32445bd 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -1188,7 +1188,7 @@ private:
 
 Util::assertIsLocked(lockLokDoc);
 
-Object::Ptr renderOptsObj = new Object();
+Object::Ptr renderOptsObj;
 
 // Fill the object with renderoptions, if any
 if (!_renderOpts.empty())
@@ -1197,11 +1197,14 @@ private:
 Poco::Dynamic::Var var = parser.parse(_renderOpts);
 renderOptsObj = var.extract();
 }
+else if (!userName.empty())
+{
+renderOptsObj = new Object();
+}
 
 // Append name of the user, if any, who opened the document to 
rendering options
 if (!userName.empty())
 {
-Object::Ptr authorContainer = new Object();
 Object::Ptr authorObj = new Object();
 authorObj->set("type", "string");
 std::string decodedUserName;
@@ -1210,15 +1213,24 @@ private:
 renderOptsObj->set(".uno:Author", authorObj);
 }
 
-std::ostringstream ossRenderOpts;
-renderOptsObj->stringify(ossRenderOpts);
+std::string renderParams;
+if (renderOptsObj)
+{
+std::ostringstream ossRenderOpts;
+renderOptsObj->stringify(ossRenderOpts);
+renderParams = ossRenderOpts.str();
+}
+
+LOG_INF("Initializing for rendering session [" << sessionId << "] on 
document url [" <<
+_url << "] with: [" << renderParams << "].");
 
 // initializeForRendering() should be called before
 // registerCallback(), as the previous creates a new view in Impress.
-_loKitDocument->initializeForRendering(ossRenderOpts.str().c_str());
+_loKitDocument->initializeForRendering(renderParams.c_str());
 
 const int viewId = _loKitDocument->getView();
 session->setViewId(viewId);
+
 _viewIdToCallbackDescr.emplace(viewId,
std::unique_ptr(new 
CallbackDescriptor({ this, viewId })));
 _loKitDocument->registerCallback(ViewCallback, 
_viewIdToCallbackDescr[viewId].get());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - kit/Kit.cpp

2017-01-01 Thread Ashod Nakashian
 kit/Kit.cpp |   21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 2fcf6220f15368286ed8d20b4eea42ed8de74c83
Author: Ashod Nakashian 
Date:   Fri Dec 23 16:19:41 2016 -0500

wsd: log documentLoad call and duration

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

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 8d7ee2a..5dcd695 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -1118,9 +1118,11 @@ private:
 _jailedUrl = uri;
 _isDocPasswordProtected = false;
 
-LOG_DBG("Calling lokit::documentLoad.");
+LOG_DBG("Calling lokit::documentLoad(" << uri << ").");
+Timestamp timestamp;
 _loKitDocument.reset(_loKit->documentLoad(uri.c_str()));
-LOG_DBG("Returned lokit::documentLoad.");
+LOG_DBG("Returned lokit::documentLoad(" << uri << ") in " << 
(timestamp.elapsed()  / 1000.) << "ms.");
+
 std::unique_lock l(_documentMutex);
 lockLokDoc.swap(l);
 
@@ -1161,6 +1163,8 @@ private:
 std::unique_lock l(_documentMutex);
 lockLokDoc.swap(l);
 
+LOG_INF("Document with url [" << uri << "] already loaded. Need to 
create new view for session [" << sessionId << "].");
+
 // Check if this document requires password
 if (_isDocPasswordProtected)
 {
commit ad2a9b90e4902e8320c7dea8df1f66b165dccab2
Author: Ashod Nakashian 
Date:   Fri Dec 23 16:49:03 2016 -0500

wsd: lock when accessing session container

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

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 32445bd..8d7ee2a 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -1264,20 +1264,29 @@ private:
 std::string sessionId;
 if (LOOLProtocol::parseNameValuePair(prefix, name, sessionId, '-') && 
name == "child")
 {
+std::unique_lock lock(_mutex);
+
 const auto it = _sessions.find(sessionId);
 if (it != _sessions.end())
 {
+auto session = it->second;
+
 static const std::string disconnect("disconnect");
 if (size == disconnect.size() &&
 strncmp(data, disconnect.data(), disconnect.size()) == 0)
 {
 LOG_DBG("Removing ChildSession " << sessionId);
-_oldSessionIds[it->second->getViewId()] = 
UserInfo({it->second->getViewUserId(), it->second->getViewUserName()});
+_oldSessionIds[session->getViewId()] = 
UserInfo({session->getViewUserId(), session->getViewUserName()});
 _sessions.erase(it);
+
+// No longer needed, and allow session dtor to take it.
+lock.unlock();
+session.reset();
 return true;
 }
 
-auto session = it->second;
+// No longer needed, and allow the handler to take it.
+lock.unlock();
 if (session)
 {
 return session->handleInput(data, size);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/Kit.cpp

2017-01-01 Thread Ashod Nakashian
 kit/Kit.cpp |   37 +
 1 file changed, 13 insertions(+), 24 deletions(-)

New commits:
commit c4d368149e74379a5c66eb5d468aeaa16121fc44
Author: Ashod Nakashian 
Date:   Fri Dec 23 16:19:05 2016 -0500

wsd: simplify session purging

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

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index f40b56c..92a097b 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -502,7 +502,6 @@ public:
 size_t purgeSessions()
 {
 std::vector> deadSessions;
-size_t numRunning = 0;
 size_t num_sessions = 0;
 {
 std::unique_lock lock(_mutex, std::defer_lock);
@@ -516,35 +515,25 @@ public:
 // bluntly exit, no need to clean up our own data structures. 
Also, there is a bug that
 // causes the deadSessions.clear() call below to crash in some 
situations when the last
 // session is being removed.
-for (auto it = _sessions.cbegin(); it != _sessions.cend(); ++it)
+for (auto it = _sessions.cbegin(); it != _sessions.cend(); )
 {
-if (!it->second->isCloseFrame())
-numRunning++;
-}
-
-if (numRunning > 0)
-{
-for (auto it = _sessions.cbegin(); it != _sessions.cend(); )
+if (it->second->isCloseFrame())
 {
-if (it->second->isCloseFrame())
-{
-deadSessions.push_back(it->second);
-it = _sessions.erase(it);
-}
-else
-{
-++it;
-}
+deadSessions.push_back(it->second);
+it = _sessions.erase(it);
+}
+else
+{
+++it;
 }
 }
 
 num_sessions = _sessions.size();
-}
-
-if (numRunning == 0)
-{
-LOG_INF("No more sessions, exiting bluntly");
-std::_Exit(Application::EXIT_OK);
+if (num_sessions == 0)
+{
+LOG_INF("No more sessions, exiting bluntly");
+std::_Exit(Application::EXIT_OK);
+}
 }
 
 // Don't destroy sessions while holding our lock.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/Kit.cpp

2017-01-01 Thread Ashod Nakashian
 kit/Kit.cpp |   30 ++
 1 file changed, 18 insertions(+), 12 deletions(-)

New commits:
commit 9d49e1595e7711ea281cd6d063c5b9bf08dd
Author: Ashod Nakashian 
Date:   Fri Dec 23 15:42:15 2016 -0500

wsd: check session before releasing lock

By the time load() is invoked, _mutex is already
unlocked in onLoad(), so it is no longer safe
to access _sessions.

So we need to get the session and pass it to load.

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

diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index edf03c9..f40b56c 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -896,13 +896,23 @@ private:
 _cvLoading.wait(lock);
 }
 
+// This shouldn't happen, but for sanity.
+const auto it = _sessions.find(sessionId);
+if (it == _sessions.end() || !it->second)
+{
+LOG_ERR("Cannot find session [" << sessionId << "] to load view 
for.");
+return false;
+}
+
+auto session = it->second;
+
 // Flag and release lock.
 ++_isLoading;
 lock.unlock();
 
 try
 {
-load(sessionId, uri, userName, docPassword, renderOpts, 
haveDocPassword);
+load(session, uri, userName, docPassword, renderOpts, 
haveDocPassword);
 if (!_loKitDocument || !_loKitDocument->get())
 {
 return false;
@@ -915,9 +925,12 @@ private:
 return false;
 }
 
+// Retake the lock (technically, not needed).
+lock.lock();
+
 // Done loading, let the next one in (if any).
 LOG_CHECK_RET(_loKitDocument && _loKitDocument->get() && 
"Uninitialized lok::Document instance", false);
-lock.lock();
+
 --_isLoading;
 _cvLoading.notify_one();
 
@@ -1087,22 +1100,15 @@ private:
 return viewColors;
 }
 
-std::shared_ptr load(const std::string& sessionId,
+std::shared_ptr load(const std::shared_ptr& 
session,
 const std::string& uri,
 const std::string& userName,
 const std::string& docPassword,
 const std::string& renderOpts,
 const bool haveDocPassword)
 {
-const auto it = _sessions.find(sessionId);
-if (it == _sessions.end() || !it->second)
-{
-LOG_ERR("Cannot find session [" << sessionId << "].");
-return nullptr;
-}
+const std::string sessionId = session->getId();
 
-auto session = it->second;
-int viewId = 0;
 std::unique_lock lockLokDoc;
 
 if (!_loKitDocument)
@@ -1222,7 +1228,7 @@ private:
 // registerCallback(), as the previous creates a new view in Impress.
 _loKitDocument->initializeForRendering(ossRenderOpts.str().c_str());
 
-viewId = _loKitDocument->getView();
+const int viewId = _loKitDocument->getView();
 session->setViewId(viewId);
 _viewIdToCallbackDescr.emplace(viewId,
std::unique_ptr(new 
CallbackDescriptor({ this, viewId })));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/ClientSession.hpp wsd/SenderQueue.hpp

2017-01-01 Thread Ashod Nakashian
 wsd/ClientSession.hpp |1 +
 wsd/SenderQueue.hpp   |6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit df32077005e81a1187ce750bfdf34021c5b04ca2
Author: Ashod Nakashian 
Date:   Sun Jan 1 23:17:50 2017 -0500

wsd: read message payload from correct source

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

diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp
index 2786e8f..7952029 100644
--- a/wsd/ClientSession.hpp
+++ b/wsd/ClientSession.hpp
@@ -63,6 +63,7 @@ public:
 
 void enqueueSendMessage(const std::shared_ptr& data)
 {
+LOG_TRC(getName() << " enqueueing client message: " << 
data->abbreviation());
 _senderQueue.enqueue(data);
 }
 
diff --git a/wsd/SenderQueue.hpp b/wsd/SenderQueue.hpp
index 6083c19..900dd94 100644
--- a/wsd/SenderQueue.hpp
+++ b/wsd/SenderQueue.hpp
@@ -52,9 +52,9 @@ public:
const enum Type type,
const size_t reserve) :
 _data(std::max(reserve, message.size())),
-_tokens(LOOLProtocol::tokenize(_data.data(), _data.size())),
-_firstLine(LOOLProtocol::getFirstLine(_data.data(), _data.size())),
-_abbreviation(LOOLProtocol::getAbbreviatedMessage(_data.data(), 
_data.size())),
+_tokens(LOOLProtocol::tokenize(message)),
+_firstLine(LOOLProtocol::getFirstLine(message)),
+_abbreviation(LOOLProtocol::getAbbreviatedMessage(message)),
 _type(type)
 {
 _data.resize(message.size());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


how to make resource file

2017-01-01 Thread jaeseok

Hello.I need your help.

I would like to know about how to make resource file such as foren.res,
forko.res. I guess that the resource file was generated by pyhon code or
downloaded to pkg.

please



--
View this message in context: 
http://nabble.documentfoundation.org/how-to-make-resource-file-tp4204083.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Git commit adds ^M at end of line

2017-01-01 Thread Wols Lists
On 01/01/17 19:08, Laurent BP wrote:
> I can remove these ^M in the patch file, but not in source files.

Git *can* handle all this stuff automatically. It sounds like you've got
some config setting wrong (although from your description I can't see how!).

There are some special settings that force a repository to be all as per
Unix with lf endings, but that will convert stuff to crlf for doze etc
on checkout/in.

Sounds to me like something's corrupted that on your system.

Cheers,
Wol
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Git commit adds ^M at end of line

2017-01-01 Thread Muhammet Kara

Hi Laurent,

2017-01-01 21:08, Laurent BP yazmış:
Sound a lot like you made the git init or git clone command from a 
msdos

prompt and not cygwin.
Thanks Jan for your answer. But I'm on Linux system (OpenSuse 13.2), 
I'm
editing file with KWrite and I launched git from a Konsole terminal. 
My

previous commit did not suffer from this default:
https://gerrit.libreoffice.org/#/c/32519/
My previous commit on help was also correct
https://gerrit.libreoffice.org/#/c/30180/

I can remove these ^M in the patch file, but not in source files.



I experienced a similar problem once when I pasted some piece of code 
from a web page. Opening the source file with vim and giving this 
command (to set file format to unix) worked for me:


:set ff=unix

Cheers,
Muhammet




-
LibreOffice 5.1.4.1
--
View this message in context:
http://nabble.documentfoundation.org/Git-commit-adds-M-at-end-of-line-tp4204025p4204050.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-01-01 Thread Khaled Hosny
 vcl/inc/win/salgdi.h  |4 +---
 vcl/win/gdi/salfont.cxx   |   33 ++---
 vcl/win/gdi/salgdi.cxx|2 --
 vcl/win/gdi/winlayout.cxx |3 +--
 4 files changed, 16 insertions(+), 26 deletions(-)

New commits:
commit 1b7e788eb3bf9cbe56ed5cc4a3fa7fa5e70ac40a
Author: Khaled Hosny 
Date:   Sun Jan 1 22:20:22 2017 +0200

The mfFontScale[n] is always 1.0

Change-Id: Ica2e67632f5bfe1f70ba7b2d7502257b47d053ce
Reviewed-on: https://gerrit.libreoffice.org/32592
Tested-by: Jenkins 
Reviewed-by: Khaled Hosny 

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 65cf06f..d974e76 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -166,8 +166,6 @@ private:
 HFONT   mhFonts[ MAX_FALLBACK ];// Font + Fallbacks
 const WinFontFace*  mpWinFontData[ MAX_FALLBACK ];  // pointer to the most 
recent font face
 WinFontInstance*   mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the 
most recent font instance
-float   mfFontScale[ MAX_FALLBACK ];// allows 
metrics emulation of huge font sizes
-float   mfCurrentFontScale;
 HRGNmhRegion;   // vcl::Region Handle
 HPENmhDefPen;   // DefaultPen
 HBRUSH  mhDefBrush; // DefaultBrush
@@ -207,7 +205,7 @@ public:
 
 HWND gethWnd();
 
-HFONT   ImplDoSetFont( FontSelectPattern* i_pFont, float& 
o_rFontScale, HFONT& o_rOldFont );
+HFONT   ImplDoSetFont( FontSelectPattern* i_pFont, HFONT& 
o_rOldFont );
 
 public:
 explicit WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND 
hWnd,
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 6be5acd..b8da03d 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -836,8 +836,9 @@ void ImplGetLogFontFromFontSelect( HDC hDC,
 }
 }
 
-HFONT WinSalGraphics::ImplDoSetFont( FontSelectPattern* i_pFont, float& 
o_rFontScale, HFONT& o_rOldFont )
+HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern* i_pFont, HFONT& 
o_rOldFont)
 {
+float fFontScale;
 HFONT hNewFont = nullptr;
 
 HDC hdcScreen = nullptr;
@@ -853,19 +854,19 @@ HFONT WinSalGraphics::ImplDoSetFont( FontSelectPattern* 
i_pFont, float& o_rFontS
 if( (-aLogFont.lfHeight <= MAXFONTHEIGHT)
 &&  (+aLogFont.lfWidth <= MAXFONTHEIGHT) )
 {
-o_rFontScale = 1.0;
+fFontScale = 1.0;
 }
 else if( -aLogFont.lfHeight >= +aLogFont.lfWidth )
 {
-o_rFontScale = -aLogFont.lfHeight / (float)MAXFONTHEIGHT;
+fFontScale = -aLogFont.lfHeight / (float)MAXFONTHEIGHT;
 aLogFont.lfHeight = -MAXFONTHEIGHT;
-aLogFont.lfWidth = FRound( aLogFont.lfWidth / o_rFontScale );
+aLogFont.lfWidth = FRound( aLogFont.lfWidth / fFontScale );
 }
 else // #i95867# also limit font widths
 {
-o_rFontScale = +aLogFont.lfWidth / (float)MAXFONTHEIGHT;
+fFontScale = +aLogFont.lfWidth / (float)MAXFONTHEIGHT;
 aLogFont.lfWidth = +MAXFONTHEIGHT;
-aLogFont.lfHeight = FRound( aLogFont.lfHeight / o_rFontScale );
+aLogFont.lfHeight = FRound( aLogFont.lfHeight / fFontScale );
 }
 
 hNewFont = ::CreateFontIndirectW( &aLogFont );
@@ -905,7 +906,6 @@ void WinSalGraphics::SetFont( FontSelectPattern* pFont, int 
nFallbackLevel )
 // deselect still active font
 if( mhDefFont )
 ::SelectFont( getHDC(), mhDefFont );
-mfCurrentFontScale = mfFontScale[nFallbackLevel];
 // release no longer referenced font handles
 for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
 {
@@ -938,8 +938,7 @@ void WinSalGraphics::SetFont( FontSelectPattern* pFont, int 
nFallbackLevel )
 mpWinFontData[ nFallbackLevel ] = static_cast( 
pFont->mpFontData );
 
 HFONT hOldFont = nullptr;
-HFONT hNewFont = ImplDoSetFont( pFont, mfFontScale[ nFallbackLevel ], 
hOldFont );
-mfCurrentFontScale = mfFontScale[nFallbackLevel];
+HFONT hNewFont = ImplDoSetFont(pFont, hOldFont);
 
 if( !mhDefFont )
 {
@@ -1000,7 +999,7 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricDataRef& 
rxFontMetric, int nFa
 rxFontMetric->SetSlant( 0 );
 
 // transformation dependent font metrics
-rxFontMetric->SetWidth( static_cast( mfFontScale[nFallbackLevel] * 
aWinMetric.tmAveCharWidth ) );
+rxFontMetric->SetWidth(aWinMetric.tmAveCharWidth);
 
 const std::vector rHhea(aHheaRawData.get(), aHheaRawData.get() + 
aHheaRawData.size());
 const std::vector rOS2(aOS2RawData.get(), aOS2RawData.get() + 
aOS2RawData.size());
@@ -1370,10 +1369,8 @@ bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& 
rGlyph, Rectangle& rRect
 
 rRect = Rectangle( Point( +aGM.gmptGlyphOrigin.x, -aGM.gmptGlyphOrigin.y ),
 Size( aGM.gmBlackBoxX, aGM.gmBlackBoxY ) );
-rRect.Left()= static_cast( mfCurrentFontScale * rRect.

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

2017-01-01 Thread Khaled Hosny
 vcl/source/font/PhysicalFontCollection.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 7633cbb0e84d20a36b2972c6fd5c0d5a5d6280a3
Author: Khaled Hosny 
Date:   Sun Jan 1 18:10:09 2017 +0200

Use FindMetricCompatibleFont() here as well

Change-Id: I4b4c360a58f5e0176688294dc3d18aacfd000277
Reviewed-on: https://gerrit.libreoffice.org/32581
Tested-by: Jenkins 
Reviewed-by: Khaled Hosny 

diff --git a/vcl/source/font/PhysicalFontCollection.cxx 
b/vcl/source/font/PhysicalFontCollection.cxx
index f0249c0..f90abfa 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -1116,9 +1116,11 @@ PhysicalFontFamily* 
PhysicalFontCollection::FindFontFamily( FontSelectPattern& r
 }
 else
 nTokenPos = -1;
-if( mpPreMatchHook )
-if( mpPreMatchHook->FindFontSubstitute( rFSD ) )
-aSearchName = GetEnglishSearchFontName( aSearchName );
+if (FindMetricCompatibleFont(rFSD) ||
+(mpPreMatchHook && mpPreMatchHook->FindFontSubstitute(rFSD)))
+{
+aSearchName = GetEnglishSearchFontName( aSearchName );
+}
 ImplFontSubstitute( aSearchName );
 PhysicalFontFamily* pFoundData = ImplFindFontFamilyBySearchName( 
aSearchName );
 if( pFoundData )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/uiconfig odk/docs odk/examples odk/index.html odk/index_online.html setup_native/source sfx2/uiconfig

2017-01-01 Thread Adolfo Jayme Barrientos
 cui/uiconfig/ui/aboutdialog.ui|2 
 odk/docs/install.html |2 
 odk/docs/tools.html   |2 
 odk/examples/DevelopersGuide/examples.html|2 
 odk/examples/examples.html|2 
 odk/index.html|2 
 odk/index_online.html |2 
 setup_native/source/packinfo/packinfo_brand.txt   |   16 +-
 setup_native/source/packinfo/packinfo_extensions.txt  |   10 -
 setup_native/source/packinfo/packinfo_office.txt  |  118 +-
 setup_native/source/packinfo/packinfo_office_help.txt |2 
 setup_native/source/packinfo/packinfo_office_lang.txt |   20 +--
 setup_native/source/packinfo/packinfo_sdkoo.txt   |2 
 setup_native/source/packinfo/packinfo_ure.txt |4 
 sfx2/uiconfig/ui/licensedialog.ui |2 
 15 files changed, 94 insertions(+), 94 deletions(-)

New commits:
commit e5da108ef01872f460c176b6a9173e346e1d59a4
Author: Adolfo Jayme Barrientos 
Date:   Sun Jan 1 17:39:23 2017 -0600

Bump copyright year to 2017

Change-Id: I26ddcdd7bb9616c0599eec9101603d4be1ea4147

diff --git a/cui/uiconfig/ui/aboutdialog.ui b/cui/uiconfig/ui/aboutdialog.ui
index d313cac..d55acee 100644
--- a/cui/uiconfig/ui/aboutdialog.ui
+++ b/cui/uiconfig/ui/aboutdialog.ui
@@ -197,7 +197,7 @@
 12
 12
 True
-Copyright ƂĀ© 
2000Ć¢Ā€Ā“2016 LibreOffice contributors.
+Copyright ƂĀ© 
2000Ć¢Ā€Ā“2017 LibreOffice contributors.
 center
 True
   
diff --git a/odk/docs/install.html b/odk/docs/install.html
index 8ad0e6b..fad79c0 100644
--- a/odk/docs/install.html
+++ b/odk/docs/install.html
@@ -507,7 +507,7 @@
 
 
   
-Copyright ƂĀ© 2000, 2016 LibreOffice contributors. All rights
+Copyright ƂĀ© 2000Ć¢Ā€Ā“2017 LibreOffice contributors. All rights
   reserved.
   LibreOffice was created by The Document Foundation, based on
   Apache OpenOffice, which is Copyright 2011 The Apache Software
diff --git a/odk/docs/tools.html b/odk/docs/tools.html
index b39e124..b0b3379 100644
--- a/odk/docs/tools.html
+++ b/odk/docs/tools.html
@@ -911,7 +911,7 @@ types the specified types depend on.
 
 
 
-Copyright ƂĀ© 2000, 2016 LibreOffice contributors. 
All rights reserved.
+Copyright ƂĀ© 2000Ć¢Ā€Ā“2017 LibreOffice contributors. 
All rights reserved.
 
 LibreOffice was created by The Document Foundation,
 based on Apache OpenOffice, which is Copyright 
2011,
diff --git a/odk/examples/DevelopersGuide/examples.html 
b/odk/examples/DevelopersGuide/examples.html
index dd8a9e2..b9aeb71 100644
--- a/odk/examples/DevelopersGuide/examples.html
+++ b/odk/examples/DevelopersGuide/examples.html
@@ -2856,7 +2856,7 @@ for the Office application.
 
 
 
-Copyright ƂĀ© 2000, 2016 LibreOffice contributors. 
All rights reserved.
+Copyright ƂĀ© 2000Ć¢Ā€Ā“2017 LibreOffice contributors. 
All rights reserved.
 
 LibreOffice was created by The Document Foundation,
 based on Apache OpenOffice, which is Copyright 2011
diff --git a/odk/examples/examples.html b/odk/examples/examples.html
index 885c386..ddcbb4d 100644
--- a/odk/examples/examples.html
+++ b/odk/examples/examples.html
@@ -810,7 +810,7 @@
 
 
 
-Copyright ƂĀ© 2000, 2016 LibreOffice contributors. 
All rights reserved.
+Copyright ƂĀ© 2000Ć¢Ā€Ā“2017 LibreOffice contributors. 
All rights reserved.
 
 LibreOffice was created by The Document Foundation,
 based on Apache OpenOffice, which is Copyright 2011
diff --git a/odk/index.html b/odk/index.html
index 9ca03f0..24b4fbd 100644
--- a/odk/index.html
+++ b/odk/index.html
@@ -189,7 +189,7 @@
 
 
 
-Copyright Ā© 2000, 2016 LibreOffice 
contributors. All rights reserved.
+Copyright Ā© 2000Ć¢Ā€Ā“2017 LibreOffice 
contributors. All rights reserved.
 
 LibreOffice was created by The Document Foundation,
 based on Apache OpenOffice, which is Copyright 2011
diff --git a/odk/index_online.html b/odk/index_online.ht

[Libreoffice-commits] core.git: instsetoo_native/inc_common

2017-01-01 Thread tamsil1amani3
 instsetoo_native/inc_common/windows/msi_templates/Binary/setup.ico |binary
 1 file changed

New commits:
commit 1cb1cc30b5eb75483b6aaeec0192f7ee1d833461
Author: tamsil1amani3 
Date:   Tue Dec 27 21:50:08 2016 +0530

tdf#103677 Icons Change

Changed setup.ico to a more decent and elegant looking one

Change-Id: I7c9ad6903d0319f22ad0a2202cb808a304f1fc12
Reviewed-on: https://gerrit.libreoffice.org/32457
Tested-by: Jenkins 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/instsetoo_native/inc_common/windows/msi_templates/Binary/setup.ico 
b/instsetoo_native/inc_common/windows/msi_templates/Binary/setup.ico
index 3580448..29b0e61 100644
Binary files 
a/instsetoo_native/inc_common/windows/msi_templates/Binary/setup.ico and 
b/instsetoo_native/inc_common/windows/msi_templates/Binary/setup.ico differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 6 commits - include/sfx2 include/vcl sc/inc vcl/inc vcl/source

2017-01-01 Thread CaolƔn McNamara
 include/sfx2/module.hxx |2 
 include/vcl/alpha.hxx   |2 
 include/vcl/graph.hxx   |4 
 sc/inc/global.hxx   |1 
 vcl/inc/impgraph.hxx|4 
 vcl/source/gdi/graph.cxx|8 
 vcl/source/gdi/impgraph.cxx |  402 +---
 7 files changed, 207 insertions(+), 216 deletions(-)

New commits:
commit a2aceeb00de1529292709894bdb39b676a3f2337
Author: CaolƃĀ”n McNamara 
Date:   Sun Jan 1 21:07:19 2017 +

return earlier, no logic change intended

Change-Id: Icd75c46eb57c059fb60fd9701e6bb1fb651d8f3f

diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 98d57ac..5689f27 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1520,86 +1520,87 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& 
rImpGraphic )
 
 void WriteImpGraphic(SvStream& rOStm, const ImpGraphic& rImpGraphic)
 {
-if( !rOStm.GetError() )
+if (rOStm.GetError())
+return;
+
+if (rImpGraphic.ImplIsSwapOut())
 {
-if( !rImpGraphic.ImplIsSwapOut() )
-{
-if( ( rOStm.GetVersion() >= SOFFICE_FILEFORMAT_50 ) &&
-( rOStm.GetCompressMode() & SvStreamCompressFlags::NATIVE ) &&
-rImpGraphic.mpGfxLink && rImpGraphic.mpGfxLink->IsNative() &&
-!rImpGraphic.maPdfData.hasElements())
-{
-// native format
-rOStm.WriteUInt32( NATIVE_FORMAT_50 );
+rOStm.SetError( SVSTREAM_GENERALERROR );
+return;
+}
 
-// write compat info
-std::unique_ptr pCompat(new VersionCompat( 
rOStm, StreamMode::WRITE, 1 ));
-pCompat.reset(); // destructor writes stuff into the header
+if( ( rOStm.GetVersion() >= SOFFICE_FILEFORMAT_50 ) &&
+( rOStm.GetCompressMode() & SvStreamCompressFlags::NATIVE ) &&
+rImpGraphic.mpGfxLink && rImpGraphic.mpGfxLink->IsNative() &&
+!rImpGraphic.maPdfData.hasElements())
+{
+// native format
+rOStm.WriteUInt32( NATIVE_FORMAT_50 );
 
-rImpGraphic.mpGfxLink->SetPrefMapMode( 
rImpGraphic.ImplGetPrefMapMode() );
-rImpGraphic.mpGfxLink->SetPrefSize( 
rImpGraphic.ImplGetPrefSize() );
-WriteGfxLink( rOStm, *rImpGraphic.mpGfxLink );
-}
-else
-{
-// own format
-const SvStreamEndian nOldFormat = rOStm.GetEndian();
-rOStm.SetEndian( SvStreamEndian::LITTLE );
+// write compat info
+std::unique_ptr pCompat(new VersionCompat( rOStm, 
StreamMode::WRITE, 1 ));
+pCompat.reset(); // destructor writes stuff into the header
 
-switch( rImpGraphic.ImplGetType() )
-{
-case GraphicType::NONE:
-case GraphicType::Default:
-break;
+rImpGraphic.mpGfxLink->SetPrefMapMode( 
rImpGraphic.ImplGetPrefMapMode() );
+rImpGraphic.mpGfxLink->SetPrefSize( rImpGraphic.ImplGetPrefSize() );
+WriteGfxLink( rOStm, *rImpGraphic.mpGfxLink );
+}
+else
+{
+// own format
+const SvStreamEndian nOldFormat = rOStm.GetEndian();
+rOStm.SetEndian( SvStreamEndian::LITTLE );
 
-case GraphicType::Bitmap:
-{
-if(rImpGraphic.getSvgData().get())
-{
-// stream out Svg defining data (length, byte 
array and evtl. path)
-// this is used e.g. in swapping out graphic data 
and in transporting it over UNO API
-// as sequence of bytes, but AFAIK not written 
anywhere to any kind of file, so it should be
-// no problem to extend it; only used at runtime
-const sal_uInt32 nSvgMagic((sal_uInt32('s') << 24) 
| (sal_uInt32('v') << 16) | (sal_uInt32('g') << 8) | sal_uInt32('0'));
-
-rOStm.WriteUInt32( nSvgMagic );
-rOStm.WriteUInt32( 
rImpGraphic.getSvgData()->getSvgDataArrayLength() );
-
rOStm.WriteBytes(rImpGraphic.getSvgData()->getSvgDataArray().getConstArray(),
-
rImpGraphic.getSvgData()->getSvgDataArrayLength());
-
rOStm.WriteUniOrByteString(rImpGraphic.getSvgData()->getPath(),
-   
rOStm.GetStreamCharSet());
-}
-else if( rImpGraphic.ImplIsAnimated())
-{
-WriteAnimation( rOStm, *rImpGraphic.mpAnimation );
-}
-else
-{
-WriteDIBBitmapEx(rImpGraphic.maEx, rOStm);
-}
-}
-   

Re: Need help for building

2017-01-01 Thread Regina Henschel

Hi all,

Regina Henschel schrieb:

Hi Mike,

Kaganski Mike schrieb:

On 12/31/2016 3:59 PM, Regina Henschel wrote:

my last build was in August. Now I tried a new build, but it fails. I
have started with
git pull -r


I may remember that wrong, but I have a feeling that it was this problem
when I was given an advise to use ./g pull -r instead of git pull -r


That seems to work. At least compiling is running now.


Build was successful. :)

Kind regards
Regina

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sfx2/source

2017-01-01 Thread CaolƔn McNamara
 sfx2/source/appl/module.cxx |8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 0ffc0db8f9cf79005f991e3aaf783a3cff37ee45
Author: CaolƃĀ”n McNamara 
Date:   Sun Jan 1 20:42:02 2017 +

remove recently unused imagelist pointers

since

commit e3203ad42dd57d546ab8cd002b8fcbe54c9bcd11
Author: CaolƃĀ”n McNamara 
Date:   Wed Dec 21 10:07:41 2016 +

remove newly unused SfxModule::GetImageList_Impl, etc

Change-Id: Ibb1430d2b6c7994b2425d686cf206d168530faef

Change-Id: Ib2acaf66f513c4f7d6f74b790929df9e0a0a7038

diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index 810c78d..4705ba4 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -51,15 +51,13 @@ public:
 SfxTbxCtrlFactArr_Impl* pTbxCtrlFac;
 SfxStbCtrlFactArr_Impl* pStbCtrlFac;
 SfxChildWinFactArr_Impl*pFactArr;
-ImageList*  pImgListSmall;
-ImageList*  pImgListBig;
 
 SfxModule_Impl();
 ~SfxModule_Impl();
 };
 
 SfxModule_Impl::SfxModule_Impl()
- : pSlotPool(nullptr), pTbxCtrlFac(nullptr), pStbCtrlFac(nullptr), 
pFactArr(nullptr), pImgListSmall(nullptr), pImgListBig(nullptr)
+ : pSlotPool(nullptr), pTbxCtrlFac(nullptr), pStbCtrlFac(nullptr), 
pFactArr(nullptr)
 {
 }
 
@@ -69,8 +67,6 @@ SfxModule_Impl::~SfxModule_Impl()
 delete pTbxCtrlFac;
 delete pStbCtrlFac;
 delete pFactArr;
-delete pImgListSmall;
-delete pImgListBig;
 }
 
 SFX_IMPL_SUPERCLASS_INTERFACE(SfxModule, SfxShell)
@@ -100,8 +96,6 @@ void SfxModule::Construct_Impl()
 pImpl->pTbxCtrlFac=nullptr;
 pImpl->pStbCtrlFac=nullptr;
 pImpl->pFactArr=nullptr;
-pImpl->pImgListSmall=nullptr;
-pImpl->pImgListBig=nullptr;
 
 SetPool( &pApp->GetPool() );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: extensions/source

2017-01-01 Thread CaolƔn McNamara
 extensions/source/resource/ResourceIndexAccess.cxx |   22 +
 1 file changed, 6 insertions(+), 16 deletions(-)

New commits:
commit 5a6994870bb2fcb78372835aab59847402447a4e
Author: CaolƃĀ”n McNamara 
Date:   Sun Jan 1 20:32:29 2017 +

fold ResourceIndexAccessBase into ResourceStringIndexAccess

Change-Id: Icef518dc65d5edf4e7893df460aaae179eecfb45

diff --git a/extensions/source/resource/ResourceIndexAccess.cxx 
b/extensions/source/resource/ResourceIndexAccess.cxx
index 2edb7cc..dfb9181 100644
--- a/extensions/source/resource/ResourceIndexAccess.cxx
+++ b/extensions/source/resource/ResourceIndexAccess.cxx
@@ -37,10 +37,10 @@ namespace
 return 
std::shared_ptr(ResMgr::CreateResMgr(sEncName.getStr()));
 }
 
-class ResourceIndexAccessBase : public cppu::WeakImplHelper< 
css::container::XIndexAccess>
+class ResourceStringIndexAccess : public cppu::WeakImplHelper< 
css::container::XIndexAccess>
 {
 public:
-explicit ResourceIndexAccessBase(const std::shared_ptr& 
pResMgr)
+explicit ResourceStringIndexAccess(const std::shared_ptr& 
pResMgr)
 : m_pResMgr(pResMgr)
 {
 OSL_ENSURE(m_pResMgr, "no resource manager given");
@@ -49,25 +49,15 @@ namespace
 // XIndexAccess
 virtual ::sal_Int32 SAL_CALL getCount(  ) throw 
(css::uno::RuntimeException, std::exception) override
 { return m_pResMgr.get() ? SAL_MAX_UINT16 : 0; };
+virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) 
throw (css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, 
css::uno::RuntimeException, std::exception) override;
 // XElementAccess
 virtual sal_Bool SAL_CALL hasElements(  ) throw 
(css::uno::RuntimeException, std::exception) override
 { return static_cast(m_pResMgr.get()); };
-
-protected:
-// m_pResMgr should never be NULL
-const std::shared_ptr m_pResMgr;
-};
-
-class ResourceStringIndexAccess : public ResourceIndexAccessBase
-{
-public:
-explicit ResourceStringIndexAccess(const std::shared_ptr& 
pResMgr)
-: ResourceIndexAccessBase(pResMgr) {}
-// XIndexAccess
-virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) 
throw (css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, 
css::uno::RuntimeException, std::exception) override;
-// XElementAccessBase
 virtual css::uno::Type SAL_CALL getElementType(  ) throw 
(css::uno::RuntimeException, std::exception) override
 { return ::cppu::UnoType::get(); };
+private:
+// m_pResMgr should never be NULL
+const std::shared_ptr m_pResMgr;
 };
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: extensions/source

2017-01-01 Thread CaolƔn McNamara
 extensions/source/resource/ResourceIndexAccess.cxx |   38 -
 1 file changed, 38 deletions(-)

New commits:
commit 705b43516215b67683ea0436c42bf5cada7ed445
Author: CaolƃĀ”n McNamara 
Date:   Sun Jan 1 20:30:03 2017 +

so ResourceStringListIndexAccess isn't needed

Change-Id: Ic25fc6f2f8f3e471a90e10c3f2319f40888520e6

diff --git a/extensions/source/resource/ResourceIndexAccess.cxx 
b/extensions/source/resource/ResourceIndexAccess.cxx
index 6f24b2b..2edb7cc 100644
--- a/extensions/source/resource/ResourceIndexAccess.cxx
+++ b/extensions/source/resource/ResourceIndexAccess.cxx
@@ -69,18 +69,6 @@ namespace
 virtual css::uno::Type SAL_CALL getElementType(  ) throw 
(css::uno::RuntimeException, std::exception) override
 { return ::cppu::UnoType::get(); };
 };
-
-class ResourceStringListIndexAccess : public ResourceIndexAccessBase
-{
-public:
-explicit ResourceStringListIndexAccess(const 
std::shared_ptr& pResMgr)
-: ResourceIndexAccessBase(pResMgr) {}
-// XIndexAccess
-virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) 
throw (css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, 
css::uno::RuntimeException, std::exception) override;
-// XElementAccessBase
-virtual css::uno::Type SAL_CALL getElementType(  ) throw 
(css::uno::RuntimeException, std::exception) override
-{ return cppu::UnoType>::get(); };
-};
 }
 
 ResourceIndexAccess::ResourceIndexAccess(Sequence const& rArgs, 
Reference const&)
@@ -140,30 +128,4 @@ Any SAL_CALL 
ResourceStringIndexAccess::getByIndex(sal_Int32 nIdx)
 return makeAny(aId.toString());
 }
 
-Any SAL_CALL ResourceStringListIndexAccess::getByIndex(sal_Int32 nIdx)
-throw (IndexOutOfBoundsException, WrappedTargetException, 
RuntimeException, std::exception)
-{
-if(nIdx > SAL_MAX_UINT16 || nIdx < 0)
-throw IndexOutOfBoundsException();
-SolarMutexGuard aGuard;
-
-if(!m_pResMgr.get())
-throw RuntimeException("resource manager not available");
-
-const ResId aId(static_cast(nIdx), *m_pResMgr);
-aId.SetRT(RSC_STRINGARRAY);
-if(!m_pResMgr->IsAvailable(aId))
-throw RuntimeException("string list resource for id not available");
-const ResStringArray aStringList(aId);
-Sequence aPropList(aStringList.Count());
-for(sal_Int32 nCount = 0; nCount != aPropList.getLength(); ++nCount)
-{
-aPropList[nCount].Name = aStringList.GetString(nCount);
-aPropList[nCount].Handle = -1;
-aPropList[nCount].Value <<= aStringList.GetValue(nCount);
-aPropList[nCount].State = PropertyState_DIRECT_VALUE;
-}
-return makeAny(aPropList);
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: extensions/source

2017-01-01 Thread CaolƔn McNamara
 extensions/source/resource/ResourceIndexAccess.cxx |6 +-
 extensions/source/resource/ResourceIndexAccess.hxx |3 +--
 2 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit e777637ffccd88a7aa51dc93bcf1744eb5367fd5
Author: CaolƃĀ”n McNamara 
Date:   Sun Jan 1 20:28:47 2017 +

so we can drop StringList access from ResourceIndexAccess

Change-Id: Ie855a45f7994e9d58ddecc51b54c25424fc544d6

diff --git a/extensions/source/resource/ResourceIndexAccess.cxx 
b/extensions/source/resource/ResourceIndexAccess.cxx
index f8a35b8..6f24b2b 100644
--- a/extensions/source/resource/ResourceIndexAccess.cxx
+++ b/extensions/source/resource/ResourceIndexAccess.cxx
@@ -97,9 +97,6 @@ Any SAL_CALL ResourceIndexAccess::getByName(const OUString& 
aName)
 case 0:
 xResult.set(new ResourceStringIndexAccess(m_pResMgr));
 break;
-case 1:
-xResult.set(new ResourceStringListIndexAccess(m_pResMgr));
-break;
 default:
 throw NoSuchElementException();
 }
@@ -112,9 +109,8 @@ Sequence SAL_CALL 
ResourceIndexAccess::getElementNames(  )
 static Sequence aResult;
 if( aResult.getLength() == 0)
 {
-aResult.realloc(2);
+aResult.realloc(1);
 aResult[0] = "String";
-aResult[1] = "StringList";
 }
 return aResult;
 }
diff --git a/extensions/source/resource/ResourceIndexAccess.hxx 
b/extensions/source/resource/ResourceIndexAccess.hxx
index 4e84215..fb466f8 100644
--- a/extensions/source/resource/ResourceIndexAccess.hxx
+++ b/extensions/source/resource/ResourceIndexAccess.hxx
@@ -32,9 +32,8 @@ namespace extensions { namespace resource
 /** The ctor takes a sequence with one element: the name of the 
resource, e.g. svt */
 ResourceIndexAccess(css::uno::Sequence< css::uno::Any> const& 
rArgs, css::uno::Reference< css::uno::XComponentContext> const&);
 // XNameAccess
-// The XNameAccess provides access to two named elements:
+// The XNameAccess provides access to one named elements:
 //"String" returns a XIndexAccess to String resources
-//"StringList" returns a XIndexAccess to 
StringList/StringArray resources
 virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) 
throw (css::container::NoSuchElementException, 
css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) 
override;
 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames(  
) throw (css::uno::RuntimeException, std::exception) override;
 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) throw 
(css::uno::RuntimeException, std::exception) override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com

2017-01-01 Thread CaolƔn McNamara
 wizards/com/sun/star/wizards/common/Resource.java |5 -
 1 file changed, 5 deletions(-)

New commits:
commit ae7aaf16abdbba6f84e00ef73862e819b11c82eb
Author: CaolƃĀ”n McNamara 
Date:   Sun Jan 1 20:24:23 2017 +

StringList isn't required or used by wizards

as shown by

commit a96c308e52983b7bc0275e31e50a9b04e5805852
Author: Noel Grandin 
Date:   Wed Dec 17 10:33:26 2014 +0200

java: these fields can be converted to local variables

Change-Id: Ifefb5de196a3e5cbaa8945759da42886c69daacf

Change-Id: I4da6c42e0114a891a6b6af8889c94b4332b0b40b

diff --git a/wizards/com/sun/star/wizards/common/Resource.java 
b/wizards/com/sun/star/wizards/common/Resource.java
index 1715fb23..7158bad 100644
--- a/wizards/com/sun/star/wizards/common/Resource.java
+++ b/wizards/com/sun/star/wizards/common/Resource.java
@@ -49,11 +49,6 @@ public class Resource
 this.xStringIndexAccess = UnoRuntime.queryInterface(
 XIndexAccess.class,
 xNameAccess.getByName("String"));
-XIndexAccess xStringListIndexAccess = UnoRuntime.queryInterface(
-XIndexAccess.class,
-xNameAccess.getByName("StringList"));
-if(xStringListIndexAccess == null)
-throw new Exception("could not initialize 
xStringListIndexAccess");
 if(this.xStringIndexAccess == null)
 throw new Exception("could not initialize xStringIndexAccess");
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: embeddedobj/source

2017-01-01 Thread Julien Nabet
 embeddedobj/source/msole/olecomponent.cxx |2 +-
 embeddedobj/source/msole/olecomponent.hxx |2 +-
 embeddedobj/source/msole/olevisual.cxx|2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 5f757b7b372597d3f632b97b16d4aef6fe08ae1a
Author: Julien Nabet 
Date:   Sun Jan 1 18:32:19 2017 +0100

Typo: GetReccomendedExtent->GetRecommendedExtent

Change-Id: Ic04a9ff115827558f9bc528c100b53bd7ca23486
Reviewed-on: https://gerrit.libreoffice.org/32587
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/embeddedobj/source/msole/olecomponent.cxx 
b/embeddedobj/source/msole/olecomponent.cxx
index dd06e6c..fb0245c 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -1209,7 +1209,7 @@ awt::Size OleComponent::GetCachedExtent( sal_Int64 
nAspect )
 }
 
 
-awt::Size OleComponent::GetReccomendedExtent( sal_Int64 nAspect )
+awt::Size OleComponent::GetRecommendedExtent( sal_Int64 nAspect )
 {
 if ( !m_pNativeImpl->m_pOleObject )
 throw embed::WrongStateException(); // TODO: the object is in wrong 
state
diff --git a/embeddedobj/source/msole/olecomponent.hxx 
b/embeddedobj/source/msole/olecomponent.hxx
index 5b3dc68..a8a2ea8 100644
--- a/embeddedobj/source/msole/olecomponent.hxx
+++ b/embeddedobj/source/msole/olecomponent.hxx
@@ -126,7 +126,7 @@ public:
 
 css::awt::Size GetExtent( sal_Int64 nAspect );
 css::awt::Size GetCachedExtent( sal_Int64 nAspect );
-css::awt::Size GetReccomendedExtent( sal_Int64 nAspect );
+css::awt::Size GetRecommendedExtent( sal_Int64 nAspect );
 
 sal_Int64 GetMiscStatus( sal_Int64 nAspect );
 
diff --git a/embeddedobj/source/msole/olevisual.cxx 
b/embeddedobj/source/msole/olevisual.cxx
index 1acb877..094c4be 100644
--- a/embeddedobj/source/msole/olevisual.cxx
+++ b/embeddedobj/source/msole/olevisual.cxx
@@ -267,7 +267,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( 
sal_Int64 nAspect )
 try
 {
 // third try the size reported by the object
-aSize = m_pOleComponent->GetReccomendedExtent( nAspect 
); // will throw an exception in case of failure
+aSize = m_pOleComponent->GetRecommendedExtent( nAspect 
); // will throw an exception in case of failure
 bSuccess = true;
 }
 catch( const uno::Exception& )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Git commit adds ^M at end of line

2017-01-01 Thread Laurent BP
Laurent BP wrote
> I can remove these ^M in the patch file, but not in source files.

This was may be confusing.
Please find attached my .patch
Like with git log -p, it is full of ^M at the end of lines in the files I
modified: I can see them and remove them in vi with %s/^M//g
However, I can't see them in source files after modification.

0001-Basic-beautify-Examples-with-bascode-tag.patch

  




-
LibreOffice 5.1.4.1
--
View this message in context: 
http://nabble.documentfoundation.org/Git-commit-adds-M-at-end-of-line-tp4204025p4204055.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] cppunit.git: 3 commits - CodingGuideLines.txt Makefile.am src/cppunit src/DllPlugInTester

2017-01-01 Thread Markus Mohrhard
 CodingGuideLines.txt|9 -
 Makefile.am |1 -
 src/DllPlugInTester/Makefile.am |2 +-
 src/cppunit/Makefile.am |2 +-
 4 files changed, 2 insertions(+), 12 deletions(-)

New commits:
commit e43bfbf604f8b4e48b8a30bcfa702fdc5043ba85
Author: Markus Mohrhard 
Date:   Sun Jan 1 19:28:02 2017 +0100

fix the distcheck build and remove refs to deleted files

diff --git a/src/DllPlugInTester/Makefile.am b/src/DllPlugInTester/Makefile.am
index 7586d97..d0409aa 100644
--- a/src/DllPlugInTester/Makefile.am
+++ b/src/DllPlugInTester/Makefile.am
@@ -1,4 +1,4 @@
-EXTRA_DIST = DllPlugInTester.dsp DllPlugInTesterTest.dsp
+EXTRA_DIST =
 
 AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
 
diff --git a/src/cppunit/Makefile.am b/src/cppunit/Makefile.am
index 7be8b4f..7134bad 100644
--- a/src/cppunit/Makefile.am
+++ b/src/cppunit/Makefile.am
@@ -2,7 +2,7 @@
 # $Id: Makefile.am,v 1.44 2005-06-14 21:28:46 blep Exp $
 #
 
-EXTRA_DIST = cppunit.dsp cppunit_dll.dsp DllMain.cpp
+EXTRA_DIST = DllMain.cpp
 AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
 
 lib_LTLIBRARIES = libcppunit.la
commit ffea468d58ebef7ccacd925eb9268a0148156851
Author: Markus Mohrhard 
Date:   Sun Jan 1 19:27:21 2017 +0100

update coding guidelines

diff --git a/CodingGuideLines.txt b/CodingGuideLines.txt
index d889fd0..b648513 100644
--- a/CodingGuideLines.txt
+++ b/CodingGuideLines.txt
@@ -13,18 +13,9 @@ CppUnit's coding guidelines for portability:
 
 - don't use the mutable keyword, instead do a const cast.
 
-- don't use templatized member functions (template method declared inside a
-  class), instead declares them as simple template functions (even
-  mainstream compiler such as VC++ 6 as trouble with them).
-
 - don't use default parameter value in template function. Not supported
   by all compiler (on OS/390 for instance).
 
-In brief, it should be possible to compile CppUnit on a C++ compiler that do
-not have the following features:
-- templatized member functions (that is a template function declared within a
-  class).
-
 As such, usage of those features should always be optional.
 
 CppUnit's version control system management
commit 51b9f42694914f999ddb51bc11be069002032211
Author: Markus Mohrhard 
Date:   Sat Dec 31 17:06:02 2016 +0100

remove reference to deleted file

diff --git a/Makefile.am b/Makefile.am
index d78f862..aa33e15 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,7 +35,6 @@ m4internal = \
m4/ax_cxx_have_isfinite.m4 \
m4/ax_cxx_have_sstream.m4 \
m4/ax_cxx_namespaces.m4 \
-   m4/ax_cxx_rtti.m4 \
m4/ax_cxx_compile_stdcxx_11.m4 \
m4/ax_prefix_config_h.m4 \
m4/bb_enable_doxygen.m4 \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - xmloff/source

2017-01-01 Thread CaolƔn McNamara
 xmloff/source/text/txtparae.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 8acf0a2157082a05fe912e849d3607d30eea2516
Author: CaolƃĀ”n McNamara 
Date:   Thu Dec 1 21:15:00 2016 +

Resolves: tdf#104812 crash on exporting odp

was crashtesting: a gadzillion failures on export to odp

e.g. fdo35235-1.odp

(cherry picked from commit f1c08d6503442ec257aa8535dfbe3743c743e4a0)
(cherry picked from commit 09b856289c44c0fe792082b681d48cf5ee70d808)

Change-Id: I259cdc9ed073be2ad7d5208cd943d4f193f09c16
Reviewed-on: https://gerrit.libreoffice.org/32275
Tested-by: Jenkins 
Reviewed-by: TamƃĀ”s Zolnai 

diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 3ff7615..481d474 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -1640,6 +1640,9 @@ void XMLTextParagraphExport::exportText(
 GetExport().GetShapeExport(); // make sure the graphics styles family
   // is added
 Reference < XEnumerationAccess > xEA( rText, UNO_QUERY );
+if( ! xEA.is() )
+return;
+
 Reference < XEnumeration > xParaEnum(xEA->createEnumeration());
 Reference < XPropertySet > xPropertySet( rText, UNO_QUERY );
 Reference < XTextSection > xBaseSection;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-01-01 Thread kerem
 include/svx/svdmodel.hxx   |4 -
 svx/source/svdraw/svdmodel.cxx |   88 -
 2 files changed, 46 insertions(+), 46 deletions(-)

New commits:
commit 9bbc168c29d3f48839d40173f5467228ce9a7268
Author: kerem 
Date:   Sat Dec 31 17:34:30 2016 +0200

fdo#39674: translated German to English in svdmodel.cxx

Change-Id: I48992d2738de40060239b4c25c4adbe64c97b4be
Reviewed-on: https://gerrit.libreoffice.org/32537
Reviewed-by: TamƃĀ”s Zolnai 
Tested-by: TamƃĀ”s Zolnai 

diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 79337a8..71c0e3e 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -155,7 +155,7 @@ protected:
 Fraction   aUIScale; // see above
 OUString   aUIUnitStr;   // see above
 Fraction   aUIUnitFact;  // see above
-intnUIUnitKomma; // see above
+intnUIUnitComma; // see above
 
 SdrLayerAdmin*  pLayerAdmin;
 SfxItemPool*pItemPool;
@@ -175,7 +175,7 @@ protected:
 SdrUndoGroup*   pAktUndoGroup;  // for deeper
 sal_uInt16  nUndoLevel; // undo nesting
 boolbMyPool:1;// to clean up pMyPool from 303a
-boolbUIOnlyKomma:1; // see eUIUnit
+boolbUIOnlyComma:1; // see eUIUnit
 boolmbUndoEnabled:1;  // If false no undo is recorded or 
we are during the execution of an undo action
 boolbExtColorTable:1; // ne separate ColorTable
 boolmbChanged:1;
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 131d2ad..cb3ed86 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -122,8 +122,8 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, 
::comphelper::IEmbeddedHelper* _pEmbe
 eObjUnit=SdrEngineDefaults::GetMapUnit();
 eUIUnit=FUNIT_MM;
 aUIScale=Fraction(1,1);
-nUIUnitKomma=0;
-bUIOnlyKomma=false;
+nUIUnitComma=0;
+bUIOnlyComma=false;
 pLayerAdmin=nullptr;
 pItemPool=pPool;
 bMyPool=false;
@@ -930,23 +930,23 @@ void SdrModel::ImpSetUIUnit()
 }
 
 // set start values
-nUIUnitKomma = 0;
+nUIUnitComma = 0;
 sal_Int64 nMul(1);
 sal_Int64 nDiv(1);
 
 // normalize on meters resp. inch
 switch (eObjUnit)
 {
-case MapUnit::Map100thMM   : nUIUnitKomma+=5; break;
-case MapUnit::Map10thMM: nUIUnitKomma+=4; break;
-case MapUnit::MapMM : nUIUnitKomma+=3; break;
-case MapUnit::MapCM : nUIUnitKomma+=2; break;
-case MapUnit::Map1000thInch: nUIUnitKomma+=3; break;
-case MapUnit::Map100thInch : nUIUnitKomma+=2; break;
-case MapUnit::Map10thInch  : nUIUnitKomma+=1; break;
-case MapUnit::MapInch   : nUIUnitKomma+=0; break;
+case MapUnit::Map100thMM   : nUIUnitComma+=5; break;
+case MapUnit::Map10thMM: nUIUnitComma+=4; break;
+case MapUnit::MapMM : nUIUnitComma+=3; break;
+case MapUnit::MapCM : nUIUnitComma+=2; break;
+case MapUnit::Map1000thInch: nUIUnitComma+=3; break;
+case MapUnit::Map100thInch : nUIUnitComma+=2; break;
+case MapUnit::Map10thInch  : nUIUnitComma+=1; break;
+case MapUnit::MapInch   : nUIUnitComma+=0; break;
 case MapUnit::MapPoint  : nDiv=72; break;  // 1Pt   = 
1/72"
-case MapUnit::MapTwip   : nDiv=144; nUIUnitKomma++; break; // 
1Twip = 1/1440"
+case MapUnit::MapTwip   : nDiv=144; nUIUnitComma++; break; // 
1Twip = 1/1440"
 case MapUnit::MapPixel  : break;
 case MapUnit::MapSysFont: break;
 case MapUnit::MapAppFont: break;
@@ -964,21 +964,21 @@ void SdrModel::ImpSetUIUnit()
 {
 case FUNIT_NONE   : break;
 // metric
-case FUNIT_100TH_MM: nUIUnitKomma-=5; break;
-case FUNIT_MM : nUIUnitKomma-=3; break;
-case FUNIT_CM : nUIUnitKomma-=2; break;
-case FUNIT_M  : nUIUnitKomma+=0; break;
-case FUNIT_KM : nUIUnitKomma+=3; break;
+case FUNIT_100TH_MM: nUIUnitComma-=5; break;
+case FUNIT_MM : nUIUnitComma-=3; break;
+case FUNIT_CM : nUIUnitComma-=2; break;
+case FUNIT_M  : nUIUnitComma+=0; break;
+case FUNIT_KM : nUIUnitComma+=3; break;
 // Inch
-case FUNIT_TWIP   : nMul=144; nUIUnitKomma--;  break;  // 1Twip = 
1/1440"
+case FUNIT_TWIP   : nMul=144; nUIUnitComma--;  break;  // 1Twip = 
1/1440"
 case FUNIT_POINT  : nMul=72; break;// 1Pt   = 1/72"
 case FUNIT_PICA   : nMul=6;  break;// 1Pica = 1/6"
 case FUNIT_INCH   : break; // 1"= 1"
 case FUNIT_FOOT   : nDiv*=12;break;// 1Ft   = 12"
-case FUNIT_MILE   : nDiv*=6336; nUIUnitKomma++; break; // 1mile = 
63360"

Re: Git commit adds ^M at end of line

2017-01-01 Thread Laurent BP
> Sound a lot like you made the git init or git clone command from a msdos
prompt and not cygwin.
Thanks Jan for your answer. But I'm on Linux system (OpenSuse 13.2), I'm
editing file with KWrite and I launched git from a Konsole terminal. My
previous commit did not suffer from this default:
https://gerrit.libreoffice.org/#/c/32519/
My previous commit on help was also correct
https://gerrit.libreoffice.org/#/c/30180/

I can remove these ^M in the patch file, but not in source files.



-
LibreOffice 5.1.4.1
--
View this message in context: 
http://nabble.documentfoundation.org/Git-commit-adds-M-at-end-of-line-tp4204025p4204050.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sal/textenc

2017-01-01 Thread CaolƔn McNamara
 sal/textenc/tcvtjp6.tab |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0f4eb22d5f3a86af9e5f8042c69e4ddf4a350b93
Author: CaolƃĀ”n McNamara 
Date:   Sun Jan 1 17:26:44 2017 +

ofz#358 SJIS_84 table mnLeadEnd is out by one

sjis 82 and 83 correctly denote the last index available
while 84 reports one past the last available index

0x84BE is the last value to map, not 0x84BF

Change-Id: Idcadc2d554ee59586f6e2f2775301fe69c94d55a

diff --git a/sal/textenc/tcvtjp6.tab b/sal/textenc/tcvtjp6.tab
index 3b98079..1dd7789 100644
--- a/sal/textenc/tcvtjp6.tab
+++ b/sal/textenc/tcvtjp6.tab
@@ -162,7 +162,7 @@ static ImplDBCSToUniLeadTab const aSJISUniLeadTab[256] =
 {  0, 0x40, 0xFC, aImplDBCSToUniTab_MS932_81 }, /* 0x81 */
 {  0, 0x4F, 0xF1, aImplDBCSToUniTab_SJIS_82 },  /* 0x82 */
 {  0, 0x40, 0xD6, aImplDBCSToUniTab_SJIS_83 },  /* 0x83 */
-{  0, 0x40, 0xBF, aImplDBCSToUniTab_SJIS_84 },  /* 0x84 */
+{  0, 0x40, 0xBE, aImplDBCSToUniTab_SJIS_84 },  /* 0x84 */
 {  0,1,0, aImplDoubleByteIdentifierTab },   /* 0x85 */ /* 
We convert this as double byte */
 {  0,1,0, aImplDoubleByteIdentifierTab },   /* 0x86 */ /* 
We convert this as double byte */
 {  0, 0x40, 0x9C, aImplDBCSToUniTab_MS932_87 }, /* 0x87 */ /* 
We use the MS table for better MS compatibility */
@@ -734,7 +734,7 @@ static ImplDBCSToUniLeadTab const aMS932UniLeadTab[256] =
 {  0, 0x40, 0xFC, aImplDBCSToUniTab_MS932_81 }, /* 0x81 */
 {  0, 0x4F, 0xF1, aImplDBCSToUniTab_SJIS_82 },  /* 0x82 */
 {  0, 0x40, 0xD6, aImplDBCSToUniTab_SJIS_83 },  /* 0x83 */
-{  0, 0x40, 0xBF, aImplDBCSToUniTab_SJIS_84 },  /* 0x84 */
+{  0, 0x40, 0xBE, aImplDBCSToUniTab_SJIS_84 },  /* 0x84 */
 {  0,1,0, aImplDoubleByteIdentifierTab },   /* 0x85 */ /* 
We convert this as double byte */
 {  0,1,0, aImplDoubleByteIdentifierTab },   /* 0x86 */ /* 
We convert this as double byte */
 {  0, 0x40, 0x9C, aImplDBCSToUniTab_MS932_87 }, /* 0x87 */
@@ -1291,7 +1291,7 @@ static ImplDBCSToUniLeadTab const 
aAPPLEJAPANESEUniLeadTab[256] =
 {  0, 0x40, 0xFC, aImplDBCSToUniTab_MS932_81 }, /* 0x81 */
 {  0, 0x4F, 0xF1, aImplDBCSToUniTab_SJIS_82 },  /* 0x82 */
 {  0, 0x40, 0xD6, aImplDBCSToUniTab_SJIS_83 },  /* 0x83 */
-{  0, 0x40, 0xBF, aImplDBCSToUniTab_SJIS_84 },  /* 0x84 */
+{  0, 0x40, 0xBE, aImplDBCSToUniTab_SJIS_84 },  /* 0x84 */
 {  0, 0x40, 0xF4, aImplDBCSToUniTab_APPLEJAPANESE_85 }, /* 0x85 */
 {  0, 0x40, 0xD2, aImplDBCSToUniTab_APPLEJAPANESE_86 }, /* 0x86 */
 {  0, 0x40, 0xFA, aImplDBCSToUniTab_APPLEJAPANESE_87 }, /* 0x87 */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source

2017-01-01 Thread TamƔs Zolnai
 sc/source/ui/Accessibility/AccessibleDocument.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8e776ddb0a65fcf2be72166fa6da1bde6a885e91
Author: TamƃĀ”s Zolnai 
Date:   Fri Dec 16 01:46:52 2016 +

tdf#71435: Accessible caret-moved events are missing when "freeze" is 
enabled

Two accessible document is created when "freeze" options is
enabled. meSplitPos identifies which accessible document handle
which part of the window. We should handle events only in that
accessible document which handles the active part.

Change-Id: Ic9674344951f620546dd272beaad796de611d258
Reviewed-on: https://gerrit.libreoffice.org/32065
Tested-by: Jenkins 
Reviewed-by: TamƃĀ”s Zolnai 
(cherry picked from commit 06ea887f8ba34a628d7641eab210501f7bd2493d)
Reviewed-on: https://gerrit.libreoffice.org/32078
Reviewed-by: CaolƃĀ”n McNamara 
Tested-by: CaolƃĀ”n McNamara 

diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx 
b/sc/source/ui/Accessibility/AccessibleDocument.cxx
index e05f663..0b1982d 100644
--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx
@@ -1588,7 +1588,7 @@ void ScAccessibleDocument::Notify( SfxBroadcaster& rBC, 
const SfxHint& rHint )
 }
 else if ((pSimpleHint->GetId() == SC_HINT_ACC_ENTEREDITMODE)) // this 
event comes only on creating edit field of a cell
 {
-if (mpViewShell->GetViewData().HasEditView(meSplitPos))
+if (mpViewShell->GetViewData().GetEditActivePart() == meSplitPos)
 {
 ScViewData& rViewData = mpViewShell->GetViewData();
 const EditEngine* pEditEng = 
rViewData.GetEditView(meSplitPos)->GetEditEngine();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - oox/source

2017-01-01 Thread Andras Timar
 oox/source/export/drawingml.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c6f34422a444cb8be3ac522424a15b3223e161ff
Author: Andras Timar 
Date:   Wed Dec 28 09:56:59 2016 +0100

tdf#104539 dir attribute of outerShdw has to be non-negative

Change-Id: Ic6f1c8555eb8d137ced2f4e87baa866df84c69ac
Reviewed-on: https://gerrit.libreoffice.org/32470
Tested-by: Jenkins 
Reviewed-by: CaolƃĀ”n McNamara 
Tested-by: CaolƃĀ”n McNamara 

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 8d02565..73bf449 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2982,7 +2982,7 @@ void DrawingML::WriteShapeEffects( const Reference< 
XPropertySet >& rXPropSet )
 aShadowAttribsGrabBag[0].Name = "dist";
 aShadowAttribsGrabBag[0].Value = Any(static_cast< sal_Int32 
>(sqrt(dX*dX + dY*dY) * 360));
 aShadowAttribsGrabBag[1].Name = "dir";
-aShadowAttribsGrabBag[1].Value = Any(static_cast< sal_Int32 
>(atan2(dY,dX) * 180 * 6 / M_PI));
+aShadowAttribsGrabBag[1].Value = Any((static_cast< sal_Int32 
>(atan2(dY,dX) * 180 * 6 / M_PI) + 2160) % 2160);
 
 aShadowGrabBag[0].Name = "Attribs";
 aShadowGrabBag[0].Value = Any(aShadowAttribsGrabBag);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sfx2/source

2017-01-01 Thread Julien Nabet
 sfx2/source/dialog/dinfdlg.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 342ed30e08ddf625e9c6bb35ebd772b4ec6a213f
Author: Julien Nabet 
Date:   Sat Dec 31 12:29:14 2016 +0100

tdf#105011, tdf#104795: copy string until its end if there's no comma

5  0x2aaab055f81e in rtl::OUString::copy (this=0x7fff29d0, 
beginIndex=3, count=-4) at 
/home/julien/lo/libreoffice/include/rtl/ustring.hxx:2223
6  0x2aaab070acd2 in (anonymous namespace)::GetContentPart 
(_rRawString="CN=timur.davlets...@gmail.com", _rPartId="CN")
at /home/julien/lo/libreoffice/sfx2/source/dialog/dinfdlg.cxx:748
7  0x2aaab070dd85 in SfxDocumentPage::ImplUpdateSignatures 
(this=0x5ca2e0b0) at 
/home/julien/lo/libreoffice/sfx2/source/dialog/dinfdlg.cxx:901

so do the same as GetContentPart from uui/source/secmacrowarnings.cxx
(I suppose we should avoid the redundancy but that's another story)

Change-Id: Ief3ce1cce7035fb572778bdee02a1073b7dfe1c1
Reviewed-on: https://gerrit.libreoffice.org/32530
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 
(cherry picked from commit 5e149b630bd837ca6c8cae609a5c148f25f9ee82)
Reviewed-on: https://gerrit.libreoffice.org/32533
Reviewed-by: CaolƃĀ”n McNamara 
Tested-by: CaolƃĀ”n McNamara 

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index c801d58..3ce89ec 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -745,8 +745,10 @@ namespace
 ++nContStart; // now its start of content, directly after Id
 
 sal_Int32  nContEnd = _rRawString.indexOf( ',', nContStart );
-
-s = _rRawString.copy( nContStart, nContEnd - nContStart );
+if (nContEnd != -1)
+s = _rRawString.copy( nContStart, nContEnd - nContStart );
+else
+s = _rRawString.copy(nContStart);
 }
 
 return s;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - oox/source

2017-01-01 Thread Andras Timar
 oox/source/export/drawingml.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7f94dfc93cdade37f371d0c583ff6e9b082737dc
Author: Andras Timar 
Date:   Wed Dec 28 09:56:59 2016 +0100

tdf#104539 dir attribute of outerShdw has to be non-negative

Change-Id: Ic6f1c8555eb8d137ced2f4e87baa866df84c69ac
Reviewed-on: https://gerrit.libreoffice.org/32471
Tested-by: Jenkins 
Reviewed-by: CaolƃĀ”n McNamara 
Tested-by: CaolƃĀ”n McNamara 

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index bfbd078..2e12ad5 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2959,7 +2959,7 @@ void DrawingML::WriteShapeEffects( const Reference< 
XPropertySet >& rXPropSet )
 aShadowAttribsGrabBag[0].Name = "dist";
 aShadowAttribsGrabBag[0].Value = Any(static_cast< sal_Int32 
>(sqrt(dX*dX + dY*dY) * 360));
 aShadowAttribsGrabBag[1].Name = "dir";
-aShadowAttribsGrabBag[1].Value = Any(static_cast< sal_Int32 
>(atan2(dY,dX) * 180 * 6 / M_PI));
+aShadowAttribsGrabBag[1].Value = Any((static_cast< sal_Int32 
>(atan2(dY,dX) * 180 * 6 / M_PI) + 2160) % 2160);
 
 aShadowGrabBag[0].Name = "Attribs";
 aShadowGrabBag[0].Value = Any(aShadowAttribsGrabBag);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - framework/source

2017-01-01 Thread Maxim Monastirsky
 framework/source/uielement/menubarmanager.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 0690b64efac12eba37af78e66f8fff5e24c91c96
Author: Maxim Monastirsky 
Date:   Thu Dec 22 01:03:31 2016 +0200

tdf#104818 Show the right label when a11y enabled

Change-Id: If4da5b9435e96e3830bac3d01e06f7ddc87754eb
(cherry picked from commit c9303b98ad69213fe346d0657a8bca5ac8fa3bd7)
Reviewed-on: https://gerrit.libreoffice.org/32377
Tested-by: Jenkins 
Reviewed-by: CaolƃĀ”n McNamara 
Tested-by: CaolƃĀ”n McNamara 

diff --git a/framework/source/uielement/menubarmanager.cxx 
b/framework/source/uielement/menubarmanager.cxx
index daa0a45..0c2be0a 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1176,11 +1176,6 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const 
Reference< XFrame >& rF
 {
 sal_uInt16 nItemId = FillItemCommand(aItemCommand,pMenu, i );
 
-// Command can be just an alias to another command.
-OUString aRealCommand = 
vcl::CommandInfoProvider::Instance().GetRealCommandForCommand( aItemCommand, 
m_xFrame );
-if ( !aRealCommand.isEmpty() )
-aItemCommand = aRealCommand;
-
 // Set module identifier when provided from outside
 if ( !rModuleIdentifier.isEmpty() )
 {
@@ -1195,6 +1190,11 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const 
Reference< XFrame >& rF
 pMenu->SetItemText( nItemId, RetrieveLabelFromCommand( 
aItemCommand ));
 }
 
+// Command can be just an alias to another command.
+OUString aRealCommand = 
vcl::CommandInfoProvider::Instance().GetRealCommandForCommand( aItemCommand, 
m_xFrame );
+if ( !aRealCommand.isEmpty() )
+aItemCommand = aRealCommand;
+
 Reference< XDispatch > xDispatch;
 Reference< XStatusListener > xStatusListener;
 PopupMenu* pPopup = pMenu->GetPopupMenu( nItemId );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/gbuild-to-ide

2017-01-01 Thread jan Iversen
 bin/gbuild-to-ide |   19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit ae4f8ac9a16b7a0631124272d08c625e86c432d8
Author: jan Iversen 
Date:   Sun Jan 1 18:26:37 2017 +0100

gbuild-to-ide performance optimize parser

Change-Id: I93c81e027269830af7d6b2c9df2f1b0f0194880e

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index e12e0fa..978fd17 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -108,26 +108,26 @@ class GbuildParser:
 with open(os.path.join(self.workdir, 'GbuildToJson', jsontype, 
jsonfilename), 'r') as f:
 jsondata = json.load(f)
 
-(foundincludes, foundisystem) = 
self.__split_includes(jsondata['INCLUDE'])
-match = 
self.buildpattern[jsontype].match(os.path.basename(jsondata['MAKEFILE'])).group(1)
+(foundincludes, foundisystem) = 
GbuildParser.__split_includes(jsondata['INCLUDE'])
+match = 
GbuildParser.buildpattern[jsontype].match(os.path.basename(jsondata['MAKEFILE'])).group(1)
 newObj = GbuildLinkTarget(match,
   
os.path.dirname(jsondata['MAKEFILE']),
   foundincludes,
   foundisystem,
-  
self.__split_defs(jsondata['DEFS']),
-  
self.__split_objs(jsondata['CXXOBJECTS']),
-  
self.__split_flags(jsondata['CXXFLAGS'], jsondata['CXXFLAGSAPPEND']),
+  
GbuildParser.__split_defs(jsondata['DEFS']),
+  
GbuildParser.__split_objs(jsondata['CXXOBJECTS']),
+  
GbuildParser.__split_flags(jsondata['CXXFLAGS'], jsondata['CXXFLAGSAPPEND']),
   
jsondata['LINKED_LIBS'].strip().split(' '),
   jsondata['ASMOBJECTS'],
-  
self.__split_flags(jsondata['CFLAGS'], jsondata['CFLAGSAPPEND']),
+  
GbuildParser.__split_flags(jsondata['CFLAGS'], jsondata['CFLAGSAPPEND']),
   jsondata['GENCOBJECTS'],
   jsondata['GENCXXOBJECTS'],
   jsondata['ILIBTARGET'],
   jsondata['LINKED_STATIC_LIBS'],
   jsondata['LINKTARGET'],
-  
self.__split_flags(jsondata['OBJCFLAGS'], jsondata['OBJCFLAGSAPPEND']),
+  
GbuildParser.__split_flags(jsondata['OBJCFLAGS'], jsondata['OBJCFLAGSAPPEND']),
   jsondata['OBJCOBJECTS'],
-  
self.__split_flags(jsondata['OBJCXXFLAGS'], jsondata['OBJCXXFLAGSAPPEND']),
+  
GbuildParser.__split_flags(jsondata['OBJCXXFLAGS'], 
jsondata['OBJCXXFLAGSAPPEND']),
   jsondata['OBJCXXOBJECTS'],
   jsondata['YACCOBJECTS'],
   jsontype)
@@ -154,8 +154,7 @@ class GbuildParser:
 class IdeIntegrationGenerator:
 
 def __init__(self, gbuildparser, ide):
-self.gbuildparser = gbuildparser
-self.ide = ide
+(self.gbuildparser, self.ide) = (gbuildparser, ide)
 
 def emit(self):
 pass
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2017-01-01 Thread Gabor Kelemen
 source/text/simpress/01/effectoptionstext.xhp |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 0333438951822fdb3300fdfffca07697aca108c1
Author: Gabor Kelemen 
Date:   Sun Jan 1 17:34:11 2017 +0100

Fix ahelps and bookmark on the Text Animation page

of the Effect Options window

Change-Id: I426118e41af06e017196ea17bf3c102f5f2ff3c3
Reviewed-on: https://gerrit.libreoffice.org/32585
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/source/text/simpress/01/effectoptionstext.xhp 
b/source/text/simpress/01/effectoptionstext.xhp
index 43c37c5..4f9f167 100644
--- a/source/text/simpress/01/effectoptionstext.xhp
+++ b/source/text/simpress/01/effectoptionstext.xhp
@@ -30,12 +30,13 @@
 
 
 
+
 Text Animation
 
 Specifies the text animation settings for the current effect in the 
Effect Options 
dialog.
 
 Group text
-Specifies how multiple paragraphs are 
animated:
+Specifies how 
multiple paragraphs are animated:
 
 
 
@@ -52,14 +53,14 @@
 
 
 Automatically after
-If "Group text - By 1st level paragraphs" is 
selected, the paragraphs are animated one after the other.
+If "Group text - By 
1st level paragraphs" is selected, the paragraphs are animated one after the 
other.
 
-Enter an additional delay in seconds to 
animate subsequent paragraphs.
+Enter an 
additional delay in seconds to animate subsequent 
paragraphs.
 
 Animate attached shape
-Deselect this box to animate only the text, 
not the shape.
+Deselect this 
box to animate only the text, not the shape.
 
 In reverse order
-Animates the paragraphs in reverse 
order.
+Animates the 
paragraphs in reverse order.
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-01-01 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f33aa5bc3af5de14cc5286f2655470474f22465c
Author: Gabor Kelemen 
Date:   Sun Jan 1 17:34:11 2017 +0100

Updated core
Project: help  0333438951822fdb3300fdfffca07697aca108c1

Fix ahelps and bookmark on the Text Animation page

of the Effect Options window

Change-Id: I426118e41af06e017196ea17bf3c102f5f2ff3c3
Reviewed-on: https://gerrit.libreoffice.org/32585
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index 139645b..0333438 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 139645b43e947cad2e6bbb89d7901427e8e3edc4
+Subproject commit 0333438951822fdb3300fdfffca07697aca108c1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - helpcontent2

2017-01-01 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a4973c22fc114661d77566038a3cc972745f557e
Author: Gabor Kelemen 
Date:   Sun Jan 1 17:33:25 2017 +0100

Updated core
Project: help  139645b43e947cad2e6bbb89d7901427e8e3edc4

Fix ahelps and bookmark on the Timing page

of the Effect Options window, plus one inconsistency

Change-Id: Ib8cd038c6dfcb4dfbb838f05945074b374b9127f
Reviewed-on: https://gerrit.libreoffice.org/32584
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index 1672ea5..139645b 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 1672ea56c2ca17e11e47dc6ee0b54f6c38a5b72b
+Subproject commit 139645b43e947cad2e6bbb89d7901427e8e3edc4
commit 635b42814ddb1a327489a3a333ee227a8927aadf
Author: Gabor Kelemen 
Date:   Sun Jan 1 17:25:16 2017 +0100

Updated core
Project: help  1672ea56c2ca17e11e47dc6ee0b54f6c38a5b72b

Fix ahelps and bookmark on the Effect page

of the Effect Options window

Change-Id: I951f2d36283be6271ffe115ab53cfaf1d1f89104
Reviewed-on: https://gerrit.libreoffice.org/32583
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index cb35be6..1672ea5 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit cb35be610c66fff9c7a91c264b052dfe3d5c
+Subproject commit 1672ea56c2ca17e11e47dc6ee0b54f6c38a5b72b
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: 2 commits - source/text

2017-01-01 Thread Gabor Kelemen
 source/text/simpress/01/effectoptionseffect.xhp |   15 ---
 source/text/simpress/01/effectoptionstiming.xhp |   19 ++-
 2 files changed, 18 insertions(+), 16 deletions(-)

New commits:
commit 139645b43e947cad2e6bbb89d7901427e8e3edc4
Author: Gabor Kelemen 
Date:   Sun Jan 1 17:33:25 2017 +0100

Fix ahelps and bookmark on the Timing page

of the Effect Options window, plus one inconsistency

Change-Id: Ib8cd038c6dfcb4dfbb838f05945074b374b9127f
Reviewed-on: https://gerrit.libreoffice.org/32584
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/source/text/simpress/01/effectoptionstiming.xhp 
b/source/text/simpress/01/effectoptionstiming.xhp
index b7cb93c..8af18ef 100644
--- a/source/text/simpress/01/effectoptionstiming.xhp
+++ b/source/text/simpress/01/effectoptionstiming.xhp
@@ -29,11 +29,12 @@
 
 
 
+
 Timing
 
 Specifies the timing for the current effect in the Effect Options 
dialog.
 Start
-Displays the start property of the selected 
animation effect. The following start properties are 
available:
+Displays the 
start property of the selected animation effect. The following start 
properties are available:
 
 
 
@@ -49,11 +50,11 @@
 
 
 Delay
-Specifies an additional delay of n seconds 
until the effect starts.
-Speed
-Specifies the duration of the 
effect.
+Specifies an 
additional delay of n seconds until the effect starts.
+Duration
+Specifies the 
duration of the effect.
 Repeat
-Specifies whether and how to repeat the 
current effect. Enter the number of repeats, or select from the 
list:
+Specifies 
whether and how to repeat the current effect. Enter the number of 
repeats, or select from the list:
 
 
 
@@ -69,11 +70,11 @@
 
 
 Rewind when done playing
-Specifies whether to let the animated shape 
return to its starting state after the animation ends.
+Specifies whether to 
let the animated shape return to its starting state after the animation 
ends.
 Animate as part of click 
sequence
-Specifies whether to let the animation start 
in the normal click sequence.
+Specifies 
whether to let the animation start in the normal click 
sequence.
 Start effect on click of
-Specifies whether to let the animation start 
when a specified shape is clicked.
-Select the 
shape by its name from the list box.
+Specifies 
whether to let the animation start when a specified shape is 
clicked.
+Select the 
shape by its name from the list box.
 
 
commit 1672ea56c2ca17e11e47dc6ee0b54f6c38a5b72b
Author: Gabor Kelemen 
Date:   Sun Jan 1 17:25:16 2017 +0100

Fix ahelps and bookmark on the Effect page

of the Effect Options window

Change-Id: I951f2d36283be6271ffe115ab53cfaf1d1f89104
Reviewed-on: https://gerrit.libreoffice.org/32583
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/source/text/simpress/01/effectoptionseffect.xhp 
b/source/text/simpress/01/effectoptionseffect.xhp
index 4f68ae4..b0da779 100644
--- a/source/text/simpress/01/effectoptionseffect.xhp
+++ b/source/text/simpress/01/effectoptionseffect.xhp
@@ -29,13 +29,14 @@
 
 
 
+
 Effect
 
 Specifies the settings and enhancements for the current effect in 
the Effect Options 
dialog.
 Settings
 For 
some effects, the settings can be specified on the Effect tab 
page.
-Direction
-Specifies the direction for the 
effect.
+Direction
+Specifies the direction 
for the effect.
 Accelerated start
 Enable this option to assign a gradually increasing 
speed to the start of the effect.
 Decelerated end
@@ -43,7 +44,7 @@
 Enhancements
 Specifies the enhancements for the current effect.
 Sound
-Select a sound from the Gallery or select one 
of the special entries.
+Select a sound 
from the Gallery or select one of the special entries.
 
 
 
@@ -62,7 +63,7 @@
 Plays the selected sound file.
 
 After animation
-Select a color to be shown after the 
animation ends, or select another after-effect from the 
list:
+Select a color 
to be shown after the animation ends, or select another after-effect from the 
list:
 
 
 
@@ -82,9 +83,9 @@
 
 
 Dim color
-Select the dim color.
+Select the 
dim color.
 Text animation
-Select the animation mode for the text of the 
current shape:
+Select 
the animation mode for the text of the current shape:
 
 
 
@@ -100,6 +101,6 @@
 
 
 Delay between characters
-Specifies the percentage of delay between 
animations of words or letters.
+Specifies the 
percentage of delay between animations of words or letters.
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-01-01 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d63289e4239db8c8be37870f85f6ecc67948fe7e
Author: Gabor Kelemen 
Date:   Sun Jan 1 13:35:22 2017 +0100

Updated core
Project: help  cb35be610c66fff9c7a91c264b052dfe3d5c

Fix old numeric ahelps

Change-Id: Ic30703d775685c455f826ff278ddff1dd8922604
Reviewed-on: https://gerrit.libreoffice.org/32582
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/helpcontent2 b/helpcontent2
index f59c4d4..cb35be6 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f59c4d42dc78c25641c7ee9da62abb49c313f93a
+Subproject commit cb35be610c66fff9c7a91c264b052dfe3d5c
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2017-01-01 Thread Gabor Kelemen
 source/text/shared/02/01170101.xhp |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit cb35be610c66fff9c7a91c264b052dfe3d5c
Author: Gabor Kelemen 
Date:   Sun Jan 1 13:35:22 2017 +0100

Fix old numeric ahelps

Change-Id: Ic30703d775685c455f826ff278ddff1dd8922604
Reviewed-on: https://gerrit.libreoffice.org/32582
Reviewed-by: Gabor Kelemen 
Tested-by: Gabor Kelemen 

diff --git a/source/text/shared/02/01170101.xhp 
b/source/text/shared/02/01170101.xhp
index 2e86736..7651243 100644
--- a/source/text/shared/02/01170101.xhp
+++ b/source/text/shared/02/01170101.xhp
@@ -526,7 +526,7 @@
 
 Text typeUFI: now renamed to Text 
Type, see #i24386#UFI: see dba spec 
prop_browser_enhancements.sxw
- Allows you to use line breaks and 
formatting in a control field, such as a text box or label. To manually enter a 
line break, press the Enter key. Select "Multi-line with formatting" to enter 
formatted text.
+ Allows you to use line breaks and 
formatting in a control field, such as a text box or label. To manually enter a 
line break, press the Enter key. Select "Multi-line with formatting" to enter 
formatted text.
  If you select the text type "Multi-line with formatting", you cannot 
bind this control to a database field.
  This control is named "Multiline input" for a text column inside a 
table control.
   
@@ -548,17 +548,17 @@
   
 
 Hide selectionUFI: see dba spec 
form_controls_interop_1.sxw
- Specifies whether a text selection on a control 
remains selected when a the focus is no longer on a control. If you set 
Hide selection to "No", the selected text remains selected when 
the focus is no longer on the control that contains the text.
+ Specifies 
whether a text selection on a control remains selected when a the focus is no 
longer on a control. If you set Hide selection to "No", 
the selected text remains selected when the focus is no longer on the control 
that contains the text.
   
   
 
 StyleUFI: see dba spec 
form_controls_interop_1.sxw
- Specifies whether Check boxes and Option buttons 
are displayed in a 3D look (default) or a flat look.
+ Specifies whether 
Check boxes and Option buttons are displayed in a 3D look (default) or a flat 
look.
   
   
 
 Border colorUFI: see dba spec 
form_controls_interop_1.sxw
- Specifies the border color for controls that have 
the Border property set to "flat".
+ Specifies the border 
color for controls that have the Border property set to 
"flat".
   
   
 
@@ -835,27 +835,27 @@
   
 
 Acting on a record
- Specifies to show or hide the action items in a 
selected Navigation Bar control. Action items are the following: Save 
record, Undo, New record, Delete record, Refresh.
+ Specifies to 
show or hide the action items in a selected Navigation Bar control. 
Action items are the following: Save record, Undo, New record, Delete record, 
Refresh.
   
   
 
 Positioning
- Specifies to show or hide the positioning items 
in a selected Navigation Bar control. Positioning items are the 
following: Record label, Record position, Record count label, Record 
count.
+ Specifies to show or 
hide the positioning items in a selected Navigation Bar control. 
Positioning items are the following: Record label, Record position, Record 
count label, Record count.
   
   
 
 Navigation
- Specifies to show or hide the navigation items in 
a selected Navigation Bar control. Navigation items are the following: 
First record, Previous record, Next record, Last record.
+ Specifies to show 
or hide the navigation items in a selected Navigation Bar control. 
Navigation items are the following: First record, Previous record, Next record, 
Last record.
   
   
 
 Filtering / Sorting
- Specifies to show or hide the filtering and 
sorting items in a selected Navigation Bar control. Filtering and 
sorting items are the following: Sort ascending, Sort descending, Sort, 
Automatic filter, Default filter, Apply filter, Reset filter/sort.
+ Specifies to show 
or hide the filtering and sorting items in a selected Navigation Bar 
control. Filtering and sorting items are the following: Sort ascending, 
Sort descending, Sort, Automatic filter, Default filter, Apply filter, Reset 
filter/sort.
   
   
 
 Icon Size
- Specifies whether the icons in a selected 
Navigation Bar should be small or large.
+ Specifies whether the 
icons in a selected Navigation Bar should be small or large.
   
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-01-01 Thread Takeshi Abe
 starmath/inc/visitors.hxx|6 +++---
 starmath/source/visitors.cxx |   38 +++---
 2 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit a5e9c5e35010bcde8cdfe8f82f880a7e159ee8ca
Author: Takeshi Abe 
Date:   Sun Jan 1 07:38:33 2017 +0900

starmath: Prefix members of SmSelectionDrawingVisitor

Change-Id: I889da35c24919157e5b01225df10947c790ebf66
Reviewed-on: https://gerrit.libreoffice.org/32547
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index 6b2f63a..622a74e 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -388,11 +388,11 @@ public:
 using SmDefaultingVisitor::Visit;
 private:
 /** Reference to drawing device */
-OutputDevice& rDev;
+OutputDevice& mrDev;
 /** True if  aSelectionArea have been initialized */
-bool bHasSelectionArea;
+bool mbHasSelectionArea;
 /** The current area that is selected */
-Rectangle aSelectionArea;
+Rectangle maSelectionArea;
 /** Extend the area that must be selected  */
 void ExtendSelectionArea(const Rectangle& rArea);
 /** Default visiting method */
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 4679e67..90ce467 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -1840,39 +1840,39 @@ void SmCloningVisitor::Visit( SmVerticalBraceNode* 
pNode )
 // SmSelectionDrawingVisitor
 
 SmSelectionDrawingVisitor::SmSelectionDrawingVisitor( OutputDevice& rDevice, 
SmNode* pTree, const Point& rOffset )
-: rDev( rDevice ) {
-bHasSelectionArea = false;
-
+: mrDev( rDevice )
+, mbHasSelectionArea( false )
+{
 //Visit everything
 SAL_WARN_IF( !pTree, "starmath", "pTree can't be null!" );
 if( pTree )
 pTree->Accept( this );
 
 //Draw selection if there's any
-if( bHasSelectionArea ){
-aSelectionArea.Move( rOffset.X( ), rOffset.Y( ) );
+if( mbHasSelectionArea ){
+maSelectionArea.Move( rOffset.X( ), rOffset.Y( ) );
 
 //Save device state
-rDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
+mrDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
 //Change colors
-rDev.SetLineColor( );
-rDev.SetFillColor( Color( COL_LIGHTGRAY ) );
+mrDev.SetLineColor( );
+mrDev.SetFillColor( Color( COL_LIGHTGRAY ) );
 
 //Draw rectangle
-rDev.DrawRect( aSelectionArea );
+mrDev.DrawRect( maSelectionArea );
 
 //Restore device state
-rDev.Pop( );
+mrDev.Pop( );
 }
 }
 
 void SmSelectionDrawingVisitor::ExtendSelectionArea(const Rectangle& rArea)
 {
-if ( ! bHasSelectionArea ) {
-aSelectionArea = rArea;
-bHasSelectionArea = true;
+if ( ! mbHasSelectionArea ) {
+maSelectionArea = rArea;
+mbHasSelectionArea = true;
 } else
-aSelectionArea.Union(rArea);
+maSelectionArea.Union(rArea);
 }
 
 void SmSelectionDrawingVisitor::DefaultVisit( SmNode* pNode )
@@ -1897,19 +1897,19 @@ void SmSelectionDrawingVisitor::VisitChildren( SmNode* 
pNode )
 void SmSelectionDrawingVisitor::Visit( SmTextNode* pNode )
 {
 if( pNode->IsSelected( ) ){
-rDev.Push( PushFlags::TEXTCOLOR | PushFlags::FONT );
+mrDev.Push( PushFlags::TEXTCOLOR | PushFlags::FONT );
 
-rDev.SetFont( pNode->GetFont( ) );
+mrDev.SetFont( pNode->GetFont( ) );
 Point Position = pNode->GetTopLeft( );
-long left   = Position.getX( ) + rDev.GetTextWidth( pNode->GetText( ), 
0, pNode->GetSelectionStart( ) );
-long right  = Position.getX( ) + rDev.GetTextWidth( pNode->GetText( ), 
0, pNode->GetSelectionEnd( ) );
+long left   = Position.getX( ) + mrDev.GetTextWidth( pNode->GetText( 
), 0, pNode->GetSelectionStart( ) );
+long right  = Position.getX( ) + mrDev.GetTextWidth( pNode->GetText( 
), 0, pNode->GetSelectionEnd( ) );
 long top= Position.getY( );
 long bottom = top + pNode->GetHeight( );
 Rectangle rect( left, top, right, bottom );
 
 ExtendSelectionArea( rect );
 
-rDev.Pop( );
+mrDev.Pop( );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: icon-themes/galaxy icon-themes/oxygen

2017-01-01 Thread Gabor Kelemen
 dev/null |binary
 1 file changed

New commits:
commit 43596585c7184d796eccca934af8ef29f4f28cb8
Author: Gabor Kelemen 
Date:   Fri Dec 30 23:53:48 2016 +0100

Remove old spadmin icons

Their use was dropped in 2014 with commits
7583df0a18585fafbb9124fcefdbc204544df78c and
a547f865e0ce7731e1b3998b06ecba505e1c27ca

Change-Id: I7d450b44aa4847b9d82549dcbf3591659b6b4215
Reviewed-on: https://gerrit.libreoffice.org/32523
Tested-by: Jenkins 
Reviewed-by: Andras Timar 

diff --git a/icon-themes/galaxy/padmin/source/fax.png 
b/icon-themes/galaxy/padmin/source/fax.png
deleted file mode 100644
index fa49e3d..000
Binary files a/icon-themes/galaxy/padmin/source/fax.png and /dev/null differ
diff --git a/icon-themes/galaxy/padmin/source/pdf.png 
b/icon-themes/galaxy/padmin/source/pdf.png
deleted file mode 100644
index 8238321..000
Binary files a/icon-themes/galaxy/padmin/source/pdf.png and /dev/null differ
diff --git a/icon-themes/galaxy/padmin/source/print.png 
b/icon-themes/galaxy/padmin/source/print.png
deleted file mode 100644
index f9f9994..000
Binary files a/icon-themes/galaxy/padmin/source/print.png and /dev/null differ
diff --git a/icon-themes/galaxy/padmin/source/printer_large.png 
b/icon-themes/galaxy/padmin/source/printer_large.png
deleted file mode 100644
index 78e1f14..000
Binary files a/icon-themes/galaxy/padmin/source/printer_large.png and /dev/null 
differ
diff --git a/icon-themes/oxygen/padmin/source/fax.png 
b/icon-themes/oxygen/padmin/source/fax.png
deleted file mode 100644
index c1b3f21..000
Binary files a/icon-themes/oxygen/padmin/source/fax.png and /dev/null differ
diff --git a/icon-themes/oxygen/padmin/source/print.png 
b/icon-themes/oxygen/padmin/source/print.png
deleted file mode 100644
index 204df73..000
Binary files a/icon-themes/oxygen/padmin/source/print.png and /dev/null differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-01-01 Thread Gabor Kelemen
 svx/source/dialog/hdft.cxx |   13 +
 1 file changed, 13 insertions(+)

New commits:
commit 16fa2d72ba0254adc7c1bec97ade5350b4da1a82
Author: Gabor Kelemen 
Date:   Fri Dec 30 00:20:03 2016 +0100

Add custom HIDs for the Page Style - Footer tabpage

This is necessary because the Header and Footer tabpages
use a shared .ui file and I can't link different help
content to the same ui elements.

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

diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index d2b28df..f1ee794 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -170,6 +170,19 @@ SvxHFPage::SvxHFPage( vcl::Window* pParent, const 
SfxItemSet& rSet, sal_uInt16 n
 {
 get(m_pPageLbl,"labelFooterFormat");
 get(m_pTurnOnBox, "checkFooterOn");
+
+/* Set custom HIDs for the Footer help page (shared/01/05040400.xhp)
+otherwise it would display the same extended help
+on both the Header and Footer tabs */
+m_pCntSharedBox->SetHelpId( "SVX_HID_FOOTER_CHECKSAMELR" );
+m_pCntSharedFirstBox->SetHelpId( "SVX_HID_FOOTER_CHECKSAMEFP" );
+m_pLMEdit->SetHelpId( "SVX_HID_FOOTER_SPINMARGLEFT" );
+m_pRMEdit->SetHelpId( "SVX_HID_FOOTER_SPINMARGRIGHT" );
+m_pDistEdit->SetHelpId( "SVX_HID_FOOTER_SPINSPACING" );
+m_pDynSpacingCB->SetHelpId( "SVX_HID_FOOTER_CHECKDYNSPACING" );
+m_pHeightEdit->SetHelpId( "SVX_HID_FOOTER_SPINHEIGHT" );
+m_pHeightDynBtn->SetHelpId( "SVX_HID_FOOTER_CHECKAUTOFIT" );
+m_pBackgroundBtn->SetHelpId( "SVX_HID_FOOTER_BUTTONMORE" );
 }
 else //Header
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-01-01 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6897ba36117197b5ed63cb88f6eaa9d3c5a5665d
Author: Gabor Kelemen 
Date:   Fri Dec 30 00:23:06 2016 +0100

Updated core
Project: help  f59c4d42dc78c25641c7ee9da62abb49c313f93a

Reconnect 'Page Style - Footer' tabpage and help content

Need to use custom HIDs so that the shared UI elements in
headfootformatpage.ui can be linked to different paragraphs

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

diff --git a/helpcontent2 b/helpcontent2
index 11b85a0..f59c4d4 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 11b85a0acfb0ed4bcaa6fe15cc2a7fb316d0cb88
+Subproject commit f59c4d42dc78c25641c7ee9da62abb49c313f93a
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2017-01-01 Thread Gabor Kelemen
 source/text/shared/01/05040400.xhp |   80 +++--
 1 file changed, 42 insertions(+), 38 deletions(-)

New commits:
commit f59c4d42dc78c25641c7ee9da62abb49c313f93a
Author: Gabor Kelemen 
Date:   Fri Dec 30 00:23:06 2016 +0100

Reconnect 'Page Style - Footer' tabpage and help content

Need to use custom HIDs so that the shared UI elements in
headfootformatpage.ui can be linked to different paragraphs

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

diff --git a/source/text/shared/01/05040400.xhp 
b/source/text/shared/01/05040400.xhp
index 5866aa1..1a9aa1c 100644
--- a/source/text/shared/01/05040400.xhp
+++ b/source/text/shared/01/05040400.xhp
@@ -28,9 +28,9 @@


   
-
+
 Footer
- Adds a footer to the current 
page style. A footer is an area in the bottom page margin, where you can add 
text or graphics.
+ Adds a 
footer to the current page style. A footer is an area in the bottom page 
margin, where you can add text or graphics.
   
   If you want, you can also add borders or a background fill to a 
footer.
 
@@ -51,46 +51,50 @@
 
 Footer
   Set the properties of the footer.
-
+
+
 Footer on
-  Adds a footer 
to the current page style.
-
-Same content left/right
-  Even and odd pages share the 
same content. To assign a 
different footer to even and odd pages, clear this option, and then click 
Edit. 
+  Adds a footer 
to the current page style.
+
+
+Same content left/right
+  Even and odd 
pages share the same content. To assign a different footer to even and odd pages, clear this 
option, and then click Edit. 
 
-
-Same content on first page
-First 
and even/odd pages share the same content.
-
-Left margin
-  Enter 
the amount of space to leave between the left edge of the page and the left 
edge of the footer.
-
-Right margin
-  Enter 
the amount of space to leave between the right edge of the page and the right 
edge of the footer.
-
+
+
+Same content on first page
+First and even/odd pages 
share the same content.
+
+
+Left margin
+  Enter the amount of space 
to leave between the left edge of the page and the left edge of the 
footer.
+
+
+Right margin
+  Enter the amount of space 
to leave between the right edge of the page and the right edge of the 
footer.
+
+
 Spacing
-  Enter the 
amount of space that you want to maintain between the bottom edge of the 
document text and the top edge of the footer.
-
-Use dynamic spacing
-  Overrides the Spacing 
setting and allows the footer to expand into the area between the footer 
and document text.
-
-Height
-  Enter the 
height you want for the footer.
-
-AutoFit height
-  Automatically adjusts the 
height of the footer to fit the content you enter.
+  Enter the amount of space 
that you want to maintain between the bottom edge of the document text and the 
top edge of the footer.
+
+
+Use dynamic spacing
+  Overrides the 
Spacing setting and allows the footer to expand into the area 
between the footer and document text.
+
+
+Height
+  Enter the height you want 
for the footer.
+
+
+AutoFit height
+  Automatically adjusts the 
height of the footer to fit the content you enter.
+
   
-
-More
-  Defines a 
border, a background color, or a background pattern for the 
footer.
+
+
+More
+  Defines a border, a 
background color, or a background pattern for the footer.
+
 
 Edit 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-01-01 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c8c91d22e51c452d92248d0f0690357255287798
Author: Gabor Kelemen 
Date:   Sun Jan 1 10:01:54 2017 +0100

Updated core
Project: help  11b85a0acfb0ed4bcaa6fe15cc2a7fb316d0cb88

Fix numeric ahids on Pivot table related pages

And one inconsistency between the text and UI.

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

diff --git a/helpcontent2 b/helpcontent2
index 644cf06..11b85a0 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 644cf06e7b304f992c4f5291249b3721d9bfc7f6
+Subproject commit 11b85a0acfb0ed4bcaa6fe15cc2a7fb316d0cb88
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2017-01-01 Thread Gabor Kelemen
 source/text/scalc/01/12090105.xhp |   13 +++--
 source/text/scalc/01/12090106.xhp |   24 
 2 files changed, 19 insertions(+), 18 deletions(-)

New commits:
commit 11b85a0acfb0ed4bcaa6fe15cc2a7fb316d0cb88
Author: Gabor Kelemen 
Date:   Sun Jan 1 10:01:54 2017 +0100

Fix numeric ahids on Pivot table related pages

And one inconsistency between the text and UI.

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

diff --git a/source/text/scalc/01/12090105.xhp 
b/source/text/scalc/01/12090105.xhp
index c84f8ce..6d10a7c 100644
--- a/source/text/scalc/01/12090105.xhp
+++ b/source/text/scalc/01/12090105.xhp
@@ -44,10 +44,11 @@
 
 
 Function
-Click the 
type of subtotal that you want to calculate. This option is only available if 
the User-defined option is selected.
+Click the type of subtotal that you want to 
calculate. This option is only available if the User-defined 
option is selected.
 
-Show elements without data
-Includes 
empty columns and rows in the results table.
+
+Show items without data
+Includes empty columns and rows in the results 
table.
 Name:
 Lists the name of the selected data field.
 
@@ -61,7 +62,7 @@
 For each data field, you can select the type of 
display. For some types you can select additional information for a 
base field and a base item.
 
 Type
-Select the type of calculating of the 
displayed value for the data field.
+Select the type 
of calculating of the displayed value for the data field.
 
 
 
@@ -157,9 +158,9 @@
 
 
 Base field
-Select the field from which the respective 
value is taken as base for the calculation.
+Select the 
field from which the respective value is taken as base for the 
calculation.
 
 Base item
-Select the item of the base field from which 
the respective value is taken as base for the calculation.
+Select the 
item of the base field from which the respective value is taken as base for the 
calculation.
 
 
diff --git a/source/text/scalc/01/12090106.xhp 
b/source/text/scalc/01/12090106.xhp
index 91ce434..e7abbb8 100644
--- a/source/text/scalc/01/12090106.xhp
+++ b/source/text/scalc/01/12090106.xhp
@@ -36,32 +36,32 @@
 mw changed "hiding..." entryData 
Field Options
 You 
can specify additional options for column, row, and page data fields in the 
pivot table.
 Sort by
-Select the data field that you want to sort 
columns or rows by.
+Select 
the data field that you want to sort columns or rows by.
 Ascending
-Sorts the values from the lowest value to 
the highest value. If the selected field is the field for which the dialog was 
opened, the items are sorted by name. If a data field was selected, the items 
are sorted by the resultant value of the selected data 
field.
+Sorts 
the values from the lowest value to the highest value. If the selected field is 
the field for which the dialog was opened, the items are sorted by name. If a 
data field was selected, the items are sorted by the resultant value of the 
selected data field.
 Descending
-Sorts the values descending from the highest 
value to the lowest value. If the selected field is the field for which the 
dialog was opened, the items are sorted by name. If a data field was selected, 
the items are sorted by the resultant value of the selected data 
field.
+Sorts the values 
descending from the highest value to the lowest value. If the selected field is 
the field for which the dialog was opened, the items are sorted by name. If a 
data field was selected, the items are sorted by the resultant value of the 
selected data field.
 Manual
-Sorts values 
alphabetically.UFI: see spec doc. Currently set to 
alphabetically.
+Sorts 
values alphabetically.UFI: see spec doc. Currently set to 
alphabetically.
 Display options
 You 
can specify the display options for all row fields except for the last, 
innermost row field.
 Layout
-Select the layout mode for the field in the 
list box.
+Select 
the layout mode for the field in the list box.
 Empty line after each item
-Adds an empty row after the data for each 
item in the pivot table.
+Adds 
an empty row after the data for each item in the pivot 
table.
 Show automatically
 Displays the top or bottom nn items when you sort by a specified 
field.
 Show
-Turns on the automatic show 
feature.
+Turns on 
the automatic show feature.
 items
-Enter the maximum number of items that you 
want to show automatically.
+Enter the 
maximum number of items that you want to show automatically.
 From
-Shows the top or bottom items in the 
specified sort order.
+Shows the 
top or bottom items in the specified sort order.
 Using field
-Select the data field that you want to sort 
the data by.
+Select 
the data field that you want to sort the data by.
 Hide items
-Select the items that you want to hide from the 
calculations.
+Select the items that 
you want to hide from the calculations.
 Hierarchy
-Selec

[Libreoffice-commits] core.git: helpcontent2

2017-01-01 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 41f4365204060a30ca4bf2959ba93371b4579b7d
Author: Gabor Kelemen 
Date:   Sun Jan 1 11:44:19 2017 +0100

Updated core
Project: help  644cf06e7b304f992c4f5291249b3721d9bfc7f6

Fix ahelps and bookmark in the Events page

'Customize - Events' and 'Sheet - Sheet Events'
uses this page, fix old style ahelps and add a bookmark
to the latter.

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

diff --git a/helpcontent2 b/helpcontent2
index cefd883..644cf06 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit cefd88394fd05463539ad228ca7edf6c672e7c9b
+Subproject commit 644cf06e7b304f992c4f5291249b3721d9bfc7f6
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2017-01-01 Thread Gabor Kelemen
 source/text/shared/01/06140500.xhp |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 644cf06e7b304f992c4f5291249b3721d9bfc7f6
Author: Gabor Kelemen 
Date:   Sun Jan 1 11:44:19 2017 +0100

Fix ahelps and bookmark in the Events page

'Customize - Events' and 'Sheet - Sheet Events'
uses this page, fix old style ahelps and add a bookmark
to the latter.

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

diff --git a/source/text/shared/01/06140500.xhp 
b/source/text/shared/01/06140500.xhp
index 12cec77..5f49ad8 100644
--- a/source/text/shared/01/06140500.xhp
+++ b/source/text/shared/01/06140500.xhp
@@ -35,6 +35,7 @@
 
 
 
+
 Events
 Assigns macros to program 
events. The assigned macro runs automatically every time the selected event 
occurs.
 
@@ -50,20 +51,21 @@
 
 
 Save In
-Select first where to save the event binding, 
in the current document or in %PRODUCTNAME.
+Select first where to 
save the event binding, in the current document or in 
%PRODUCTNAME.
 A macro that is saved with a document can only be run when that 
document is opened.
 
 
-The big list box lists the events and the 
assigned macros. After you selected the location in the Save In 
list box, select an event in the big list box. Then click Assign 
Macro.
+
+The big list box lists the events and the assigned 
macros. After you selected the location in the Save In list box, 
select an event in the big list box. Then click Assign 
Macro.
 
 
 
 Assign Macro
-Opens the 
Macro Selector to assign a 
macro to the selected event.
+Opens the Macro Selector to assign a macro to 
the selected event.
 
 
 Remove Macro
-Deletes the 
macro assignment for the selected event.
+Deletes the macro assignment for the selected 
event.
 
 List of events
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2017-01-01 Thread Gabor Kelemen
 source/text/shared/01/0613.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cefd88394fd05463539ad228ca7edf6c672e7c9b
Author: Gabor Kelemen 
Date:   Sun Jan 1 09:54:23 2017 +0100

Fix one more numeric ahid on the Script Organizer page

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

diff --git a/source/text/shared/01/0613.xhp 
b/source/text/shared/01/0613.xhp
index 8fb74dd..5543d28 100644
--- a/source/text/shared/01/0613.xhp
+++ b/source/text/shared/01/0613.xhp
@@ -135,7 +135,7 @@
 Opens a dialog where you 
can change the name of the selected script.
 
 Delete
-Prompts you to delete the selected 
script.
+Prompts you to delete the 
selected script.
 The 
Macro Selector dialog contains two list boxes, namely the Library list box and 
the Macro name list box.
 Library
 Select a macro or script from "user", "share", or an open document. 
To view the contents of a library, double-click an entry in the 
list.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2017-01-01 Thread Gabor Kelemen
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 224e23579ececef1df186d8a93045647c9f46b53
Author: Gabor Kelemen 
Date:   Sun Jan 1 09:54:23 2017 +0100

Updated core
Project: help  cefd88394fd05463539ad228ca7edf6c672e7c9b

Fix one more numeric ahid on the Script Organizer page

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

diff --git a/helpcontent2 b/helpcontent2
index d798499f..cefd883 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d798499f968366e1d0277e008d1d7e4b2912f85d
+Subproject commit cefd88394fd05463539ad228ca7edf6c672e7c9b
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Need help for building

2017-01-01 Thread Khaled Hosny
On Sun, Jan 01, 2017 at 03:06:05PM +0100, Regina Henschel wrote:
> Hi Mike,
> 
> Kaganski Mike schrieb:
> > On 12/31/2016 3:59 PM, Regina Henschel wrote:
> > > my last build was in August. Now I tried a new build, but it fails. I
> > > have started with
> > > git pull -r
> > 
> > I may remember that wrong, but I have a feeling that it was this problem
> > when I was given an advise to use ./g pull -r instead of git pull -r
> 
> That seems to work. At least compiling is running now.

If you are using submodules (which you do since you build with
--enable-help) then you should use the ā€œgā€ script not git directly to
make sure everything is kept in sync (unless you know your way around
git submodules of course).

Regards,
Khaled
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Need help for building

2017-01-01 Thread Regina Henschel

Hi Mike,

Kaganski Mike schrieb:

On 12/31/2016 3:59 PM, Regina Henschel wrote:

my last build was in August. Now I tried a new build, but it fails. I
have started with
git pull -r


I may remember that wrong, but I have a feeling that it was this problem
when I was given an advise to use ./g pull -r instead of git pull -r


That seems to work. At least compiling is running now.

Kind regards
Regina

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Git commit adds ^M at end of line

2017-01-01 Thread jan iversen

> Any idea what I made wrong?

Sound a lot like you made the git init or git clone command from a msdos prompt 
and not cygwin.

rgds
jan i


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Git commit adds ^M at end of line

2017-01-01 Thread Laurent BP
Hello,

I don't know if it is due to new year, but I can't properly commit this
morning.

I made some changes to some help files, following procedure in wiki
https://wiki.documentfoundation.org/Development/Submodules#Working_in_submodules
Previously, I already succeeded in such procedure.

But this morning, when I make the commit with "git commit -a", enter title
and an empty line, save and exit, the result is huge: all lines of files are
considered modified. Check with "git log -p" shows that git is considering
that all modified files have now ^M at end of each line (which means new
line in MS-DOS).

I tried to remove these ^M from source files in vi with :%s/^M//g (^M is
type with Ctrl+V, Ctrl+M) but vi told me there is no ^M.

Any idea what I made wrong?

Best regards and happy new year :-)

Laurent BP



-
LibreOffice 5.1.4.1
--
View this message in context: 
http://nabble.documentfoundation.org/Git-commit-adds-M-at-end-of-line-tp4204025.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: bin/gbuild-to-ide

2017-01-01 Thread jan Iversen
 bin/gbuild-to-ide |   37 +++--
 1 file changed, 15 insertions(+), 22 deletions(-)

New commits:
commit 2823fd4698fdc8019af36f881aa90a89ba8d8236
Author: jan Iversen 
Date:   Sun Jan 1 11:46:17 2017 +0100

gbuild-to-ide parser simplification.

Added build_type to objects instead of having 3 sets.

Modified the generators to use build_type

Change-Id: Ic884522eb6d2c41e7b838f62a0d0800dc4e02c8a

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index ea75965..e12e0fa 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -65,7 +65,7 @@ class GbuildParser:
 self.makecmd = makecmd
 self.binpath = os.path.dirname(os.environ['GPERF']) # woha, this is 
quite a hack
 (self.srcdir, self.builddir, self.instdir, self.workdir) = 
(os.environ['SRCDIR'], os.environ['BUILDDIR'], os.environ['INSTDIR'], 
os.environ['WORKDIR'])
-(self.libs, self.exes, self.tests, self.modulenamelist) = ([], [], [], 
[])
+(self.modulenamelist, self.files) = ([], [])
 (self.target_by_path, self.target_by_location) = ({}, {})
 
 includepattern = re.compile('-I(\S+)')
@@ -131,13 +131,8 @@ class GbuildParser:
   jsondata['OBJCXXOBJECTS'],
   jsondata['YACCOBJECTS'],
   jsontype)
-if jsontype == 'Library':
-self.libs.append(newObj)
-elif jsontype == 'Executable':
-self.exes.append(newObj)
-elif jsontype == 'CppunitTest':
-self.tests.append(newObj)
-for target in set(self.libs) | set(self.exes) | set(self.tests):
+self.files.append(newObj)
+for target in self.files:
 if target.location not in self.target_by_location:
 self.target_by_location[target.location] = set()
 self.target_by_location[target.location] |= set([target])
@@ -291,12 +286,8 @@ class DebugIntegrationGenerator(IdeIntegrationGenerator):
 def emit(self):
 print(self.gbuildparser.srcdir)
 print(self.gbuildparser.builddir)
-for lib in self.gbuildparser.libs:
-print(lib)
-for exe in self.gbuildparser.exes:
-print(exe)
-for test in self.gbuildparser.tests:
-print(test)
+for f in self.gbuildparser.files:
+print(f)
 
 
 class VimIntegrationGenerator(IdeIntegrationGenerator):
@@ -306,7 +297,7 @@ class VimIntegrationGenerator(IdeIntegrationGenerator):
 
 def emit(self):
 global_list = []
-for lib in set(self.gbuildparser.libs) | set(self.gbuildparser.tests):
+for lib in self.gbuildparser.files:
 entries = []
 for file in lib.cxxobjects:
 filePath = os.path.join(self.gbuildparser.srcdir, file) + 
".cxx"
@@ -560,12 +551,14 @@ class XcodeIntegrationGenerator(IdeIntegrationGenerator):
 self.write_dict(dict, file, 0)
 
 def get_product_type(self, modulename):
-if modulename in self.gbuildparser.libs:
+if modulename.build_type == 'Library':
 return 'com.apple.product-type.library.dynamic'
-elif modulename in self.gbuildparser.exes:
-return 'com.apple.product-type.something'
-else:
+elif modulename.build_type == 'Executable':
+return 'com.apple.product-type.executable'
+elif modulename.build_type == 'CppunitTest':
 return 'com.apple.product-type.cppunit'
+else:
+return 'com.apple.product-type.something'
 
 counter = 0
 
@@ -849,7 +842,7 @@ class 
VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
 
 def write_solution(self, solution_path, projects):
 print('Solution %s:' % 
os.path.splitext(os.path.basename(solution_path))[0], end='')
-library_projects = [project for project in projects if project.target 
in self.gbuildparser.libs]
+library_projects = [project for project in projects if 
project.target.build_type == 'Library']
 with open(solution_path, 'w') as f:
 f.write('Microsoft Visual Studio Solution File, Format Version 
12.00\n')
 for project in projects:
@@ -1038,7 +1031,7 @@ class 
QtCreatorIntegrationGenerator(IdeIntegrationGenerator):
 def __init__(self, gbuildparser, ide):
 IdeIntegrationGenerator.__init__(self, gbuildparser, ide)
 self.target_by_location = {}
-for target in set(self.gbuildparser.libs) | 
set(self.gbuildparser.exes):
+for target in self.gbuildparser.files:
 if target.location not in self.target_by_location:
 self.target_by_location[target.location] = set()
 self.target_by_location[target.location] |= set([target])
@@ -1494,7 +1487,7 @@ class 
QtCreatorIntegrationGenerator(IdeIntegrationGen

[Libreoffice-commits] core.git: bin/gbuild-to-ide

2017-01-01 Thread jan Iversen
 bin/gbuild-to-ide |  184 +++---
 1 file changed, 66 insertions(+), 118 deletions(-)

New commits:
commit d3c44886c56f401cc18c2ba480131a621d06c781
Author: jan Iversen 
Date:   Sun Jan 1 10:29:50 2017 +0100

Update json parser in gbuild-to-ide

Simplified parser and added the missing json elements:
ASMOBJECTS
CFLAGS
CFLAGSAPPEND
CXXFLAGS
CXXFLAGSAPPEND
CXXOBJECTS
DEFS
GENCOBJECTS
GENCXXOBJECTS
ILIBTARGET
INCLUDE
LINKED_LIBS
LINKED_STATIC_LIBS
LINKTARGET
MAKEFILE
OBJCFLAGS
OBJCFLAGSAPPEND
OBJCOBJECTS
OBJCXXFLAGS
OBJCXXFLAGSAPPEND
OBJCXXOBJECTS
YACCOBJECTS

This patch should not affect the different generators

Change-Id: I74795880d7d34868d61ef73859bda0aedc8b2e28

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 451f6b5..ea75965 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -22,74 +22,43 @@ import traceback
 
 
 class GbuildLinkTarget:
-def __init__(self, name, location, include, include_sys, defs, cxxobjects, 
cxxflags, linked_libs):
-(self.name, self.location, self.include, self.include_sys, self.defs, 
self.cxxobjects, self.cxxflags, self.linked_libs) = (
-name, location, include, include_sys, defs, cxxobjects, cxxflags, 
linked_libs)
-
-def short_name(self):
+def __init__(self, name, location, include, include_sys, defs, cxxobjects, 
cxxflags, linked_libs,
+ asmobjects, cflags, gencobjects, gencxxobjects, ilibtarget, 
linked_static_libs, linktarget,
+ objcflags, objcobjects, objcxxflags, objcxxobjects, 
yaccobjects, build_type):
+(self.name, self.location, self.include,
+ self.include_sys, self.defs, self.cxxobjects,
+ self.cxxflags, self.linked_libs,
+ self.asmobjects, self.cflags, self.gencobjects,
+ self.gencxxobjects, self.ilibtarget, self.linked_static_libs,
+ self.linktarget, self.objcflags, self.objcobjects,
+ self.objcxxflags, self.objcxxobjects, self.yaccobjects,
+ self.build_type) = (name, location, include,
+ include_sys, defs, cxxobjects,
+ cxxflags, linked_libs, asmobjects,
+ cflags, gencobjects, gencxxobjects,
+ ilibtarget, linked_static_libs, linktarget,
+ objcflags, objcobjects, objcxxflags,
+ objcxxobjects, yaccobjects, build_type)
+
+def name(self):
 return self.name
 
-def is_empty(self):
-return not self.include and not self.defs and not self.cxxobjects and 
not self.linked_libs
-
-def __str__(self):
-return '%s at %s with include path: %s, isystem includes: %s, defines: 
%s, objects: %s, cxxflags: %s and linked libs: %s' % (
-self.short_name(), self.location, self.include, self.include_sys, 
self.defs, self.cxxobjects,
-self.cxxflags, self.linked_libs)
-
-
-class GbuildLib(GbuildLinkTarget):
-def __init__(self, name, location, include, include_sys, defs, cxxobjects, 
cxxflags, linked_libs):
-GbuildLinkTarget.__init__(self, name, location, include, include_sys, 
defs, cxxobjects, cxxflags, linked_libs)
-
-def short_name(self):
-"""Return the short name of target based on the Library_* makefile 
name"""
-return 'Library %s' % self.name
-
-def short_name(self):
-"""Return the short name of target based on the Library_* makefile 
name"""
-return 'Library %s' % self.name
-
-def module(self):
-"""Return module name """
-return self.location[self.location.rindex('/')+1:]
-
 def target_name(self):
-return 'Library_%s' % self.name
-
-def library_name(self):
-return self.name
-
-class GbuildTest(GbuildLinkTarget):
-def __init__(self, name, location, include, include_sys, defs, cxxobjects, 
cxxflags, linked_libs):
-GbuildLinkTarget.__init__(self, name, location, include, include_sys, 
defs, cxxobjects, cxxflags, linked_libs)
+return self.build_type + '-' + self.name
 
 def short_name(self):
-"""Return the short name of target based n the CppunitTest_* makefile 
names"""
-return 'CppunitTest %s' % self.name
+return self.build_type + ' ' + self.name
 
 def module(self):
-"""Return module name """
 return self.location[self.location.rindex('/')+1:]
 
-def target_name(self):
-return 'CppunitTest_%s' % self.name
-
-class GbuildExe(GbuildLinkTarget):
-def __init__(self, name, location, include, include_sys, defs, cxxobjects, 
cxxflags, linked_libs):
-GbuildLinkTarget.__init__(self, name, location, include, include_sys, 
defs, cxxobjects, cxxflags, linked_libs)
-
-def short_name(self):
-"""Return the short name of target based on the Executable_* makefile 
name"""
-ret