summaryrefslogtreecommitdiff
path: root/sw/source/filter/html
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r--sw/source/filter/html/css1atr.cxx4
-rw-r--r--sw/source/filter/html/htmlatr.cxx12
-rw-r--r--sw/source/filter/html/htmlfld.cxx4
-rw-r--r--sw/source/filter/html/htmlform.cxx4
-rw-r--r--sw/source/filter/html/htmltab.cxx24
-rw-r--r--sw/source/filter/html/htmltabw.cxx4
-rw-r--r--sw/source/filter/html/svxcss1.cxx8
7 files changed, 58 insertions, 2 deletions
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 909ec61ba98c..093409868ebc 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -210,6 +210,8 @@ OString GetCSS1_Color(const Color& rColor)
return "#" + lclConvToHex(rColor.GetRed()) + lclConvToHex(rColor.GetGreen()) + lclConvToHex(rColor.GetBlue());
}
+namespace {
+
class SwCSS1OutMode
{
SwHTMLWriter& rWrt;
@@ -234,6 +236,8 @@ public:
}
};
+}
+
void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
const sal_Char *pVal,
const OUString *pSVal )
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 67ca2a1b4aec..72c3e20b68e8 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -201,6 +201,8 @@ sal_uInt16 SwHTMLWriter::GetCSS1ScriptForScriptType( sal_uInt16 nScriptType )
* Otherwise, attributes of the format are output as well.
*/
+namespace {
+
struct SwHTMLTextCollOutputInfo
{
OString aToken; // End token to be output
@@ -223,6 +225,8 @@ struct SwHTMLTextCollOutputInfo
bool ShouldOutputToken() const { return bOutPara || !HasParaToken(); }
};
+}
+
SwHTMLFormatInfo::SwHTMLFormatInfo( const SwFormat *pF, SwDoc *pDoc, SwDoc *pTemplate,
bool bOutStyles,
LanguageType eDfltLang,
@@ -1029,6 +1033,8 @@ static void OutHTML_SwFormatOff( Writer& rWrt, const SwHTMLTextCollOutputInfo& r
}
}
+namespace {
+
class HTMLStartEndPos
{
sal_Int32 nStart;
@@ -1048,6 +1054,8 @@ public:
void SetEnd( sal_Int32 nE ) { nEnd = nE; }
};
+}
+
HTMLStartEndPos::HTMLStartEndPos( const SfxPoolItem& rItem, sal_Int32 nStt,
sal_Int32 nE ) :
nStart( nStt ),
@@ -1069,8 +1077,6 @@ enum HTMLOnOffState { HTML_NOT_SUPPORTED, // unsupported Attribute
HTML_DROPCAP_VALUE, // DropCap-Attribute
HTML_AUTOFMT_VALUE }; // Attribute for automatic character styles
-}
-
class HTMLEndPosLst
{
HTMLStartEndPositions aStartLst; // list, sorted for start positions
@@ -1153,6 +1159,8 @@ public:
bool IsHTMLMode( sal_uLong nMode ) const { return (nHTMLMode & nMode) != 0; }
};
+}
+
void HTMLEndPosLst::InsertItem_( HTMLStartEndPos *pPos, HTMLStartEndPositions::size_type nEndPos )
{
// Insert the attribute in the Start list behind all attributes that
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 92ecf5578909..e7de3fad7ee6 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -38,12 +38,16 @@
using namespace nsSwDocInfoSubType;
using namespace ::com::sun::star;
+namespace {
+
struct HTMLNumFormatTableEntry
{
const sal_Char *pName;
NfIndexTableOffset const eFormat;
};
+}
+
static HTMLOptionEnum<SwFieldIds> const aHTMLFieldTypeTable[] =
{
{ OOO_STRING_SW_HTML_FT_author, SwFieldIds::Author },
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 13f33ac57839..6f536bab0bdc 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -365,6 +365,8 @@ const uno::Reference< script::XEventAttacherManager >&
return m_xFormEventManager;
}
+namespace {
+
class SwHTMLImageWatcher :
public cppu::WeakImplHelper< awt::XImageConsumer, XEventListener >
{
@@ -408,6 +410,8 @@ public:
virtual void SAL_CALL disposing( const EventObject& Source ) override;
};
+}
+
SwHTMLImageWatcher::SwHTMLImageWatcher(
const uno::Reference< drawing::XShape >& rShape,
bool bWidth, bool bHeight ) :
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 0d659d7dfd65..12153fb74c4d 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -82,6 +82,8 @@ static HTMLOptionEnum<sal_Int16> const aHTMLTableVAlignTable[] =
// table tags options
+namespace {
+
struct HTMLTableOptions
{
sal_uInt16 nCols;
@@ -165,6 +167,8 @@ public:
size_t GetContextStAttrMin() const { return nContextStAttrMin; }
};
+}
+
// Cell content is a linked list with SwStartNodes and
// HTMLTables.
@@ -208,6 +212,8 @@ public:
const std::shared_ptr<SwHTMLTableLayoutCnts>& CreateLayoutInfo();
};
+namespace {
+
// Cell of a HTML table
class HTMLTableCell
{
@@ -271,9 +277,13 @@ public:
bool IsCovered() const { return mbCovered; }
};
+}
+
// Row of a HTML table
typedef std::vector<HTMLTableCell> HTMLTableCells;
+namespace {
+
class HTMLTableRow
{
HTMLTableCells m_aCells; ///< cells of the row
@@ -365,6 +375,8 @@ public:
std::unique_ptr<SwHTMLTableLayoutColumn> CreateLayoutInfo();
};
+}
+
// HTML table
typedef std::vector<HTMLTableRow> HTMLTableRows;
@@ -3874,6 +3886,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
xSaveStruct.reset();
}
+namespace {
+
class RowSaveStruct : public SwPendingData
{
public:
@@ -3886,6 +3900,8 @@ public:
{}
};
+}
+
void SwHTMLParser::BuildTableRow( HTMLTable *pCurTable, bool bReadOptions,
SvxAdjust eGrpAdjust,
sal_Int16 eGrpVertOri )
@@ -4245,6 +4261,8 @@ void SwHTMLParser::BuildTableSection( HTMLTable *pCurTable,
// now we stand (perhaps) in front of <TBODY>,... or </TABLE>
}
+namespace {
+
struct TableColGrpSaveStruct : public SwPendingData
{
sal_uInt16 nColGrpSpan;
@@ -4258,6 +4276,8 @@ struct TableColGrpSaveStruct : public SwPendingData
inline void CloseColGroup( HTMLTable *pTable );
};
+}
+
inline TableColGrpSaveStruct::TableColGrpSaveStruct() :
nColGrpSpan( 1 ), nColGrpWidth( 0 ),
bRelColGrpWidth( false ), eColGrpAdjust( SvxAdjust::End ),
@@ -4677,6 +4697,8 @@ void SwHTMLParser::BuildTableCaption( HTMLTable *pCurTable )
*m_pPam->GetPoint() = xSaveStruct->GetPos();
}
+namespace {
+
class TableSaveStruct : public SwPendingData
{
public:
@@ -4692,6 +4714,8 @@ public:
void MakeTable( sal_uInt16 nWidth, SwPosition& rPos, SwDoc *pDoc );
};
+}
+
void TableSaveStruct::MakeTable( sal_uInt16 nWidth, SwPosition& rPos, SwDoc *pDoc )
{
m_xCurrentTable->MakeTable(nullptr, nWidth);
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 577a9f5c7b11..b34ae8485d6e 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -56,6 +56,8 @@
using namespace ::com::sun::star;
+namespace {
+
class SwHTMLWrtTable : public SwWriteTable
{
static void Pixelize( sal_uInt16& rValue );
@@ -88,6 +90,8 @@ public:
sal_uInt16 nHSpace=0, sal_uInt16 nVSpace=0 ) const;
};
+}
+
SwHTMLWrtTable::SwHTMLWrtTable( const SwTableLines& rLines, long nWidth,
sal_uInt32 nBWidth, bool bRel,
sal_uInt16 nLSub, sal_uInt16 nRSub,
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 721a9e4afd59..cbfbe2e919f3 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -256,6 +256,8 @@ static sal_uInt16 const aBorderWidths[] =
#undef SBORDER_ENTRY
#undef DBORDER_ENTRY
+namespace {
+
struct SvxCSS1ItemIds
{
sal_uInt16 nFont;
@@ -295,6 +297,8 @@ struct SvxCSS1ItemIds
sal_uInt16 nDirection;
};
+}
+
static SvxCSS1ItemIds aItemIds;
struct SvxCSS1BorderInfo
@@ -3062,6 +3066,8 @@ static void ParseCSS1_so_language( const CSS1Expression *pExpr,
}
}
+namespace {
+
// the assignment of property to parsing function
struct CSS1PropEntry
{
@@ -3069,6 +3075,8 @@ struct CSS1PropEntry
FnParseCSS1Prop pFunc;
};
+}
+
#define CSS1_PROP_ENTRY(p) \
{ sCSS1_P_##p, ParseCSS1_##p }