[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - 65 commits - connectivity/registry connectivity/source cui/source cui/uiconfig dbaccess/source dbaccess/uiconfig desktop/unx download.lst editeng/source embeddedobj/source external/icu external/libmspub external/poppler filter/source framework/source include/oox include/vcl include/xmloff l10ntools/source oox/source reportbuilder/java reportdesign/source sc/inc sc/source sd/CppunitTest_sd_import_tests.mk sd/qa sd/source svx/source sw/qa sw/source tools/source vcl/source writerfilter/source xmloff/source
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Thu Jan 8 07:45:20 PST 2015
connectivity/registry/postgresql/org/openoffice/Office/DataAccess/Drivers.xcu | 5
connectivity/source/drivers/file/FResultSet.cxx | 1
connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx | 11
connectivity/source/drivers/postgresql/pq_tools.cxx | 2
cui/source/tabpages/autocdlg.cxx | 2
cui/uiconfig/ui/movemenu.ui | 2
dbaccess/source/ui/dlg/advancedsettings.cxx | 5
dbaccess/uiconfig/ui/specialsettingspage.ui | 36 +-
desktop/unx/source/file_image_unx.c | 6
download.lst | 2
editeng/source/editeng/impedit4.cxx | 6
embeddedobj/source/msole/oleembed.cxx | 11
external/icu/UnpackedTarball_icu.mk | 1
external/icu/icu4c-icu11451.patch.1 | 11
external/libmspub/ExternalProject_libmspub.mk | 1
external/poppler/ExternalProject_poppler.mk | 1
filter/source/graphicfilter/itiff/itiff.cxx | 11
framework/source/fwe/classes/addonsoptions.cxx | 44 +-
include/oox/export/shapes.hxx | 2
include/vcl/outdev.hxx | 2
include/vcl/print.hxx | 1
include/xmloff/xmltoken.hxx | 1
l10ntools/source/export.cxx | 19 -
oox/source/drawingml/shape.cxx | 13
oox/source/drawingml/textparagraphproperties.cxx | 12
oox/source/drawingml/textparagraphpropertiescontext.cxx | 5
oox/source/export/shapes.cxx | 114 ++++--
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java | 3
reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java | 57 +--
reportdesign/source/ui/inspection/GeometryHandler.cxx | 1
sc/inc/scmatrix.hxx | 8
sc/source/core/data/column2.cxx | 27 +
sc/source/core/data/compressedarray.cxx | 4
sc/source/core/data/documen2.cxx | 3
sc/source/core/data/documen4.cxx | 2
sc/source/core/data/document.cxx | 19 -
sc/source/core/data/formulacell.cxx | 11
sc/source/core/data/funcdesc.cxx | 3
sc/source/core/data/table5.cxx | 2
sc/source/core/tool/interpr1.cxx | 4
sc/source/core/tool/scmatrix.cxx | 173 ++++++----
sc/source/filter/excel/excform8.cxx | 18 -
sc/source/filter/excel/impop.cxx | 12
sc/source/filter/excel/xeformula.cxx | 4
sc/source/filter/excel/xelink.cxx | 34 +
sc/source/filter/excel/xistring.cxx | 6
sc/source/filter/inc/sheetdatabuffer.hxx | 14
sc/source/filter/inc/unitconverter.hxx | 3
sc/source/filter/inc/worksheethelper.hxx | 2
sc/source/filter/oox/sheetdatabuffer.cxx | 31 +
sc/source/filter/oox/sheetdatacontext.cxx | 7
sc/source/filter/oox/unitconverter.cxx | 16
sc/source/filter/xcl97/XclExpChangeTrack.cxx | 6
sc/source/filter/xml/xmldpimp.cxx | 2
sc/source/filter/xml/xmlfilti.cxx | 13
sc/source/filter/xml/xmlimprt.cxx | 1
sc/source/ui/dbgui/asciiopt.cxx | 3
sc/source/ui/docshell/impex.cxx | 69 ++-
sc/source/ui/inc/impex.hxx | 4
sc/source/ui/view/viewfun5.cxx | 2
sd/CppunitTest_sd_import_tests.mk | 41 --
sd/qa/unit/data/odp/bnc822341.odp |binary
sd/qa/unit/data/pptx/bnc862510_6.pptx |binary
sd/qa/unit/data/pptx/bnc862510_7.pptx |binary
sd/qa/unit/import-tests.cxx | 121 ++++++
sd/source/ui/dlg/animobjs.cxx | 22 -
sd/source/ui/inc/animobjs.hxx | 2
svx/source/dialog/linkwarn.cxx | 6
svx/source/fmcomp/gridcell.cxx | 19 -
svx/source/inc/gridcell.hxx | 1
sw/qa/extras/htmlexport/htmlexport.cxx | 4
sw/qa/extras/ooxmlexport/data/multi-page-toc.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 12
sw/qa/extras/rtfimport/data/fdo84685.rtf | 7
sw/qa/extras/rtfimport/data/fdo85179.rtf | 4
sw/qa/extras/rtfimport/data/fdo86761.rtf | 42 ++
sw/qa/extras/rtfimport/rtfimport.cxx | 26 +
sw/source/core/access/accmap.cxx | 4
sw/source/core/doc/doclay.cxx | 6
sw/source/core/layout/fly.cxx | 7
sw/source/core/txtnode/ndtxt.cxx | 11
sw/source/core/uibase/inc/column.hxx | 2
sw/source/filter/ascii/parasc.cxx | 1
sw/source/filter/ww8/ww8par2.cxx | 5
sw/source/ui/frmdlg/column.cxx | 56 ++-
tools/source/stream/stream.cxx | 4
vcl/source/control/combobox.cxx | 7
vcl/source/filter/ixpm/xpmread.cxx | 4
vcl/source/filter/jpeg/jpegc.cxx | 2
vcl/source/gdi/print.cxx | 10
vcl/source/outdev/gradient.cxx | 24 +
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 18 +
writerfilter/source/dmapper/DomainMapper_Impl.hxx | 18 +
writerfilter/source/dmapper/GraphicImport.cxx | 3
writerfilter/source/rtftok/rtfcontrolwords.hxx | 2
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 26 +
writerfilter/source/rtftok/rtfsdrimport.cxx | 2
xmloff/source/core/xmltoken.cxx | 1
xmloff/source/draw/ximpcustomshape.cxx | 43 --
99 files changed, 1011 insertions(+), 443 deletions(-)
New commits:
commit c359b92abd7d798917283398b812d965a1f098b9
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Wed Dec 24 04:52:25 2014 +0100
we want to compare two different cells, fdo#85353
Change-Id: Ie612555a63a1eff79e6c35aeed3cfa27b948ad38
Reviewed-on: https://gerrit.libreoffice.org/13636
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 96409fd72c6fca3b64254666471f590ff89b9a26)
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index b8e5958..6e0da40 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -1324,7 +1324,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
if ( ValidCol(nOtherCol) && ValidRow(nOtherRow) )
{
ScAddress aOtherPos( nOtherCol, nOtherRow, nOtherTab );
- aOtherCell.assign(*this, aOtherPos);
+ aOtherCell.assign(rOtherDoc, aOtherPos);
}
if (!aThisCell.equalsWithoutFormat(aOtherCell))
commit 74a74ba8e538c590eea8d87cd2f56eca7f640225
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Wed Dec 24 04:11:08 2014 +0100
reimplement shared formula import for xlsb, fdo#86734
Change-Id: Ic5d678a2b1197ce8d83b308b0a4387bf657052d5
Reviewed-on: https://gerrit.libreoffice.org/13634
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit c931268890fdd0e9aec1bdab939495f299e11011)
diff --git a/sc/source/filter/inc/sheetdatabuffer.hxx b/sc/source/filter/inc/sheetdatabuffer.hxx
index 1a3ae9a..9d05f64 100644
--- a/sc/source/filter/inc/sheetdatabuffer.hxx
+++ b/sc/source/filter/inc/sheetdatabuffer.hxx
@@ -126,6 +126,10 @@ public:
/** Inserts a ISO 8601 date cell into the sheet. */
void setDateCell( const CellModel& rModel, const OUString& rDateString );
+ void createSharedFormula(
+ const com::sun::star::table::CellAddress& rRange,
+ const ApiTokenSequence& rTokens);
+
/** Inserts the passed token array as array formula. */
void createArrayFormula(
const ::com::sun::star::table::CellRangeAddress& rRange,
@@ -151,17 +155,17 @@ public:
/** Final processing after the sheet has been imported. */
void finalizeImport();
-private:
- struct XfIdRowRange;
-
/** Sets the passed formula token array into a cell. */
void setCellFormula(
const ::com::sun::star::table::CellAddress& rCellAddr,
const ApiTokenSequence& rTokens );
+private:
+ struct XfIdRowRange;
+
/** Creates a formula token array representing the shared formula with the
passed identifier. */
- ApiTokenSequence resolveSharedFormula( const BinAddress& rMapKey ) const;
+ ApiTokenSequence resolveSharedFormula( const css::table::CellAddress& rMapKey ) const;
/** Inserts the passed array formula into the sheet. */
void finalizeArrayFormula(
@@ -234,7 +238,7 @@ private:
SharedFormulaMap maSharedFormulas; /// Maps shared formula base address to defined name token index.
::com::sun::star::table::CellAddress
maSharedFmlaAddr; /// Address of a cell containing a pending shared formula.
- BinAddress maSharedBaseAddr; /// Base address of the pending shared formula.
+ css::table::CellAddress maSharedBaseAddr; /// Base address of the pending shared formula.
XfIdRowRange maXfIdRowRange; /// Cached XF identifier for a range of rows.
XfIdRangeListMap maXfIdRangeLists; /// Collected XF identifiers for cell rangelists.
MergedRangeList maMergedRanges; /// Merged cell ranges.
diff --git a/sc/source/filter/inc/worksheethelper.hxx b/sc/source/filter/inc/worksheethelper.hxx
index 26c6999..3dd60c0 100644
--- a/sc/source/filter/inc/worksheethelper.hxx
+++ b/sc/source/filter/inc/worksheethelper.hxx
@@ -59,7 +59,7 @@ class WorksheetSettings;
typedef ::std::map< OUString, void* > ExtLst;
-typedef ::std::map< BinAddress, sal_Int32 > SharedFormulaMap;
+typedef ::std::map< BinAddress, ApiTokenSequence > SharedFormulaMap;
/** An enumeration for all types of sheets in a workbook. */
enum WorksheetType
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index 68b39db..c77f43f 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -220,6 +220,14 @@ void SheetDataBuffer::setDateCell( const CellModel& rModel, const OUString& rDat
setValueCell( rModel, fValue );
}
+void SheetDataBuffer::createSharedFormula(const CellAddress& rAddr, const ApiTokenSequence& rTokens)
+{
+ BinAddress aAddr(rAddr);
+ maSharedFormulas[aAddr] = rTokens;
+ if( mbPendingSharedFmla )
+ setCellFormula( maSharedFmlaAddr, resolveSharedFormula( maSharedBaseAddr ) );
+}
+
void SheetDataBuffer::setFormulaCell( const CellModel& rModel, const ApiTokenSequence& rTokens )
{
mbPendingSharedFmla = false;
@@ -249,11 +257,11 @@ void SheetDataBuffer::setFormulaCell( const CellModel& rModel, const ApiTokenSeq
reading the formula definition it will be retried to insert the
formula via retryPendingSharedFormulaCell(). */
BinAddress aBaseAddr( aTokenInfo.First );
- aTokens = resolveSharedFormula( aBaseAddr );
+ aTokens = resolveSharedFormula( aTokenInfo.First );
if( !aTokens.hasElements() )
{
maSharedFmlaAddr = rModel.maCellAddr;
- maSharedBaseAddr = aBaseAddr;
+ maSharedBaseAddr = aTokenInfo.First;
mbPendingSharedFmla = true;
}
}
@@ -556,10 +564,11 @@ void SheetDataBuffer::setCellFormula( const CellAddress& rCellAddr, const ApiTok
}
}
-ApiTokenSequence SheetDataBuffer::resolveSharedFormula( const BinAddress& rMapKey ) const
+ApiTokenSequence SheetDataBuffer::resolveSharedFormula( const CellAddress& rAddr ) const
{
- sal_Int32 nTokenIndex = ContainerHelper::getMapElement( maSharedFormulas, rMapKey, -1 );
- return (nTokenIndex >= 0) ? getFormulaParser().convertNameToFormula( nTokenIndex ) : ApiTokenSequence();
+ BinAddress aAddr(rAddr);
+ ApiTokenSequence aTokens = ContainerHelper::getMapElement( maSharedFormulas, aAddr, ApiTokenSequence() );
+ return aTokens;
}
void SheetDataBuffer::finalizeArrayFormula( const CellRangeAddress& rRange, const ApiTokenSequence& rTokens ) const
diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx
index f6ca6a4..4752995 100644
--- a/sc/source/filter/oox/sheetdatacontext.cxx
+++ b/sc/source/filter/oox/sheetdatacontext.cxx
@@ -558,8 +558,13 @@ void SheetDataContext::importDataTable( SequenceInputStream& rStrm )
}
}
-void SheetDataContext::importSharedFmla( SequenceInputStream& /*rStrm*/ )
+void SheetDataContext::importSharedFmla( SequenceInputStream& rStrm )
{
+ if( readFormulaRef( rStrm ) && maFmlaData.isValidSharedRef( maCellData.maCellAddr ) )
+ {
+ ApiTokenSequence aTokens = mrFormulaParser.importFormula( maCellData.maCellAddr, FORMULATYPE_SHAREDFORMULA, rStrm );
+ mrSheetData.createSharedFormula( maCellData.maCellAddr, aTokens );
+ }
}
} // namespace xls
commit 591e4216a4f9dea0bc29ce8fc93a77c8f1e45bdf
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Mon Dec 22 06:22:45 2014 +0100
fix another validation error for OOXML, related fdo#40746
e.g. exporting fdo40746-2.ods as OOXML
Change-Id: I8a19ec2caecbc3687229d820ac2ec11fc01facd1
Reviewed-on: https://gerrit.libreoffice.org/13590
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 62bc15f270614afa37c6615fc34cd79f45026da5)
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 3de8363..08b2afb 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -242,7 +242,7 @@ protected:
/** Writes the list of externalName elements. */
void WriteExtNameBufferXml( XclExpXmlStream& rStrm );
-private:
+protected:
typedef boost::shared_ptr< XclExpExtNameBuffer > XclExpExtNameBfrRef;
XclExpExtNameBfrRef mxExtNameBfr; /// List of EXTERNNAME records.
};
@@ -1684,14 +1684,18 @@ void XclExpSupbook::SaveXml( XclExpXmlStream& rStrm )
}
- pExternalLink->startElement( XML_sheetDataSet, FSEND);
+ if (!maXctList.IsEmpty() || mxExtNameBfr)
+ {
+ pExternalLink->startElement( XML_sheetDataSet, FSEND);
- // sheetData elements
- maXctList.SaveXml( rStrm );
- // externalName elements
- WriteExtNameBufferXml( rStrm );
+ // sheetData elements
+ maXctList.SaveXml( rStrm );
+ // externalName elements
+ WriteExtNameBufferXml( rStrm );
- pExternalLink->endElement( XML_sheetDataSet);
+ pExternalLink->endElement( XML_sheetDataSet);
+
+ }
pExternalLink->endElement( XML_externalBook);
pExternalLink->endElement( XML_externalLink);
}
commit bf8e0a17eae89e6228350d99826657f56cc0845c
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Mon Dec 22 06:18:07 2014 +0100
fix OOXML validation error, related fdo#40746
e.g. fdo40746-2.ods exported to OOXML
Change-Id: I48bc7a7d21ddc00eceaeb09970a2b1a60330fbf0
Reviewed-on: https://gerrit.libreoffice.org/13589
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 1eb1d5a643f3526d540abe783edac78c8ded476b)
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 234e65b..3de8363 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1671,14 +1671,18 @@ void XclExpSupbook::SaveXml( XclExpXmlStream& rStrm )
FSNS(XML_r, XML_id), XclXmlUtils::ToOString( sId ).getStr(),
FSEND);
- pExternalLink->startElement( XML_sheetNames, FSEND);
- for (size_t nPos = 0, nSize = maXctList.GetSize(); nPos < nSize; ++nPos)
+ if (!maXctList.IsEmpty())
{
- pExternalLink->singleElement( XML_sheetName,
- XML_val, XclXmlUtils::ToOString( maXctList.GetRecord( nPos )->GetTabName()).getStr(),
- FSEND);
+ pExternalLink->startElement( XML_sheetNames, FSEND);
+ for (size_t nPos = 0, nSize = maXctList.GetSize(); nPos < nSize; ++nPos)
+ {
+ pExternalLink->singleElement( XML_sheetName,
+ XML_val, XclXmlUtils::ToOString( maXctList.GetRecord( nPos )->GetTabName()).getStr(),
+ FSEND);
+ }
+ pExternalLink->endElement( XML_sheetNames);
+
}
- pExternalLink->endElement( XML_sheetNames);
pExternalLink->startElement( XML_sheetDataSet, FSEND);
commit 4ad5d63f00b76e5430eceeefcdc1054d624abd3e
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Mon Dec 22 05:00:24 2014 +0100
fix OOXML validation errors
Change-Id: Ieac082a3b312602eff5ec101529536d747fa3836
Reviewed-on: https://gerrit.libreoffice.org/13586
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 995a06e212c1a5ca6b5f29ad01d445a1c0d460f1)
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 93b5a09..7104c4e 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -1079,6 +1079,12 @@ void XclExpChTrCellContent::SaveXml( XclExpXmlStream& rRevisionLogStrm )
if( pOldData )
{
lcl_WriteCell( rRevisionLogStrm, XML_oc, aPosition, pOldData );
+ if (!pNewData)
+ {
+ pStream->singleElement(XML_nc,
+ XML_r, XclXmlUtils::ToOString( aPosition ).getStr(),
+ FSEND);
+ }
}
if( pNewData )
{
commit e18dbfbcee04f1bf971aa993061ac16b304942e7
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Sun Dec 7 05:14:10 2014 +0100
we need the original context that contains the data, fdo#85856
Conflicts:
sc/source/core/data/documen2.cxx
Change-Id: I107201ab736b548f010d813540e0a9cec7402e79
Reviewed-on: https://gerrit.libreoffice.org/13343
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit c9770b4fc95e87e1f56f01b7b448d20e57277d50)
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 98cb68f..79e6f63 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -897,9 +897,8 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
aRefCxt.mnTabDelta = nDz;
maTabs[nNewPos]->UpdateReference(aRefCxt, NULL);
- sc::RefUpdateInsertTabContext aInsTabCxt(nNewPos, 1);
maTabs[nNewPos]->UpdateInsertTabAbs(nNewPos); // alle abs. um eins hoch!!
- maTabs[nOldPos]->UpdateInsertTab(aInsTabCxt);
+ maTabs[nOldPos]->UpdateInsertTab(aCxt);
maTabs[nOldPos]->UpdateCompile();
maTabs[nNewPos]->UpdateCompile( true ); // maybe already compiled in Clone, but used names need recompilation
commit 33a2c106f68c28d28a25d46d13c5a3f6e3f61d07
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Dec 8 00:47:44 2014 +0100
import part for: " use correct xml element name, related fdo#45266"
Change-Id: Ied71383fc837c7e667455f84937801e8d45f2989
Reviewed-on: https://gerrit.libreoffice.org/13360
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 21afec83dbb6ab338e43db647345cda81db1039a)
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 549446c..8bc0b1a 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -2619,6 +2619,7 @@ namespace xmloff { namespace token {
XML_STEP,
XML_DATA_PILOT_GROUPS,
XML_DATA_PILOT_GROUP,
+ XML_DATA_PILOT_GROUP_MEMBER,
XML_JAPANESE_CANDLE_STICK,
XML_NAMED_SYMBOL,
diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx
index 3840a78..db4cb90 100644
--- a/sc/source/filter/xml/xmldpimp.cxx
+++ b/sc/source/filter/xml/xmldpimp.cxx
@@ -1868,7 +1868,7 @@ SvXMLImportContext *ScXMLDataPilotGroupContext::CreateChildContext( sal_uInt16 n
if (nPrefix == XML_NAMESPACE_TABLE)
{
- if (IsXMLToken(rLName, XML_DATA_PILOT_MEMBER))
+ if (IsXMLToken(rLName, XML_DATA_PILOT_MEMBER) || IsXMLToken(rLName, XML_DATA_PILOT_GROUP_MEMBER))
pContext = new ScXMLDataPilotGroupMemberContext(GetScImport(), nPrefix, rLName, xAttrList, this);
}
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 379bb52..a3fb7d5 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1792,6 +1792,7 @@ const SvXMLTokenMap& ScXMLImport::GetDataPilotMembersElemTokenMap()
static const SvXMLTokenMapEntry aDataPilotMembersElemTokenMap[] =
{
{ XML_NAMESPACE_TABLE, XML_DATA_PILOT_MEMBER, XML_TOK_DATA_PILOT_MEMBERS_ELEM_DATA_PILOT_MEMBER },
+ { XML_NAMESPACE_TABLE, XML_DATA_PILOT_GROUP_MEMBER, XML_TOK_DATA_PILOT_MEMBERS_ELEM_DATA_PILOT_MEMBER },
XML_TOKEN_MAP_END
};
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 5833f04..4c96192 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -2624,6 +2624,7 @@ namespace xmloff { namespace token {
TOKEN( "step", XML_STEP ),
TOKEN( "data-pilot-groups", XML_DATA_PILOT_GROUPS ),
TOKEN( "data-pilot-group", XML_DATA_PILOT_GROUP ),
+ TOKEN( "data-pilot-group-member", XML_DATA_PILOT_GROUP_MEMBER ),
TOKEN( "japanese-candle-stick", XML_JAPANESE_CANDLE_STICK ),
TOKEN( "named-symbol", XML_NAMED_SYMBOL ),
TOKEN( "diamond", XML_DIAMOND ),
commit bc3a5901092079551309edb011467512bbfdf3be
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Mon Dec 22 23:57:50 2014 +0100
Resolves fdo#87581: Pb to delete words with 2 initials in Autocorr Except
Cherry-picked from a5811c70bb443190a76a52585580659f96a58a04
Change-Id: I49b97c5c1546f0410542cb67540c5507c95bec98
Reviewed-on: https://gerrit.libreoffice.org/13619
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 4d782fe3ba2f40804cad202d88ea64fde1396032)
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 1ac62ea..b8de639 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1489,7 +1489,7 @@ bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet& )
for( i = nCount; i; )
{
OUString aString = (*pWrdList)[ --i ];
- if( USHRT_MAX == m_pDoubleCapsLB->GetEntryPos(aString) )
+ if( LISTBOX_ENTRY_NOTFOUND == m_pDoubleCapsLB->GetEntryPos(aString) )
{
pWrdList->erase(i);
}
commit 7f0ceaf422b20288985259a9befa4e823318c828
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Mon Dec 29 06:01:27 2014 +0100
handle relative refs correctly in xls import, fdo#80091
Change-Id: Ia70f96e1d31e71c56f03c828be0a4e49fff4b198
Reviewed-on: https://gerrit.libreoffice.org/13688
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit be9631c2dd65a46f56c45615acd415422ee6a468)
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index 2fdf75e..be5a3ea 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -611,9 +611,12 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
ExcRelToScRel8( nRowFirst, nColFirst, aCRD.Ref1, bRNorSF );
ExcRelToScRel8( nRowLast, nColLast, aCRD.Ref2, bRNorSF );
- if( IsComplColRange( nColFirst, nColLast ) )
+ bool bColRel = aCRD.Ref1.IsColRel() || aCRD.Ref2.IsColRel();
+ bool bRowRel = aCRD.Ref1.IsRowRel() || aCRD.Ref2.IsRowRel();
+
+ if( !bColRel && IsComplColRange( nColFirst, nColLast ) )
SetComplCol( aCRD );
- else if( IsComplRowRange( nRowFirst, nRowLast ) )
+ else if( !bRowRel && IsComplRowRange( nRowFirst, nRowLast ) )
SetComplRow( aCRD );
aStack << aPool.Store( aCRD );
commit aee9703130101fab4db30f64496b9b07a18c5007
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 16 17:31:23 2014 +0000
this horror depends on unsigned max increment to wrap-around to 0
understandable dbgutil out of bounds iterator checking regression from
commit 3af368f0f8e6691aa2eef177ccfcfcb95885c84b
Date: Tue Aug 14 21:03:04 2012 +0200
AnimationWindow: convert List to std::vector
(cherry picked from commit 1c32b8747e0a2051b9abcb1e681c3ca08c039269)
(cherry picked from commit 402e020c09ff0a003cfd8f84719ff3cde633a295)
Conflicts:
sd/source/ui/dlg/animobjs.cxx
sd/source/ui/inc/animobjs.hxx
Change-Id: I8ff3e0726cc0d6e643f2f4e08b0ca41e327e5efc
Reviewed-on: https://gerrit.libreoffice.org/13497
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit c0d269254514274fcb200efc8090e1bb81878757)
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 0030348..111b37c 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -591,7 +591,8 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
if (!m_FrameList.empty() && !bMovie)
{
- aNumFldBitmap.SetValue(m_nCurrentFrame + 1);
+ size_t nIndex = m_nCurrentFrame + 1;
+ aNumFldBitmap.SetValue(nIndex);
// if there is at least 1 object in the list
aBtnFirst.Enable();
@@ -897,8 +898,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
long nTime = rAnimBmp.nWait;
Time* pTime = new Time( 0, 0, nTime / 100, nTime % 100 );
+ size_t nIndex = m_nCurrentFrame + 1;
m_FrameList.insert(
- m_FrameList.begin() + m_nCurrentFrame + 1,
+ m_FrameList.begin() + nIndex,
::std::make_pair(pBitmapEx, pTime));
// increment => next one inserted after this one
@@ -924,9 +926,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
pSnapShot->GetModel(), pSnapShot).GetBitmapEx() );
Time* pTime = new Time( aTimeField.GetTime() );
-
+ size_t nIndex = m_nCurrentFrame + 1;
m_FrameList.insert(
- m_FrameList.begin() + m_nCurrentFrame + 1,
+ m_FrameList.begin() + nIndex,
::std::make_pair(pBitmapEx, pTime));
// increment => next one inserted after this one
@@ -946,8 +948,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
Time* pTime = new Time( aTimeField.GetTime() );
+ size_t nIndex = m_nCurrentFrame + 1;
m_FrameList.insert(
- m_FrameList.begin() + m_nCurrentFrame + 1,
+ m_FrameList.begin() + nIndex,
::std::make_pair(pBitmapEx, pTime));
}
@@ -957,7 +960,8 @@ void AnimationWindow::AddObj (::sd::View& rView )
SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObject = pMark->GetMarkedSdrObj();
SdrObject* pClone = pObject->Clone();
- pPage->InsertObject(pClone, m_nCurrentFrame + 1);
+ size_t nIndex = m_nCurrentFrame + 1;
+ pPage->InsertObject(pClone, nIndex);
}
// several objects: group the clones
else if (nMarkCount > 1)
@@ -976,8 +980,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
Time* pTime = new Time( aTimeField.GetTime() );
+ size_t nIndex = m_nCurrentFrame + 1;
m_FrameList.insert(
- m_FrameList.begin() + m_nCurrentFrame + 1,
+ m_FrameList.begin() + nIndex,
::std::make_pair(pBitmapEx, pTime));
// increment => next one inserted after this one
@@ -995,7 +1000,8 @@ void AnimationWindow::AddObj (::sd::View& rView )
for (sal_uLong nObject= 0; nObject < nMarkCount; nObject++)
pObjList->InsertObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj()->Clone(), CONTAINER_APPEND);
- pPage->InsertObject(pCloneGroup, m_nCurrentFrame + 1);
+ size_t nIndex = m_nCurrentFrame + 1;
+ pPage->InsertObject(pCloneGroup, nIndex);
}
}
diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx
index 87fea276..0be13e4 100644
--- a/sd/source/ui/inc/animobjs.hxx
+++ b/sd/source/ui/inc/animobjs.hxx
@@ -132,7 +132,7 @@ private:
::Window* pWin;
::std::vector< ::std::pair<BitmapEx*, Time*> > m_FrameList;
- static const size_t EMPTY_FRAMELIST = ULONG_MAX;
+ static const size_t EMPTY_FRAMELIST = std::numeric_limits<size_t>::max();
size_t m_nCurrentFrame;
SdDrawDocument* pMyDoc;
commit a6806b702c4989253f55d9f4f63f862b54e0ab72
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 6 14:36:05 2015 +0000
Resolves: fdo#87823 Move Menu->New Menu
Change-Id: I677b519a1bcae3266baff4577b63971b6f8add75
(cherry picked from commit 3fda8cb3ed7c790d1b591f4f833054b777e5b490)
(cherry picked from commit fb5b995067702df770366b0af4c546a2b85c9f48)
Reviewed-on: https://gerrit.libreoffice.org/13770
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 5f020776e36da2c25d7991c984f5f7d07004d69e)
diff --git a/cui/uiconfig/ui/movemenu.ui b/cui/uiconfig/ui/movemenu.ui
index cdada84..5dc4242 100644
--- a/cui/uiconfig/ui/movemenu.ui
+++ b/cui/uiconfig/ui/movemenu.ui
@@ -5,7 +5,7 @@
<object class="GtkDialog" id="MoveMenuDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Move Menu</property>
+ <property name="title" translatable="yes">New Menu</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
commit 247a076c1b9bbe8b4816e9fba6b60c56c06e5b11
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Tue Dec 30 01:16:53 2014 +0100
relative refs wrap around in xls, fdo#84556
Change-Id: If84d468d4bd55ed55ccd517d0b078d283a1a9c38
Reviewed-on: https://gerrit.libreoffice.org/13695
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit 57009e242645590603b8854a81be74c1d4872fa1)
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index 1653ea9..2fdf75e 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -1409,7 +1409,16 @@ void ExcelToSc8::ExcRelToScRel8( sal_uInt16 nRow, sal_uInt16 nC, ScSingleRefData
{
// C O L
if( bColRel )
- rSRD.SetRelCol(static_cast<SCCOL>(static_cast<sal_Int8>(nC)));
+ {
+ SCCOL nRelCol = static_cast<sal_Int8>(nC);
+ sal_Int16 nDiff = aEingPos.Col() + nRelCol;
+ if ( nDiff < 0)
+ {
+ // relative column references wrap around
+ nRelCol = static_cast<sal_Int16>(256 + (int)nRelCol);
+ }
+ rSRD.SetRelCol(static_cast<SCCOL>(nRelCol));
+ }
else
rSRD.SetAbsCol(static_cast<SCCOL>(nCol));
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index ba281b8..18f55ff 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -859,17 +859,17 @@ void ImportExcel::Shrfmla( void )
const ScTokenArray* pErgebnis;
- pFormConv->Reset();
- pFormConv->Convert( pErgebnis, maStrm, nLenExpr, true, FT_SharedFormula );
-
- OSL_ENSURE( pErgebnis, "+ImportExcel::Shrfmla(): ScTokenArray is NULL!" );
-
// The shared range in this record is erroneous more than half the time.
- // Don't ever rely on it.
+ // Don't ever rely on it. Use the one from the formula cell above.
SCCOL nCol1 = mpLastFormula->mnCol;
SCROW nRow1 = mpLastFormula->mnRow;
ScAddress aPos(nCol1, nRow1, GetCurrScTab());
+ pFormConv->Reset(aPos);
+ pFormConv->Convert( pErgebnis, maStrm, nLenExpr, true, FT_SharedFormula );
+
+ OSL_ENSURE( pErgebnis, "+ImportExcel::Shrfmla(): ScTokenArray is NULL!" );
+
pExcRoot->pShrfmlaBuff->Store(aPos, *pErgebnis);
// Create formula cell for the last formula record.
commit dd0850b08f39fa125fbd13a72359e96b5b5726c9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 6 15:05:36 2015 +0000
Resolves: fdo#82219 color graphics as black and white
i.e. revert
commit bb5c7d6a79309236d4f19bb2498f2e850f735a2f
Date: Sun Apr 13 01:42:27 2014 +1000
fdo#38844 Reduce XOR clipping for gradients
Removed XOR clipping version of ClipAndDrawGradientMetafile. Because it
has been removed, the other version isn't really needed in it's own
function so I've moved it back into DrawGradient.
Change-Id: Ib1519a019061c8c71183db63e5c11681bcad4cc4
(cherry picked from commit e2883ca86f747eb62d1fe9e9b8d115c689e3abd7)
Reviewed-on: https://gerrit.libreoffice.org/13773
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit 938deff2a1e5451fd5493520480ae3c9615af3f9)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
Conflicts:
vcl/source/outdev/gradient.cxx
Change-Id: Iff1cb48cb8fa6d29937cf228a57aea9e8072110c
Reviewed-on: https://gerrit.libreoffice.org/13804
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit 3c3f77338ebfdc449cec2cd658bf07e99a765466)
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 25bf4cf..3e98666 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1463,6 +1463,8 @@ protected:
virtual void EmulateDrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
void DrawInvisiblePolygon( const PolyPolygon& rPolyPoly );
+ virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const PolyPolygon &rPolyPoly );
+
private:
SAL_DLLPRIVATE bool DrawTransparentNatively( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent );
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 01c3430..bb79496 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -259,6 +259,7 @@ protected:
virtual long GetGradientStepCount( long nMinRect ) SAL_OVERRIDE;
virtual bool UsePolyPolygonForComplexGradient() SAL_OVERRIDE;
+ virtual void ClipAndDrawGradientMetafile ( const Gradient &rGradient, const PolyPolygon &rPolyPoly ) SAL_OVERRIDE;
void ScaleBitmap ( Bitmap&, SalTwoRect& ) SAL_OVERRIDE { };
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index e6e1e36..3464fb9 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1812,6 +1812,16 @@ bool Printer::UsePolyPolygonForComplexGradient()
return true;
}
+void Printer::ClipAndDrawGradientMetafile ( const Gradient &rGradient, const PolyPolygon &rPolyPoly )
+{
+ const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+
+ Push( PUSH_CLIPREGION );
+ IntersectClipRegion(Region(rPolyPoly));
+ DrawGradient( aBoundRect, rGradient );
+ Pop();
+}
+
void Printer::InitFont() const
{
DBG_TESTSOLARMUTEX();
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 1f2a26c..a782664 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -84,10 +84,8 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_BEGIN" ) );
mpMetaFile->AddAction( new MetaGradientExAction( rPolyPoly, rGradient ) );
- Push( PUSH_CLIPREGION );
- IntersectClipRegion(Region(rPolyPoly));
- DrawGradient( aBoundRect, rGradient );
- Pop();
+
+ ClipAndDrawGradientMetafile(rGradient, rPolyPoly);
mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_END" ) );
}
@@ -162,6 +160,24 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
mpAlphaVDev->DrawPolyPolygon( rPolyPoly );
}
+void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient &rGradient, const PolyPolygon &rPolyPoly )
+{
+ const Rectangle aBoundRect( rPolyPoly.GetBoundRect() );
+ const bool bOldOutput = IsOutputEnabled();
+
+ EnableOutput( false );
+ Push( PUSH_RASTEROP );
+ SetRasterOp( ROP_XOR );
+ DrawGradient( aBoundRect, rGradient );
+ SetFillColor( COL_BLACK );
+ SetRasterOp( ROP_0 );
+ DrawPolyPolygon( rPolyPoly );
+ SetRasterOp( ROP_XOR );
+ DrawGradient( aBoundRect, rGradient );
+ Pop();
+ EnableOutput( bOldOutput );
+}
+
namespace
{
inline sal_uInt8 GetGradientColorValue( long nValue )
commit aa35d24c196e25ae03cf482d67f098d7323439b9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 7 13:08:22 2015 +0000
Resolves: fdo#73165 don't restart timer if already running
If the timer is already running and you restart it then it starts counting down
again so the timeout occasion just keeps getting pushed out indefinitely.
Change-Id: I907dcc20c6fb4a770deeebba459fe68c24a4ec98
Reviewed-on: https://gerrit.libreoffice.org/13792
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 0823a95da37cc0cf9d0490a3a3c6c0e0e0d0e11e)
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 58cff5c..4dd987d 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1791,9 +1791,11 @@ void SwDoc::UnblockIdling()
maIdleTimer.Start();
}
-void SwDoc::StartBackgroundJobs() {
+void SwDoc::StartBackgroundJobs()
+{
// Trigger DoIdleJobs(), asynchronously.
- maIdleTimer.Start();
+ if (!maIdleTimer.IsActive()) //fdo#73165 if the timer is already running don't restart from 0
+ maIdleTimer.Start();
}
IMPL_LINK( SwDoc, DoIdleJobs, Timer *, pTimer )
commit 5096e8b5395233bfdf99e41dc56f9efd42ac85e9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 7 11:28:41 2015 +0000
Resolves: fdo#87612 don't overwrite users input if the value is unchanged
so you can enter values without them getting auto-expanded to their
canonical form as you're typing them and having the insertion
point jump to the start causing real confusion. But retain the
improvement of fdo#61704 where the value is set when modified so
clicking "ok" without leaving the field works as expected
Change-Id: I6d6b08a56def9961422b341b3a97dd29d366aa5d
Reviewed-on: https://gerrit.libreoffice.org/13790
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 177cfe9b602a081f0c3a166e90aace16b868bca3)
diff --git a/sw/source/core/uibase/inc/column.hxx b/sw/source/core/uibase/inc/column.hxx
index 4026d94..8f760ff 100644
--- a/sw/source/core/uibase/inc/column.hxx
+++ b/sw/source/core/uibase/inc/column.hxx
@@ -153,7 +153,7 @@ class SwColumnPage : public SfxTabPage
void Apply(Button *);
void Timeout();
- void Update();
+ void Update(MetricField *pInteractiveField);
void UpdateCols();
void Init();
void ResetColWidth();
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index ff71b0b..793aae7 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -830,7 +830,7 @@ void SwColumnPage::Init()
}
UpdateCols();
- Update();
+ Update(NULL);
// set maximum number of columns
// values below 1 are not allowed
@@ -964,7 +964,7 @@ IMPL_LINK( SwColumnPage, ColModify, NumericField *, pNF )
SetLabels( nFirstVis );
UpdateCols();
ResetColWidth();
- Update();
+ Update(NULL);
}
return 0;
@@ -1041,7 +1041,7 @@ IMPL_LINK( SwColumnPage, GapModify, MetricField*, pMetricFld )
}
}
- Update();
+ Update(pMetricFld);
return 0;
}
@@ -1072,7 +1072,7 @@ IMPL_LINK( SwColumnPage, AutoWidthHdl, CheckBox *, pBox )
}
pColMgr->SetAutoWidth(pBox->IsChecked(), sal_uInt16(nDist));
UpdateCols();
- Update();
+ Update(NULL);
return 0;
}
@@ -1085,7 +1085,7 @@ IMPL_LINK_NOARG(SwColumnPage, Up)
{
--nFirstVis;
SetLabels( nFirstVis );
- Update();
+ Update(NULL);
}
return 0;
}
@@ -1099,7 +1099,7 @@ IMPL_LINK_NOARG(SwColumnPage, Down)
{
++nFirstVis;
SetLabels( nFirstVis );
- Update();
+ Update(NULL);
}
return 0;
}
@@ -1111,7 +1111,8 @@ IMPL_LINK_NOARG(SwColumnPage, Down)
------------------------------------------------------------------------*/
void SwColumnPage::Timeout()
{
- if(pModifiedField)
+ PercentField *pField = pModifiedField;
+ if (pModifiedField)
{
// find the changed column
sal_uInt16 nChanged = nFirstVis;
@@ -1147,24 +1148,49 @@ void SwColumnPage::Timeout()
nColWidth[nChanged] = nNewWidth;
pModifiedField = 0;
}
- Update();
+
+ Update(pField ? pField->get() : NULL);
}
/*------------------------------------------------------------------------
Description: Update the view
------------------------------------------------------------------------*/
-void SwColumnPage::Update()
+void SwColumnPage::Update(MetricField *pInteractiveField)
{
m_pBalanceColsCB->Enable(nCols > 1);
if(nCols >= 2)
{
- aEd1.SetPrcntValue(aEd1.NormalizePercent(nColWidth[nFirstVis]), FUNIT_TWIP);
- aDistEd1.SetPrcntValue(aDistEd1.NormalizePercent(nColDist[nFirstVis]), FUNIT_TWIP);
- aEd2.SetPrcntValue(aEd2.NormalizePercent(nColWidth[nFirstVis + 1]), FUNIT_TWIP);
+ sal_Int64 nCurrentValue, nNewValue;
+
+ nCurrentValue = aEd1.NormalizePercent(aEd1.DenormalizePercent(aEd1.GetValue(FUNIT_TWIP)));
+ nNewValue = aEd1.NormalizePercent(nColWidth[nFirstVis]);
+
+ //fdo#87612 if we're interacting with this widget and the value will be the same
+ //then leave it alone (i.e. don't change equivalent values of e.g. .8 -> 0.8)
+ if (nNewValue != nCurrentValue || pInteractiveField != aEd1.get())
+ aEd1.SetPrcntValue(nNewValue, FUNIT_TWIP);
+
+ nCurrentValue = aDistEd1.NormalizePercent(aDistEd1.DenormalizePercent(aDistEd1.GetValue(FUNIT_TWIP)));
+ nNewValue = aDistEd1.NormalizePercent(nColDist[nFirstVis]);
+ if (nNewValue != nCurrentValue || pInteractiveField != aDistEd1.get())
+ aDistEd1.SetPrcntValue(nNewValue, FUNIT_TWIP);
+
+ nCurrentValue = aEd2.NormalizePercent(aEd2.DenormalizePercent(aEd2.GetValue(FUNIT_TWIP)));
+ nNewValue = aEd2.NormalizePercent(nColWidth[nFirstVis+1]);
+ if (nNewValue != nCurrentValue || pInteractiveField != aEd2.get())
+ aEd2.SetPrcntValue(nNewValue, FUNIT_TWIP);
+
if(nCols >= 3)
{
- aDistEd2.SetPrcntValue(aDistEd2.NormalizePercent(nColDist[nFirstVis + 1]), FUNIT_TWIP);
- aEd3.SetPrcntValue(aEd3.NormalizePercent(nColWidth[nFirstVis + 2]), FUNIT_TWIP);
+ nCurrentValue = aDistEd2.NormalizePercent(aDistEd2.DenormalizePercent(aDistEd2.GetValue(FUNIT_TWIP)));
+ nNewValue = aDistEd2.NormalizePercent(nColDist[nFirstVis+1]);
+ if (nNewValue != nCurrentValue || pInteractiveField != aDistEd2.get())
+ aDistEd2.SetPrcntValue(nNewValue, FUNIT_TWIP);
+
+ nCurrentValue = aEd3.NormalizePercent(aEd3.DenormalizePercent(aEd3.GetValue(FUNIT_TWIP)));
+ nNewValue = aEd3.NormalizePercent(nColWidth[nFirstVis+2]);
+ if (nNewValue != nCurrentValue || pInteractiveField != aEd3.get())
+ aEd3.SetPrcntValue(nNewValue, FUNIT_TWIP);
}
else
{
@@ -1257,7 +1283,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
aDistEd1.SetMetricFieldMin(0);
aDistEd2.SetMetricFieldMin(0);
}
- Update();
+ Update(NULL);
}
int SwColumnPage::DeactivatePage(SfxItemSet *_pSet)
commit 625af0b3df7dc9f78e6a89bb61725044840f6cf7
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Wed Jan 7 16:43:38 2015 +0100
fix compilation
Change-Id: If55862447acc364203079ad98a0bffd0da2dff79
Reviewed-on: https://gerrit.libreoffice.org/13800
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 3c744def658df4e7d2154ee48eabe39969600486)
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 6803808..36b4053 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -294,8 +294,8 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
}
else
{
- ScAddress aCellPos( nPosX, nPosY, GetViewData().GetTabNo() );
- ScImportExport aObj( GetViewData().GetDocument(), aCellPos );
+ ScAddress aCellPos( nPosX, nPosY, GetViewData()->GetTabNo() );
+ ScImportExport aObj( GetViewData()->GetDocument(), aCellPos );
aObj.SetOverwriting( true );
OUString aStr;
commit 59de74dd0ad38fc26cf56985bcde10fe6200dab8
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Wed Jan 7 15:57:11 2015 +0100
fdo#88099 PostgreSQL-SDBC: use correct syntax for boolean comparisons
Change-Id: Iddb551b62b1ff3fc9ce977483e41faa9ad8aef13
Reviewed-on: https://gerrit.libreoffice.org/13799
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 92eadff29ac6f4e53b7123ccacba9e8e49772a8e)
diff --git a/connectivity/registry/postgresql/org/openoffice/Office/DataAccess/Drivers.xcu b/connectivity/registry/postgresql/org/openoffice/Office/DataAccess/Drivers.xcu
index 51f8148..63757e3 100644
--- a/connectivity/registry/postgresql/org/openoffice/Office/DataAccess/Drivers.xcu
+++ b/connectivity/registry/postgresql/org/openoffice/Office/DataAccess/Drivers.xcu
@@ -55,6 +55,11 @@
<value>false</value>
</prop>
</node>
+ <node oor:name="BooleanComparisonMode" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:int">
+ <value>2</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
<!-- These entries enable the "Advanced Settings" UI to change the settings
commit be2947e8baa85f7951907081ff51f86b550ae2b4
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Wed Jan 7 15:56:12 2015 +0100
protect agains past-the-end string access
Change-Id: I651c7b062b454fad85eff8852f7e62804a0d0058
Reviewed-on: https://gerrit.libreoffice.org/13798
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit cd0700994b4ced5cfb8504c1b58ebfdbc3515674)
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index ff89568..3610dbb 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -423,7 +423,7 @@ void splitSQL( const OString & sql, OStringVector &vec )
}
else if( singleQuote )
{
- if( '\'' == c && '\'' == sql[i+1] )
+ if( '\'' == c && (i+1) < length && '\'' == sql[i+1] )
{
// two subsequent single quotes within a quoted string
// mean a single quote within the string
commit e910de2501e6aed82e01930478ed7a14cfd0836a
Author: Andras Timar <andras.timar at collabora.com>
Date: Mon Dec 15 10:19:14 2014 +0100
fdo#87292 use system dependent path instead of file URL
Change-Id: I3da4cd7af16a8ecfb19ce23e01117e735e9dd8d6
(cherry picked from commit efe3e06dd1b99215d82b6373aa7434a8f25a22f2)
Reviewed-on: https://gerrit.libreoffice.org/13479
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit ab5e09164df88bbfe6060d095678b20898fcec3e)
diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx
index 1f223ce..c1cc764 100644
--- a/svx/source/dialog/linkwarn.cxx
+++ b/svx/source/dialog/linkwarn.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <osl/file.hxx>
#include <svx/linkwarn.hxx>
#include <svtools/miscopt.hxx>
@@ -27,7 +28,10 @@ SvxLinkWarningDialog::SvxLinkWarningDialog( Window* pParent, const OUString& _rF
// replace filename
OUString sInfoText = get_primary_text();
- sInfoText = sInfoText.replaceAll("%FILENAME", _rFileName);
+ OUString aPath;
+ if ( osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL( _rFileName, aPath ) )
+ aPath = _rFileName;
+ sInfoText = sInfoText.replaceAll("%FILENAME", aPath);
set_primary_text( sInfoText );
// load state of "warning on" checkbox from misc options
commit 6af58992897534e07513627aaf507be2d3258de6
Author: David Tardon <dtardon at redhat.com>
Date: Fri Dec 12 17:09:45 2014 +0100
rhbz#1116534 crash when pasting over a formula
When pasting CSV data into existing document, we cannot use the
ScImportExport optimization for insertion, because the cells can already
have content (a grouped formula in this case). So use appropriate
ScDocument functions, even if that means the import is slower.
This is a regression from commit 93959db4d8846cfdfb87ab647c4d457fb09bb869
"use DocumentImport for csv import, related fdo#69006".
(cherry picked from commit bf97980c8d5d5fbc63a08b8834c10fe903152b75)
Conflicts:
sc/source/ui/view/viewfun5.cxx
Change-Id: I92f70abca0542d796e3aa674b28a31053fff00d0
Reviewed-on: https://gerrit.libreoffice.org/13456
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
(cherry picked from commit 40ec3aa2d5f9ecf713cce0fd7c89fdd5f830f664)
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 9882966..feba39c 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -85,7 +85,8 @@ ScImportExport::ScImportExport( ScDocument* p )
bFormulas( false ), bIncludeFiltered( true ),
bAll( true ), bSingle( true ), bUndo( false ),
bOverflowRow( false ), bOverflowCol( false ), bOverflowCell( false ),
- mbApi( true ), mbImportBroadcast(false), mExportTextOptions()
+ mbApi( true ), mbImportBroadcast(false), mbOverwriting( false ),
+ mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -99,7 +100,8 @@ ScImportExport::ScImportExport( ScDocument* p, const ScAddress& rPt )
bFormulas( false ), bIncludeFiltered( true ),
bAll( false ), bSingle( true ), bUndo( pDocSh != NULL ),
bOverflowRow( false ), bOverflowCol( false ), bOverflowCell( false ),
- mbApi( true ), mbImportBroadcast(false), mExportTextOptions()
+ mbApi( true ), mbImportBroadcast(false), mbOverwriting( false ),
+ mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -114,7 +116,8 @@ ScImportExport::ScImportExport( ScDocument* p, const ScRange& r )
bFormulas( false ), bIncludeFiltered( true ),
bAll( false ), bSingle( false ), bUndo( pDocSh != NULL ),
bOverflowRow( false ), bOverflowCol( false ), bOverflowCell( false ),
- mbApi( true ), mbImportBroadcast(false), mExportTextOptions()
+ mbApi( true ), mbImportBroadcast(false), mbOverwriting( false ),
+ mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -130,7 +133,8 @@ ScImportExport::ScImportExport( ScDocument* p, const OUString& rPos )
bFormulas( false ), bIncludeFiltered( true ),
bAll( false ), bSingle( true ), bUndo( pDocSh != NULL ),
bOverflowRow( false ), bOverflowCol( false ), bOverflowCell( false ),
- mbApi( true ), mbImportBroadcast(false), mExportTextOptions()
+ mbApi( true ), mbImportBroadcast(false), mbOverwriting( false ),
+ mExportTextOptions()
{
pUndoDoc = NULL;
pExtOptions = NULL;
@@ -928,7 +932,8 @@ bool ScImportExport::Text2Doc( SvStream& rStrm )
// Extended Ascii-Import
static bool lcl_PutString(
- ScDocumentImport& rDocImport, SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rStr, sal_uInt8 nColFormat,
+ ScDocumentImport& rDocImport, bool bUseDocImport,
+ SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rStr, sal_uInt8 nColFormat,
SvNumberFormatter* pFormatter, bool bDetectNumFormat,
::utl::TransliterationWrapper& rTransliteration, CalendarWrapper& rCalendar,
::utl::TransliterationWrapper* pSecondTransliteration, CalendarWrapper* pSecondCalendar )
@@ -952,17 +957,24 @@ static bool lcl_PutString(
pDoc->ApplyPattern(nCol, nRow, nTab, aNewAttrs);
}
- if(ScStringUtil::isMultiline(rStr))
+ if ( bUseDocImport )
{
- ScFieldEditEngine& rEngine = pDoc->GetEditEngine();
- rEngine.SetText(rStr);
- rDocImport.setEditCell(ScAddress(nCol, nRow, nTab), rEngine.CreateTextObject());
- return true;
- }
- else
+ if(ScStringUtil::isMultiline(rStr))
+ {
+ ScFieldEditEngine& rEngine = pDoc->GetEditEngine();
+ rEngine.SetText(rStr);
+ rDocImport.setEditCell(ScAddress(nCol, nRow, nTab), rEngine.CreateTextObject());
+ return true;
+ }
+ else
+ {
+ rDocImport.setStringCell(ScAddress(nCol, nRow, nTab), rStr);
+ return false;
+ }
+ } else
{
- rDocImport.setStringCell(ScAddress(nCol, nRow, nTab), rStr);
- return false;
+ pDoc->SetTextCell(ScAddress(nCol, nRow, nTab), rStr);
+ return bMultiLine;
}
}
@@ -976,7 +988,10 @@ static bool lcl_PutString(
if ( pDocFormatter->IsNumberFormat( rStr, nEnglish, fVal ) )
{
// Numberformat will not be set to English
- rDocImport.setNumericCell( ScAddress( nCol, nRow, nTab ), fVal );
+ if ( bUseDocImport )
+ rDocImport.setNumericCell( ScAddress( nCol, nRow, nTab ), fVal );
+ else
+ pDoc->SetValue( nCol, nRow, nTab, fVal );
return bMultiLine;
}
// else, continue with SetString
@@ -1165,7 +1180,10 @@ static bool lcl_PutString(
nFormat = pDocFormatter->GetStandardFormat( fDays, nFormat, nType, eDocLang);
ScAddress aPos(nCol,nRow,nTab);
- rDocImport.setNumericCell(aPos, fDays);
+ if ( bUseDocImport )
+ rDocImport.setNumericCell(aPos, fDays);
+ else
+ pDoc->SetValue( aPos, fDays );
pDoc->SetNumberFormat(aPos, nFormat);
return bMultiLine; // success
@@ -1182,14 +1200,20 @@ static bool lcl_PutString(
aParam.mbDetectNumberFormat = bDetectNumFormat;
aParam.meSetTextNumFormat = ScSetStringParam::SpecialNumberOnly;
aParam.mbHandleApostrophe = false;
- rDocImport.setAutoInput(ScAddress(nCol, nRow, nTab), rStr, &aParam);
+ if ( bUseDocImport )
+ rDocImport.setAutoInput(ScAddress(nCol, nRow, nTab), rStr, &aParam);
+ else
+ pDoc->SetString( nCol, nRow, nTab, rStr, &aParam );
}
else
{
bMultiLine = true;
ScFieldEditEngine& rEngine = pDoc->GetEditEngine();
rEngine.SetText(rStr);
- rDocImport.setEditCell(ScAddress(nCol, nRow, nTab), rEngine.CreateTextObject());
+ if ( bUseDocImport )
+ rDocImport.setEditCell(ScAddress(nCol, nRow, nTab), rEngine.CreateTextObject());
+ else
+ pDoc->SetEditText( ScAddress( nCol, nRow, nTab ), rEngine.CreateTextObject() );
}
return bMultiLine;
}
@@ -1347,7 +1371,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
nFmt = SC_COL_TEXT;
bMultiLine |= lcl_PutString(
- aDocImport, nCol, nRow, nTab, aCell, nFmt,
+ aDocImport, !mbOverwriting, nCol, nRow, nTab, aCell, nFmt,
&aNumFormatter, bDetectNumFormat, aTransliteration, aCalendar,
pEnglishTransliteration.get(), pEnglishCalendar.get());
}
@@ -1390,7 +1414,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
nFmt = SC_COL_TEXT;
bMultiLine |= lcl_PutString(
- aDocImport, nCol, nRow, nTab, aCell, nFmt,
+ aDocImport, !mbOverwriting, nCol, nRow, nTab, aCell, nFmt,
&aNumFormatter, bDetectNumFormat, aTransliteration,
aCalendar, pEnglishTransliteration.get(), pEnglishCalendar.get());
}
@@ -1448,13 +1472,14 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
bDetermineRange = !bDetermineRange; // toggle
} while (!bDetermineRange);
- aDocImport.finalize();
+ if ( !mbOverwriting )
+ aDocImport.finalize();
xProgress.reset(); // make room for AdjustRowHeight progress
if (bRangeIsDetermined)
EndPaste(false);
- if (mbImportBroadcast)
+ if (mbImportBroadcast && !mbOverwriting)
{
pDoc->BroadcastCells(aRange, SC_HINT_DATACHANGED);
pDocSh->PostDataChanged();
diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx
index 9faa1a6..0db2234 100644
--- a/sc/source/ui/inc/impex.hxx
+++ b/sc/source/ui/inc/impex.hxx
@@ -67,6 +67,9 @@ class ScImportExport
bool bOverflowCell; // too much data for a cell
bool mbApi;
bool mbImportBroadcast; // whether or not to broadcast after data import.
+ bool mbOverwriting; // Whether we could be overwriting existing values (paste).
+ // In this case we cannot use the insert optimization, but we
+ // do not need to broadcast after the import.
ScExportTextOptions mExportTextOptions;
ScAsciiOptions* pExtOptions; // extended options
@@ -155,6 +158,7 @@ public:
bool IsApi() const { return mbApi; }
void SetApi( bool bApi ) { mbApi = bApi; }
void SetImportBroadcast( bool b ) { mbImportBroadcast = b; }
+ void SetOverwriting( const bool bOverwriting ) { mbOverwriting = bOverwriting; }
const ScExportTextOptions& GetExportTextOptions() { return mExportTextOptions; }
void SetExportTextOptions( const ScExportTextOptions& options ) { mExportTextOptions = options; }
};
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 9d39811..6803808 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -294,9 +294,9 @@ bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
}
else
{
- ScAddress aCellPos( nPosX, nPosY, GetViewData()->GetTabNo() );
- ScImportExport aObj( GetViewData()->GetDocument(), aCellPos );
- aObj.SetImportBroadcast(true);
+ ScAddress aCellPos( nPosX, nPosY, GetViewData().GetTabNo() );
+ ScImportExport aObj( GetViewData().GetDocument(), aCellPos );
+ aObj.SetOverwriting( true );
OUString aStr;
SotStorageStreamRef xStream;
commit b12c388492b9e69f7a9606e30b3a2232c5deb5ff
Author: Eike Rathke <erack at redhat.com>
Date: Thu Dec 18 13:26:48 2014 +0100
Resolves: fdo#86978 append formula cells to track instead of tree
Cells in FormulaTree are assumed to be tracked already and their
dependents be notified. Also postpone tracking until all listeners are
established.
(cherry picked from commit 573f5dfba805b733dd2da62bde3cd5d9d25879d9)
Conflicts:
sc/source/core/data/formulacell.cxx
Change-Id: I7f27fba979fe231e3d3cd071fcc8a273142cb3f3
Reviewed-on: https://gerrit.libreoffice.org/13523
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
(cherry picked from commit d210265a1b6c4d7b405ef6e79fd30395ca1bc0aa)
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index f53426a0..af7d98f 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -3735,6 +3735,10 @@ void ScDocument::CompileXML()
if ( pValidationList )
pValidationList->CompileXML();
+ // Track all formula cells that were appended to the FormulaTrack during
+ // import or CompileXML().
+ TrackFormulas();
+
SetAutoCalc( bOldAutoCalc );
}
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 48e6760..da68f68 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2033,7 +2033,14 @@ void ScFormulaCell::SetDirty( bool bDirtyFlag )
if( bDirtyFlag )
SetDirtyVar();
pDocument->AppendToFormulaTrack( this );
- pDocument->TrackFormulas();
+
+ // While loading a document listeners have not been established yet.
+ // Tracking would remove this cell from the FormulaTrack and add it to
+ // the FormulaTree, once in there it would be assumed that its
+ // dependents already had been tracked and it would be skipped on a
+ // subsequent notify. Postpone tracking until all listeners are set.
+ if (!pDocument->IsImportingXML())
+ pDocument->TrackFormulas();
}
}
commit e0504b17b930d8056820b14d469fee1d82b60a3f
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Sun Dec 21 18:44:26 2014 +0100
fdo#87555 ComboBox in table should use same formatting as floating ComboBox
Same as fdo#67615 for TexFields, but for ComboBox.
Same problem, same cause, same solution.
ListBox seems not to have this problem :)
Change-Id: I953c5452f6c313b8940fbd1048b4c901b331fc58
Reviewed-on: https://gerrit.libreoffice.org/13580
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit b8dfd3ae3c322d9cabc78e76c5a9d18ead5823cd)
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 0863c60..3e866f3 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2452,7 +2452,6 @@ bool DbTimeField::commitControl()
DbComboBox::DbComboBox(DbGridColumn& _rColumn)
:DbCellControl(_rColumn)
- ,m_nKeyType(::com::sun::star::util::NumberFormat::UNDEFINED)
{
setAlignedController( false );
@@ -2524,9 +2523,6 @@ void DbComboBox::Init( Window& rParent, const Reference< XRowSet >& xCursor )
SetList( xModel->getPropertyValue( FM_PROP_STRINGITEMLIST ) );
implAdjustGenericFieldSetting( xModel );
- if (m_rColumn.GetParent().getNumberFormatter().is())
- m_nKeyType = comphelper::getNumberFormatType(m_rColumn.GetParent().getNumberFormatter()->getNumberFormatsSupplier()->getNumberFormats(), m_rColumn.GetKey());
-
DbCellControl::Init( rParent, xCursor );
}
@@ -2539,17 +2535,10 @@ CellControllerRef DbComboBox::CreateController() const
OUString DbComboBox::GetFormatText(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
{
- OUString aString;
- if (_rxField.is())
- try
- {
- aString = getFormattedValue( _rxField, xFormatter, m_rColumn.GetParent().getNullDate(), m_rColumn.GetKey(), m_nKeyType );
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- return aString;
+ const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xPS(_rxField, UNO_QUERY);
+ ::dbtools::FormattedColumnValue fmter( xFormatter, xPS );
+
+ return fmter.getFormattedValue();
}
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 9e86abd..6c1a372 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -473,7 +473,6 @@ protected:
class DbComboBox : public DbCellControl
{
- sal_Int16 m_nKeyType;
public:
TYPEINFO_OVERRIDE();
commit 49a428c5074e66d1905d68f8c0049ea0a85d9bdf
Author: Eike Rathke <erack at redhat.com>
Date: Mon Dec 22 21:14:11 2014 +0100
fdo#85258 differentiate between empty cell and empty result in matrix
Change-Id: I79259224e411f9c1a6e852623d9d49cf89a03c27
(cherry picked from commit 069698de192ef7e8d3582398e4542c175cabb987)
Reviewed-on: https://gerrit.libreoffice.org/13617
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 007bede69824b2caee948d21acefc2f5b0f63b3a)
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index 1e4c74f..851caa4 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -278,6 +278,9 @@ public:
/** Put a column vector of empties, starting at row nR, must fit into dimensions. */
void PutEmptyVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR );
+ /** Put a column vector of empty results, starting at row nR, must fit into dimensions. */
+ void PutEmptyResultVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR );
+
/** Put a column vector of empty paths, starting at row nR, must fit into dimensions. */
void PutEmptyPathVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR );
@@ -322,6 +325,9 @@ public:
/// @return <TRUE/> if empty or empty path.
bool IsEmpty( SCSIZE nC, SCSIZE nR ) const;
+ /// @return <TRUE/> if empty, not empty result or empty path.
+ bool IsEmptyCell( SCSIZE nC, SCSIZE nR ) const;
+
/// @return <TRUE/> if empty path.
bool IsEmptyPath( SCSIZE nC, SCSIZE nR ) const;
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 08a00c0..06ee75a 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -2065,16 +2065,23 @@ namespace {
struct CellBucket
{
+ SCSIZE mnEmpValStart;
SCSIZE mnNumValStart;
SCSIZE mnStrValStart;
+ SCSIZE mnEmpValCount;
std::vector<double> maNumVals;
std::vector<svl::SharedString> maStrVals;
- CellBucket() : mnNumValStart(0), mnStrValStart(0) {}
+ CellBucket() : mnEmpValStart(0), mnNumValStart(0), mnStrValStart(0), mnEmpValCount(0) {}
void flush(ScMatrix& rMat, SCSIZE nCol)
{
- if (!maNumVals.empty())
+ if (mnEmpValCount)
+ {
+ rMat.PutEmptyResultVector(mnEmpValCount, nCol, mnEmpValStart);
+ reset();
+ }
+ else if (!maNumVals.empty())
{
const double* p = &maNumVals[0];
rMat.PutDouble(p, maNumVals.size(), nCol, mnNumValStart);
@@ -2090,7 +2097,8 @@ struct CellBucket
void reset()
{
- mnNumValStart = mnStrValStart = 0;
+ mnEmpValStart = mnNumValStart = mnStrValStart = 0;
+ mnEmpValCount = 0;
maNumVals.clear();
maStrVals.clear();
}
@@ -2162,7 +2170,18 @@ public:
if (rCell.IsEmpty())
{
- aBucket.flush(mrMat, mnMatCol);
+ if (aBucket.mnEmpValCount && nThisRow == nPrevRow + 1)
+ {
+ // Secondary empty results.
+ ++aBucket.mnEmpValCount;
+ }
+ else
+ {
+ // First empty result.
+ aBucket.flush(mrMat, mnMatCol);
+ aBucket.mnEmpValStart = nThisRow - mnTopRow;
+ ++aBucket.mnEmpValCount;
+ }
continue;
}
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 493080a..4a63f14 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1893,14 +1893,14 @@ void ScInterpreter::ScIsEmpty()
if ( !pMat )
; // nothing
else if ( !pJumpMatrix )
- nRes = pMat->IsEmpty( 0, 0) ? 1 : 0;
+ nRes = pMat->IsEmptyCell( 0, 0) ? 1 : 0;
else
{
SCSIZE nCols, nRows, nC, nR;
pMat->GetDimensions( nCols, nRows);
pJumpMatrix->GetPos( nC, nR);
if ( nC < nCols && nR < nRows )
- nRes = pMat->IsEmpty( nC, nR) ? 1 : 0;
+ nRes = pMat->IsEmptyCell( nC, nR) ? 1 : 0;
// else: false, not empty (which is what Xcl does)
}
}
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 19f65dd..b71cc1d 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -194,6 +194,13 @@ _Comp CompareMatrixElemFunc<_Comp>::maComp;
}
+/* TODO: it would be good if mdds had get/set<sal_uInt8> additionally to
+ * get/set<bool>, we're abusing double here. */
+typedef double TMatFlag;
+const TMatFlag SC_MATFLAG_EMPTYCELL = 0.0;
+const TMatFlag SC_MATFLAG_EMPTYRESULT = 1.0;
+const TMatFlag SC_MATFLAG_EMPTYPATH = 2.0;
+
class ScMatrixImpl: private boost::noncopyable
{
MatrixImplType maMat;
@@ -246,6 +253,7 @@ public:
bool IsString( SCSIZE nIndex ) const;
bool IsString( SCSIZE nC, SCSIZE nR ) const;
bool IsEmpty( SCSIZE nC, SCSIZE nR ) const;
+ bool IsEmptyCell( SCSIZE nC, SCSIZE nR ) const;
bool IsEmptyPath( SCSIZE nC, SCSIZE nR ) const;
bool IsValue( SCSIZE nIndex ) const;
bool IsValue( SCSIZE nC, SCSIZE nR ) const;
@@ -259,6 +267,7 @@ public:
void PutDoubleVector( const ::std::vector< double > & rVec, SCSIZE nC, SCSIZE nR );
void PutStringVector( const ::std::vector< svl::SharedString > & rVec, SCSIZE nC, SCSIZE nR );
void PutEmptyVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR );
+ void PutEmptyResultVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR );
void PutEmptyPathVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR );
void CompareEqual();
void CompareNotEqual();
@@ -295,7 +304,7 @@ private:
};
ScMatrixImpl::ScMatrixImpl(SCSIZE nC, SCSIZE nR) :
- maMat(nR, nC), maMatFlag(nR, nC), pErrorInterpreter(NULL), mbCloneIfConst(true) {}
+ maMat(nR, nC), maMatFlag(nR, nC, SC_MATFLAG_EMPTYCELL), pErrorInterpreter(NULL), mbCloneIfConst(true) {}
ScMatrixImpl::ScMatrixImpl(SCSIZE nC, SCSIZE nR, double fInitVal) :
maMat(nR, nC, fInitVal), maMatFlag(nR, nC), pErrorInterpreter(NULL), mbCloneIfConst(true) {}
@@ -454,7 +463,7 @@ void ScMatrixImpl::PutEmpty(SCSIZE nC, SCSIZE nR)
if (ValidColRow( nC, nR))
{
maMat.set_empty(nR, nC);
- maMatFlag.set(nR, nC, false); // zero flag to indicate that this is 'empty', not 'empty path'.
+ maMatFlag.set(nR, nC, SC_MATFLAG_EMPTYCELL);
}
else
{
@@ -467,7 +476,7 @@ void ScMatrixImpl::PutEmptyPath(SCSIZE nC, SCSIZE nR)
if (ValidColRow( nC, nR))
{
maMat.set_empty(nR, nC);
- maMatFlag.set(nR, nC, true); // non-zero flag to indicate empty 'path'.
+ maMatFlag.set(nR, nC, SC_MATFLAG_EMPTYPATH);
}
else
{
@@ -582,7 +591,7 @@ svl::SharedString ScMatrixImpl::GetString( SvNumberFormatter& rFormatter, SCSIZE
return maMat.get_string(aPos).getString();
case mdds::mtm::element_empty:
{
- if (!maMatFlag.get<bool>(nR, nC))
+ if (maMatFlag.get<TMatFlag>(nR, nC) != SC_MATFLAG_EMPTYPATH)
// not an empty path.
return svl::SharedString::getEmptyString();
@@ -638,8 +647,10 @@ ScMatrixValue ScMatrixImpl::Get(SCSIZE nC, SCSIZE nR) const
aVal.aStr = maMat.get_string(aPos);
break;
case mdds::mtm::element_empty:
- // Empty path equals empty plus flag.
- aVal.nType = maMatFlag.get<bool>(nR, nC) ? SC_MATVAL_EMPTYPATH : SC_MATVAL_EMPTY;
+ /* TODO: do we need to pass the differentiation of 'empty' and
+ * 'empty result' to the outer world anywhere? */
+ aVal.nType = maMatFlag.get<TMatFlag>(nR, nC) == SC_MATFLAG_EMPTYPATH ? SC_MATVAL_EMPTYPATH :
+ SC_MATVAL_EMPTY;
aVal.fVal = 0.0;
default:
;
@@ -675,17 +686,28 @@ bool ScMatrixImpl::IsString( SCSIZE nC, SCSIZE nR ) const
bool ScMatrixImpl::IsEmpty( SCSIZE nC, SCSIZE nR ) const
{
- // Flag must be zero for this to be an empty element, instead of being an
- // empty path element.
+ // Flag must indicate an empty element instead of an
+ // 'empty path' element.
+ ValidColRowReplicated( nC, nR );
+ return maMat.get_type(nR, nC) == mdds::mtm::element_empty &&
+ maMatFlag.get<TMatFlag>(nR, nC) != SC_MATFLAG_EMPTYPATH;
+}
+
+bool ScMatrixImpl::IsEmptyCell( SCSIZE nC, SCSIZE nR ) const
+{
+ // Flag must indicate an 'empty' element instead of an
+ // 'empty result' or 'empty path' element.
ValidColRowReplicated( nC, nR );
- return maMat.get_type(nR, nC) == mdds::mtm::element_empty && !maMatFlag.get<bool>(nR, nC);
+ return maMat.get_type(nR, nC) == mdds::mtm::element_empty &&
+ maMatFlag.get<TMatFlag>(nR, nC) == SC_MATFLAG_EMPTYCELL;
}
bool ScMatrixImpl::IsEmptyPath( SCSIZE nC, SCSIZE nR ) const
{
- // 'Empty path' is empty plus non-zero flag.
+ // Flag must indicate an 'empty path' element.
if (ValidColRowOrReplicated( nC, nR ))
- return maMat.get_type(nR, nC) == mdds::mtm::element_empty && maMatFlag.get<bool>(nR, nC);
+ return maMat.get_type(nR, nC) == mdds::mtm::element_empty &&
+ maMatFlag.get<TMatFlag>(nR, nC) == SC_MATFLAG_EMPTYPATH;
else
return true;
}
@@ -801,8 +823,8 @@ void ScMatrixImpl::PutEmptyVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR )
if (nCount && ValidColRow( nC, nR) && ValidColRow( nC, nR + nCount - 1))
{
maMat.set_empty(nR, nC, nCount);
- // zero flag to indicate that this is 'empty', not 'empty path'.
- std::vector<bool> aVals(nCount, false);
+ // Flag to indicate that this is 'empty', not 'empty result' or 'empty path'.
+ std::vector<TMatFlag> aVals(nCount, SC_MATFLAG_EMPTYCELL);
maMatFlag.set(nR, nC, aVals.begin(), aVals.end());
}
else
@@ -811,13 +833,28 @@ void ScMatrixImpl::PutEmptyVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR )
}
}
+void ScMatrixImpl::PutEmptyResultVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR )
+{
+ if (nCount && ValidColRow( nC, nR) && ValidColRow( nC, nR + nCount - 1))
+ {
+ maMat.set_empty(nR, nC, nCount);
+ // Flag to indicate that this is 'empty result', not 'empty' or 'empty path'.
+ std::vector<TMatFlag> aVals(nCount, SC_MATFLAG_EMPTYRESULT);
+ maMatFlag.set(nR, nC, aVals.begin(), aVals.end());
+ }
+ else
+ {
+ OSL_FAIL("ScMatrixImpl::PutEmptyResultVector: dimension error");
+ }
+}
+
void ScMatrixImpl::PutEmptyPathVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR )
{
if (nCount && ValidColRow( nC, nR) && ValidColRow( nC, nR + nCount - 1))
{
maMat.set_empty(nR, nC, nCount);
- // non-zero flag to indicate empty 'path'.
- std::vector<bool> aVals(nCount, true);
+ // Flag to indicate 'empty path'.
+ std::vector<TMatFlag> aVals(nCount, SC_MATFLAG_EMPTYPATH);
maMatFlag.set(nR, nC, aVals.begin(), aVals.end());
}
else
@@ -2075,6 +2112,11 @@ bool ScMatrix::IsEmpty( SCSIZE nC, SCSIZE nR ) const
return pImpl->IsEmpty(nC, nR);
}
+bool ScMatrix::IsEmptyCell( SCSIZE nC, SCSIZE nR ) const
+{
+ return pImpl->IsEmptyCell(nC, nR);
+}
+
bool ScMatrix::IsEmptyPath( SCSIZE nC, SCSIZE nR ) const
{
return pImpl->IsEmptyPath(nC, nR);
@@ -2135,6 +2177,11 @@ void ScMatrix::PutEmptyVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR )
pImpl->PutEmptyVector(nCount, nC, nR);
}
+void ScMatrix::PutEmptyResultVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR )
+{
+ pImpl->PutEmptyResultVector(nCount, nC, nR);
+}
+
void ScMatrix::PutEmptyPathVector( SCSIZE nCount, SCSIZE nC, SCSIZE nR )
{
pImpl->PutEmptyPathVector(nCount, nC, nR);
commit b6644ba1844e47a61653561ff57fde95abed574c
Author: Eike Rathke <erack at redhat.com>
Date: Tue Dec 16 01:37:31 2014 +0100
fdo#79249 call formula compiler with error string
... instead of attempting to stringize a NaN coded error value.
Regression introduced with 30a20743ae17e6e02183a65603d38968253b3ffb
(cherry picked from commit 994607b55104b9ae4554554c13b001b8d5d513b6)
construct grouped ScFormulaCell with bDirty=true, fdo#79249 related
Noticed when loading
https://bugs.freedesktop.org/attachment.cgi?id=99844
with fdo#79249 fix where oox::xls::applyCellFormulas() groups the
consecutive =#N/A formulas. Only A1 result was displayed, other cells
were displayed empty.
(cherry picked from commit a1dc5e97da273bf35d58d54e625149022569a993)
correct error string, #N/A instead of #NA
(cherry picked from commit 758755e31b3d9e1ed2eab522d4794282178346ac)
implement an actually working setErrorCell() from BIFF error codes
(cherry picked from commit ca9a81b2ca858b82e863e1e6f917928916fea79e)
Change-Id: Ia7a8ca39938820ac75db169404446fa696c6ee1b
3a541f74d3d25e1515a1c6d47f02ec6a8e817c93
15019072b6e812b9ffe29d3ee6afacd9ab526948
67b8fc324779875ba14e2d69204c40fe27cc180e
Reviewed-on: https://gerrit.libreoffice.org/13490
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
(cherry picked from commit 11724301fb690cbd58581e468f3cd80e7becc07d)
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index db3ccb2..48e6760 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -687,7 +687,7 @@ ScFormulaCell::ScFormulaCell(
nSeenInIteration(0),
cMatrixFlag ( cInd ),
nFormatType(xGroup->mnFormatType),
- bDirty(false),
+ bDirty(true),
bChanged( false ),
bRunning( false ),
bCompile( false ),
diff --git a/sc/source/filter/inc/unitconverter.hxx b/sc/source/filter/inc/unitconverter.hxx
index 726a133..1f13945 100644
--- a/sc/source/filter/inc/unitconverter.hxx
+++ b/sc/source/filter/inc/unitconverter.hxx
@@ -86,6 +86,9 @@ public:
/** Returns a BIFF error code from the passed error string. */
sal_uInt8 calcBiffErrorCode( const OUString& rErrorCode ) const;
+ /** Returns an error string from the passed BIFF error code. */
+ const OUString& calcErrorString( sal_uInt8 nErrorCode ) const;
+
private:
/** Adds an error code to the internal maps. */
void addErrorCode( sal_uInt8 nErrorCode, const OUString& rErrorCode );
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index 434c07c..68b39db 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -197,18 +197,14 @@ void SheetDataBuffer::setBooleanCell( const CellModel& rModel, bool bValue )
void SheetDataBuffer::setErrorCell( const CellModel& rModel, const OUString& rErrorCode )
{
- setErrorCell( rModel, getUnitConverter().calcBiffErrorCode( rErrorCode ) );
+ // Using the formula compiler now we can simply pass on the error string.
+ getFormulaBuffer().setCellFormula( rModel.maCellAddr, rErrorCode);
+ setCellFormat( rModel );
}
void SheetDataBuffer::setErrorCell( const CellModel& rModel, sal_uInt8 nErrorCode )
{
- OUStringBuffer aBuf;
- aBuf.append('{');
- aBuf.append(BiffHelper::calcDoubleFromError(nErrorCode));
- aBuf.append('}');
-
- getFormulaBuffer().setCellFormula(rModel.maCellAddr, aBuf.makeStringAndClear());
- setCellFormat( rModel );
+ setErrorCell( rModel, getUnitConverter().calcErrorString( nErrorCode));
}
void SheetDataBuffer::setDateCell( const CellModel& rModel, const OUString& rDateString )
diff --git a/sc/source/filter/oox/unitconverter.cxx b/sc/source/filter/oox/unitconverter.cxx
index dd6f555..87c59c27 100644
--- a/sc/source/filter/oox/unitconverter.cxx
+++ b/sc/source/filter/oox/unitconverter.cxx
@@ -112,7 +112,7 @@ UnitConverter::UnitConverter( const WorkbookHelper& rHelper ) :
addErrorCode( BIFF_ERR_REF, "#REF!" );
addErrorCode( BIFF_ERR_NAME, "#NAME?" );
addErrorCode( BIFF_ERR_NUM, "#NUM!" );
- addErrorCode( BIFF_ERR_NA, "#NA" );
+ addErrorCode( BIFF_ERR_NA, "#N/A" );
}
void UnitConverter::finalizeImport()
@@ -218,6 +218,20 @@ sal_uInt8 UnitConverter::calcBiffErrorCode( const OUString& rErrorCode ) const
return (aIt == maOoxErrCodes.end()) ? BIFF_ERR_NA : aIt->second;
}
+const OUString& UnitConverter::calcErrorString( sal_uInt8 nErrorCode ) const
+{
+ OoxErrorCodeMap::const_iterator iFail( maOoxErrCodes.end());
+ for (OoxErrorCodeMap::const_iterator aIt( maOoxErrCodes.begin()); aIt != maOoxErrCodes.end(); ++aIt)
+ {
+ if (aIt->second == nErrorCode)
+ return aIt->first;
+ if (aIt->second == BIFF_ERR_NA)
+ iFail = aIt;
+ }
+ assert(iFail != maOoxErrCodes.end()); // BIFF_ERR_NA really should be in the map..
+ return iFail->first;
+}
+
void UnitConverter::addErrorCode( sal_uInt8 nErrorCode, const OUString& rErrorCode )
{
maOoxErrCodes[ rErrorCode ] = nErrorCode;
commit 54114545d12b8e322a0de29c4b8b58e72598e9fb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 7 09:55:46 2015 +0000
Resolves: fdo#87840 by default hide all feature checkboxes
and explicitly show the supported ones
(cherry picked from commit fef5c2b81d1ac7d64e01521da792f470b03a1841)
Conflicts:
dbaccess/uiconfig/ui/specialsettingspage.ui
Change-Id: I93d998472a82085da9bd5a8ec7ad4cb39998e198
Reviewed-on: https://gerrit.libreoffice.org/13789
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
Tested-by: Lionel Elie Mamane <lionel at mamane.lu>
(cherry picked from commit db3ab19f6ca3252141f7e7f858fdde406a890cec)
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 399369d..3c41665 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -98,6 +98,7 @@ namespace dbaui
{
get((*setting->ppControl), setting->sControlId);
(*setting->ppControl)->SetClickHdl( getControlModifiedLink() );
+ (*setting->ppControl)->Show();
// check whether this must be a tristate check box
const SfxPoolItem& rItem = _rCoreAttrs.Get( nItemId );
diff --git a/dbaccess/uiconfig/ui/specialsettingspage.ui b/dbaccess/uiconfig/ui/specialsettingspage.ui
index 0072f8c..48ee74e 100644
--- a/dbaccess/uiconfig/ui/specialsettingspage.ui
+++ b/dbaccess/uiconfig/ui/specialsettingspage.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Wed Jan 29 13:37:30 2014 -->
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkFrame" id="SpecialSettingsPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -26,9 +26,9 @@
<child>
<object class="GtkCheckButton" id="usesql92">
<property name="label" translatable="yes">Use SQL92 naming constraints</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -43,9 +43,9 @@
<child>
<object class="GtkCheckButton" id="append">
<property name="label" translatable="yes">Append the table alias name on SELECT statements</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -60,9 +60,9 @@
<child>
<object class="GtkCheckButton" id="useas">
<property name="label" translatable="yes">Use keyword AS before table alias names</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -77,9 +77,9 @@
<child>
<object class="GtkCheckButton" id="useoj">
<property name="label" translatable="yes">Use Outer Join syntax '{oj }'</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -94,9 +94,9 @@
<child>
<object class="GtkCheckButton" id="ignoreprivs">
<property name="label" translatable="yes">Ignore the privileges from the database driver</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -111,9 +111,9 @@
<child>
<object class="GtkCheckButton" id="replaceparams">
<property name="label" translatable="yes">Replace named parameters with '?'</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -128,9 +128,9 @@
<child>
<object class="GtkCheckButton" id="displayver">
<property name="label" translatable="yes">Display version columns (when available)</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -145,9 +145,9 @@
<child>
<object class="GtkCheckButton" id="usecatalogname">
<property name="label" translatable="yes">Use catalog name in SELECT statements</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -162,9 +162,9 @@
<child>
<object class="GtkCheckButton" id="useschemaname">
<property name="label" translatable="yes">Use schema name in SELECT statements</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -179,9 +179,9 @@
<child>
<object class="GtkCheckButton" id="createindex">
<property name="label" translatable="yes">Create index with ASC or DESC statement</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -196,9 +196,9 @@
<child>
<object class="GtkCheckButton" id="eol">
<property name="label" translatable="yes">End text lines with CR+LF</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -213,9 +213,9 @@
<child>
<object class="GtkCheckButton" id="ignorecurrency">
<property name="label" translatable="yes">Ignore currency field information</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -230,9 +230,9 @@
<child>
<object class="GtkCheckButton" id="inputchecks">
<property name="label" translatable="yes">Form data input checks for required fields</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -247,9 +247,9 @@
<child>
<object class="GtkCheckButton" id="useodbcliterals">
<property name="label" translatable="yes">Use ODBC conformant date/time literals</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -264,9 +264,9 @@
<child>
<object class="GtkCheckButton" id="primarykeys">
<property name="label" translatable="yes">Supports primary keys</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
@@ -281,9 +281,9 @@
<child>
<object class="GtkCheckButton" id="resulttype">
<property name="label" translatable="yes">Respect the result set type from the database driver</property>
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
commit c55acdeb3b3b842f6315a7e7472415369f31e793
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Mon Feb 2 21:02:42 2015 +0100
Better fix for fdo#87558: Duplication in Last Used Functions sidebar list
Advantage compared to previous fix: in sidebar, last used function is put at the top
Still function from menu is sorted, the pb is we use InsertEntry, see
0 ImplEntryList::InsertEntry (this=0x32d0910, nPos=2147483647, pNewEntry=0x326f620, bSort=true)
at /home/julien/compile-libreoffice/libreoffice/vcl/source/control/ilstbox.cxx:144
1 0x00002aaab1b2444e in ImplListBoxWindow::InsertEntry (this=0x3287358, nPos=2147483647, pNewEntry=0x326f620)
at /home/julien/compile-libreoffice/libreoffice/vcl/source/control/ilstbox.cxx:750
2 0x00002aaab1b2a138 in ImplListBox::InsertEntry (this=0x3287100, nPos=2147483647, rStr="ACOT")
at /home/julien/compile-libreoffice/libreoffice/vcl/source/control/ilstbox.cxx:2182
3 0x00002aaab1b47d51 in ListBox::InsertEntry (this=0x32e9ca0, rStr="ACOT", nPos=2147483647)
at /home/julien/compile-libreoffice/libreoffice/vcl/source/control/lstbox.cxx:1001
4 0x00002aaad0c05d84 in formula::FuncPage::UpdateFunctionList (this=0x3217110) at /home/julien/compile-libreoffice/libreoffice/formula/source/ui/dlg/funcpage.cxx:153
should we create a new InsertEntry to force bSort=false?
Change-Id: Iba1b020aeea09951dead30f6781b24993aac98e0
Reviewed-on: https://gerrit.libreoffice.org/13725
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 585ab75a9344e140c876cb7565d3525a62fb8a73)
Reviewed-on: https://gerrit.libreoffice.org/13781
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 689afb19dc399ff3fcea07a6d264b61d10313a1e)
Reviewed-on: https://gerrit.libreoffice.org/13782
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 3cc529ccfb91444c13c771d0f8b2c1292452002f)
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index cdc6171..24c80fe 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -779,13 +779,13 @@ void ScFunctionMgr::fillLastRecentlyUsedFunctions(::std::vector< const formula::
const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions();
sal_uInt16 nLRUFuncCount = std::min( rAppOpt.GetLRUFuncListCount(), (sal_uInt16)LRU_MAX );
sal_uInt16* pLRUListIds = rAppOpt.GetLRUFuncList();
+ _rLastRUFunctions.clear();
if ( pLRUListIds )
{
for (sal_uInt16 i = 0; i < nLRUFuncCount; ++i)
{
- if (std::find(_rLastRUFunctions.begin(), _rLastRUFunctions.end(), Get(pLRUListIds[i])) == _rLastRUFunctions.end())
- _rLastRUFunctions.push_back( Get( pLRUListIds[i] ) );
+ _rLastRUFunctions.push_back( Get( pLRUListIds[i] ) );
}
}
}
commit de98fbfb66fa0354bd727ba2c97a0d7098225236
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Mon Jan 5 15:08:22 2015 +0100
fdo#80968 file resultset seek table to before beginning on opening resultset
Change-Id: I73abbc7cfe0804e729a711a247b6e085b4e41d95
Reviewed-on: https://gerrit.libreoffice.org/13742
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 2414f02ff0d087d144b472b5b4b1f93d6e3e2960)
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index aece696..221e588 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1294,6 +1294,7 @@ bool OResultSet::OpenImpl()
m_nRowPos = -1;
m_nFilePos = 0;
m_nRowCountResult = -1;
+ m_pTable->seekRow(IResultSetHelper::ABSOLUTE, 0, m_nFilePos);
m_nLastVisitedPos = m_pTable->getCurrentLastPos();
commit fd98ffb57d5bac1b63abcb46bf373ba49e2cf004
Author: Zolnai Tamás <zolnaitamas2000 at gmail.com>
Date: Wed Jan 7 02:14:33 2015 +0100
fdo#83354: Chart is truncated - moved down outside the margins of the object
Handle the case when the content height is unitialized (0).
When content height is 0 it means there is no content (so
we don't need to calculate adjustment) or the content height is
uninitialized which leads to wrong calculated value.
Regression from:
cb19042f4395c97d123a27c6960d5e30d666c010
(cherry picked from commit 89a81a6610cf316666291750e7300bcd1a97d062)
Change-Id: I45570a71f0597847820ce77e8dcec4a5b0c6785d
Reviewed-on: https://gerrit.libreoffice.org/13783
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 32dce67106c9f6ddbb91daf4dd84308974ebe309)
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 6c541c7..2a119b5 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1705,7 +1705,12 @@ void SwFlyFrm::MakeContentPos( const SwBorderAttrs &rAttrs )
const SdrTextVertAdjust nAdjust = GetFmt()->GetTextVertAdjust().GetValue();
if( nAdjust != SDRTEXTVERTADJUST_TOP )
{
- SwTwips nDiff = (Prt().*fnRect->fnGetHeight)() - CalcContentHeight(&rAttrs, nMinHeight, nUL);
+ const SwTwips nContentHeight = CalcContentHeight(&rAttrs, nMinHeight, nUL);
+ SwTwips nDiff = 0;
+
+ if( nContentHeight != 0)
+ nDiff = (Prt().*fnRect->fnGetHeight)() - nContentHeight;
+
if( nDiff > 0 )
{
if( nAdjust == SDRTEXTVERTADJUST_CENTER )
commit 2633c8762a87c8f71c438267a64e8895338cab7e
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Thu Dec 18 06:37:27 2014 +0100
fdo#76780 don't limit PositionY to available width
Change-Id: I3a429d0a6f771f6bfde2331ddc8544c92d8147f7
Reviewed-on: https://gerrit.libreoffice.org/13517
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit 0d63a64ecaeb4517c710876b1170e28ae71a44a2)
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index be85489..c2ea980 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -881,7 +881,6 @@ inspection::LineDescriptor SAL_CALL GeometryHandler::describePropertyLine(const
switch(nId)
{
case PROPERTY_ID_POSITIONX:
- case PROPERTY_ID_POSITIONY:
case PROPERTY_ID_WIDTH:
if ( bSetMin )
xNumericControl->setMinValue(beans::Optional<double>(sal_True,0.0));
commit 4d59efada653436765ab8f824d40fd3d89bc296f
Author: Eike Rathke <erack at redhat.com>
Date: Tue Jan 6 13:00:59 2015 +0100
move nScanLineBufferComponents to where it is used [-Werror=clobbered]
gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1)
vcl/source/filter/jpeg/jpegc.cxx: In function ‘void ReadJPEG(JPEGReader*, void*, long int*, const Size&)’:
vcl/source/filter/jpeg/jpegc.cxx:72:10: error: variable ‘nScanLineBufferComponents’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
long nScanLineBufferComponents = 0;
^
Change-Id: I90a0d02977c49d2471069788a02fb1c7d28c039a
(cherry picked from commit 09a5910c96a822c6e7fc4b82d89c00c22e905eba)
Reviewed-on: https://gerrit.libreoffice.org/13766
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit b29b9c4861e1008171b59aa4caed9cfdf3d0094e)
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 04aa3a2..411b17b 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -69,7 +69,6 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
long nAlignedWidth;
JSAMPLE* aRangeLimit;
boost::scoped_array<unsigned char> pScanLineBuffer;
- long nScanLineBufferComponents = 0;
if ( setjmp( jerr.setjmp_buffer ) )
{
@@ -150,6 +149,7 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
nAlignedWidth = aCreateBitmapParam.nAlignedWidth;
aRangeLimit = cinfo.sample_range_limit;
+ long nScanLineBufferComponents = 0;
if ( cinfo.out_color_space == JCS_CMYK )
{
nScanLineBufferComponents = cinfo.output_width * 4;
commit d41a564243d4960ab5b5b4eb823137e8bbb1f9cc
Author: Eike Rathke <erack at redhat.com>
Date: Mon Jan 5 22:28:34 2015 +0100
workaround a weird gcc optimization werror bug
gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1)
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list