#include "GuiDocumentEditor.h"
namespace
{
namespace
{
using
namespace
collections
;
namespace
document_operation_visitors
{
class
:
public
,
public
::
{
public
:
&
;
*
;
;
;
<
>
;
<
::
>
;
(
&
,
*
,
,
)
:runRanges(
)
, model(
)
, start(
)
, end(
)
{
::
;
resolvedStyle
->
(
::
,
resolvedStyle
);
.
(
resolvedStyle
);
}
const
::
&
()
{
return
.
() -
1
];
}
template
<
typename
>
void
(
<
>
::*
,
::*
)
{
const
::
&
=
();
if
(
.
()->*
&& (
.
()->*
).
() !=
src
.
.*
)
{
.
()->*
<
>();
}
}
template
<
typename
>
void
(
<
>
::*
,
::
::*
)
{
const
::
&
=
();
if
(
.
()->*
&& (
.
()->*
).
() !=
src
.*
)
{
.
()->*
<
>();
}
}
void
(
<
>
::*
,
::*
)
{
const
::
&
=
();
if
(
.
()->*
)
{
auto
= (
.
()->*
).
();
if
(
dfs
.
||
dfs
.
!=
src
.
.*
)
{
.
()->*
<
>();
}
}
}
template
<
typename
>
void
(
<
>
::*
,
::*
)
{
const
::
&
=
();
.
()->*
=
src
.
.*
;
}
template
<
typename
>
void
(
<
>
::*
,
::
::*
)
{
const
::
&
=
();
.
()->*
=
src
.*
;
}
void
(
<
>
::*
,
::*
)
{
const
::
&
=
();
.
()->*
((
double
)(
src
.
.*
),
false
);
}
void
(
*
)
{
for
(
=
->
.
() -
1
;
i
>=
0
;
i
--)
{
<
>
=
->
i
];
=
subRun
.
()];
if
(
range
.
<
&&
<
range
.
)
{
subRun
(
this
);
}
}
}
void
(
*
)
override
{
const
::
&
=
();
if
(
)
{
(&
::
, &
::
);
(&
::
, &
::
);
(&
::
, &
::
::
);
(&
::
, &
::
::
);
(&
::
, &
::
);
(&
::
, &
::
);
(&
::
, &
::
);
(&
::
, &
::
);
(&
::
, &
::
);
(&
::
, &
::
);
}
else
{
new
;
(&
::
, &
::
);
(&
::
, &
::
);
(&
::
, &
::
::
);
(&
::
, &
::
::
);
(&
::
, &
::
);
(&
::
, &
::
);
(&
::
, &
::
);
(&
::
, &
::
);
(&
::
, &
::
);
(&
::
, &
::
);
}
}
void
(
DocumentStylePropertiesRun
*
)
override
{
const
::
&
=
();
::
=
->
(
->
,
currentResolvedStyle
);
.
(
resolvedStyle
);
(
);
.
(
.
() -
1
);
}
void
(
DocumentStyleApplicationRun
*
)
override
{
const
::
&
=
();
::
=
->
(
->
,
currentResolvedStyle
);
.
(
resolvedStyle
);
(
);
.
(
.
() -
1
);
}
void
(
*
)
override
{
const
::
&
=
();
::
=
->
(
->
,
currentResolvedStyle
);
.
(
resolvedStyle
);
(
);
.
(
.
() -
1
);
}
void
(
*
)
override
{
}
void
(
DocumentEmbeddedObjectRun
*
)
override
{
}
void
(
*
)
override
{
(
);
}
};
class
SummarizeStyleNameVisitor
:
public
,
public
::
{
public
:
&
;
*
;
;
;
<
>
;
<
>
;
bool
=
false
;
SummarizeStyleNameVisitor
(
&
,
*
,
,
)
:runRanges(
)
, model(
)
, start(
)
, end(
)
{
}
void
(
*
)
{
if
(!
)
{
;
=
true
;
}
else
if
(
&& (!
||
.
() !=
.
()))
{
<
>();
}
}
void
(
*
)
{
for
(
=
->
.
() -
1
;
i
>=
0
;
i
--)
{
<
>
=
->
i
];
=
subRun
.
()];
if
(
range
.
<
&&
<
range
.
)
{
subRun
(
this
);
}
}
}
void
(
*
)
override
{
(
);
}
void
(
DocumentStylePropertiesRun
*
)
override
{
(
);
}
void
(
DocumentStyleApplicationRun
*
)
override
{
auto
=
;
->
;
(
);
oldStyleName
;
}
void
(
*
)
override
{
(
);
}
void
(
*
)
override
{
(
);
}
void
(
DocumentEmbeddedObjectRun
*
)
override
{
(
);
}
void
(
*
)
override
{
(
);
}
};
}
using
namespace
document_operation_visitors
;
namespace
{
<
>
(
*
,
&
,
*
,
,
)
{
(
,
,
,
);
->
(&
visitor
);
return
visitor
.
;
}
<
>
(
*
,
&
,
*
,
,
)
{
SummarizeStyleNameVisitor
(
,
,
,
);
->
(&
visitor
);
return
visitor
.
;
}
template
<
typename
>
void
(
<
>&
,
<
>
,
<
>
::*
)
{
if
(
.
()->*
&& (!(
.
()->*
) || (
.
()->*
).
() != (
.
()->*
).
()))
{
.
()->*
<
>();
}
}
void
(
<
>&
,
<
>
)
{
(
,
, &
::
);
(
,
, &
::
);
(
,
, &
::
);
(
,
, &
::
);
(
,
, &
::
);
(
,
, &
::
);
(
,
, &
::
);
(
,
, &
::
);
(
,
, &
::
);
(
,
, &
::
);
}
}
}
}