[Libreoffice-commits] core.git: 2 commits - extensions/source sw/source
Caolán McNamara
caolanm at redhat.com
Tue Sep 15 02:44:24 PDT 2015
extensions/source/abpilot/abpfinalpage.hxx | 2
extensions/source/abpilot/admininvokationpage.hxx | 2
extensions/source/abpilot/datasourcehandling.cxx | 11 ++--
extensions/source/abpilot/datasourcehandling.hxx | 4 -
extensions/source/abpilot/fieldmappingpage.hxx | 2
extensions/source/abpilot/tableselectionpage.hxx | 2
extensions/source/abpilot/typeselectionpage.hxx | 2
extensions/source/bibliography/bibresid.hxx | 2
extensions/source/bibliography/bibshortcuthandler.hxx | 2
extensions/source/bibliography/bibview.hxx | 2
extensions/source/bibliography/formcontrolcontainer.cxx | 2
extensions/source/bibliography/general.cxx | 2
extensions/source/bibliography/general.hxx | 2
extensions/source/bibliography/loadlisteneradapter.hxx | 4 -
extensions/source/config/ldap/ldapuserprofilebe.hxx | 2
extensions/source/dbpilots/commonpagesdbp.hxx | 4 -
extensions/source/dbpilots/gridwizard.hxx | 2
extensions/source/dbpilots/groupboxwiz.hxx | 10 ++--
extensions/source/dbpilots/listcombowizard.hxx | 8 +--
extensions/source/dbpilots/optiongrouplayouter.hxx | 2
extensions/source/dbpilots/unoautopilot.hxx | 2
extensions/source/inc/componentmodule.hxx | 2
extensions/source/logging/consolehandler.cxx | 2
extensions/source/logging/filehandler.cxx | 2
extensions/source/logging/logger.cxx | 2
extensions/source/logging/methodguard.hxx | 2
extensions/source/ole/ole2uno.hxx | 4 -
sw/source/filter/ww8/wrtw8esh.cxx | 40 ++++++++++++++--
sw/source/filter/ww8/wrtww8.hxx | 2
29 files changed, 83 insertions(+), 44 deletions(-)
New commits:
commit 3c68751f6beecccda7857e414b39c8cc8db6e57a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Sep 15 10:43:33 2015 +0100
cppcheck: noExplicitConstructor
Change-Id: If00a2de2c23271baaee126230c6bf9e657666ff4
diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx
index 1a87654..d758143 100644
--- a/extensions/source/abpilot/abpfinalpage.hxx
+++ b/extensions/source/abpilot/abpfinalpage.hxx
@@ -50,7 +50,7 @@ namespace abp
StringBag m_aInvalidDataSourceNames;
public:
- FinalPage( OAddessBookSourcePilot* _pParent );
+ explicit FinalPage(OAddessBookSourcePilot* _pParent);
virtual ~FinalPage();
virtual void dispose() SAL_OVERRIDE;
diff --git a/extensions/source/abpilot/admininvokationpage.hxx b/extensions/source/abpilot/admininvokationpage.hxx
index 36153d0..86ec918 100644
--- a/extensions/source/abpilot/admininvokationpage.hxx
+++ b/extensions/source/abpilot/admininvokationpage.hxx
@@ -34,7 +34,7 @@ namespace abp
bool m_bSuccessfullyExecutedDialog;
public:
- AdminDialogInvokationPage( OAddessBookSourcePilot* _pParent );
+ explicit AdminDialogInvokationPage(OAddessBookSourcePilot* _pParent);
virtual ~AdminDialogInvokationPage();
virtual void dispose() SAL_OVERRIDE;
protected:
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx
index f74c530..b8df4f3 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -187,7 +187,10 @@ namespace abp
Reference< XNameAccess > xContext; /// the UNO data source context
StringBag aDataSourceNames; /// for quicker name checks (without the UNO overhead)
- ODataSourceContextImpl( const Reference< XComponentContext >& _rxORB ) : xORB( _rxORB ) { }
+ explicit ODataSourceContextImpl(const Reference< XComponentContext >& _rxORB)
+ : xORB(_rxORB)
+ {
+ }
};
ODataSourceContext::ODataSourceContext(const Reference< XComponentContext >& _rxORB)
@@ -321,9 +324,9 @@ namespace abp
OUString sName;
bool bTablesUpToDate; // table name cache up-to-date?
- ODataSourceImpl( const Reference< XComponentContext >& _rxORB )
- :xORB( _rxORB )
- ,bTablesUpToDate( false )
+ explicit ODataSourceImpl(const Reference< XComponentContext >& _rxORB)
+ : xORB(_rxORB)
+ , bTablesUpToDate(false)
{
}
diff --git a/extensions/source/abpilot/datasourcehandling.hxx b/extensions/source/abpilot/datasourcehandling.hxx
index 8f8cb6c..656409f 100644
--- a/extensions/source/abpilot/datasourcehandling.hxx
+++ b/extensions/source/abpilot/datasourcehandling.hxx
@@ -48,7 +48,7 @@ namespace abp
ODataSourceContextImpl* m_pImpl;
public:
- ODataSourceContext(
+ explicit ODataSourceContext(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
);
~ODataSourceContext();
@@ -112,7 +112,7 @@ namespace abp
// - ctor/dtor/assignment
/// constructs an object which is initially invalid
- ODataSource(
+ explicit ODataSource(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
);
diff --git a/extensions/source/abpilot/fieldmappingpage.hxx b/extensions/source/abpilot/fieldmappingpage.hxx
index 5244ddb..655573a 100644
--- a/extensions/source/abpilot/fieldmappingpage.hxx
+++ b/extensions/source/abpilot/fieldmappingpage.hxx
@@ -34,7 +34,7 @@ namespace abp
VclPtr<FixedText> m_pHint;
public:
- FieldMappingPage( OAddessBookSourcePilot* _pParent );
+ explicit FieldMappingPage(OAddessBookSourcePilot* _pParent);
virtual ~FieldMappingPage();
virtual void dispose() SAL_OVERRIDE;
protected:
diff --git a/extensions/source/abpilot/tableselectionpage.hxx b/extensions/source/abpilot/tableselectionpage.hxx
index 0501913..de58a65 100644
--- a/extensions/source/abpilot/tableselectionpage.hxx
+++ b/extensions/source/abpilot/tableselectionpage.hxx
@@ -34,7 +34,7 @@ namespace abp
VclPtr<ListBox> m_pTableList;
public:
- TableSelectionPage( OAddessBookSourcePilot* _pParent );
+ explicit TableSelectionPage( OAddessBookSourcePilot* _pParent );
virtual ~TableSelectionPage();
virtual void dispose() SAL_OVERRIDE;
protected:
diff --git a/extensions/source/abpilot/typeselectionpage.hxx b/extensions/source/abpilot/typeselectionpage.hxx
index d5f13a8..a8c1830 100644
--- a/extensions/source/abpilot/typeselectionpage.hxx
+++ b/extensions/source/abpilot/typeselectionpage.hxx
@@ -61,7 +61,7 @@ namespace abp
::std::vector< ButtonItem > m_aAllTypes;
public:
- TypeSelectionPage( OAddessBookSourcePilot* _pParent );
+ explicit TypeSelectionPage( OAddessBookSourcePilot* _pParent );
virtual ~TypeSelectionPage();
virtual void dispose() SAL_OVERRIDE;
diff --git a/extensions/source/bibliography/bibresid.hxx b/extensions/source/bibliography/bibresid.hxx
index bb96b88..808b815 100644
--- a/extensions/source/bibliography/bibresid.hxx
+++ b/extensions/source/bibliography/bibresid.hxx
@@ -27,7 +27,7 @@
class BibResId : public ResId
{
public:
- BibResId( sal_uInt16 nId );
+ explicit BibResId(sal_uInt16 nId);
};
#define BIB_RESSTR(i) BibResId(i).toString()
diff --git a/extensions/source/bibliography/bibshortcuthandler.hxx b/extensions/source/bibliography/bibshortcuthandler.hxx
index d6310f5..a16750b 100644
--- a/extensions/source/bibliography/bibshortcuthandler.hxx
+++ b/extensions/source/bibliography/bibshortcuthandler.hxx
@@ -34,7 +34,7 @@ private:
VclPtr<vcl::Window> pBaseClass; // in cases, where BibShortCutHandler also has to be a window
protected:
- inline BibShortCutHandler( vcl::Window* pBaseClass );
+ explicit BibShortCutHandler( vcl::Window* pBaseClass );
public:
virtual ~BibShortCutHandler();
diff --git a/extensions/source/bibliography/bibview.hxx b/extensions/source/bibliography/bibview.hxx
index 86719c1..bfa6f57 100644
--- a/extensions/source/bibliography/bibview.hxx
+++ b/extensions/source/bibliography/bibview.hxx
@@ -50,7 +50,7 @@ namespace bib
using FormControlContainer::connectForm;
using FormControlContainer::disconnectForm;
using FormControlContainer::isFormConnected;
- BibViewFormControlContainer(BibView *pBibView);
+ explicit BibViewFormControlContainer(BibView *pBibView);
};
class BibView : public BibWindow
diff --git a/extensions/source/bibliography/formcontrolcontainer.cxx b/extensions/source/bibliography/formcontrolcontainer.cxx
index ffd71e0..51265d4 100644
--- a/extensions/source/bibliography/formcontrolcontainer.cxx
+++ b/extensions/source/bibliography/formcontrolcontainer.cxx
@@ -78,7 +78,7 @@ namespace bib
struct ControlModeSwitch : public ::std::unary_function< Reference< XControl >, void >
{
bool bDesign;
- ControlModeSwitch( bool _bDesign ) : bDesign( _bDesign ) { }
+ explicit ControlModeSwitch( bool _bDesign ) : bDesign( _bDesign ) { }
void operator() ( const Reference< XControl >& _rxControl ) const
{
diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx
index bab2494..d613df6 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -72,7 +72,7 @@ class BibPosListener :public cppu::WeakImplHelper <sdbc::XRowSetListener>
{
VclPtr<BibGeneralPage> pParentPage;
public:
- BibPosListener(BibGeneralPage* pParent);
+ explicit BibPosListener(BibGeneralPage* pParent);
//XPositioningListener
virtual void SAL_CALL cursorMoved(const lang::EventObject& event) throw( uno::RuntimeException, std::exception ) SAL_OVERRIDE;
diff --git a/extensions/source/bibliography/general.hxx b/extensions/source/bibliography/general.hxx
index af34aa6..44ee591 100644
--- a/extensions/source/bibliography/general.hxx
+++ b/extensions/source/bibliography/general.hxx
@@ -50,7 +50,7 @@ class BibGeneralPageFocusListener : public cppu::WeakAggImplHelper1 < ::com::sun
private:
VclPtr<BibGeneralPage> mpBibGeneralPage;
public:
- BibGeneralPageFocusListener(BibGeneralPage *pBibGeneralPage);
+ explicit BibGeneralPageFocusListener(BibGeneralPage *pBibGeneralPage);
virtual void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
diff --git a/extensions/source/bibliography/loadlisteneradapter.hxx b/extensions/source/bibliography/loadlisteneradapter.hxx
index 8bd3346..bff35f2 100644
--- a/extensions/source/bibliography/loadlisteneradapter.hxx
+++ b/extensions/source/bibliography/loadlisteneradapter.hxx
@@ -40,7 +40,7 @@ namespace bib
OComponentAdapterBase* m_pAdapter;
::osl::Mutex& m_rMutex;
protected:
- OComponentListener( ::osl::Mutex& _rMutex )
+ explicit OComponentListener( ::osl::Mutex& _rMutex )
:m_pAdapter( NULL )
,m_rMutex( _rMutex )
{
@@ -110,7 +110,7 @@ namespace bib
friend class OLoadListenerAdapter;
protected:
- OLoadListener( ::osl::Mutex& _rMutex ) : OComponentListener( _rMutex ) { }
+ explicit OLoadListener( ::osl::Mutex& _rMutex ) : OComponentListener( _rMutex ) { }
// XLoadListener equivalents
virtual void _loaded( const ::com::sun::star::lang::EventObject& aEvent ) = 0;
diff --git a/extensions/source/config/ldap/ldapuserprofilebe.hxx b/extensions/source/config/ldap/ldapuserprofilebe.hxx
index 9f56e8d..9c23200 100644
--- a/extensions/source/config/ldap/ldapuserprofilebe.hxx
+++ b/extensions/source/config/ldap/ldapuserprofilebe.hxx
@@ -54,7 +54,7 @@ class LdapUserProfileBe : private LdapProfileMutexHolder, public BackendBase
{
public:
- LdapUserProfileBe(const uno::Reference<uno::XComponentContext>& xContext);
+ explicit LdapUserProfileBe(const uno::Reference<uno::XComponentContext>& xContext);
virtual ~LdapUserProfileBe() ;
// XServiceInfo
diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx
index 7b8131f..3600131 100644
--- a/extensions/source/dbpilots/commonpagesdbp.hxx
+++ b/extensions/source/dbpilots/commonpagesdbp.hxx
@@ -41,7 +41,7 @@ namespace dbp
m_xDSContext;
public:
- OTableSelectionPage(OControlWizard* _pParent);
+ explicit OTableSelectionPage(OControlWizard* _pParent);
virtual ~OTableSelectionPage();
virtual void dispose() SAL_OVERRIDE;
@@ -105,7 +105,7 @@ namespace dbp
VclPtr<ListBox> m_pStoreWhere;
public:
- ODBFieldPage( OControlWizard* _pParent );
+ explicit ODBFieldPage( OControlWizard* _pParent );
virtual ~ODBFieldPage();
virtual void dispose() SAL_OVERRIDE;
diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx
index 89f311b..c93f0ec 100644
--- a/extensions/source/dbpilots/gridwizard.hxx
+++ b/extensions/source/dbpilots/gridwizard.hxx
@@ -80,7 +80,7 @@ namespace dbp
VclPtr<ListBox> m_pSelFields;
public:
- OGridFieldsSelection( OGridWizard* _pParent );
+ explicit OGridFieldsSelection( OGridWizard* _pParent );
virtual ~OGridFieldsSelection();
virtual void dispose() SAL_OVERRIDE;
diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx
index 453a93d..567eebf 100644
--- a/extensions/source/dbpilots/groupboxwiz.hxx
+++ b/extensions/source/dbpilots/groupboxwiz.hxx
@@ -87,7 +87,7 @@ namespace dbp
VclPtr<ListBox> m_pExistingRadios;
public:
- ORadioSelectionPage( OControlWizard* _pParent );
+ explicit ORadioSelectionPage( OControlWizard* _pParent );
virtual ~ORadioSelectionPage();
virtual void dispose() SAL_OVERRIDE;
@@ -115,7 +115,7 @@ namespace dbp
VclPtr<ListBox> m_pDefSelection;
public:
- ODefaultFieldSelectionPage( OControlWizard* _pParent );
+ explicit ODefaultFieldSelectionPage( OControlWizard* _pParent );
virtual ~ODefaultFieldSelectionPage();
virtual void dispose() SAL_OVERRIDE;
@@ -138,7 +138,7 @@ namespace dbp
m_nLastSelection;
public:
- OOptionValuesPage( OControlWizard* _pParent );
+ explicit OOptionValuesPage( OControlWizard* _pParent );
virtual ~OOptionValuesPage();
virtual void dispose() SAL_OVERRIDE;
@@ -158,7 +158,7 @@ namespace dbp
class OOptionDBFieldPage : public ODBFieldPage
{
public:
- OOptionDBFieldPage( OControlWizard* _pParent );
+ explicit OOptionDBFieldPage( OControlWizard* _pParent );
protected:
OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
@@ -173,7 +173,7 @@ namespace dbp
VclPtr<Edit> m_pName;
public:
- OFinalizeGBWPage( OControlWizard* _pParent );
+ explicit OFinalizeGBWPage( OControlWizard* _pParent );
virtual ~OFinalizeGBWPage();
virtual void dispose() SAL_OVERRIDE;
diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx
index 57aee28..d0b7ff3 100644
--- a/extensions/source/dbpilots/listcombowizard.hxx
+++ b/extensions/source/dbpilots/listcombowizard.hxx
@@ -101,7 +101,7 @@ namespace dbp
VclPtr<ListBox> m_pSelectTable;
public:
- OContentTableSelection( OListComboWizard* _pParent );
+ explicit OContentTableSelection( OListComboWizard* _pParent );
virtual ~OContentTableSelection();
virtual void dispose() SAL_OVERRIDE;
@@ -128,7 +128,7 @@ namespace dbp
public:
- OContentFieldSelection( OListComboWizard* _pParent );
+ explicit OContentFieldSelection( OListComboWizard* _pParent );
virtual ~OContentFieldSelection();
virtual void dispose() SAL_OVERRIDE;
@@ -153,7 +153,7 @@ namespace dbp
public:
- OLinkFieldsPage( OListComboWizard* _pParent );
+ explicit OLinkFieldsPage( OListComboWizard* _pParent );
virtual ~OLinkFieldsPage();
virtual void dispose() SAL_OVERRIDE;
@@ -175,7 +175,7 @@ namespace dbp
class OComboDBFieldPage : public ODBFieldPage
{
public:
- OComboDBFieldPage( OControlWizard* _pParent );
+ explicit OComboDBFieldPage( OControlWizard* _pParent );
protected:
OListComboSettings& getSettings() { return static_cast<OListComboWizard*>(getDialog())->getSettings(); }
diff --git a/extensions/source/dbpilots/optiongrouplayouter.hxx b/extensions/source/dbpilots/optiongrouplayouter.hxx
index c3910ee..2c1c41f 100644
--- a/extensions/source/dbpilots/optiongrouplayouter.hxx
+++ b/extensions/source/dbpilots/optiongrouplayouter.hxx
@@ -41,7 +41,7 @@ namespace dbp
mxContext;
public:
- OOptionGroupLayouter(
+ explicit OOptionGroupLayouter(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
);
diff --git a/extensions/source/dbpilots/unoautopilot.hxx b/extensions/source/dbpilots/unoautopilot.hxx
index 638e97e..5be6570 100644
--- a/extensions/source/dbpilots/unoautopilot.hxx
+++ b/extensions/source/dbpilots/unoautopilot.hxx
@@ -38,7 +38,7 @@ namespace dbp
,public ::comphelper::OPropertyArrayUsageHelper< OUnoAutoPilot< TYPE, SERVICEINFO > >
,public OModuleResourceClient
{
- OUnoAutoPilot(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB)
+ explicit OUnoAutoPilot(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB)
: OUnoAutoPilot_Base(_rxORB)
{
}
diff --git a/extensions/source/inc/componentmodule.hxx b/extensions/source/inc/componentmodule.hxx
index ecd6d73..3515ef4 100644
--- a/extensions/source/inc/componentmodule.hxx
+++ b/extensions/source/inc/componentmodule.hxx
@@ -150,7 +150,7 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService
class ModuleRes : public ::ResId
{
public:
- ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { }
+ explicit ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { }
};
diff --git a/extensions/source/logging/consolehandler.cxx b/extensions/source/logging/consolehandler.cxx
index f08dd66..d05f0df 100644
--- a/extensions/source/logging/consolehandler.cxx
+++ b/extensions/source/logging/consolehandler.cxx
@@ -73,7 +73,7 @@ namespace logging
sal_Int32 m_nThreshold;
protected:
- ConsoleHandler( const Reference< XComponentContext >& _rxContext );
+ explicit ConsoleHandler( const Reference< XComponentContext >& _rxContext );
virtual ~ConsoleHandler();
// XConsoleHandler
diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx
index 23ff7ec..7db279d 100644
--- a/extensions/source/logging/filehandler.cxx
+++ b/extensions/source/logging/filehandler.cxx
@@ -94,7 +94,7 @@ namespace logging
FileValidity m_eFileValidity;
protected:
- FileHandler( const Reference< XComponentContext >& _rxContext );
+ explicit FileHandler( const Reference< XComponentContext >& _rxContext );
virtual ~FileHandler();
// XLogHandler
diff --git a/extensions/source/logging/logger.cxx b/extensions/source/logging/logger.cxx
index 5a62c89..fdb3360 100644
--- a/extensions/source/logging/logger.cxx
+++ b/extensions/source/logging/logger.cxx
@@ -120,7 +120,7 @@ namespace logging
ImplPool m_aImpl;
public:
- LoggerPool( const Reference< XComponentContext >& _rxContext );
+ explicit LoggerPool( const Reference< XComponentContext >& _rxContext );
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw(RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/extensions/source/logging/methodguard.hxx b/extensions/source/logging/methodguard.hxx
index a0f8cda..167b3a3 100644
--- a/extensions/source/logging/methodguard.hxx
+++ b/extensions/source/logging/methodguard.hxx
@@ -38,7 +38,7 @@ namespace logging
};
public:
- ComponentMethodGuard( COMPONENT& _rHandler )
+ explicit ComponentMethodGuard( COMPONENT& _rHandler )
:m_rHandler( _rHandler )
{
m_rHandler.enterMethod( Access() );
diff --git a/extensions/source/ole/ole2uno.hxx b/extensions/source/ole/ole2uno.hxx
index ae96a69..346de1e 100644
--- a/extensions/source/ole/ole2uno.hxx
+++ b/extensions/source/ole/ole2uno.hxx
@@ -71,9 +71,9 @@ void o2u_attachCurrentThread();
class BridgeRuntimeError
{
public:
- BridgeRuntimeError(const OUString& sMessage)
+ explicit BridgeRuntimeError(const OUString& sMessage)
+ : message(sMessage)
{
- message = sMessage;
}
OUString message;
};
commit 1ed0f437679d702b633e381eaf6f6d6f9aecdd9b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Sep 15 09:29:04 2015 +0100
Related: tdf#93675 wrong font used in drawings in exported .docx
get the right font so stuff fits in the shapes like its supposed
to
Change-Id: Ic9777166395fcbf64572494034f06ef182073e19
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 2b7cebe..6ce03c9 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -28,6 +28,7 @@
#include <sot/storage.hxx>
#include <vcl/graphicfilter.hxx>
#include <svl/itemiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdotext.hxx>
#include <svx/svdmodel.hxx>
@@ -88,6 +89,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/form/XFormComponent.hpp>
#include "docsh.hxx"
+#include "IDocumentStylePoolAccess.hxx"
#include <oox/ole/olehelper.hxx>
#include <fstream>
#include <unotools/streamwrap.hxx>
@@ -1308,10 +1310,43 @@ const SfxPoolItem& MSWord_SdrAttrIter::GetItem( sal_uInt16 nWhich ) const
return *pRet;
}
+//Drawing shapes properties inherit from a different pool that the document
+//styles. On export to .doc[x] they will default to style "Normal". Here explicitly
+//set any items which are not already set, but differ from "Normal".
+void MSWord_SdrAttrIter::SetItemsThatDifferFromStandard(bool bCharAttr, SfxItemSet& rSet)
+{
+ SwTextFormatColl* pC = m_rExport.m_pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool
+ (RES_POOLCOLL_STANDARD, false);
+
+ SfxWhichIter aWhichIter(rSet);
+ for (sal_uInt16 nEEWhich = aWhichIter.FirstWhich(); nEEWhich; nEEWhich = aWhichIter.NextWhich())
+ {
+ if (SfxItemState::SET != rSet.GetItemState(nEEWhich, false))
+ {
+ sal_uInt16 nSwWhich = sw::hack::TransformWhichBetweenPools(m_rExport.m_pDoc->GetAttrPool(),
+ *pEditPool, nEEWhich);
+ if (!nSwWhich)
+ continue;
+ bool bWanted = ( bCharAttr ? ( nSwWhich >= RES_CHRATR_BEGIN && nSwWhich < RES_TXTATR_END )
+ : ( nSwWhich >= RES_PARATR_BEGIN && nSwWhich < RES_FRMATR_END ) );
+ if (!bWanted)
+ continue;
+
+ const SfxPoolItem& rDrawItem = rSet.Get(nEEWhich);
+ const SfxPoolItem& rStandardItem = pC->GetFormatAttr(nSwWhich);
+ if (rDrawItem != rStandardItem)
+ rSet.Put(rDrawItem);
+ }
+ }
+}
+
void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>* pWhichsToIgnore)
{
SfxItemSet aSet( pEditObj->GetParaAttribs( nPara ));
- if( aSet.Count() )
+
+ SetItemsThatDifferFromStandard(bCharAttr, aSet);
+
+ if (aSet.Count())
{
const SfxItemSet* pOldSet = m_rExport.GetCurItemSet();
m_rExport.SetCurItemSet( &aSet );
@@ -1325,7 +1360,6 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>*
do
{
sal_uInt16 nWhich = pItem->Which();
-
if (pWhichsToIgnore && pWhichsToIgnore->find(nWhich) != pWhichsToIgnore->end())
continue;
@@ -1341,7 +1375,7 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>*
SfxPoolItem* pI = pItem->Clone();
pI->SetWhich( nWhich );
if (m_rExport.CollapseScriptsforWordOk(nScript,nWhich))
- m_rExport.AttrOutput().OutputItem( *pI );
+ m_rExport.AttrOutput().OutputItem(*pI);
delete pI;
}
} while( !aIter.IsAtEnd() && 0 != ( pItem = aIter.NextItem() ) );
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 4fbc1cb..970f0c5 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1416,6 +1416,8 @@ private:
sal_Int32 SearchNext( sal_Int32 nStartPos );
void SetCharSet(const EECharAttrib& rTextAttr, bool bStart);
+ void SetItemsThatDifferFromStandard(bool bCharAttr, SfxItemSet& rSet);
+
MSWord_SdrAttrIter(const MSWord_SdrAttrIter&) SAL_DELETED_FUNCTION;
MSWord_SdrAttrIter& operator=(const MSWord_SdrAttrIter&) SAL_DELETED_FUNCTION;
public:
More information about the Libreoffice-commits
mailing list