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
50b328f5
Kaydet (Commit)
50b328f5
authored
Mar 09, 2001
tarafından
Daniel Vogelheim
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
- changed: autotext event import/export is now based on an XNameReplace
üst
35667520
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
120 additions
and
116 deletions
+120
-116
XMLAutoTextContainerEventImport.cxx
xmloff/source/text/XMLAutoTextContainerEventImport.cxx
+16
-16
XMLAutoTextContainerEventImport.hxx
xmloff/source/text/XMLAutoTextContainerEventImport.hxx
+5
-6
XMLAutoTextEventExport.cxx
xmloff/source/text/XMLAutoTextEventExport.cxx
+0
-0
XMLAutoTextEventExport.hxx
xmloff/source/text/XMLAutoTextEventExport.hxx
+36
-47
XMLAutoTextEventImport.cxx
xmloff/source/text/XMLAutoTextEventImport.cxx
+53
-44
XMLAutoTextEventImport.hxx
xmloff/source/text/XMLAutoTextEventImport.hxx
+10
-3
No files found.
xmloff/source/text/XMLAutoTextContainerEventImport.cxx
Dosyayı görüntüle @
50b328f5
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: XMLAutoTextContainerEventImport.cxx,v $
* $RCSfile: XMLAutoTextContainerEventImport.cxx,v $
*
*
* $Revision: 1.
1
$
* $Revision: 1.
2
$
*
*
* last change: $Author: dvo $ $Date: 2001-0
2-06 16:34:29
$
* last change: $Author: dvo $ $Date: 2001-0
3-09 14:53:43
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -63,10 +63,6 @@
...
@@ -63,10 +63,6 @@
#include "XMLAutoTextContainerEventImport.hxx"
#include "XMLAutoTextContainerEventImport.hxx"
#endif
#endif
#ifndef _XMLOFF_XMLAUTOTEXTGROUPEVENTIMPORT_HXX
#include "XMLAutoTextGroupEventImport.hxx"
#endif
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Reference.hxx>
#endif
#endif
...
@@ -75,8 +71,8 @@
...
@@ -75,8 +71,8 @@
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#endif
#endif
#ifndef _COM_SUN_STAR_
TEXT_XAUTOTEXTCONTAINER
_HPP_
#ifndef _COM_SUN_STAR_
CONTAINER_XNAMEREPLACE
_HPP_
#include <com/sun/star/
text/XAutoTextContainer
.hpp>
#include <com/sun/star/
container/XNameReplace
.hpp>
#endif
#endif
#ifndef _XMLOFF_XMLIMP_HXX
#ifndef _XMLOFF_XMLIMP_HXX
...
@@ -95,6 +91,10 @@
...
@@ -95,6 +91,10 @@
#include "xmlkywd.hxx"
#include "xmlkywd.hxx"
#endif
#endif
#ifndef _XMLOFF_XMLEVENTSIMPORTCONTEXT_HXX
#include "XMLEventsImportContext.hxx"
#endif
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
...
@@ -102,7 +102,7 @@ using ::rtl::OUString;
...
@@ -102,7 +102,7 @@ using ::rtl::OUString;
using
::
com
::
sun
::
star
::
uno
::
Any
;
using
::
com
::
sun
::
star
::
uno
::
Any
;
using
::
com
::
sun
::
star
::
uno
::
Reference
;
using
::
com
::
sun
::
star
::
uno
::
Reference
;
using
::
com
::
sun
::
star
::
xml
::
sax
::
XAttributeList
;
using
::
com
::
sun
::
star
::
xml
::
sax
::
XAttributeList
;
using
::
com
::
sun
::
star
::
text
::
XAutoTextContainer
;
using
::
com
::
sun
::
star
::
container
::
XNameReplace
;
...
@@ -113,9 +113,9 @@ XMLAutoTextContainerEventImport::XMLAutoTextContainerEventImport(
...
@@ -113,9 +113,9 @@ XMLAutoTextContainerEventImport::XMLAutoTextContainerEventImport(
SvXMLImport
&
rImport
,
SvXMLImport
&
rImport
,
USHORT
nPrfx
,
USHORT
nPrfx
,
const
OUString
&
rLName
,
const
OUString
&
rLName
,
const
Reference
<
X
AutoTextContainer
>
&
rContnr
)
:
const
Reference
<
X
NameReplace
>
&
rEvnts
)
:
SvXMLImportContext
(
rImport
,
nPrfx
,
rLName
),
SvXMLImportContext
(
rImport
,
nPrfx
,
rLName
),
r
Container
(
rContnr
)
r
Events
(
rEvnts
)
{
{
}
}
...
@@ -128,12 +128,12 @@ SvXMLImportContext* XMLAutoTextContainerEventImport::CreateChildContext(
...
@@ -128,12 +128,12 @@ SvXMLImportContext* XMLAutoTextContainerEventImport::CreateChildContext(
const
OUString
&
rLocalName
,
const
OUString
&
rLocalName
,
const
Reference
<
XAttributeList
>
&
xAttrList
)
const
Reference
<
XAttributeList
>
&
xAttrList
)
{
{
if
((
XML_NAMESPACE_
TEXT
==
nPrefix
)
&&
if
((
XML_NAMESPACE_
OFFICE
==
nPrefix
)
&&
rLocalName
.
equalsAsciiL
(
sXML_
auto_text_group
,
rLocalName
.
equalsAsciiL
(
sXML_
events
,
sizeof
(
sXML_
auto_text_group
)
-
1
))
sizeof
(
sXML_
events
)
-
1
))
{
{
return
new
XML
AutoTextGroupEventImport
(
GetImport
(),
nPrefix
,
return
new
XML
EventsImportContext
(
GetImport
(),
nPrefix
,
rLocalName
,
rLocalName
,
rContainer
);
rEvents
);
}
}
else
else
return
new
SvXMLImportContext
(
GetImport
(),
nPrefix
,
rLocalName
);
return
new
SvXMLImportContext
(
GetImport
(),
nPrefix
,
rLocalName
);
...
...
xmloff/source/text/XMLAutoTextContainerEventImport.hxx
Dosyayı görüntüle @
50b328f5
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: XMLAutoTextContainerEventImport.hxx,v $
* $RCSfile: XMLAutoTextContainerEventImport.hxx,v $
*
*
* $Revision: 1.
1
$
* $Revision: 1.
2
$
*
*
* last change: $Author: dvo $ $Date: 2001-0
2-06 16:34:29
$
* last change: $Author: dvo $ $Date: 2001-0
3-09 14:53:43
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -73,8 +73,7 @@
...
@@ -73,8 +73,7 @@
namespace
rtl
{
class
OUString
;
}
namespace
rtl
{
class
OUString
;
}
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
text
{
class
XAutoTextContainer
;
}
namespace
container
{
class
XNameReplace
;
}
namespace
text
{
class
XAutoTextGroup
;
}
namespace
xml
{
namespace
sax
{
class
XAttributeList
;
}
}
namespace
xml
{
namespace
sax
{
class
XAttributeList
;
}
}
}
}
}
}
}
}
...
@@ -87,7 +86,7 @@ class XMLAutoTextContainerEventImport : public SvXMLImportContext
...
@@ -87,7 +86,7 @@ class XMLAutoTextContainerEventImport : public SvXMLImportContext
{
{
/// the parent auto text container
/// the parent auto text container
const
::
com
::
sun
::
star
::
uno
::
Reference
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
text
::
XAutoTextContainer
>
&
rContainer
;
::
com
::
sun
::
star
::
container
::
XNameReplace
>
&
rEvents
;
public
:
public
:
...
@@ -98,7 +97,7 @@ public:
...
@@ -98,7 +97,7 @@ public:
USHORT
nPrfx
,
USHORT
nPrfx
,
const
::
rtl
::
OUString
&
rLName
,
const
::
rtl
::
OUString
&
rLName
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
text
::
XAutoTextContainer
>
&
rContainer
);
::
com
::
sun
::
star
::
container
::
XNameReplace
>
&
rEvents
);
~
XMLAutoTextContainerEventImport
();
~
XMLAutoTextContainerEventImport
();
...
...
xmloff/source/text/XMLAutoTextEventExport.cxx
Dosyayı görüntüle @
50b328f5
This diff is collapsed.
Click to expand it.
xmloff/source/text/XMLAutoTextEventExport.hxx
Dosyayı görüntüle @
50b328f5
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: XMLAutoTextEventExport.hxx,v $
* $RCSfile: XMLAutoTextEventExport.hxx,v $
*
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
*
* last change: $Author: dvo $ $Date: 2001-0
2-13 16:55:00
$
* last change: $Author: dvo $ $Date: 2001-0
3-09 14:53:43
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -71,11 +71,9 @@
...
@@ -71,11 +71,9 @@
namespace
rtl
{
class
OUString
;
}
namespace
rtl
{
class
OUString
;
}
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
container
{
class
XNameAccess
;
}
namespace
frame
{
class
XModel
;
}
namespace
frame
{
class
XModel
;
}
namespace
lang
{
class
XMultiServiceFactory
;
}
namespace
lang
{
class
XMultiServiceFactory
;
}
namespace
text
{
class
XAutoTextContainer
;
}
namespace
text
{
class
XAutoTextGroup
;
}
namespace
text
{
class
XAutoTextEntry
;
}
namespace
uno
{
template
<
class
X
>
class
Reference
;
}
namespace
uno
{
template
<
class
X
>
class
Reference
;
}
namespace
uno
{
template
<
class
X
>
class
Sequence
;
}
namespace
uno
{
template
<
class
X
>
class
Sequence
;
}
namespace
uno
{
class
XInterface
;
}
namespace
uno
{
class
XInterface
;
}
...
@@ -84,20 +82,24 @@ namespace com { namespace sun { namespace star {
...
@@ -84,20 +82,24 @@ namespace com { namespace sun { namespace star {
}
}
}
}
}
}
/**
* Component for the export of events attached to autotext blocks.
* Via the XInitialization interface it expects up to two strings, the
* first giving the file name (URL) of the autotext group, and the second
* identifying the autotext. If one of the strings is not given, it
* will export the whole group / all groups.
*/
class
XMLAutoTextEventExport
:
public
SvXMLExport
class
XMLAutoTextEventExport
:
public
SvXMLExport
{
{
::
std
::
set
<
::
rtl
::
OUString
>
*
eventCount
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>
xEvents
;
/// names of groups to be exported; export all group if empty.
const
::
rtl
::
OUString
sEventType
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
&
rGroupNames
;
const
::
rtl
::
OUString
sNone
;
// generate a combined name for sake of counting names
::
rtl
::
OUString
combinedName
(
const
::
rtl
::
OUString
&
rGroupName
,
const
::
rtl
::
OUString
&
rEntryName
);
public
:
public
:
XMLAutoTextEventExport
();
XMLAutoTextEventExport
();
XMLAutoTextEventExport
(
XMLAutoTextEventExport
(
...
@@ -105,51 +107,36 @@ public:
...
@@ -105,51 +107,36 @@ public:
const
::
com
::
sun
::
star
::
uno
::
Reference
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
xml
::
sax
::
XDocumentHandler
>
&
rHandler
,
::
com
::
sun
::
star
::
xml
::
sax
::
XDocumentHandler
>
&
rHandler
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XModel
>
&
rModel
);
::
com
::
sun
::
star
::
frame
::
XModel
>
&
rModel
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
container
::
XNameAccess
>
&
rEvents
);
~
XMLAutoTextEventExport
();
~
XMLAutoTextEventExport
();
// XInitialization
virtual
void
SAL_CALL
initialize
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Any
>
&
rArguments
)
throw
(
::
com
::
sun
::
star
::
uno
::
Exception
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
protected
:
protected
:
// export the events off all autotexts
/// export the events off all autotexts
virtual
sal_uInt32
exportDoc
(
virtual
sal_uInt32
exportDoc
(
const
sal_Char
*
pClass
=
NULL
);
const
sal_Char
*
pClass
=
NULL
);
void
exportAutoTextContainer
(
const
sal_Char
*
pClass
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
text
::
XAutoTextContainer
>
&
rAutoTextContainer
,
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
&
rGroupNames
);
void
exportAutoTextGroup
(
::
rtl
::
OUString
&
rName
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
text
::
XAutoTextGroup
>
&
rGroup
);
void
exportAutoTextEntry
(
::
rtl
::
OUString
&
rGroupName
,
::
rtl
::
OUString
&
rName
,
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
text
::
XAutoTextEntry
>
&
rEntry
);
/// count the number of events (to be used before hasXXX() methods)
void
countEvents
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
text
::
XAutoTextContainer
>
&
rAutoTextContainer
,
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
&
rGroupNames
);
/// does the document have any events ?
/// does the document have any events ?
sal_Bool
has
Document
Events
();
sal_Bool
hasEvents
();
/// does the group have any events ?
/// export the events element
sal_Bool
hasGroupEvents
(
void
exportEvents
();
const
::
rtl
::
OUString
&
rGroupName
);
/// does this entry have any events ?
sal_Bool
hasEntryEvents
(
const
::
rtl
::
OUString
&
rGroupName
,
const
::
rtl
::
OUString
&
rEntryName
);
/// add the namespaces used by events
/// (to be called for the document element)
void
addNamespaces
();
// methods without content:
// methods without content:
...
@@ -163,6 +150,8 @@ protected:
...
@@ -163,6 +150,8 @@ protected:
virtual
void
_ExportContent
();
virtual
void
_ExportContent
();
};
};
// global functions to support the component
// global functions to support the component
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
SAL_CALL
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
SAL_CALL
...
...
xmloff/source/text/XMLAutoTextEventImport.cxx
Dosyayı görüntüle @
50b328f5
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: XMLAutoTextEventImport.cxx,v $
* $RCSfile: XMLAutoTextEventImport.cxx,v $
*
*
* $Revision: 1.
2
$
* $Revision: 1.
3
$
*
*
* last change: $Author: dvo $ $Date: 2001-0
2-06 16:34:29
$
* last change: $Author: dvo $ $Date: 2001-0
3-09 14:53:43
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -71,32 +71,16 @@
...
@@ -71,32 +71,16 @@
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#endif
#endif
#ifndef _COM_SUN_STAR_TEXT_XAUTOTEXTCONTAINER_HPP_
#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP_
#include <com/sun/star/text/XAutoTextContainer.hpp>
#include <com/sun/star/document/XEventsSupplier.hpp>
#endif
#ifndef _COM_SUN_STAR_TEXT_XAUTOTEXTGROUP_HPP_
#include <com/sun/star/text/XAutoTextGroup.hpp>
#endif
#ifndef _COM_SUN_STAR_TEXT_XAUTOTEXTGROUP_HPP_
#include <com/sun/star/text/XAutoTextGroup.hpp>
#endif
#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#endif
#endif
#ifndef _COM_SUN_STAR_UNO_XINTERFACE_HPP_
#ifndef _COM_SUN_STAR_UNO_XINTERFACE_HPP_
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/XInterface.hpp>
#endif
#endif
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
#include <comphelper/processfactory.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#endif
#ifndef _XMLOFF_XMLAUTOTEXTGROUPEVENTIMPORT_HXX
#include "XMLAutoTextGroupEventImport.hxx"
#endif
#endif
#ifndef _XMLOFF_XMLAUTOTEXTCONTAINEREVENTIMPORT_HXX
#ifndef _XMLOFF_XMLAUTOTEXTCONTAINEREVENTIMPORT_HXX
...
@@ -111,16 +95,23 @@
...
@@ -111,16 +95,23 @@
#include "xmlkywd.hxx"
#include "xmlkywd.hxx"
#endif
#endif
#ifndef _TOOLS_DEBUG_HXX
#include <tools/debug.hxx>
#endif
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
using
::
rtl
::
OUString
;
using
::
rtl
::
OUString
;
using
::
com
phelper
::
getProcessServiceFactor
y
;
using
::
com
::
sun
::
star
::
uno
::
An
y
;
using
::
com
::
sun
::
star
::
uno
::
Reference
;
using
::
com
::
sun
::
star
::
uno
::
Reference
;
using
::
com
::
sun
::
star
::
uno
::
Sequence
;
using
::
com
::
sun
::
star
::
uno
::
Sequence
;
using
::
com
::
sun
::
star
::
uno
::
Type
;
using
::
com
::
sun
::
star
::
uno
::
XInterface
;
using
::
com
::
sun
::
star
::
uno
::
XInterface
;
using
::
com
::
sun
::
star
::
uno
::
RuntimeException
;
using
::
com
::
sun
::
star
::
uno
::
Exception
;
using
::
com
::
sun
::
star
::
uno
::
Exception
;
using
::
com
::
sun
::
star
::
xml
::
sax
::
XAttributeList
;
using
::
com
::
sun
::
star
::
xml
::
sax
::
XAttributeList
;
using
::
com
::
sun
::
star
::
text
::
XAutoTextContainer
;
using
::
com
::
sun
::
star
::
document
::
XEventsSupplier
;
using
::
com
::
sun
::
star
::
container
::
XNameReplace
;
using
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
;
using
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
;
const
sal_Char
sAPI_AutoText
[]
=
"com.sun.star.text.AutoTextContainer"
;
const
sal_Char
sAPI_AutoText
[]
=
"com.sun.star.text.AutoTextContainer"
;
...
@@ -129,36 +120,55 @@ const sal_Char sAPI_AutoText[] = "com.sun.star.text.AutoTextContainer";
...
@@ -129,36 +120,55 @@ const sal_Char sAPI_AutoText[] = "com.sun.star.text.AutoTextContainer";
XMLAutoTextEventImport
::
XMLAutoTextEventImport
()
throw
()
:
XMLAutoTextEventImport
::
XMLAutoTextEventImport
()
throw
()
:
SvXMLImport
()
SvXMLImport
()
{
{
// instantiate AutoTextContainer via factory
Reference
<
XMultiServiceFactory
>
xFactory
=
getProcessServiceFactory
();
if
(
xFactory
.
is
())
{
OUString
sService
(
RTL_CONSTASCII_USTRINGPARAM
(
sAPI_AutoText
));
Reference
<
XAutoTextContainer
>
xContainer
(
xFactory
->
createInstance
(
sService
),
uno
::
UNO_QUERY
);
xAutoTextContainer
=
xContainer
;
}
}
}
XMLAutoTextEventImport
::~
XMLAutoTextEventImport
()
XMLAutoTextEventImport
::~
XMLAutoTextEventImport
()
{
{
}
}
void
XMLAutoTextEventImport
::
initialize
(
const
Sequence
<
Any
>
&
rArguments
)
throw
(
Exception
,
RuntimeException
)
{
// The events may come as either an XNameReplace or XEventsSupplier.
const
sal_Int32
nLength
=
rArguments
.
getLength
();
for
(
sal_Int32
i
=
0
;
i
<
nLength
;
i
++
)
{
const
Type
&
rType
=
rArguments
[
i
].
getValueType
();
if
(
rType
==
::
getCppuType
(
(
Reference
<
XEventsSupplier
>*
)
NULL
)
)
{
Reference
<
XEventsSupplier
>
xSupplier
;
rArguments
[
i
]
>>=
xSupplier
;
DBG_ASSERT
(
xSupplier
.
is
(),
"need XEventsSupplier or XNameReplace"
);
xEvents
=
xSupplier
->
getEvents
();
}
else
if
(
rType
==
::
getCppuType
(
(
Reference
<
XNameReplace
>*
)
NULL
)
)
{
rArguments
[
i
]
>>=
xEvents
;
DBG_ASSERT
(
xEvents
.
is
(),
"need XEventsSupplier or XNameReplace"
);
}
}
// call parent
SvXMLImport
::
initialize
(
rArguments
);
}
SvXMLImportContext
*
XMLAutoTextEventImport
::
CreateContext
(
SvXMLImportContext
*
XMLAutoTextEventImport
::
CreateContext
(
sal_uInt16
nPrefix
,
sal_uInt16
nPrefix
,
const
OUString
&
rLocalName
,
const
OUString
&
rLocalName
,
const
Reference
<
XAttributeList
>
&
xAttrList
)
const
Reference
<
XAttributeList
>
&
xAttrList
)
{
{
if
(
x
AutoTextContainer
.
is
()
&&
if
(
x
Events
.
is
()
&&
(
XML_NAMESPACE_
TEXT
==
nPrefix
)
&&
(
XML_NAMESPACE_
OFFICE
==
nPrefix
)
&&
rLocalName
.
equalsAsciiL
(
sXML_auto_text_events
,
rLocalName
.
equalsAsciiL
(
sXML_auto_text_events
,
sizeof
(
sXML_auto_text_events
)
-
1
)
)
sizeof
(
sXML_auto_text_events
)
-
1
)
)
{
{
return
new
XMLAutoTextContainerEventImport
(
*
this
,
nPrefix
,
rLocalName
,
return
new
XMLAutoTextContainerEventImport
(
xAutoTextContainer
);
*
this
,
nPrefix
,
rLocalName
,
xEvents
);
}
}
else
else
{
{
...
@@ -167,20 +177,19 @@ SvXMLImportContext* XMLAutoTextEventImport::CreateContext(
...
@@ -167,20 +177,19 @@ SvXMLImportContext* XMLAutoTextEventImport::CreateContext(
}
}
Sequence
<
OUString
>
SAL_CALL
Sequence
<
OUString
>
SAL_CALL
XMLAutoTextEventImport_getSupportedServiceNames
()
XMLAutoTextEventImport_getSupportedServiceNames
()
throw
()
throw
()
{
{
const
OUString
aServiceName
(
RTL_CONSTASCII_USTRINGPARAM
(
Sequence
<
OUString
>
aSeq
(
1
);
"com.sun.star.office.sax.importer.AutoTextEventReader"
)
);
aSeq
[
0
]
=
XMLAutoTextEventImport_getImplementationName
();
const
Sequence
<
OUString
>
aSeq
(
&
aServiceName
,
1
);
return
aSeq
;
return
aSeq
;
}
}
OUString
SAL_CALL
XMLAutoTextEventImport_getImplementationName
()
throw
()
OUString
SAL_CALL
XMLAutoTextEventImport_getImplementationName
()
throw
()
{
{
return
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"XMLAutoTextEventImport"
)
);
return
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.comp.Writer.XMLAutotextEventsImporter"
)
);
}
}
Reference
<
XInterface
>
SAL_CALL
XMLAutoTextEventImport_createInstance
(
Reference
<
XInterface
>
SAL_CALL
XMLAutoTextEventImport_createInstance
(
...
...
xmloff/source/text/XMLAutoTextEventImport.hxx
Dosyayı görüntüle @
50b328f5
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: XMLAutoTextEventImport.hxx,v $
* $RCSfile: XMLAutoTextEventImport.hxx,v $
*
*
* $Revision: 1.
1
$
* $Revision: 1.
2
$
*
*
* last change: $Author: dvo $ $Date: 2001-0
2-06 11:51:27
$
* last change: $Author: dvo $ $Date: 2001-0
3-09 14:53:43
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -89,13 +89,20 @@ namespace com { namespace sun { namespace star {
...
@@ -89,13 +89,20 @@ namespace com { namespace sun { namespace star {
class
XMLAutoTextEventImport
:
public
SvXMLImport
class
XMLAutoTextEventImport
:
public
SvXMLImport
{
{
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
text
::
XAutoTextContainer
>
xAutoTextContainer
;
::
com
::
sun
::
star
::
container
::
XNameReplace
>
xEvents
;
public
:
public
:
XMLAutoTextEventImport
()
throw
();
XMLAutoTextEventImport
()
throw
();
~
XMLAutoTextEventImport
();
~
XMLAutoTextEventImport
();
// XInitialization
virtual
void
SAL_CALL
initialize
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Any
>
&
rArguments
)
throw
(
::
com
::
sun
::
star
::
uno
::
Exception
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
protected
:
protected
:
...
...
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