[Libreoffice-commits] core.git: 10 commits - chart2/source cui/source dbaccess/source editeng/source forms/source framework/inc framework/source include/oox oox/source sc/source sfx2/source svl/source unoxml/source
Noel Grandin
noel.grandin at collabora.co.uk
Tue Sep 19 07:32:31 UTC 2017
chart2/source/inc/MediaDescriptorHelper.hxx | 46 +++++-----------
chart2/source/tools/MediaDescriptorHelper.cxx | 23 --------
cui/source/inc/cuitabarea.hxx | 5 -
cui/source/inc/cuitabline.hxx | 4 -
cui/source/tabpages/tpbitmap.cxx | 3 -
cui/source/tabpages/tpcolor.cxx | 3 -
cui/source/tabpages/tpgradnt.cxx | 3 -
cui/source/tabpages/tphatch.cxx | 3 -
cui/source/tabpages/tplnedef.cxx | 6 --
cui/source/tabpages/tplneend.cxx | 6 --
cui/source/tabpages/tppattern.cxx | 3 -
dbaccess/source/core/api/resultcolumn.cxx | 2
editeng/source/editeng/impedit.hxx | 4 -
editeng/source/editeng/impedit2.cxx | 7 --
forms/source/component/FormattedField.cxx | 5 -
forms/source/component/FormattedField.hxx | 1
framework/inc/services/desktop.hxx | 1
framework/source/services/desktop.cxx | 6 --
include/oox/core/filterbase.hxx | 2
include/oox/helper/binaryoutputstream.hxx | 17 +++++-
oox/source/core/filterbase.cxx | 2
oox/source/helper/binaryoutputstream.cxx | 35 +++++++++++-
sc/source/filter/inc/worksheetfragment.hxx | 2
sc/source/filter/oox/worksheetfragment.cxx | 2
sfx2/source/doc/doctemplates.cxx | 3 -
svl/source/misc/inettype.cxx | 71 +-------------------------
unoxml/source/events/mouseevent.cxx | 3 -
unoxml/source/events/mouseevent.hxx | 1
28 files changed, 84 insertions(+), 185 deletions(-)
New commits:
commit ff95bd4f88172d01436b1f1bf0716240f3156504
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Sep 18 16:54:33 2017 +0200
unused m_xProgressHandler in TplTaskEnvironment
since initial
commit 7bf29c44efa5985f59c160ba5a75dc212f955d42
Date: Tue Oct 14 05:23:43 2008 +0000
CWS-TOOLING: integrate CWS mba30fixes02
Change-Id: I6284ed98c0d9f06c78c5abdf29657988ac42fa43
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 3d39a8074a83..d0e5cb929620 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -161,7 +161,6 @@ typedef vector< GroupData_Impl* > GroupList_Impl;
class TplTaskEnvironment : public ::cppu::WeakImplHelper< ucb::XCommandEnvironment >
{
uno::Reference< task::XInteractionHandler > m_xInteractionHandler;
- uno::Reference< ucb::XProgressHandler > m_xProgressHandler;
public:
explicit TplTaskEnvironment( const uno::Reference< task::XInteractionHandler>& rxInteractionHandler )
@@ -172,7 +171,7 @@ public:
{ return m_xInteractionHandler; }
virtual uno::Reference<ucb::XProgressHandler> SAL_CALL getProgressHandler() override
- { return m_xProgressHandler; }
+ { return uno::Reference<ucb::XProgressHandler>(); }
};
class SfxDocTplService_Impl
commit 8c2327ca349da9edad0f6e494be3f1c11378d15c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Sep 18 16:51:55 2017 +0200
unused Registration class
since
commit 1b694dad643334ec1bab3f823dcd68f44a05ebe3
Date: Thu Aug 24 22:14:27 2017 +0200
loplugin:unusedmethods
Change-Id: I54ec057e9216f3b245b86b6c81fb75ca06917d74
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index a019f975b23c..3480a55741a3 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -39,36 +39,6 @@ struct MediaTypeEntry
INetContentType m_eTypeID;
};
-struct TypeIDMapEntry
-{
- OUString m_aTypeName;
-};
-
-class Registration
-{
- typedef std::map<INetContentType, TypeIDMapEntry*> TypeIDMap;
-
- TypeIDMap m_aTypeIDMap; // map ContentType to TypeID
-
-public:
- Registration() {}
-
- ~Registration();
-public:
-
- static INetContentType GetContentType(OUString const & rTypeName);
-
- static OUString GetContentType(INetContentType eTypeID);
-
- static INetContentType GetContentType4Extension(OUString const & rExtension);
-
-};
-
-namespace
-{
- struct theRegistration
- : public rtl::Static< Registration, theRegistration > {};
-}
MediaTypeEntry const * seekEntry(OUString const & rTypeName,
MediaTypeEntry const * pMap, std::size_t nSize);
@@ -252,39 +222,6 @@ MediaTypeEntry const aStaticExtensionMap[]
}
-// Registration
-
-
-Registration::~Registration()
-{
- for ( TypeIDMap::iterator it = m_aTypeIDMap.begin(); it != m_aTypeIDMap.end(); ++it )
- delete it->second;
-}
-
-// static
-INetContentType Registration::GetContentType(OUString const &)
-{
- return CONTENT_TYPE_UNKNOWN;
-}
-
-// static
-OUString Registration::GetContentType(INetContentType eTypeID)
-{
- Registration &rRegistration = theRegistration::get();
-
- TypeIDMap::const_iterator pEntry = rRegistration.m_aTypeIDMap.find( eTypeID );
- if( pEntry != rRegistration.m_aTypeIDMap.end() )
- return pEntry->second->m_aTypeName;
- return OUString();
-}
-
-// static
-INetContentType Registration::GetContentType4Extension(OUString const & )
-{
- return CONTENT_TYPE_UNKNOWN;
-}
-
-
// seekEntry
@@ -333,7 +270,7 @@ INetContentType INetContentTypes::GetContentType(OUString const & rTypeName)
aType += aSubType;
MediaTypeEntry const * pEntry = seekEntry(aType, aStaticTypeNameMap,
CONTENT_TYPE_LAST + 1);
- return pEntry ? pEntry->m_eTypeID : Registration::GetContentType(aType);
+ return pEntry ? pEntry->m_eTypeID : CONTENT_TYPE_UNKNOWN;
}
else
return rTypeName.equalsIgnoreAsciiCase(CONTENT_TYPE_STR_X_STARMAIL) ?
@@ -357,7 +294,7 @@ OUString INetContentTypes::GetContentType(INetContentType eTypeID)
}
OUString aTypeName = eTypeID <= CONTENT_TYPE_LAST ? OUString::createFromAscii(aMap[eTypeID])
- : Registration::GetContentType(eTypeID);
+ : OUString();
if (aTypeName.isEmpty())
{
OSL_FAIL("INetContentTypes::GetContentType(): Bad ID");
@@ -373,9 +310,7 @@ INetContentType INetContentTypes::GetContentType4Extension(OUString const & rExt
SAL_N_ELEMENTS(aStaticExtensionMap));
if (pEntry)
return pEntry->m_eTypeID;
- INetContentType eTypeID = Registration::GetContentType4Extension(rExtension);
- return eTypeID == CONTENT_TYPE_UNKNOWN ? CONTENT_TYPE_APP_OCTSTREAM
- : eTypeID;
+ return CONTENT_TYPE_APP_OCTSTREAM;
}
//static
commit 975677d0aa580210eb27b734c326f775a2112eda
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Sep 18 16:47:49 2017 +0200
unused m_relatedTarget in CMouseEvent
since initial commit in
commit acff30cd25b28aeaa75f96c38b58203163966eaf
Date: Tue Mar 2 08:47:29 2004 +0000
#i25594# ui events
Change-Id: I47cadedb8899114aa64c2ac585e4a9722ea38720
diff --git a/unoxml/source/events/mouseevent.cxx b/unoxml/source/events/mouseevent.cxx
index 7b0c71cd17c4..6b84ec577be7 100644
--- a/unoxml/source/events/mouseevent.cxx
+++ b/unoxml/source/events/mouseevent.cxx
@@ -86,8 +86,7 @@ namespace DOM { namespace events
}
Reference< XEventTarget > SAL_CALL CMouseEvent::getRelatedTarget()
{
- ::osl::MutexGuard const g(m_Mutex);
- return m_relatedTarget;
+ return Reference< XEventTarget >();
}
void SAL_CALL CMouseEvent::initMouseEvent(
diff --git a/unoxml/source/events/mouseevent.hxx b/unoxml/source/events/mouseevent.hxx
index 4fa5f28b75aa..2b274713e75d 100644
--- a/unoxml/source/events/mouseevent.hxx
+++ b/unoxml/source/events/mouseevent.hxx
@@ -45,7 +45,6 @@ protected:
bool m_altKey;
bool m_metaKey;
sal_Int16 m_button;
- css::uno::Reference< css::xml::dom::events::XEventTarget > m_relatedTarget;
public:
explicit CMouseEvent();
commit 71d48c3d5c81f9637705de2212ef860bf8a9b4fd
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Sep 18 16:23:13 2017 +0200
unused xForbiddenCharsTable in ImpEditEngine
since as far back as I can see
Change-Id: I828d527e91479f40d0186b09043de4841d735e84
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 9cf5de4e22ab..aa0a1eb8b7a6 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -520,8 +520,6 @@ private:
Link<EditView*,void> maBeginDropHdl;
Link<EditView*,void> maEndDropHdl;
- std::shared_ptr<SvxForbiddenCharactersTable> xForbiddenCharsTable;
-
bool bKernAsianPunctuation:1;
bool bAddExtLeading:1;
bool bIsFormatting:1;
@@ -1036,7 +1034,7 @@ public:
void SetAddExtLeading( bool b );
bool IsAddExtLeading() const { return bAddExtLeading; }
- std::shared_ptr<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const;
+ static std::shared_ptr<SvxForbiddenCharactersTable> GetForbiddenCharsTable();
static void SetForbiddenCharsTable( const std::shared_ptr<SvxForbiddenCharactersTable>& xForbiddenChars );
/** sets a link that is called at the beginning of a drag operation at an edit view */
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 1e020d6d5ac3..af9c14b3340f 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4339,12 +4339,9 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, bool bRight )
}
}
-std::shared_ptr<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable() const
+std::shared_ptr<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable()
{
- std::shared_ptr<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable;
- if (!xF)
- xF = EditDLL::Get().GetGlobalData()->GetForbiddenCharsTable();
- return xF;
+ return EditDLL::Get().GetGlobalData()->GetForbiddenCharsTable();
}
void ImpEditEngine::SetForbiddenCharsTable(const std::shared_ptr<SvxForbiddenCharactersTable>& xForbiddenChars)
commit a090b8785f6580ef779fb8b4e140f82085b4455a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Sep 18 16:16:09 2017 +0200
inline some use-once fields in cui
Change-Id: Ib2abea6b1f68cf193325d312e67578b2d346e39a
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 0faca3c5cd64..12b48faa7566 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -378,7 +378,6 @@ private:
ChangeType* m_pnGradientListState;
ChangeType* m_pnColorListState;
- XFillStyleItem m_aXFStyleItem;
XFillGradientItem m_aXGradientItem;
XFillAttrSetItem m_aXFillAttr;
SfxItemSet& m_rXFSet;
@@ -448,7 +447,6 @@ private:
ChangeType* m_pnHatchingListState;
ChangeType* m_pnColorListState;
- XFillStyleItem m_aXFStyleItem;
XFillHatchItem m_aXHatchItem;
XFillAttrSetItem m_aXFillAttr;
SfxItemSet& m_rXFSet;
@@ -527,7 +525,6 @@ private:
XBitmapListRef m_pBitmapList;
ChangeType* m_pnBitmapListState;
- XFillStyleItem m_aXFStyleItem;
XFillBitmapItem m_aXBitmapItem;
double m_fObjectWidth;
@@ -603,7 +600,6 @@ private:
ChangeType* m_pnPatternListState;
ChangeType* m_pnColorListState;
- XFillStyleItem m_aXFStyleItem;
XFillBitmapItem m_aXPatternItem;
XFillAttrSetItem m_aXFillAttr;
SfxItemSet& m_rXFSet;
@@ -699,7 +695,6 @@ private:
ChangeType* pnColorListState;
- XFillStyleItem aXFStyleItem;
XFillColorItem aXFillColorItem;
XFillAttrSetItem aXFillAttr;
SfxItemSet& rXFSet;
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 670297f860f4..95fbe6ed9f0c 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -263,8 +263,6 @@ private:
const SfxItemSet& rOutAttrs;
XDash aDash;
- XLineStyleItem aXLStyle;
- XLineWidthItem aXWidth;
XLineDashItem aXDash;
XLineColorItem aXColor;
XLineAttrSetItem aXLineAttr;
@@ -344,8 +342,6 @@ private:
const SfxItemSet& rOutAttrs;
const SdrObject* pPolyObj;
- XLineStyleItem aXLStyle;
- XLineWidthItem aXWidth;
XLineColorItem aXColor;
XLineAttrSetItem aXLineAttr;
SfxItemSet& rXLSet;
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index ddf6e0b69c4b..fa2e431f3cf3 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -80,7 +80,6 @@ SvxBitmapTabPage::SvxBitmapTabPage( vcl::Window* pParent, const SfxItemSet& rInA
m_pBitmapList( nullptr ),
m_pnBitmapListState( nullptr ),
- m_aXFStyleItem( drawing::FillStyle_BITMAP ),
m_aXBitmapItem( OUString(), Graphic() ),
m_fObjectWidth(0.0),
m_fObjectHeight(0.0),
@@ -111,7 +110,7 @@ SvxBitmapTabPage::SvxBitmapTabPage( vcl::Window* pParent, const SfxItemSet& rInA
get(m_pBtnImport, "BTN_IMPORT");
// setting the output device
- m_rXFSet.Put( m_aXFStyleItem );
+ m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) );
m_rXFSet.Put( m_aXBitmapItem );
m_pCtlBitmapPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 62cf5e8293d3..fdbd86392a1e 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -60,7 +60,6 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr
, rOutAttrs ( rInAttrs )
// All the horrific pointers we store and should not
, pnColorListState( nullptr )
- , aXFStyleItem( drawing::FillStyle_SOLID )
, aXFillColorItem( OUString(), Color( COL_BLACK ) )
, aXFillAttr( rInAttrs.GetPool() )
, rXFSet( aXFillAttr.GetItemSet() )
@@ -110,7 +109,7 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr
SetExchangeSupport();
// setting the output device
- rXFSet.Put( aXFStyleItem );
+ rXFSet.Put( XFillStyleItem(drawing::FillStyle_SOLID) );
rXFSet.Put( aXFillColorItem );
m_pCtlPreviewOld->SetAttributes( aXFillAttr.GetItemSet() );
m_pCtlPreviewNew->SetAttributes( aXFillAttr.GetItemSet() );
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index ba3a550cb2af..6d060e4b16ab 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -61,7 +61,6 @@ SvxGradientTabPage::SvxGradientTabPage
m_pnGradientListState ( nullptr ),
m_pnColorListState ( nullptr ),
- m_aXFStyleItem ( drawing::FillStyle_GRADIENT ),
m_aXGradientItem ( OUString(), XGradient( COL_BLACK, COL_WHITE ) ),
m_aXFillAttr ( rInAttrs.GetPool() ),
m_rXFSet ( m_aXFillAttr.GetItemSet() )
@@ -101,7 +100,7 @@ SvxGradientTabPage::SvxGradientTabPage
m_pSliderBorder->SetRange(Range(0,100));
// setting the output device
- m_rXFSet.Put( m_aXFStyleItem );
+ m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_GRADIENT) );
m_rXFSet.Put( m_aXGradientItem );
m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index d9978103e212..33422103baaa 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -61,7 +61,6 @@ SvxHatchTabPage::SvxHatchTabPage
m_pnHatchingListState ( nullptr ),
m_pnColorListState ( nullptr ),
- m_aXFStyleItem ( drawing::FillStyle_HATCH ),
m_aXHatchItem ( OUString(), XHatch() ),
m_aXFillAttr ( rInAttrs.GetPool() ),
m_rXFSet ( m_aXFillAttr.GetItemSet() )
@@ -106,7 +105,7 @@ SvxHatchTabPage::SvxHatchTabPage
m_ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
// setting the output device
- m_rXFSet.Put( m_aXFStyleItem );
+ m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_HATCH) );
m_rXFSet.Put( m_aXHatchItem );
m_pCtlPreview->SetAttributes( m_aXFillAttr.GetItemSet() );
m_pHatchLB->SetSelectHdl( LINK( this, SvxHatchTabPage, ChangeHatchHdl ) );
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 49e2bb8a028e..01bd02642051 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -63,8 +63,6 @@ SvxLineDefTabPage::SvxLineDefTabPage
, &rInAttrs ),
rOutAttrs ( rInAttrs ),
- aXLStyle ( drawing::LineStyle_DASH ),
- aXWidth ( XOUT_WIDTH ),
aXDash ( OUString(), XDash( css::drawing::DashStyle_RECT, 3, 7, 2, 40, 15 ) ),
aXColor ( OUString(), COL_BLACK ),
aXLineAttr ( rInAttrs.GetPool() ),
@@ -117,8 +115,8 @@ SvxLineDefTabPage::SvxLineDefTabPage
DBG_ASSERT( pPool, "Where is the pool?" );
ePoolUnit = pPool->GetMetric( SID_ATTR_LINE_WIDTH );
- rXLSet.Put( aXLStyle );
- rXLSet.Put( aXWidth );
+ rXLSet.Put( XLineStyleItem(drawing::LineStyle_DASH) );
+ rXLSet.Put( XLineWidthItem(XOUT_WIDTH) );
rXLSet.Put( aXDash );
rXLSet.Put( aXColor );
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index 4ac321a6e65c..e3ada8dc504b 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -64,8 +64,6 @@ SvxLineEndDefTabPage::SvxLineEndDefTabPage
rOutAttrs ( rInAttrs ),
pPolyObj ( nullptr ),
- aXLStyle ( css::drawing::LineStyle_SOLID ),
- aXWidth ( XOUT_WIDTH ),
aXColor ( OUString(), COL_BLACK ),
aXLineAttr ( rInAttrs.GetPool() ),
rXLSet ( aXLineAttr.GetItemSet() ),
@@ -87,8 +85,8 @@ SvxLineEndDefTabPage::SvxLineEndDefTabPage
// this page needs ExchangeSupport
SetExchangeSupport();
- rXLSet.Put( aXLStyle );
- rXLSet.Put( aXWidth );
+ rXLSet.Put( XLineStyleItem(css::drawing::LineStyle_SOLID) );
+ rXLSet.Put( XLineWidthItem(XOUT_WIDTH) );
rXLSet.Put( aXColor );
rXLSet.Put( XLineStartWidthItem( m_pCtlPreview->GetOutputSize().Height() / 2 ) );
rXLSet.Put( XLineEndWidthItem( m_pCtlPreview->GetOutputSize().Height() / 2 ) );
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index 95746d9ca8d1..d0f3bd8cdf41 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -93,7 +93,6 @@ SvxPatternTabPage::SvxPatternTabPage( vcl::Window* pParent, const SfxItemSet& r
m_pnPatternListState ( nullptr ),
m_pnColorListState ( nullptr ),
- m_aXFStyleItem ( drawing::FillStyle_BITMAP ),
m_aXPatternItem ( OUString(), Graphic() ),
m_aXFillAttr ( rInAttrs.GetPool() ),
m_rXFSet ( m_aXFillAttr.GetItemSet() )
@@ -119,7 +118,7 @@ SvxPatternTabPage::SvxPatternTabPage( vcl::Window* pParent, const SfxItemSet& r
SetExchangeSupport();
// setting the output device
- m_rXFSet.Put( m_aXFStyleItem );
+ m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) );
m_rXFSet.Put( m_aXPatternItem );
m_pBtnAdd->SetClickHdl( LINK( this, SvxPatternTabPage, ClickAddHdl_Impl ) );
commit c087e24c683dc402c442bb0a3dbea974000b72b2
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Sep 18 16:06:47 2017 +0200
fix caching in OResultColumn
this obviously never worked, because the template method was never
updating the cache field, just a copy of the cache field
Change-Id: Ibeed9a0f0764a4d398548c05aed466cd6cdfc266
diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx
index 96ce95ad646c..9691217983c8 100644
--- a/dbaccess/source/core/api/resultcolumn.cxx
+++ b/dbaccess/source/core/api/resultcolumn.cxx
@@ -167,7 +167,7 @@ void OResultColumn::disposing()
namespace
{
template< typename T >
- void obtain( Any& _out_rValue, ::boost::optional< T > _rCache, const sal_Int32 _nPos, const Reference < XResultSetMetaData >& _rxResultMeta, T (SAL_CALL XResultSetMetaData::*Getter)( sal_Int32 ) )
+ void obtain( Any& _out_rValue, ::boost::optional< T > & _rCache, const sal_Int32 _nPos, const Reference < XResultSetMetaData >& _rxResultMeta, T (SAL_CALL XResultSetMetaData::*Getter)( sal_Int32 ) )
{
if ( !_rCache )
_rCache.reset( (_rxResultMeta.get()->*Getter)( _nPos ) );
commit ba91bc19023f3d7158ef9e394665eb5eb89c4037
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Sep 18 15:50:25 2017 +0200
fix SequenceOutputStream constness
Change-Id: I6e1039c077602b2cb42702cb4131f9503ef533c2
diff --git a/include/oox/core/filterbase.hxx b/include/oox/core/filterbase.hxx
index dcbebc122309..3accd63f2872 100644
--- a/include/oox/core/filterbase.hxx
+++ b/include/oox/core/filterbase.hxx
@@ -196,7 +196,7 @@ public:
/** Imports the raw binary data from the specified stream.
@return True, if the data could be imported from the stream. */
- bool importBinaryData( StreamDataSequence const & orDataSeq, const OUString& rStreamName );
+ bool importBinaryData( StreamDataSequence & orDataSeq, const OUString& rStreamName );
// com.sun.star.lang.XServiceInfo interface -------------------------------
diff --git a/include/oox/helper/binaryoutputstream.hxx b/include/oox/helper/binaryoutputstream.hxx
index 2b954a66f49a..21f563227fd8 100644
--- a/include/oox/helper/binaryoutputstream.hxx
+++ b/include/oox/helper/binaryoutputstream.hxx
@@ -175,7 +175,7 @@ private:
construction, the stream points to the beginning of the passed data
sequence. The data sequence is expanded automatically while writing to it.
*/
-class OOX_DLLPUBLIC SequenceOutputStream : public SequenceSeekableStream, public BinaryOutputStream
+class OOX_DLLPUBLIC SequenceOutputStream : public BinaryOutputStream
{
public:
/** Constructs the wrapper object for the passed data sequence.
@@ -185,13 +185,26 @@ public:
wrapper. The data sequence MUST NOT be changed from outside as long
as this stream wrapper is used to write to it.
*/
- explicit SequenceOutputStream( StreamDataSequence const & rData );
+ explicit SequenceOutputStream( StreamDataSequence & rData );
/** Writes the passed data sequence. */
virtual void writeData( const StreamDataSequence& rData, size_t nAtomSize = 1 ) override;
/** Write nBytes bytes from the (preallocated!) buffer pMem. */
virtual void writeMemory( const void* pMem, sal_Int32 nBytes, size_t nAtomSize = 1 ) override;
+
+ /** Returns the size of the wrapped data sequence. */
+ virtual sal_Int64 size() const override;
+ /** Returns the current stream position. */
+ virtual sal_Int64 tell() const override;
+ /** Seeks the stream to the passed position. */
+ virtual void seek( sal_Int64 nPos ) override;
+ /** Releases the reference to the data sequence. */
+ virtual void close() override;
+
+private:
+ StreamDataSequence* mpData; ///< Wrapped data sequence.
+ sal_Int32 mnPos; ///< Current position in the sequence.
};
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 4945039c901b..6ac5048072bf 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -379,7 +379,7 @@ VbaProject& FilterBase::getVbaProject() const
return *mxImpl->mxVbaProject;
}
-bool FilterBase::importBinaryData( StreamDataSequence const & orDataSeq, const OUString& rStreamName )
+bool FilterBase::importBinaryData( StreamDataSequence & orDataSeq, const OUString& rStreamName )
{
OSL_ENSURE( !rStreamName.isEmpty(), "FilterBase::importBinaryData - empty stream name" );
if( rStreamName.isEmpty() )
diff --git a/oox/source/helper/binaryoutputstream.cxx b/oox/source/helper/binaryoutputstream.cxx
index f75e2f5bc024..652b768f81b9 100644
--- a/oox/source/helper/binaryoutputstream.cxx
+++ b/oox/source/helper/binaryoutputstream.cxx
@@ -130,9 +130,10 @@ void BinaryOutputStream::writeCompressedUnicodeArray( const OUString& rString, b
writeUnicodeArray( rString );
}
-SequenceOutputStream::SequenceOutputStream( StreamDataSequence const & rData ) :
+SequenceOutputStream::SequenceOutputStream( StreamDataSequence & rData ) :
BinaryStreamBase( true ),
- SequenceSeekableStream( rData )
+ mpData( &rData ),
+ mnPos( 0 )
{
}
@@ -147,12 +148,38 @@ void SequenceOutputStream::writeMemory( const void* pMem, sal_Int32 nBytes, size
if( mpData && (nBytes > 0) )
{
if( mpData->getLength() - mnPos < nBytes )
- const_cast< StreamDataSequence* >( mpData )->realloc( mnPos + nBytes );
- memcpy( const_cast< StreamDataSequence* >( mpData )->getArray() + mnPos, pMem, static_cast< size_t >( nBytes ) );
+ mpData->realloc( mnPos + nBytes );
+ memcpy( mpData->getArray() + mnPos, pMem, static_cast< size_t >( nBytes ) );
mnPos += nBytes;
}
}
+sal_Int64 SequenceOutputStream::size() const
+{
+ return mpData ? mpData->getLength() : -1;
+}
+
+sal_Int64 SequenceOutputStream::tell() const
+{
+ return mpData ? mnPos : -1;
+}
+
+void SequenceOutputStream::seek( sal_Int64 nPos )
+{
+ if( mpData )
+ {
+ mnPos = getLimitedValue< sal_Int32, sal_Int64 >( nPos, 0, mpData->getLength() );
+ mbEof = mnPos != nPos;
+ }
+}
+
+void SequenceOutputStream::close()
+{
+ mpData = nullptr;
+ mbEof = true;
+}
+
+
} // namespace oox
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/inc/worksheetfragment.hxx b/sc/source/filter/inc/worksheetfragment.hxx
index 512412d24ea2..4993bc67f198 100644
--- a/sc/source/filter/inc/worksheetfragment.hxx
+++ b/sc/source/filter/inc/worksheetfragment.hxx
@@ -176,7 +176,7 @@ private:
void importControl( SequenceInputStream& rStrm );
/** Imports the binary data of an embedded OLE object from the fragment with the passed ID. */
- void importEmbeddedOleData( const StreamDataSequence& orEmbeddedData, const OUString& rRelId );
+ void importEmbeddedOleData( StreamDataSequence& orEmbeddedData, const OUString& rRelId );
};
} // namespace xls
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index 57a8d0051f44..703593747c22 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -895,7 +895,7 @@ void WorksheetFragment::importControl( SequenceInputStream& rStrm )
getVmlDrawing().registerControl( aInfo );
}
-void WorksheetFragment::importEmbeddedOleData( const StreamDataSequence& orEmbeddedData, const OUString& rRelId )
+void WorksheetFragment::importEmbeddedOleData( StreamDataSequence& orEmbeddedData, const OUString& rRelId )
{
OUString aFragmentPath = getFragmentPathFromRelId( rRelId );
if( !aFragmentPath.isEmpty() )
commit f320d1edeb2c95a21479baaf6ef77344f8df62e4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Sep 18 14:25:59 2017 +0200
unused m_xLastFrame in Desktop
sinice
commit abf3022d6378deb71946d644de92d26c73515ac2
Date: Wed Jul 31 10:03:28 2002 +0000
#101886# roll it back temp.
Change-Id: If1058c0130d1a2c68bc041a3f7433df87effc0e4
diff --git a/framework/inc/services/desktop.hxx b/framework/inc/services/desktop.hxx
index a77c816e9d2a..bdcd42271de2 100644
--- a/framework/inc/services/desktop.hxx
+++ b/framework/inc/services/desktop.hxx
@@ -399,7 +399,6 @@ class Desktop : private cppu::BaseMutex,
css::uno::Reference< css::frame::XFrames > m_xFramesHelper; /// helper for XFrames, XIndexAccess, XElementAccess and implementation of a childcontainer!
css::uno::Reference< css::frame::XDispatchProvider > m_xDispatchHelper; /// helper to dispatch something for new tasks, created by "_blank"!
ELoadState m_eLoadState; /// hold information about state of asynchron loading of component for loadComponentFromURL()!
- css::uno::Reference< css::frame::XFrame > m_xLastFrame; /// last target of "loadComponentFromURL()"!
css::uno::Any m_aInteractionRequest;
bool m_bSuspendQuickstartVeto; /// don't ask quickstart for a veto
std::unique_ptr<SvtCommandOptions> m_xCommandOptions; /// ref counted class to support disabling commands defined by configuration file
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 580f42b0caeb..2f3ffe8c2a56 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -165,7 +165,6 @@ Desktop::Desktop( const css::uno::Reference< css::uno::XComponentContext >& xCon
, m_xFramesHelper ( )
, m_xDispatchHelper ( )
, m_eLoadState ( E_NOTSET )
- , m_xLastFrame ( )
, m_aInteractionRequest ( )
, m_bSuspendQuickstartVeto( false )
, m_sName ( )
@@ -1104,7 +1103,6 @@ void SAL_CALL Desktop::disposing()
// At least clean up other member references.
m_xDispatchHelper.clear();
m_xFramesHelper.clear();
- m_xLastFrame.clear();
m_xContext.clear();
m_xPipeTerminator.clear();
@@ -1185,11 +1183,11 @@ void SAL_CALL Desktop::dispatchFinished( const css::frame::DispatchResultEvent&
SolarMutexGuard g;
if( m_eLoadState != E_INTERACTION )
{
- m_xLastFrame.clear();
m_eLoadState = E_FAILED;
if( aEvent.State == css::frame::DispatchResultState::SUCCESS )
{
- if ( aEvent.Result >>= m_xLastFrame )
+ css::uno::Reference< css::frame::XFrame > xLastFrame; /// last target of "loadComponentFromURL()"!
+ if ( aEvent.Result >>= xLastFrame )
m_eLoadState = E_SUCCESSFUL;
}
}
commit d7844222bb56f346eae4e58c9e87c774a7211cb0
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Sep 18 14:19:56 2017 +0200
unused m_nFieldType in OFormattedModel
since initial import
Change-Id: Ib347a24c108b97f76e9384d5c567db1474c8d686
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 4d101828d3ad..27cdd02b1e6c 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -261,7 +261,6 @@ void OFormattedModel::implConstruct()
m_xOriginalFormatter = nullptr;
m_nKeyType = NumberFormat::UNDEFINED;
m_aNullDate = DBTypeConversion::getStandardDate();
- m_nFieldType = DataType::OTHER;
// default our formats supplier
osl_atomic_increment(&m_refCount);
setPropertyToDefaultByHandle(PROPERTY_ID_FORMATSSUPPLIER);
@@ -529,10 +528,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor
{
m_xOriginalFormatter = nullptr;
// get some properties of the field
- m_nFieldType = DataType::OTHER;
Reference<XPropertySet> xField = getField();
- if ( xField.is() )
- xField->getPropertyValue( PROPERTY_FIELDTYPE ) >>= m_nFieldType;
sal_Int32 nFormatKey = 0;
DBG_ASSERT(m_xAggregateSet.is(), "OFormattedModel::onConnectedDbColumn : have no aggregate !");
if (m_xAggregateSet.is())
@@ -619,7 +615,6 @@ void OFormattedModel::onDisconnectedDbColumn()
setPropertyValue(PROPERTY_TREATASNUMERIC, makeAny(m_bOriginalNumeric));
m_xOriginalFormatter = nullptr;
}
- m_nFieldType = DataType::OTHER;
m_nKeyType = NumberFormat::UNDEFINED;
m_aNullDate = DBTypeConversion::getStandardDate();
}
diff --git a/forms/source/component/FormattedField.hxx b/forms/source/component/FormattedField.hxx
index b5bf605eaa1f..317f18a608ce 100644
--- a/forms/source/component/FormattedField.hxx
+++ b/forms/source/component/FormattedField.hxx
@@ -42,7 +42,6 @@ class OFormattedModel
css::util::Date m_aNullDate;
css::uno::Any m_aSaveValue;
- sal_Int32 m_nFieldType;
sal_Int16 m_nKeyType;
bool m_bOriginalNumeric : 1,
m_bNumeric : 1; // analogous for the TreatAsNumeric-property
commit 75ad3ca84409f9b622b32d0ceb6614c3c9f5b8aa
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Sep 18 14:02:57 2017 +0200
various unused fields in MediaDescriptorHelper
ever since initial import
Change-Id: Ie2df9fbee973e5c9bcdac090770d6a683450dfa8
diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx b/chart2/source/inc/MediaDescriptorHelper.hxx
index fd20e1f441a7..f7d589692111 100644
--- a/chart2/source/inc/MediaDescriptorHelper.hxx
+++ b/chart2/source/inc/MediaDescriptorHelper.hxx
@@ -68,55 +68,37 @@ public:
css::uno::Sequence< css::beans::PropertyValue >
m_aModelProperties; //these are properties which are not described in service com.sun.star.document.MediaDescriptor
- //@todo define this for debug only, except URL
- bool AsTemplate; //document is a template.
+ css::uno::Any ComponentData;
+ css::uno::Any FilterData;
+ OUString FilterName; //internal filter name.
+ bool ISSET_FilterName;
- css::uno::Any
- ComponentData;
- css::uno::Any
- FilterData;
- OUString FilterName; //internal filter name.
- bool ISSET_FilterName;
- bool Hidden; //load document, invisible.
-
- OUString HierarchicalDocumentName;
+ OUString HierarchicalDocumentName;
css::uno::Reference< css::io::XOutputStream >
OutputStream; //a stream to receive the document data for saving
- bool ISSET_OutputStream;
+ bool ISSET_OutputStream;
css::uno::Reference< css::io::XInputStream >
InputStream; //content of document.
- bool ISSET_InputStream;
-
- bool OpenNewView; //opens a new view for an already loaded document.
- bool Overwrite; //opens a new view for an already loaded document.
+ bool ISSET_InputStream;
- bool Preview; //show preview.
- bool ReadOnly; //open document readonly.
+ bool ReadOnly; //open document readonly.
- //not documented ... @todo remove?
- bool Silent; //prevents dialogs to query for more information.
- bool Unpacked;
- OUString URL;// FileName, URL of the document.
- bool ISSET_URL;
- sal_Int16 Version; //storage version.
+ OUString URL;// FileName, URL of the document.
+ bool ISSET_URL;
- css::uno::Any
- ViewData;
- sal_Int16 ViewId; //id of the initial view.
+ css::uno::Any ViewData;
// new framework objects
css::uno::Reference< css::embed::XStorage >
Storage;
- bool ISSET_Storage;
+ bool ISSET_Storage;
css::uno::Reference< css::io::XStream >
Stream;
- bool ISSET_Stream;
-
- bool SetEmbedded;
+ bool ISSET_Stream;
protected:
-SAL_DLLPRIVATE void impl_init();
+ SAL_DLLPRIVATE void impl_init();
};
}
diff --git a/chart2/source/tools/MediaDescriptorHelper.cxx b/chart2/source/tools/MediaDescriptorHelper.cxx
index a96dddf731b7..78fa5d14d007 100644
--- a/chart2/source/tools/MediaDescriptorHelper.cxx
+++ b/chart2/source/tools/MediaDescriptorHelper.cxx
@@ -61,7 +61,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence<
if (rProp.Name == "AsTemplate")
{
- rProp.Value >>= AsTemplate;
addModelProp(rProp);
}
else if (rProp.Name == "Author")
@@ -109,7 +108,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence<
}
else if (rProp.Name == "Hidden")
{
- rProp.Value >>= Hidden;
addModelProp(rProp);
}
else if (rProp.Name == "HierarchicalDocumentName")
@@ -145,12 +143,10 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence<
}
else if (rProp.Name == "OpenNewView")
{
- rProp.Value >>= OpenNewView;
addRegularProp(rProp);
}
else if (rProp.Name == "Overwrite")
{
- rProp.Value >>= Overwrite;
addModelProp(rProp);
}
else if (rProp.Name == "Password")
@@ -171,7 +167,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence<
}
else if (rProp.Name == "Preview")
{
- rProp.Value >>= Preview;
addModelProp(rProp);
}
else if (rProp.Name == "ReadOnly")
@@ -185,12 +180,10 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence<
}
else if (rProp.Name == "SetEmbedded")
{
- rProp.Value >>= SetEmbedded;
addRegularProp(rProp);
}
else if (rProp.Name == "Silent")
{
- rProp.Value >>= Silent;
addRegularProp(rProp);
}
else if (rProp.Name == "StatusIndicator")
@@ -217,7 +210,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence<
}
else if (rProp.Name == "Unpacked")
{
- rProp.Value >>= Unpacked;
addModelProp(rProp);
}
else if (rProp.Name == "URL")
@@ -227,7 +219,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence<
}
else if (rProp.Name == "Version")
{
- rProp.Value >>= Version;
addModelProp(rProp);
}
else if (rProp.Name == "ViewData")
@@ -237,7 +228,6 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence<
}
else if (rProp.Name == "ViewId")
{
- rProp.Value >>= ViewId;
addModelProp(rProp);
}
else if (rProp.Name == "WinExtent")
@@ -259,26 +249,13 @@ MediaDescriptorHelper::MediaDescriptorHelper( const uno::Sequence<
void MediaDescriptorHelper::impl_init()
{
- AsTemplate = false;
-
ISSET_FilterName = false;
- Hidden = false;
ISSET_OutputStream = false;
ISSET_InputStream = false;
- OpenNewView = false;
- Overwrite = false;
- Preview = false;
ReadOnly = false;
- Silent = false;
- Unpacked = false;
ISSET_URL = false;
- Version = 0;
-
- ViewId = 0;
-
- SetEmbedded = false;
ISSET_Storage = false;
ISSET_Stream = false;
More information about the Libreoffice-commits
mailing list