Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
71d322a8
Kaydet (Commit)
71d322a8
authored
Ock 14, 2014
tarafından
Oliver-Rainer Wittmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
123457: improve ODF filter - suppress import and export of hyperlinks without an URL
üst
b6f34391
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
191 additions
and
162 deletions
+191
-162
txtparae.hxx
xmloff/inc/xmloff/txtparae.hxx
+10
-2
xmlexp.hxx
xmloff/inc/xmloff/xmlexp.hxx
+10
-8
xmlexp.cxx
xmloff/source/core/xmlexp.cxx
+117
-103
txtimp.cxx
xmloff/source/text/txtimp.cxx
+2
-1
txtparae.cxx
xmloff/source/text/txtparae.cxx
+0
-0
txtparai.cxx
xmloff/source/text/txtparai.cxx
+52
-48
No files found.
xmloff/inc/xmloff/txtparae.hxx
Dosyayı görüntüle @
71d322a8
...
@@ -107,13 +107,21 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport
...
@@ -107,13 +107,21 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport
::
rtl
::
OUString
sOpenRubyCharStyle
;
::
rtl
::
OUString
sOpenRubyCharStyle
;
sal_Bool
bOpenRuby
;
sal_Bool
bOpenRuby
;
// --> OD 2008-05-07 #refactorlists#
XMLTextListsHelper
*
mpTextListsHelper
;
XMLTextListsHelper
*
mpTextListsHelper
;
::
std
::
vector
<
XMLTextListsHelper
*
>
maTextListsHelperStack
;
::
std
::
vector
<
XMLTextListsHelper
*
>
maTextListsHelperStack
;
// <--
enum
FrameType
{
FT_TEXT
,
FT_GRAPHIC
,
FT_EMBEDDED
,
FT_SHAPE
};
enum
FrameType
{
FT_TEXT
,
FT_GRAPHIC
,
FT_EMBEDDED
,
FT_SHAPE
};
void
exportTextRangeSpan
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
text
::
XTextRange
>
&
rTextRange
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySet
>
&
xPropSet
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
beans
::
XPropertySetInfo
>
&
xPropSetInfo
,
const
sal_Bool
bIsUICharStyle
,
const
sal_Bool
bHasAutoStyle
,
const
::
rtl
::
OUString
&
sStyle
,
sal_Bool
&
rPrevCharIsSpace
);
protected
:
protected
:
const
::
rtl
::
OUString
sActualSize
;
const
::
rtl
::
OUString
sActualSize
;
...
...
xmloff/inc/xmloff/xmlexp.hxx
Dosyayı görüntüle @
71d322a8
...
@@ -684,14 +684,16 @@ inline void SvXMLExport::SetGraphicResolver(
...
@@ -684,14 +684,16 @@ inline void SvXMLExport::SetGraphicResolver(
// Helper class to export an element.
// Helper class to export an element.
class
XMLOFF_DLLPUBLIC
SvXMLElementExport
class
XMLOFF_DLLPUBLIC
SvXMLElementExport
{
{
SvXMLExport
&
rExport
;
SvXMLExport
&
mrExport
;
::
rtl
::
OUString
aName
;
::
rtl
::
OUString
maElementName
;
sal_Bool
bIgnWS
:
1
;
const
sal_Bool
mbIgnoreWhitespaceInside
:
1
;
sal_Bool
bDoSomething
:
1
;
const
sal_Bool
mbDoSomething
:
1
;
SAL_DLLPRIVATE
void
StartElement
(
SvXMLExport
&
rExp
,
sal_uInt16
nPrefix
,
SAL_DLLPRIVATE
const
::
rtl
::
OUString
&
rName
,
void
StartElement
(
sal_Bool
bIgnWSOutside
);
const
sal_uInt16
nPrefix
,
const
::
rtl
::
OUString
&
rName
,
const
sal_Bool
bIgnoreWhitespaceOutside
);
public
:
public
:
...
...
xmloff/source/core/xmlexp.cxx
Dosyayı görüntüle @
71d322a8
...
@@ -2627,12 +2627,10 @@ SvXMLExport::AddAttributesRDFa(
...
@@ -2627,12 +2627,10 @@ SvXMLExport::AddAttributesRDFa(
mpImpl
->
mpRDFaHelper
->
AddRDFa
(
xMeta
);
mpImpl
->
mpRDFaHelper
->
AddRDFa
(
xMeta
);
}
}
// --> OD 2008-11-26 #158694#
sal_Bool
SvXMLExport
::
exportTextNumberElement
()
const
sal_Bool
SvXMLExport
::
exportTextNumberElement
()
const
{
{
return
mpImpl
->
mbExportTextNumberElement
;
return
mpImpl
->
mbExportTextNumberElement
;
}
}
// <--
sal_Bool
SvXMLExport
::
SetNullDateOnUnitConverter
()
sal_Bool
SvXMLExport
::
SetNullDateOnUnitConverter
()
{
{
...
@@ -2643,116 +2641,132 @@ sal_Bool SvXMLExport::SetNullDateOnUnitConverter()
...
@@ -2643,116 +2641,132 @@ sal_Bool SvXMLExport::SetNullDateOnUnitConverter()
return
mpImpl
->
mbNullDateInitialized
;
return
mpImpl
->
mbNullDateInitialized
;
}
}
//=============================================================================
void
SvXMLElementExport
::
StartElement
(
SvXMLExport
&
rExp
,
//=============================================================================
sal_uInt16
nPrefixKey
,
const
OUString
&
rLName
,
sal_Bool
bIWSOutside
)
{
aName
=
rExp
.
GetNamespaceMap
().
GetQNameByKey
(
nPrefixKey
,
rLName
);
rExp
.
StartElement
(
aName
,
bIWSOutside
);
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_uInt16
nPrefixKey
,
const
sal_Char
*
pLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
rExport
(
rExp
),
bIgnWS
(
bIWSInside
),
bDoSomething
(
sal_True
)
{
OUString
sLName
(
OUString
::
createFromAscii
(
pLName
)
);
StartElement
(
rExp
,
nPrefixKey
,
sLName
,
bIWSOutside
);
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_uInt16
nPrefixKey
,
const
OUString
&
rLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
rExport
(
rExp
),
bIgnWS
(
bIWSInside
),
bDoSomething
(
sal_True
)
{
StartElement
(
rExp
,
nPrefixKey
,
rLName
,
bIWSOutside
);
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_uInt16
nPrefixKey
,
enum
XMLTokenEnum
eLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
rExport
(
rExp
),
bIgnWS
(
bIWSInside
),
bDoSomething
(
sal_True
)
{
StartElement
(
rExp
,
nPrefixKey
,
GetXMLToken
(
eLName
),
bIWSOutside
);
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_Bool
bDoSth
,
sal_uInt16
nPrefixKey
,
const
sal_Char
*
pLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
rExport
(
rExp
),
bIgnWS
(
bIWSInside
),
bDoSomething
(
bDoSth
)
{
if
(
bDoSomething
)
{
OUString
sLName
(
OUString
::
createFromAscii
(
pLName
)
);
StartElement
(
rExp
,
nPrefixKey
,
sLName
,
bIWSOutside
);
}
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_Bool
bDoSth
,
sal_uInt16
nPrefixKey
,
const
OUString
&
rLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
rExport
(
rExp
),
bIgnWS
(
bIWSInside
),
bDoSomething
(
bDoSth
)
{
if
(
bDoSomething
)
StartElement
(
rExp
,
nPrefixKey
,
rLName
,
bIWSOutside
);
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_Bool
bDoSth
,
sal_uInt16
nPrefixKey
,
enum
XMLTokenEnum
eLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
rExport
(
rExp
),
bIgnWS
(
bIWSInside
),
bDoSomething
(
bDoSth
)
{
if
(
bDoSomething
)
StartElement
(
rExport
,
nPrefixKey
,
GetXMLToken
(
eLName
),
bIWSOutside
);
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
void
SvXMLElementExport
::
StartElement
(
const
OUString
&
rQName
,
const
sal_uInt16
nPrefixKey
,
sal_Bool
bIWSOutside
,
const
OUString
&
rLName
,
sal_Bool
bIWSInside
)
:
const
sal_Bool
bIgnoreWhitespaceOutside
)
rExport
(
rExp
),
{
bIgnWS
(
bIWSInside
),
maElementName
=
mrExport
.
GetNamespaceMap
().
GetQNameByKey
(
nPrefixKey
,
rLName
);
bDoSomething
(
sal_True
)
mrExport
.
StartElement
(
maElementName
,
bIgnoreWhitespaceOutside
);
{
}
aName
=
rQName
;
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_uInt16
nPrefixKey
,
const
sal_Char
*
pLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
mrExport
(
rExp
)
,
maElementName
()
,
mbIgnoreWhitespaceInside
(
bIWSInside
)
,
mbDoSomething
(
sal_True
)
{
const
OUString
sLName
(
OUString
::
createFromAscii
(
pLName
)
);
StartElement
(
nPrefixKey
,
sLName
,
bIWSOutside
);
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_uInt16
nPrefixKey
,
const
OUString
&
rLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
mrExport
(
rExp
)
,
maElementName
()
,
mbIgnoreWhitespaceInside
(
bIWSInside
)
,
mbDoSomething
(
sal_True
)
{
StartElement
(
nPrefixKey
,
rLName
,
bIWSOutside
);
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_uInt16
nPrefixKey
,
enum
XMLTokenEnum
eLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
mrExport
(
rExp
)
,
maElementName
()
,
mbIgnoreWhitespaceInside
(
bIWSInside
)
,
mbDoSomething
(
sal_True
)
{
StartElement
(
nPrefixKey
,
GetXMLToken
(
eLName
),
bIWSOutside
);
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_Bool
bDoSth
,
sal_uInt16
nPrefixKey
,
const
sal_Char
*
pLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
mrExport
(
rExp
)
,
maElementName
()
,
mbIgnoreWhitespaceInside
(
bIWSInside
)
,
mbDoSomething
(
bDoSth
)
{
if
(
mbDoSomething
)
{
const
OUString
sLName
(
OUString
::
createFromAscii
(
pLName
)
);
StartElement
(
nPrefixKey
,
sLName
,
bIWSOutside
);
}
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_Bool
bDoSth
,
sal_uInt16
nPrefixKey
,
const
OUString
&
rLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
mrExport
(
rExp
)
,
maElementName
()
,
mbIgnoreWhitespaceInside
(
bIWSInside
)
,
mbDoSomething
(
bDoSth
)
{
if
(
mbDoSomething
)
StartElement
(
nPrefixKey
,
rLName
,
bIWSOutside
);
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
sal_Bool
bDoSth
,
sal_uInt16
nPrefixKey
,
enum
XMLTokenEnum
eLName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
mrExport
(
rExp
)
,
maElementName
()
,
mbIgnoreWhitespaceInside
(
bIWSInside
)
,
mbDoSomething
(
bDoSth
)
{
if
(
mbDoSomething
)
StartElement
(
nPrefixKey
,
GetXMLToken
(
eLName
),
bIWSOutside
);
}
SvXMLElementExport
::
SvXMLElementExport
(
SvXMLExport
&
rExp
,
const
OUString
&
rQName
,
sal_Bool
bIWSOutside
,
sal_Bool
bIWSInside
)
:
mrExport
(
rExp
)
,
maElementName
()
,
mbIgnoreWhitespaceInside
(
bIWSInside
)
,
mbDoSomething
(
sal_True
)
{
maElementName
=
rQName
;
rExp
.
StartElement
(
rQName
,
bIWSOutside
);
rExp
.
StartElement
(
rQName
,
bIWSOutside
);
}
}
SvXMLElementExport
::~
SvXMLElementExport
()
SvXMLElementExport
::~
SvXMLElementExport
()
{
{
if
(
bDoSomething
)
if
(
m
bDoSomething
)
{
{
rExport
.
EndElement
(
aName
,
bIgnWS
);
mrExport
.
EndElement
(
maElementName
,
mbIgnoreWhitespaceInside
);
}
}
}
}
xmloff/source/text/txtimp.cxx
Dosyayı görüntüle @
71d322a8
...
@@ -2125,7 +2125,8 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels )
...
@@ -2125,7 +2125,8 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels )
{
{
if
(
!
lcl_HasListStyle
(
if
(
!
lcl_HasListStyle
(
m_pImpl
->
m_pOutlineStylesCandidates
[
i
][
j
],
m_pImpl
->
m_pOutlineStylesCandidates
[
i
][
j
],
m_pImpl
->
m_xParaStyles
,
GetXMLImport
(),
m_pImpl
->
m_xParaStyles
,
GetXMLImport
(),
s_NumberingStyleName
,
s_NumberingStyleName
,
sOutlineStyleName
))
sOutlineStyleName
))
{
{
...
...
xmloff/source/text/txtparae.cxx
Dosyayı görüntüle @
71d322a8
This diff is collapsed.
Click to expand it.
xmloff/source/text/txtparai.cxx
Dosyayı görüntüle @
71d322a8
...
@@ -338,10 +338,10 @@ public:
...
@@ -338,10 +338,10 @@ public:
class
XMLImpHyperlinkContext_Impl
:
public
SvXMLImportContext
class
XMLImpHyperlinkContext_Impl
:
public
SvXMLImportContext
{
{
XMLHints_Impl
&
rHints
;
XMLHints_Impl
&
m
rHints
;
XMLHyperlinkHint_Impl
*
pHint
;
XMLHyperlinkHint_Impl
*
m
pHint
;
sal_Bool
&
r
IgnoreLeadingSpace
;
sal_Bool
&
mrb
IgnoreLeadingSpace
;
public
:
public
:
...
@@ -367,71 +367,77 @@ public:
...
@@ -367,71 +367,77 @@ public:
TYPEINIT1
(
XMLImpHyperlinkContext_Impl
,
SvXMLImportContext
);
TYPEINIT1
(
XMLImpHyperlinkContext_Impl
,
SvXMLImportContext
);
XMLImpHyperlinkContext_Impl
::
XMLImpHyperlinkContext_Impl
(
XMLImpHyperlinkContext_Impl
::
XMLImpHyperlinkContext_Impl
(
SvXMLImport
&
rImport
,
SvXMLImport
&
rImport
,
sal_uInt16
nPrfx
,
sal_uInt16
nPrfx
,
const
OUString
&
rLName
,
const
OUString
&
rLName
,
const
Reference
<
xml
::
sax
::
XAttributeList
>
&
xAttrList
,
const
Reference
<
xml
::
sax
::
XAttributeList
>
&
xAttrList
,
XMLHints_Impl
&
rHnts
,
XMLHints_Impl
&
rHnts
,
sal_Bool
&
rIgnLeadSpace
)
:
sal_Bool
&
rIgnLeadSpace
)
SvXMLImportContext
(
rImport
,
nPrfx
,
rLName
),
:
SvXMLImportContext
(
rImport
,
nPrfx
,
rLName
)
rHints
(
rHnts
),
,
mrHints
(
rHnts
)
pHint
(
new
XMLHyperlinkHint_Impl
(
,
mpHint
(
new
XMLHyperlinkHint_Impl
(
GetImport
().
GetTextImport
()
->
GetCursorAsRange
()
->
getStart
()
)
)
GetImport
().
GetTextImport
()
->
GetCursorAsRange
()
->
getStart
()
)
),
,
mrbIgnoreLeadingSpace
(
rIgnLeadSpace
)
rIgnoreLeadingSpace
(
rIgnLeadSpace
)
{
{
OUString
sShow
;
OUString
sShow
;
const
SvXMLTokenMap
&
rTokenMap
=
const
SvXMLTokenMap
&
rTokenMap
=
GetImport
().
GetTextImport
()
->
GetTextHyperlinkAttrTokenMap
();
GetImport
().
GetTextImport
()
->
GetTextHyperlinkAttrTokenMap
();
sal_Int16
nAttrCount
=
xAttrList
.
is
()
?
xAttrList
->
getLength
()
:
0
;
sal_Int16
nAttrCount
=
xAttrList
.
is
()
?
xAttrList
->
getLength
()
:
0
;
for
(
sal_Int16
i
=
0
;
i
<
nAttrCount
;
i
++
)
for
(
sal_Int16
i
=
0
;
i
<
nAttrCount
;
i
++
)
{
{
const
OUString
&
rAttrName
=
xAttrList
->
getNameByIndex
(
i
);
const
OUString
&
rAttrName
=
xAttrList
->
getNameByIndex
(
i
);
const
OUString
&
rValue
=
xAttrList
->
getValueByIndex
(
i
);
const
OUString
&
rValue
=
xAttrList
->
getValueByIndex
(
i
);
OUString
aLocalName
;
OUString
aLocalName
;
sal_uInt16
nPrefix
=
const
sal_uInt16
nPrefix
=
GetImport
().
GetNamespaceMap
().
GetKeyByAttrName
(
rAttrName
,
&
aLocalName
);
GetImport
().
GetNamespaceMap
().
GetKeyByAttrName
(
rAttrName
,
switch
(
rTokenMap
.
Get
(
nPrefix
,
aLocalName
))
&
aLocalName
);
switch
(
rTokenMap
.
Get
(
nPrefix
,
aLocalName
)
)
{
{
case
XML_TOK_TEXT_HYPERLINK_HREF
:
case
XML_TOK_TEXT_HYPERLINK_HREF
:
pHint
->
SetHRef
(
GetImport
().
GetAbsoluteReference
(
rValue
)
);
m
pHint
->
SetHRef
(
GetImport
().
GetAbsoluteReference
(
rValue
)
);
break
;
break
;
case
XML_TOK_TEXT_HYPERLINK_NAME
:
case
XML_TOK_TEXT_HYPERLINK_NAME
:
pHint
->
SetName
(
rValue
);
m
pHint
->
SetName
(
rValue
);
break
;
break
;
case
XML_TOK_TEXT_HYPERLINK_TARGET_FRAME
:
case
XML_TOK_TEXT_HYPERLINK_TARGET_FRAME
:
pHint
->
SetTargetFrameName
(
rValue
);
m
pHint
->
SetTargetFrameName
(
rValue
);
break
;
break
;
case
XML_TOK_TEXT_HYPERLINK_SHOW
:
case
XML_TOK_TEXT_HYPERLINK_SHOW
:
sShow
=
rValue
;
sShow
=
rValue
;
break
;
break
;
case
XML_TOK_TEXT_HYPERLINK_STYLE_NAME
:
case
XML_TOK_TEXT_HYPERLINK_STYLE_NAME
:
pHint
->
SetStyleName
(
rValue
);
m
pHint
->
SetStyleName
(
rValue
);
break
;
break
;
case
XML_TOK_TEXT_HYPERLINK_VIS_STYLE_NAME
:
case
XML_TOK_TEXT_HYPERLINK_VIS_STYLE_NAME
:
pHint
->
SetVisitedStyleName
(
rValue
);
m
pHint
->
SetVisitedStyleName
(
rValue
);
break
;
break
;
}
}
}
}
if
(
sShow
.
getLength
()
&&
!
pHint
->
GetTargetFrameName
().
getLength
()
)
if
(
sShow
.
getLength
()
&&
!
m
pHint
->
GetTargetFrameName
().
getLength
()
)
{
{
if
(
IsXMLToken
(
sShow
,
XML_NEW
)
)
if
(
IsXMLToken
(
sShow
,
XML_NEW
)
)
pHint
->
SetTargetFrameName
(
m
pHint
->
SetTargetFrameName
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"_blank"
)
)
);
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"_blank"
)
)
);
else
if
(
IsXMLToken
(
sShow
,
XML_REPLACE
)
)
else
if
(
IsXMLToken
(
sShow
,
XML_REPLACE
)
)
pHint
->
SetTargetFrameName
(
m
pHint
->
SetTargetFrameName
(
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"_self"
)
)
);
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"_self"
)
)
);
}
}
rHints
.
Insert
(
pHint
,
rHints
.
Count
()
);
if
(
mpHint
->
GetHRef
().
isEmpty
()
)
{
// hyperlink without an URL is not imported.
delete
mpHint
;
mpHint
=
NULL
;
}
else
{
mrHints
.
Insert
(
mpHint
,
mrHints
.
Count
()
);
}
}
}
XMLImpHyperlinkContext_Impl
::~
XMLImpHyperlinkContext_Impl
()
XMLImpHyperlinkContext_Impl
::~
XMLImpHyperlinkContext_Impl
()
{
{
if
(
pHint
)
if
(
mpHint
!=
NULL
)
pHint
->
SetEnd
(
GetImport
().
GetTextImport
()
m
pHint
->
SetEnd
(
GetImport
().
GetTextImport
()
->
GetCursorAsRange
()
->
getStart
()
);
->
GetCursorAsRange
()
->
getStart
()
);
}
}
...
@@ -444,7 +450,7 @@ SvXMLImportContext *XMLImpHyperlinkContext_Impl::CreateChildContext(
...
@@ -444,7 +450,7 @@ SvXMLImportContext *XMLImpHyperlinkContext_Impl::CreateChildContext(
{
{
XMLEventsImportContext
*
pCtxt
=
new
XMLEventsImportContext
(
XMLEventsImportContext
*
pCtxt
=
new
XMLEventsImportContext
(
GetImport
(),
nPrefix
,
rLocalName
);
GetImport
(),
nPrefix
,
rLocalName
);
pHint
->
SetEventsContext
(
pCtxt
);
m
pHint
->
SetEventsContext
(
pCtxt
);
return
pCtxt
;
return
pCtxt
;
}
}
else
else
...
@@ -455,13 +461,13 @@ SvXMLImportContext *XMLImpHyperlinkContext_Impl::CreateChildContext(
...
@@ -455,13 +461,13 @@ SvXMLImportContext *XMLImpHyperlinkContext_Impl::CreateChildContext(
return
XMLImpSpanContext_Impl
::
CreateChildContext
(
return
XMLImpSpanContext_Impl
::
CreateChildContext
(
GetImport
(),
nPrefix
,
rLocalName
,
xAttrList
,
GetImport
(),
nPrefix
,
rLocalName
,
xAttrList
,
nToken
,
rHints
,
r
IgnoreLeadingSpace
);
nToken
,
mrHints
,
mrb
IgnoreLeadingSpace
);
}
}
}
}
void
XMLImpHyperlinkContext_Impl
::
Characters
(
const
OUString
&
rChars
)
void
XMLImpHyperlinkContext_Impl
::
Characters
(
const
OUString
&
rChars
)
{
{
GetImport
().
GetTextImport
()
->
InsertString
(
rChars
,
r
IgnoreLeadingSpace
);
GetImport
().
GetTextImport
()
->
InsertString
(
rChars
,
mrb
IgnoreLeadingSpace
);
}
}
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
...
@@ -1656,25 +1662,23 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext(
...
@@ -1656,25 +1662,23 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext(
// test for HyperLinkURL property. If present, insert link as
// test for HyperLinkURL property. If present, insert link as
// text property (StarWriter), else try to insert as text
// text property (StarWriter), else try to insert as text
// field (StarCalc, StarDraw, ...)
// field (StarCalc, StarDraw, ...)
Reference
<
beans
::
XPropertySet
>
xPropSet
(
Reference
<
beans
::
XPropertySet
>
xPropSet
(
rImport
.
GetTextImport
()
->
GetCursor
(),
UNO_QUERY
);
rImport
.
GetTextImport
()
->
GetCursor
(),
UNO_QUERY
);
const
OUString
sHyperLinkURL
(
static
const
OUString
sHyperLinkURL
(
RTL_CONSTASCII_USTRINGPARAM
(
"HyperLinkURL"
)
);
RTL_CONSTASCII_USTRINGPARAM
(
"HyperLinkURL"
));
if
(
xPropSet
->
getPropertySetInfo
()
->
hasPropertyByName
(
sHyperLinkURL
)
)
if
(
xPropSet
->
getPropertySetInfo
()
->
hasPropertyByName
(
sHyperLinkURL
)
)
{
{
pContext
=
new
XMLImpHyperlinkContext_Impl
(
rImport
,
nPrefix
,
pContext
=
new
XMLImpHyperlinkContext_Impl
(
rLocalName
,
xAttrList
,
rImport
,
rHints
,
nPrefix
,
rIgnoreLeadingSpace
);
rLocalName
,
xAttrList
,
rHints
,
rIgnoreLeadingSpace
);
}
}
else
else
{
{
pContext
=
new
XMLUrlFieldImportContext
(
rImport
,
pContext
=
new
XMLUrlFieldImportContext
(
rImport
,
*
rImport
.
GetTextImport
().
get
(),
nPrefix
,
rLocalName
);
*
rImport
.
GetTextImport
().
get
(),
nPrefix
,
rLocalName
);
//whitespace handling like other fields
//whitespace handling like other fields
rIgnoreLeadingSpace
=
sal_False
;
rIgnoreLeadingSpace
=
sal_False
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment