[Libreoffice-commits] core.git: 4 commits - sw/source ucb/source
Noel Grandin
noel at peralex.com
Wed Sep 7 09:49:58 UTC 2016
sw/source/filter/html/htmlcss1.cxx | 10 +++---
sw/source/filter/html/htmlctxt.cxx | 20 ++++++------
sw/source/filter/html/htmlgrin.cxx | 2 -
sw/source/filter/html/htmlsect.cxx | 16 ++++-----
sw/source/filter/html/swhtml.hxx | 44 +++++++++++++++++----------
sw/source/filter/xml/xmlexpit.cxx | 4 +-
sw/source/filter/xml/xmlexpit.hxx | 3 -
sw/source/filter/xml/xmlfmt.cxx | 6 ---
sw/source/filter/xml/xmlfmte.cxx | 3 -
sw/source/filter/xml/xmlimp.cxx | 2 -
sw/source/filter/xml/xmlimp.hxx | 3 -
sw/source/filter/xml/xmlimpit.cxx | 5 +--
sw/source/filter/xml/xmlimpit.hxx | 3 -
sw/source/filter/xml/xmlitemi.cxx | 2 -
sw/source/filter/xml/xmltexti.cxx | 4 +-
sw/source/filter/xml/xmltexti.hxx | 2 -
sw/source/ui/chrdlg/drpcps.cxx | 6 +--
sw/source/ui/config/optpage.cxx | 4 +-
sw/source/ui/dbui/mmresultdialogs.cxx | 12 +++----
sw/source/ui/dbui/selectdbtabledialog.cxx | 10 +++---
sw/source/ui/inc/mmresultdialogs.hxx | 6 +--
sw/source/uibase/app/appopt.cxx | 12 +++----
sw/source/uibase/config/cfgitems.cxx | 32 +++++++++----------
sw/source/uibase/dbui/dbtree.cxx | 6 +--
sw/source/uibase/dialog/swwrtshitem.cxx | 6 ++-
sw/source/uibase/dochdl/swdtflvr.cxx | 6 +--
sw/source/uibase/frmdlg/colmgr.cxx | 20 ++++--------
sw/source/uibase/inc/cfgitems.hxx | 20 +++++-------
sw/source/uibase/inc/colmgr.hxx | 2 -
sw/source/uibase/inc/numfmtlb.hxx | 2 -
sw/source/uibase/inc/swwrtshitem.hxx | 2 -
sw/source/uibase/inc/uiitems.hxx | 4 +-
sw/source/uibase/inc/wrtsh.hxx | 2 -
sw/source/uibase/uiview/viewprt.cxx | 2 -
sw/source/uibase/uno/SwXDocumentSettings.cxx | 2 -
sw/source/uibase/utlui/numfmtlb.cxx | 6 +--
sw/source/uibase/utlui/uiitems.cxx | 8 ++--
sw/source/uibase/utlui/uitool.cxx | 2 -
sw/source/uibase/wrtsh/wrtsh3.cxx | 4 +-
ucb/source/regexp/regexp.cxx | 8 ----
40 files changed, 151 insertions(+), 162 deletions(-)
New commits:
commit bcbbf987771793030c7377f065f01f53c8f23ee3
Author: Noel Grandin <noel at peralex.com>
Date: Wed Sep 7 11:47:56 2016 +0200
-Werror=unused-but-set-variable
Change-Id: I1a7ed38a95b06029d821b000324b2cc880df1ebb
diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx
index 11ee8fa..94ca028 100644
--- a/ucb/source/regexp/regexp.cxx
+++ b/ucb/source/regexp/regexp.cxx
@@ -87,11 +87,6 @@ bool Regexp::matches(OUString const & rString) const
sal_Unicode const * p = pBegin;
if (matchStringIgnoreCase(&p, pEnd, m_aPrefix))
{
- sal_Unicode const * pBlock1End = pEnd;
-
- sal_Unicode const * pBlock2Begin = nullptr;
- sal_Unicode const * pBlock2End = nullptr;
-
switch (m_eKind)
{
case KIND_PREFIX:
@@ -116,9 +111,6 @@ bool Regexp::matches(OUString const & rString) const
&& (q == pEnd || *q == '/' || *q == '?' || *q == '#'))
{
bMatches = true;
- pBlock1End = p;
- pBlock2Begin = q;
- pBlock2End = pEnd;
break;
}
commit 21cbf3a33dbf06c119cc3c1f377b953fd97af94b
Author: Noel Grandin <noel at peralex.com>
Date: Wed Sep 7 11:46:23 2016 +0200
convert HTML_CNTXT constants to typed_flags
Change-Id: I94197bd40e4eca751452494d41abba05f69c8b8c
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index 780cd6c..feb4938 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -224,14 +224,14 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
}
void SwHTMLParser::SaveDocContext( HTMLAttrContext *pCntxt,
- sal_uInt16 nFlags,
+ HtmlContextFlags nFlags,
const SwPosition *pNewPos )
{
HTMLAttrContext_SaveDoc *pSave = pCntxt->GetSaveDocContext( true );
- pSave->SetStripTrailingPara( (HTML_CNTXT_STRIP_PARA & nFlags) != 0 );
- pSave->SetKeepNumRules( (HTML_CNTXT_KEEP_NUMRULE & nFlags) != 0 );
- pSave->SetFixHeaderDist( (HTML_CNTXT_HEADER_DIST & nFlags) != 0 );
- pSave->SetFixFooterDist( (HTML_CNTXT_FOOTER_DIST & nFlags) != 0 );
+ pSave->SetStripTrailingPara( bool(HtmlContextFlags::StripPara & nFlags) );
+ pSave->SetKeepNumRules( bool(HtmlContextFlags::KeepNumrule & nFlags) );
+ pSave->SetFixHeaderDist( bool(HtmlContextFlags::HeaderDist & nFlags) );
+ pSave->SetFixFooterDist( bool(HtmlContextFlags::FooterDist & nFlags) );
if( pNewPos )
{
@@ -246,7 +246,7 @@ void SwHTMLParser::SaveDocContext( HTMLAttrContext *pCntxt,
GetNumInfo().Clear();
}
- if( (HTML_CNTXT_KEEP_ATTRS & nFlags) != 0 )
+ if( HtmlContextFlags::KeepAttrs & nFlags )
{
// Attribute an aktueller Position beenden und an neuer neu anfangen
SplitAttrTab( *pNewPos );
@@ -263,12 +263,12 @@ void SwHTMLParser::SaveDocContext( HTMLAttrContext *pCntxt,
// Mit dem Setzen von nContextStMin koennen automatisch auch
// keine gerade offenen Listen (DL/OL/UL) mehr beendet werden.
- if( (HTML_CNTXT_PROTECT_STACK & nFlags) != 0 )
+ if( HtmlContextFlags::ProtectStack & nFlags )
{
pSave->SetContextStMin( m_nContextStMin );
m_nContextStMin = m_aContexts.size();
- if( (HTML_CNTXT_KEEP_ATTRS & nFlags) == 0 )
+ if( HtmlContextFlags::KeepAttrs & nFlags )
{
pSave->SetContextStAttrMin( m_nContextStAttrMin );
m_nContextStAttrMin = m_aContexts.size();
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 488758e..423706e 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -52,9 +52,9 @@
#include "swcss1.hxx"
#include "swhtml.hxx"
-#define CONTEXT_FLAGS_MULTICOL (HTML_CNTXT_STRIP_PARA | \
- HTML_CNTXT_KEEP_NUMRULE | \
- HTML_CNTXT_KEEP_ATTRS)
+#define CONTEXT_FLAGS_MULTICOL (HtmlContextFlags::StripPara | \
+ HtmlContextFlags::KeepNumrule | \
+ HtmlContextFlags::KeepAttrs)
#define CONTEXT_FLAGS_HDRFTR (CONTEXT_FLAGS_MULTICOL)
#define CONTEXT_FLAGS_FTN (CONTEXT_FLAGS_MULTICOL)
@@ -149,7 +149,7 @@ void SwHTMLParser::NewDivision( int nToken )
SwFrameFormat *pHdFtFormat;
bool bNew = false;
- sal_uInt16 nFlags = CONTEXT_FLAGS_HDRFTR;
+ HtmlContextFlags nFlags = CONTEXT_FLAGS_HDRFTR;
if( bHeader )
{
pHdFtFormat = const_cast<SwFrameFormat*>(rPageFormat.GetHeader().GetHeaderFormat());
@@ -160,7 +160,7 @@ void SwHTMLParser::NewDivision( int nToken )
pHdFtFormat = const_cast<SwFrameFormat*>(rPageFormat.GetHeader().GetHeaderFormat());
bNew = true;
}
- nFlags |= HTML_CNTXT_HEADER_DIST;
+ nFlags |= HtmlContextFlags::HeaderDist;
}
else
{
@@ -172,7 +172,7 @@ void SwHTMLParser::NewDivision( int nToken )
pHdFtFormat = const_cast<SwFrameFormat*>(rPageFormat.GetFooter().GetFooterFormat());
bNew = true;
}
- nFlags |= HTML_CNTXT_FOOTER_DIST;
+ nFlags |= HtmlContextFlags::FooterDist;
}
const SwFormatContent& rFlyContent = pHdFtFormat->GetContent();
@@ -765,7 +765,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet,
HTMLAttrContext *pCntxt,
const OUString& rName,
- sal_uInt16 nFlags )
+ HtmlContextFlags nFlags )
{
RndStdIds eAnchorId =
static_cast<const SwFormatAnchor&>(rItemSet.Get( RES_ANCHOR )).GetAnchorId();
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 0448c80..9d7704b 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -333,16 +333,22 @@ class SwHTMLNumRuleInfo;
typedef std::vector<std::unique_ptr<ImageMap>> ImageMaps;
-#define HTML_CNTXT_PROTECT_STACK 0x0001
-#define HTML_CNTXT_STRIP_PARA 0x0002
-#define HTML_CNTXT_KEEP_NUMRULE 0x0004
-#define HTML_CNTXT_HEADER_DIST 0x0008
-#define HTML_CNTXT_FOOTER_DIST 0x0010
-#define HTML_CNTXT_KEEP_ATTRS 0x0020
+enum class HtmlContextFlags {
+ ProtectStack = 0x0001,
+ StripPara = 0x0002,
+ KeepNumrule = 0x0004,
+ HeaderDist = 0x0008,
+ FooterDist = 0x0010,
+ KeepAttrs = 0x0020,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<HtmlContextFlags> : is_typed_flags<HtmlContextFlags, 0x03f> {};
+}
#define CONTEXT_FLAGS_ABSPOS \
- (HTML_CNTXT_PROTECT_STACK | \
- HTML_CNTXT_STRIP_PARA)
+ (HtmlContextFlags::ProtectStack | \
+ HtmlContextFlags::StripPara)
enum class HtmlFrameFormatFlags {
Box = 0x0001,
@@ -590,9 +596,9 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
// Fly-Frames einfuegen/verlassen
void InsertFlyFrame( const SfxItemSet& rItemSet, HTMLAttrContext *pCntxt,
- const OUString& rId, sal_uInt16 nFlags );
+ const OUString& rId, HtmlContextFlags nFlags );
- void SaveDocContext( HTMLAttrContext *pCntxt, sal_uInt16 nFlags,
+ void SaveDocContext( HTMLAttrContext *pCntxt, HtmlContextFlags nFlags,
const SwPosition *pNewPos );
void RestoreDocContext( HTMLAttrContext *pCntxt );
commit 93136caef5a34d2d4017376fa7192d332765431b
Author: Noel Grandin <noel at peralex.com>
Date: Wed Sep 7 11:40:35 2016 +0200
convert HTML_FF flags to typed_flags
Change-Id: I61c1c008925bcd4b51de327004b73e1c18b34189
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 619c5ae..d502957 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -2085,14 +2085,14 @@ void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/,
void SwHTMLParser::SetFrameFormatAttrs( SfxItemSet &rItemSet,
SvxCSS1PropertyInfo & /*rPropInfo*/,
- sal_uInt16 nFlags,
+ HtmlFrameFormatFlags nFlags,
SfxItemSet &rFrameItemSet )
{
const SfxPoolItem *pItem;
- if( (nFlags & HTML_FF_BOX) != 0 &&
+ if( (nFlags & HtmlFrameFormatFlags::Box) &&
SfxItemState::SET==rItemSet.GetItemState( RES_BOX, true, &pItem ) )
{
- if( (nFlags & HTML_FF_PADDING) == 0 )
+ if( nFlags & HtmlFrameFormatFlags::Padding )
{
SvxBoxItem aBoxItem( *static_cast<const SvxBoxItem *>(pItem) );
// reset all 4 sides to 0
@@ -2106,14 +2106,14 @@ void SwHTMLParser::SetFrameFormatAttrs( SfxItemSet &rItemSet,
rItemSet.ClearItem( RES_BOX );
}
- if( (nFlags & HTML_FF_BACKGROUND) != 0 &&
+ if( (nFlags & HtmlFrameFormatFlags::Background) &&
SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, true, &pItem ) )
{
rFrameItemSet.Put( *pItem );
rItemSet.ClearItem( RES_BACKGROUND );
}
- if( (nFlags & HTML_FF_DIRECTION) != 0 &&
+ if( (nFlags & HtmlFrameFormatFlags::Direction) &&
SfxItemState::SET==rItemSet.GetItemState( RES_FRAMEDIR, true, &pItem ) )
{
rFrameItemSet.Put( *pItem );
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index 73176ec..780cd6c 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -440,7 +440,7 @@ bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
// Sonstige CSS1-Attribute Setzen
SetFrameFormatAttrs( rItemSet, rPropInfo,
- HTML_FF_BOX|HTML_FF_PADDING|HTML_FF_BACKGROUND|HTML_FF_DIRECTION,
+ HtmlFrameFormatFlags::Box|HtmlFrameFormatFlags::Padding|HtmlFrameFormatFlags::Background|HtmlFrameFormatFlags::Direction,
aFrameItemSet );
InsertFlyFrame( aFrameItemSet, pContext, rPropInfo.aId,
@@ -473,7 +473,7 @@ bool SwHTMLParser::CreateContainer( const OUString& rClass,
SetFixSize( aDummy, aDummy, false, false, rItemSet, rPropInfo,
*pFrameItemSet );
SetSpace( aDummy, rItemSet, rPropInfo, *pFrameItemSet );
- SetFrameFormatAttrs( rItemSet, rPropInfo, HTML_FF_BOX|HTML_FF_BACKGROUND|HTML_FF_DIRECTION,
+ SetFrameFormatAttrs( rItemSet, rPropInfo, HtmlFrameFormatFlags::Box|HtmlFrameFormatFlags::Background|HtmlFrameFormatFlags::Direction,
*pFrameItemSet );
bRet = true;
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 938a77f..3b1a5f0 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -547,7 +547,7 @@ IMAGE_SETEVENT:
SetSpace( Size( nHSpace, nVSpace), aItemSet, aPropInfo, aFrameSet );
// Sonstige CSS1-Attribute Setzen
- SetFrameFormatAttrs( aItemSet, aPropInfo, HTML_FF_BOX, aFrameSet );
+ SetFrameFormatAttrs( aItemSet, aPropInfo, HtmlFrameFormatFlags::Box, aFrameSet );
Size aTwipSz( bPrcWidth ? 0 : nWidth, bPrcHeight ? 0 : nHeight );
if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index c889932..488758e 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -636,7 +636,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss )
// it will be cleared here. That for, it won't be set at the section,
// too.
SetFrameFormatAttrs( aItemSet, aPropInfo,
- HTML_FF_BOX|HTML_FF_BACKGROUND|HTML_FF_PADDING|HTML_FF_DIRECTION,
+ HtmlFrameFormatFlags::Box|HtmlFrameFormatFlags::Background|HtmlFrameFormatFlags::Padding|HtmlFrameFormatFlags::Direction,
aFrameItemSet );
// Insert fly frame. If the are columns, the fly frame's name is not
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 2dca612..0448c80 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -344,10 +344,16 @@ typedef std::vector<std::unique_ptr<ImageMap>> ImageMaps;
(HTML_CNTXT_PROTECT_STACK | \
HTML_CNTXT_STRIP_PARA)
-#define HTML_FF_BOX 0x0001
-#define HTML_FF_BACKGROUND 0x0002
-#define HTML_FF_PADDING 0x0004
-#define HTML_FF_DIRECTION 0x0008
+enum class HtmlFrameFormatFlags {
+ Box = 0x0001,
+ Background = 0x0002,
+ Padding = 0x0004,
+ Direction = 0x0008,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<HtmlFrameFormatFlags> : is_typed_flags<HtmlFrameFormatFlags, 0x0f> {};
+}
class SwHTMLParser : public SfxHTMLParser, public SwClient
{
@@ -669,7 +675,7 @@ private:
SfxItemSet &rFrameItemSet );
static void SetFrameFormatAttrs( SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo,
- sal_uInt16 nFlags, SfxItemSet &rFrameItemSet );
+ HtmlFrameFormatFlags nFlags, SfxItemSet &rFrameItemSet );
// Frames anlegen und Auto-gebundene Rahmen registrieren
void RegisterFlyFrame( SwFrameFormat *pFlyFrame );
commit 15da84c9c3a5323075c5e97ccd595a130f54cf20
Author: Noel Grandin <noel at peralex.com>
Date: Wed Sep 7 11:36:20 2016 +0200
loplugin:constantparam in sw
Change-Id: I16badc615e98202668b1b201035b5137cb94c10c
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 6c96f8b..2738bee 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -290,10 +290,10 @@ SvXMLExportItemMapper::~SvXMLExportItemMapper()
void SvXMLExportItemMapper::exportXML( SvXMLExport& rExport,
const SfxItemSet& rSet,
const SvXMLUnitConverter& rUnitConverter,
- XMLTokenEnum ePropToken,
- SvXmlExportFlags nFlags ) const
+ XMLTokenEnum ePropToken ) const
{
std::vector<sal_uInt16> aIndexArray;
+ const SvXmlExportFlags nFlags = SvXmlExportFlags::IGN_WS;
exportXML( rExport, rExport.GetAttrList(), rSet, rUnitConverter,
rExport.GetNamespaceMap(), nFlags, &aIndexArray );
diff --git a/sw/source/filter/xml/xmlexpit.hxx b/sw/source/filter/xml/xmlexpit.hxx
index 04af9f0..df68321 100644
--- a/sw/source/filter/xml/xmlexpit.hxx
+++ b/sw/source/filter/xml/xmlexpit.hxx
@@ -72,8 +72,7 @@ public:
void exportXML( SvXMLExport& rExport,
const SfxItemSet& rSet,
const SvXMLUnitConverter& rUnitConverter,
- ::xmloff::token::XMLTokenEnum ePropToken,
- SvXmlExportFlags nFlags ) const;
+ ::xmloff::token::XMLTokenEnum ePropToken ) const;
/** this method is called for every item that has the
MID_SW_FLAG_SPECIAL_ITEM_EXPORT flag set */
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 02a261f..58551e3 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -1052,8 +1052,7 @@ void SwXMLImport::UpdateTextCollConditions( SwDoc *pDoc )
bool SwXMLImport::FindAutomaticStyle(
sal_uInt16 nFamily,
const OUString& rName,
- const SfxItemSet **ppItemSet,
- OUString *pParent ) const
+ const SfxItemSet **ppItemSet ) const
{
SwXMLItemSetStyleContext_Impl *pStyle = nullptr;
if( GetAutoStyles() )
@@ -1080,9 +1079,6 @@ bool SwXMLImport::FindAutomaticStyle(
}
}
-
- if( pParent )
- *pParent = pStyle->GetParentName();
}
}
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index 3f68785..f019c04 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -154,8 +154,7 @@ void SwXMLExport::ExportFormat( const SwFormat& rFormat, enum XMLTokenEnum eFami
GetTableItemMapper().exportXML( *this,
rFormat.GetAttrSet(),
GetTwipUnitConverter(),
- ePropToken,
- SvXmlExportFlags::IGN_WS );
+ ePropToken );
}
}
}
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 261d671..d0b30d9 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -977,7 +977,7 @@ XMLTextImportHelper* SwXMLImport::CreateTextImport()
{
return new SwXMLTextImportHelper( GetModel(), *this, getImportInfo(),
IsInsertMode(),
- IsStylesOnlyMode(), true/*bShowProgress*/,
+ IsStylesOnlyMode(),
IsBlockMode(), IsOrganizerMode(),
m_bPreserveRedlineMode );
}
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index 93f3ba9..e8a7c25 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -176,8 +176,7 @@ public:
bool FindAutomaticStyle( sal_uInt16 nFamily,
const OUString& rName,
- const SfxItemSet **ppItemSet,
- OUString *pParent=nullptr ) const;
+ const SfxItemSet **ppItemSet ) const;
virtual void SetStatistics(
const css::uno::Sequence< css::beans::NamedValue> & i_rStats) override;
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index e7a356b..83ad344 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -57,10 +57,9 @@ using namespace ::xmloff::token;
using uno::Any;
SvXMLImportItemMapper::SvXMLImportItemMapper(
- SvXMLItemMapEntriesRef const & rMapEntries,
- sal_uInt16 nUnknWhich ) :
+ SvXMLItemMapEntriesRef const & rMapEntries ) :
mrMapEntries( rMapEntries ),
- nUnknownWhich( nUnknWhich )
+ nUnknownWhich( RES_UNKNOWNATR_CONTAINER )
{
}
diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx
index 92517db..d0be90e 100644
--- a/sw/source/filter/xml/xmlimpit.hxx
+++ b/sw/source/filter/xml/xmlimpit.hxx
@@ -38,8 +38,7 @@ protected:
sal_uInt16 nUnknownWhich;
public:
- SvXMLImportItemMapper( SvXMLItemMapEntriesRef const & rMapEntries ,
- sal_uInt16 nUnknWhich=USHRT_MAX );
+ SvXMLImportItemMapper( SvXMLItemMapEntriesRef const & rMapEntries );
virtual ~SvXMLImportItemMapper();
/** fills the given itemset with the attributes in the given list */
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index e5b1d58..2e99031 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -94,7 +94,7 @@ private:
SwXMLImportTableItemMapper_Impl::SwXMLImportTableItemMapper_Impl(
SvXMLItemMapEntriesRef rMapEntries ) :
- SvXMLImportItemMapper( rMapEntries, RES_UNKNOWNATR_CONTAINER)
+ SvXMLImportItemMapper( rMapEntries )
{
Reset();
}
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 461091f..7b91379 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -147,10 +147,10 @@ SwXMLTextImportHelper::SwXMLTextImportHelper(
const uno::Reference < XModel>& rModel,
SvXMLImport& rImport,
const uno::Reference<XPropertySet> & rInfoSet,
- bool bInsertM, bool bStylesOnlyM, bool _bProgress,
+ bool bInsertM, bool bStylesOnlyM,
bool bBlockM, bool bOrganizerM,
bool /*bPreserveRedlineMode*/ ) :
- XMLTextImportHelper( rModel, rImport, bInsertM, bStylesOnlyM, _bProgress,
+ XMLTextImportHelper( rModel, rImport, bInsertM, bStylesOnlyM, true/*bProgress*/,
bBlockM, bOrganizerM ),
pRedlineHelper( nullptr )
{
diff --git a/sw/source/filter/xml/xmltexti.hxx b/sw/source/filter/xml/xmltexti.hxx
index 24f4991..5a8704e 100644
--- a/sw/source/filter/xml/xmltexti.hxx
+++ b/sw/source/filter/xml/xmltexti.hxx
@@ -39,7 +39,7 @@ public:
const css::uno::Reference<css::frame::XModel>& rModel,
SvXMLImport& rImport,
const css::uno::Reference<css::beans::XPropertySet>& rInfoSet,
- bool bInsertM, bool bStylesOnlyM, bool bProgress,
+ bool bInsertM, bool bStylesOnlyM,
bool bBlockM, bool bOrganizerM,
bool bPreserveRedlineMode );
virtual ~SwXMLTextImportHelper();
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 1810065..3e7f79e 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -82,8 +82,8 @@ class SwDropCapsPict : public Control
sal_uLong textWidth; ///< Physical width of this segment.
sal_uInt16 scriptType; ///< Script type (e.g. Latin, Asian, Complex)
sal_Int32 changePos; ///< Character position where the script changes.
- ScriptInfo(sal_uLong txtWidth, sal_uInt16 scrptType, sal_Int32 position)
- : textWidth(txtWidth), scriptType(scrptType), changePos(position) {}
+ ScriptInfo(sal_uInt16 scrptType, sal_Int32 position)
+ : textWidth(0), scriptType(scrptType), changePos(position) {}
};
std::vector<ScriptInfo> maScriptChanges;
SvxFont maFont;
@@ -446,7 +446,7 @@ void SwDropCapsPict::CheckScript()
for(;;)
{
nChg = xBreak->endOfScript( maText, nChg, nScript );
- maScriptChanges.push_back( ScriptInfo(0, nScript, nChg) );
+ maScriptChanges.push_back( ScriptInfo(nScript, nChg) );
if( nChg >= maText.getLength() || nChg < 0 )
break;
nScript = xBreak->getScriptType( maText, nChg );
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index d6df1bd..dde2cb6 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -408,7 +408,7 @@ bool SwAddPrinterTabPage::FillItemSet( SfxItemSet* rCoreSet )
{
if ( bAttrModified )
{
- SwAddPrinterItem aAddPrinterAttr (FN_PARAM_ADDPRINTER);
+ SwAddPrinterItem aAddPrinterAttr;
aAddPrinterAttr.m_bPrintGraphic = m_pGrfCB->IsChecked();
aAddPrinterAttr.m_bPrintTable = true; // always enabled since CWS printerpullgpages /*aTabCB.IsChecked();*/
aAddPrinterAttr.m_bPrintDraw = m_pGrfCB->IsChecked(); // UI merged with m_pGrfCB in CWS printerpullgpages
@@ -2482,7 +2482,7 @@ bool SwTestTabPage::FillItemSet( SfxItemSet* rCoreSet )
if ( bAttrModified )
{
- SwTestItem aTestItem(FN_PARAM_SWTEST);
+ SwTestItem aTestItem;
aTestItem.bTest1=m_pTest1CBox->IsChecked();
aTestItem.bTest2=m_pTest2CBox->IsChecked();
aTestItem.bTest3=m_pTest3CBox->IsChecked();
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index b18a738..644a4de 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -218,8 +218,8 @@ public:
void SetBCC(const OUString& rSet) {m_pBCCED->SetText(rSet);}
};
-SwMMResultSaveDialog::SwMMResultSaveDialog(vcl::Window* pParent)
- : SfxModalDialog(pParent, "MMResultSaveDialog", "modules/swriter/ui/mmresultsavedialog.ui"),
+SwMMResultSaveDialog::SwMMResultSaveDialog()
+ : SfxModalDialog(nullptr, "MMResultSaveDialog", "modules/swriter/ui/mmresultsavedialog.ui"),
m_bCancelSaving(false)
{
get(m_pSaveAsOneRB, "singlerb");
@@ -264,8 +264,8 @@ void SwMMResultSaveDialog::dispose()
SfxModalDialog::dispose();
}
-SwMMResultPrintDialog::SwMMResultPrintDialog(vcl::Window* pParent)
- : SfxModalDialog(pParent, "MMResultPrintDialog", "modules/swriter/ui/mmresultprintdialog.ui")
+SwMMResultPrintDialog::SwMMResultPrintDialog()
+ : SfxModalDialog(nullptr, "MMResultPrintDialog", "modules/swriter/ui/mmresultprintdialog.ui")
, m_pTempPrinter(nullptr)
{
get(m_pPrinterFT, "printerft");
@@ -314,8 +314,8 @@ void SwMMResultPrintDialog::dispose()
SfxModalDialog::dispose();
}
-SwMMResultEmailDialog::SwMMResultEmailDialog(vcl::Window* pParent)
- : SfxModalDialog(pParent, "MMResultEmailDialog", "modules/swriter/ui/mmresultemaildialog.ui"),
+SwMMResultEmailDialog::SwMMResultEmailDialog()
+ : SfxModalDialog(nullptr, "MMResultEmailDialog", "modules/swriter/ui/mmresultemaildialog.ui"),
m_sConfigureMail(SW_RES(ST_CONFIGUREMAIL))
{
get(m_pMailToFT, "mailtoft");
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index e9472ce..db2a10f 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -46,7 +46,7 @@ class SwAddressTable : public SvSimpleTable
{
public:
explicit SwAddressTable(SvSimpleTableContainer& rParent);
- void InsertHeaderItem(sal_uInt16 nColumn, const OUString& rText, HeaderBarItemBits nBits);
+ void InsertHeaderItem(sal_uInt16 nColumn, const OUString& rText);
virtual void Resize() override;
void setColSizes();
};
@@ -60,9 +60,9 @@ SwAddressTable::SwAddressTable(SvSimpleTableContainer& rParent)
EnableAsyncDrag(false);
}
-void SwAddressTable::InsertHeaderItem(sal_uInt16 nColumn, const OUString& rText, HeaderBarItemBits nBits)
+void SwAddressTable::InsertHeaderItem(sal_uInt16 nColumn, const OUString& rText)
{
- GetTheHeaderBar().InsertItem( nColumn, rText, 0, nBits );
+ GetTheHeaderBar().InsertItem( nColumn, rText, 0, HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER );
}
void SwAddressTable::Resize()
@@ -107,8 +107,8 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(vcl::Window* pParent,
m_pTable = VclPtr<SwAddressTable>::Create(*pHeaderTreeContainer);
long aStaticTabs[]= { 2, 0, 0 };
m_pTable->SetTabs( aStaticTabs );
- m_pTable->InsertHeaderItem(1, m_sName, HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER);
- m_pTable->InsertHeaderItem(2, m_sType, HeaderBarItemBits::LEFT | HeaderBarItemBits::VCENTER);
+ m_pTable->InsertHeaderItem(1, m_sName );
+ m_pTable->InsertHeaderItem(2, m_sType );
m_pPreviewPB->SetClickHdl(LINK(this, SwSelectDBTableDialog, PreviewHdl));
diff --git a/sw/source/ui/inc/mmresultdialogs.hxx b/sw/source/ui/inc/mmresultdialogs.hxx
index 17c0d1f..2a7debc 100644
--- a/sw/source/ui/inc/mmresultdialogs.hxx
+++ b/sw/source/ui/inc/mmresultdialogs.hxx
@@ -62,7 +62,7 @@ class SwMMResultSaveDialog : public SfxModalDialog
DECL_LINK_TYPED(DocumentSelectionHdl_Impl, Button*, void);
public:
- SwMMResultSaveDialog(vcl::Window* pParent = nullptr);
+ SwMMResultSaveDialog();
virtual ~SwMMResultSaveDialog();
virtual void dispose() override;
@@ -94,7 +94,7 @@ class SwMMResultPrintDialog : public SfxModalDialog
void FillInPrinterSettings();
public:
- SwMMResultPrintDialog(vcl::Window* pParent = nullptr);
+ SwMMResultPrintDialog();
virtual ~SwMMResultPrintDialog();
virtual void dispose() override;
@@ -144,7 +144,7 @@ class SwMMResultEmailDialog : public SfxModalDialog
void FillInEmailSettings();
public:
- SwMMResultEmailDialog(vcl::Window* pParent = nullptr);
+ SwMMResultEmailDialog();
virtual ~SwMMResultEmailDialog();
virtual void dispose() override;
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index 3740c55..7f90721 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -118,11 +118,11 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
#endif
0);
- pRet->Put( SwDocDisplayItem( aViewOpt, FN_PARAM_DOCDISP) );
- pRet->Put( SwElemItem( aViewOpt, FN_PARAM_ELEM) );
+ pRet->Put( SwDocDisplayItem( aViewOpt ) );
+ pRet->Put( SwElemItem( aViewOpt ) );
if( bTextDialog )
{
- pRet->Put( SwShadowCursorItem( aViewOpt, FN_PARAM_SHADOWCURSOR ));
+ pRet->Put( SwShadowCursorItem( aViewOpt ));
pRet->Put( SfxBoolItem(FN_PARAM_CRSR_IN_PROTECTED, aViewOpt.IsCursorInProtectedArea()));
pRet->Put(SfxBoolItem(FN_PARAM_IGNORE_PROTECTED, aViewOpt.IsIgnoreProtectedArea()));
}
@@ -227,7 +227,7 @@ SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
if(!pOpt)
pOpt = GetPrtOptions(!bTextDialog);
- SwAddPrinterItem aAddPrinterItem (FN_PARAM_ADDPRINTER, *pOpt );
+ SwAddPrinterItem aAddPrinterItem(*pOpt );
pRet->Put(aAddPrinterItem);
// Options for Web background
@@ -477,7 +477,7 @@ VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent
if( (bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE == nId) ||
(!bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE != nId) )
{
- aSet.Put (SwWrtShellItem(SID_WRT_SHELL,pCurrView->GetWrtShellPtr()));
+ aSet.Put (SwWrtShellItem(pCurrView->GetWrtShellPtr()));
pRet->PageCreated(aSet);
}
}
@@ -499,7 +499,7 @@ VclPtr<SfxTabPage> SwModule::CreateTabPage( sal_uInt16 nId, vcl::Window* pParent
SwView* pCurrView = GetView();
if(pCurrView)
{
- aSet.Put( SwWrtShellItem( SID_WRT_SHELL, pCurrView->GetWrtShellPtr() ) );
+ aSet.Put( SwWrtShellItem( pCurrView->GetWrtShellPtr() ) );
pRet->PageCreated(aSet);
}
}
diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx
index b4605a7..00d8f28 100644
--- a/sw/source/uibase/config/cfgitems.cxx
+++ b/sw/source/uibase/config/cfgitems.cxx
@@ -30,8 +30,8 @@
#include "crstate.hxx"
-SwDocDisplayItem::SwDocDisplayItem( sal_uInt16 _nWhich ) :
- SfxPoolItem(_nWhich)
+SwDocDisplayItem::SwDocDisplayItem() :
+ SfxPoolItem(FN_PARAM_DOCDISP)
{
bParagraphEnd =
bTab =
@@ -52,8 +52,8 @@ SwDocDisplayItem::SwDocDisplayItem( const SwDocDisplayItem& rDocDisplayItem ):
*this = rDocDisplayItem;
};
-SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich ) :
- SfxPoolItem( _nWhich )
+SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt ) :
+ SfxPoolItem( FN_PARAM_DOCDISP )
{
bParagraphEnd = rVOpt.IsParagraph(true);
bTab = rVOpt.IsTab(true);
@@ -115,8 +115,8 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const
rVOpt.SetShowHiddenPara(bShowHiddenPara );
}
-SwElemItem::SwElemItem( sal_uInt16 _nWhich ) :
- SfxPoolItem(_nWhich)
+SwElemItem::SwElemItem() :
+ SfxPoolItem(FN_PARAM_ELEM)
{
bVertRuler =
bVertRulerRight=
@@ -135,8 +135,8 @@ SwElemItem::SwElemItem( const SwElemItem& rElemItem ):
*this = rElemItem;
}
-SwElemItem::SwElemItem(const SwViewOption& rVOpt, sal_uInt16 _nWhich) :
- SfxPoolItem( _nWhich )
+SwElemItem::SwElemItem(const SwViewOption& rVOpt) :
+ SfxPoolItem( FN_PARAM_ELEM )
{
bVertRuler = rVOpt.IsViewVRuler(true);
bVertRulerRight = rVOpt.IsVRulerRight();
@@ -208,14 +208,14 @@ SwAddPrinterItem::SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem ):
}
// CTOR for empty Item
-SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich):
- SfxPoolItem(_nWhich)
+SwAddPrinterItem::SwAddPrinterItem():
+ SfxPoolItem(FN_PARAM_ADDPRINTER)
{
}
// CTOR from SwPrintOptions
-SwAddPrinterItem::SwAddPrinterItem( sal_uInt16 _nWhich, const SwPrintData& rPrtData ) :
- SfxPoolItem(_nWhich)
+SwAddPrinterItem::SwAddPrinterItem( const SwPrintData& rPrtData ) :
+ SfxPoolItem(FN_PARAM_ADDPRINTER)
{
SwPrintData::operator=(rPrtData);
}
@@ -235,8 +235,8 @@ bool SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const
}
// Item for Settings dialog, ShadowCursorPage
-SwShadowCursorItem::SwShadowCursorItem( sal_uInt16 _nWhich )
- : SfxPoolItem( _nWhich ),
+SwShadowCursorItem::SwShadowCursorItem()
+ : SfxPoolItem( FN_PARAM_SHADOWCURSOR ),
eMode( FILL_TAB )
,bOn( false )
{
@@ -250,8 +250,8 @@ SwShadowCursorItem::SwShadowCursorItem( const SwShadowCursorItem& rCpy )
{
}
-SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 _nWhich )
- : SfxPoolItem( _nWhich ),
+SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt )
+ : SfxPoolItem( FN_PARAM_SHADOWCURSOR ),
eMode( rVOpt.GetShdwCursorFillMode() )
,bOn( rVOpt.IsShadowCursor() )
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index feffb62..70a6daa 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -67,8 +67,8 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper < XContainerListener >
SwWrtShell* m_pWrtShell;
public:
- explicit SwDBTreeList_Impl(SwWrtShell* pShell)
- : m_pWrtShell(pShell)
+ explicit SwDBTreeList_Impl()
+ : m_pWrtShell(nullptr)
{
}
virtual ~SwDBTreeList_Impl();
@@ -147,7 +147,7 @@ SwDBTreeList::SwDBTreeList(vcl::Window *pParent, WinBits nStyle)
, aImageList(SW_RES(ILIST_DB_DLG))
, bInitialized(false)
, bShowColumns(false)
- , pImpl(new SwDBTreeList_Impl(nullptr))
+ , pImpl(new SwDBTreeList_Impl)
{
if (IsVisible())
InitTreeList();
diff --git a/sw/source/uibase/dialog/swwrtshitem.cxx b/sw/source/uibase/dialog/swwrtshitem.cxx
index e981662..27a9ab0 100644
--- a/sw/source/uibase/dialog/swwrtshitem.cxx
+++ b/sw/source/uibase/dialog/swwrtshitem.cxx
@@ -18,8 +18,10 @@
*/
#include "swwrtshitem.hxx"
-SwWrtShellItem::SwWrtShellItem( sal_uInt16 _nWhich, SwWrtShell* pSh )
- : SfxPoolItem( _nWhich ), pWrtSh( pSh )
+#include <globals.hrc>
+
+SwWrtShellItem::SwWrtShellItem( SwWrtShell* pSh )
+ : SfxPoolItem( SID_WRT_SHELL ), pWrtSh( pSh )
{
}
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 8341af3..596ad57 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -190,11 +190,10 @@ class SwTrnsfrActionAndUndo
SwUndoId eUndoId;
public:
SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId,
- const SwRewriter * pRewriter = nullptr,
bool bDelSel = false)
: pSh( pS ), eUndoId( nId )
{
- pSh->StartUndo( eUndoId, pRewriter );
+ pSh->StartUndo( eUndoId );
if( bDelSel )
pSh->DelRight();
pSh->StartAllAction();
@@ -1243,8 +1242,7 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
if( bDelSel )
// #i34830#
- pAction.reset(new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, nullptr,
- true ));
+ pAction.reset(new SwTrnsfrActionAndUndo( &rSh, UNDO_PASTE_CLIPBOARD, true ));
}
SwTransferable *pTrans=nullptr, *pTunneledTrans=GetSwTransferable( rData );
diff --git a/sw/source/uibase/frmdlg/colmgr.cxx b/sw/source/uibase/frmdlg/colmgr.cxx
index bc47c06..9b38ce6 100644
--- a/sw/source/uibase/frmdlg/colmgr.cxx
+++ b/sw/source/uibase/frmdlg/colmgr.cxx
@@ -109,19 +109,15 @@ void SwColMgr::SetActualWidth(sal_uInt16 nW)
}
// ctor
-SwColMgr::SwColMgr(const SfxItemSet& rSet, sal_uInt16 nActWidth) :
- aFormatCol(static_cast<const SwFormatCol&>(rSet.Get(RES_COL))),
- nWidth(nActWidth)
+SwColMgr::SwColMgr(const SfxItemSet& rSet) :
+ aFormatCol(static_cast<const SwFormatCol&>(rSet.Get(RES_COL)))
{
- if(nWidth == USHRT_MAX)
- {
- nWidth = (sal_uInt16)static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth();
- if (nWidth < MINLAY)
- nWidth = USHRT_MAX;
- const SvxLRSpaceItem &rLR = static_cast<const SvxLRSpaceItem&>(rSet.Get(RES_LR_SPACE));
- nWidth = nWidth - (sal_uInt16)rLR.GetLeft();
- nWidth = nWidth - (sal_uInt16)rLR.GetRight();
- }
+ nWidth = (sal_uInt16)static_cast<const SwFormatFrameSize&>(rSet.Get(RES_FRM_SIZE)).GetWidth();
+ if (nWidth < MINLAY)
+ nWidth = USHRT_MAX;
+ const SvxLRSpaceItem &rLR = static_cast<const SvxLRSpaceItem&>(rSet.Get(RES_LR_SPACE));
+ nWidth = nWidth - (sal_uInt16)rLR.GetLeft();
+ nWidth = nWidth - (sal_uInt16)rLR.GetRight();
::FitToActualSize(aFormatCol, nWidth);
}
diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx
index fce80f1..57a8c5f 100644
--- a/sw/source/uibase/inc/cfgitems.hxx
+++ b/sw/source/uibase/inc/cfgitems.hxx
@@ -55,11 +55,10 @@ class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem
bool bShowHiddenPara :1;
public:
- SwDocDisplayItem( sal_uInt16 nWhich = FN_PARAM_DOCDISP );
+ SwDocDisplayItem();
SwDocDisplayItem(
const SwDocDisplayItem& rSwDocDisplayItem );
- SwDocDisplayItem( const SwViewOption& rVOpt,
- sal_uInt16 nWhich );
+ SwDocDisplayItem( const SwViewOption& rVOpt );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
@@ -87,9 +86,9 @@ class SW_DLLPUBLIC SwElemItem : public SfxPoolItem
friend class SwContentOptPage;
public:
- SwElemItem( sal_uInt16 nWhich = FN_PARAM_ELEM );
+ SwElemItem();
SwElemItem(const SwElemItem& rElemItem);
- SwElemItem(const SwViewOption& rVOpt, sal_uInt16 nWhich);
+ SwElemItem(const SwViewOption& rVOpt);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
@@ -108,8 +107,8 @@ class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData
using SwPrintData::operator ==;
public:
- SwAddPrinterItem( sal_uInt16 nWhich = FN_PARAM_ADDPRINTER );
- SwAddPrinterItem( sal_uInt16 nWhich, const SwPrintData& rPrtData );
+ SwAddPrinterItem();
+ SwAddPrinterItem( const SwPrintData& rPrtData );
SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
@@ -125,9 +124,9 @@ class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem
sal_uInt8 eMode;
bool bOn;
public:
- SwShadowCursorItem( sal_uInt16 nWhich = FN_PARAM_SHADOWCURSOR );
+ SwShadowCursorItem();
SwShadowCursorItem( const SwShadowCursorItem& rElemItem );
- SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 nWhich );
+ SwShadowCursorItem( const SwViewOption& rVOpt );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
@@ -163,8 +162,7 @@ class SW_DLLPUBLIC SwTestItem : public SfxPoolItem
bool bTest10:1;
public:
- SwTestItem( sal_uInt16 _nWhich):
- SfxPoolItem(_nWhich){};
+ SwTestItem() : SfxPoolItem(FN_PARAM_SWTEST) {};
SwTestItem( const SwTestItem& pTestItem);
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
diff --git a/sw/source/uibase/inc/colmgr.hxx b/sw/source/uibase/inc/colmgr.hxx
index c9b59dc..53cc566 100644
--- a/sw/source/uibase/inc/colmgr.hxx
+++ b/sw/source/uibase/inc/colmgr.hxx
@@ -28,7 +28,7 @@ class SW_DLLPUBLIC SwColMgr
{
public:
// lActWidth is passed directly from the page dialogs edits
- SwColMgr(const SfxItemSet &rSet, sal_uInt16 nActWidth = USHRT_MAX);
+ SwColMgr(const SfxItemSet &rSet);
~SwColMgr();
inline sal_uInt16 GetCount() const;
diff --git a/sw/source/uibase/inc/numfmtlb.hxx b/sw/source/uibase/inc/numfmtlb.hxx
index 300d976..4ef3759 100644
--- a/sw/source/uibase/inc/numfmtlb.hxx
+++ b/sw/source/uibase/inc/numfmtlb.hxx
@@ -41,7 +41,7 @@ class SW_DLLPUBLIC NumFormatListBox : public ListBox
DECL_DLLPRIVATE_LINK_TYPED( SelectHdl, ListBox&, void );
SAL_DLLPRIVATE double GetDefValue(const short nFormatType) const;
- SAL_DLLPRIVATE void Init(short nFormatType);
+ SAL_DLLPRIVATE void Init();
SAL_DLLPRIVATE SwView* GetView();
public:
diff --git a/sw/source/uibase/inc/swwrtshitem.hxx b/sw/source/uibase/inc/swwrtshitem.hxx
index 3900319..dcdb04d 100644
--- a/sw/source/uibase/inc/swwrtshitem.hxx
+++ b/sw/source/uibase/inc/swwrtshitem.hxx
@@ -28,7 +28,7 @@ class SW_DLLPUBLIC SwWrtShellItem: public SfxPoolItem
SwWrtShell* pWrtSh;
public:
- SwWrtShellItem( sal_uInt16 nWhich , SwWrtShell* pWrtSh);
+ SwWrtShellItem( SwWrtShell* pWrtSh );
SwWrtShellItem( const SwWrtShellItem& );
virtual bool operator==( const SfxPoolItem& ) const override;
diff --git a/sw/source/uibase/inc/uiitems.hxx b/sw/source/uibase/inc/uiitems.hxx
index 2222ffd..add23a7 100644
--- a/sw/source/uibase/inc/uiitems.hxx
+++ b/sw/source/uibase/inc/uiitems.hxx
@@ -35,7 +35,7 @@ class SW_DLLPUBLIC SwPageFootnoteInfoItem : public SfxPoolItem
public:
- SwPageFootnoteInfoItem(const sal_uInt16 nId, SwPageFootnoteInfo& rInfo);
+ SwPageFootnoteInfoItem(SwPageFootnoteInfo& rInfo);
SwPageFootnoteInfoItem(const SwPageFootnoteInfoItem& rItem );
virtual ~SwPageFootnoteInfoItem();
@@ -73,7 +73,7 @@ class SW_DLLPUBLIC SwUINumRuleItem : public SfxPoolItem
SwNumRule* pRule;
public:
- SwUINumRuleItem( const SwNumRule& rRule, const sal_uInt16 = FN_PARAM_ACT_NUMBER);
+ SwUINumRuleItem( const SwNumRule& rRule );
SwUINumRuleItem( const SwUINumRuleItem& rItem );
virtual ~SwUINumRuleItem();
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 5226c3a..6e633ce 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -416,7 +416,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
void ExecMacro( const SvxMacro& rMacro, OUString* pRet = nullptr, SbxArray* pArgs = nullptr );
// call into the dark Basic/JavaScript
sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
- bool bCheckPtr = false, SbxArray* pArgs = nullptr );
+ bool bCheckPtr = false );
// a click at the given field. the cursor is on it.
// execute the predefined actions.
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index 44b472b..2f401a0 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -320,7 +320,7 @@ void SetAppPrintOptions( SwViewShell* pSh, bool bWeb )
if( rIDDA.getPrinter( false ) )
{
// Close application own printing options in SfxPrinter.
- SwAddPrinterItem aAddPrinterItem (FN_PARAM_ADDPRINTER, aPrtData);
+ SwAddPrinterItem aAddPrinterItem(aPrtData);
SfxItemSet aSet( pSh->GetAttrPool(),
FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
SID_HTML_MODE, SID_HTML_MODE,
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 46ec397..053398b 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -889,7 +889,7 @@ void SwXDocumentSettings::_postSetValues ()
// when setting a printer it should have decent default options
SfxItemSet aOptions( mpPrinter->GetOptions() );
SwPrintData aPrtData( mpDoc->getIDocumentDeviceAccess().getPrintData() );
- SwAddPrinterItem aAddPrinterItem (FN_PARAM_ADDPRINTER, aPrtData);
+ SwAddPrinterItem aAddPrinterItem (aPrtData);
aOptions.Put(aAddPrinterItem);
mpPrinter->SetOptions( aOptions );
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index d54d84c..39fd6b3 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -64,7 +64,7 @@ NumFormatListBox::NumFormatListBox(vcl::Window* pWin, WinBits nStyle) :
bShowLanguageControl(false),
bUseAutomaticLanguage(true)
{
- Init(css::util::NumberFormat::NUMBER);
+ Init();
}
VCL_BUILDER_DECL_FACTORY(NumFormatListBox)
@@ -86,7 +86,7 @@ VCL_BUILDER_DECL_FACTORY(NumFormatListBox)
rRet = pListBox;
}
-void NumFormatListBox::Init(short nFormatType)
+void NumFormatListBox::Init()
{
SwView *pView = GetView();
@@ -95,7 +95,7 @@ void NumFormatListBox::Init(short nFormatType)
else
eCurLanguage = SvtSysLocale().GetLanguageTag().getLanguageType();
- SetFormatType(nFormatType);
+ SetFormatType(css::util::NumberFormat::NUMBER);
SetDefFormat(nDefFormat);
SetSelectHdl(LINK(this, NumFormatListBox, SelectHdl));
diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx
index 8b759ff..b0180b6 100644
--- a/sw/source/uibase/utlui/uiitems.cxx
+++ b/sw/source/uibase/utlui/uiitems.cxx
@@ -32,8 +32,8 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-SwPageFootnoteInfoItem::SwPageFootnoteInfoItem( const sal_uInt16 nId, SwPageFootnoteInfo& rInfo) :
- SfxPoolItem( nId ),
+SwPageFootnoteInfoItem::SwPageFootnoteInfoItem( SwPageFootnoteInfo& rInfo) :
+ SfxPoolItem( FN_PARAM_FTN_INFO ),
aFootnoteInfo(rInfo)
{
}
@@ -221,8 +221,8 @@ bool SwPtrItem::operator==( const SfxPoolItem& rAttr ) const
// SwUINumRuleItem for the NumTabPages of the FormatNumRule/Styleists
-SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul, const sal_uInt16 nId )
- : SfxPoolItem( nId ), pRule( new SwNumRule( rRul ) )
+SwUINumRuleItem::SwUINumRuleItem( const SwNumRule& rRul )
+ : SfxPoolItem( FN_PARAM_ACT_NUMBER ), pRule( new SwNumRule( rRul ) )
{
}
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index c04bd7b..514a91a 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -560,7 +560,7 @@ void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet)
// Integrate footnotes
SwPageFootnoteInfo& rInfo = (SwPageFootnoteInfo&)rPageDesc.GetFootnoteInfo();
- SwPageFootnoteInfoItem aFootnoteItem(FN_PARAM_FTN_INFO, rInfo);
+ SwPageFootnoteInfoItem aFootnoteItem(rInfo);
rSet.Put(aFootnoteItem);
// Register compliant
diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx
index 71b4140..9b5cb4e 100644
--- a/sw/source/uibase/wrtsh/wrtsh3.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh3.cxx
@@ -160,9 +160,9 @@ void SwWrtShell::ExecMacro( const SvxMacro& rMacro, OUString* pRet, SbxArray* pA
}
sal_uInt16 SwWrtShell::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
- bool bChkPtr, SbxArray* pArgs)
+ bool bChkPtr)
{
- return GetDoc()->CallEvent( nEvent, rCallEvent, bChkPtr, pArgs );
+ return GetDoc()->CallEvent( nEvent, rCallEvent, bChkPtr );
}
// If a util::URL-Button is selected, return its util::URL
More information about the Libreoffice-commits
mailing list