summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapper_Impl.hxx
diff options
context:
space:
mode:
authorVasily Melenchuk <Vasily.Melenchuk@cib.de>2017-08-18 22:14:08 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-11-10 02:01:57 +0100
commiteaa9cf6a3069fba3d82c046f0041bfb537d9e648 (patch)
tree55806b023e2f7c380a877d0df6b0bd5bb53ad46e /writerfilter/source/dmapper/DomainMapper_Impl.hxx
parent7f603dd111afcc30eec8bbec97efc16ad8b4c4d1 (diff)
tdf#43017: Support for DOCX hyperlinks character properties
Here goes a bunch of related changes: 1. Create new character style based on current character properties 2. Apply created style to hyperlink object 3. Fixes to predefined style names usage in w:rPr 4. Disable style usage for hyperlinks in TOC: they will receive later anoter styles Change-Id: I1a228992eb7c1e259a6a811aa7f959debaae4f35 Reviewed-on: https://gerrit.libreoffice.org/41784 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapper_Impl.hxx')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx29
1 files changed, 20 insertions, 9 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index df22413a8cbd..bf5c2644e182 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -132,23 +132,27 @@ public:
/// field stack element
class FieldContext
{
- bool m_bFieldCommandCompleted;
+ bool m_bFieldCommandCompleted;
css::uno::Reference<css::text::XTextRange> m_xStartRange;
- OUString m_sCommand;
+ OUString m_sCommand;
OUString m_sResult;
+ boost::optional<FieldId> m_eFieldId;
bool m_bFieldLocked;
css::uno::Reference<css::text::XTextField> m_xTextField;
- css::uno::Reference<css::text::XFormField> m_xFormField;
+ css::uno::Reference<css::text::XFormField> m_xFormField;
css::uno::Reference<css::beans::XPropertySet> m_xTOC;
css::uno::Reference<css::beans::XPropertySet> m_xTC; // TOX entry
css::uno::Reference<css::beans::XPropertySet> m_xCustomField;
- OUString m_sHyperlinkURL;
+
+ OUString m_sHyperlinkURL;
/// A frame for the hyperlink when one exists.
OUString m_sHyperlinkTarget;
- FFDataHandler::Pointer_t m_pFFDataHandler;
- FormControlHelper::Pointer_t m_pFormControlHelper;
+ OUString m_sHyperlinkStyle;
+
+ FFDataHandler::Pointer_t m_pFFDataHandler;
+ FormControlHelper::Pointer_t m_pFormControlHelper;
/// (Character) properties of the field itself.
PropertyMapPtr m_pProperties;
@@ -161,6 +165,9 @@ public:
void AppendCommand(const OUString& rPart);
const OUString& GetCommand() const {return m_sCommand; }
+ void SetFieldId(FieldId eFieldId ) { m_eFieldId = eFieldId; }
+ boost::optional<FieldId> GetFieldId() const { return m_eFieldId; }
+
void AppendResult(OUString const& rResult) { m_sResult += rResult; }
const OUString& GetResult() const { return m_sResult; }
@@ -183,10 +190,12 @@ public:
void SetTC(css::uno::Reference<css::beans::XPropertySet> const& xTC) { m_xTC = xTC; }
const css::uno::Reference<css::beans::XPropertySet>& GetTC() { return m_xTC; }
- void SetHyperlinkURL( const OUString& rURL ) { m_sHyperlinkURL = rURL; }
- const OUString& GetHyperlinkURL() { return m_sHyperlinkURL; }
+ void SetHyperlinkURL( const OUString& rURL ) { m_sHyperlinkURL = rURL; }
+ const OUString& GetHyperlinkURL() { return m_sHyperlinkURL; }
void SetHyperlinkTarget(const OUString& rTarget) { m_sHyperlinkTarget = rTarget; }
const OUString& GetHyperlinkTarget() { return m_sHyperlinkTarget; }
+ void SetHyperlinkStyle(const OUString& rStyle) { m_sHyperlinkStyle = rStyle; }
+ const OUString& GetHyperlinkStyle() { return m_sHyperlinkStyle; }
void setFFDataHandler(FFDataHandler::Pointer_t pFFDataHandler) { m_pFFDataHandler = pFFDataHandler; }
const FFDataHandler::Pointer_t& getFFDataHandler() const { return m_pFFDataHandler; }
@@ -203,7 +212,7 @@ struct TextAppendContext
css::uno::Reference<css::text::XTextAppend> xTextAppend;
css::uno::Reference<css::text::XTextRange> xInsertPosition;
css::uno::Reference<css::text::XParagraphCursor> xCursor;
- ParagraphPropertiesPtr pLastParagraphProperties;
+ ParagraphPropertiesPtr pLastParagraphProperties;
TextAppendContext(const css::uno::Reference<css::text::XTextAppend>& xAppend, const css::uno::Reference<css::text::XTextCursor>& xCur)
: xTextAppend(xAppend)
@@ -687,6 +696,8 @@ public:
void PopPageHeaderFooter();
bool IsInHeaderFooter() const { return m_bInHeaderFooterImport; }
+ bool IsInTOC() const { return m_bStartTOC; }
+
void PushFootOrEndnote( bool bIsFootnote );
void PopFootOrEndnote();
bool IsInFootOrEndnote() const { return m_bInFootOrEndnote; }