[Libreoffice-commits] .: sfx2/inc sfx2/source

Michael Stahl mst at kemper.freedesktop.org
Mon Jun 11 14:29:43 PDT 2012


 sfx2/inc/sfx2/XmlIdRegistry.hxx            |    9 ++-------
 sfx2/source/doc/DocumentMetadataAccess.cxx |    7 +++++++
 2 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 40b7eff9075c88d80fb0f3472d2671c5d2c72d0d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 11 23:18:23 2012 +0200

    un-inline isValidXmlId (MSVC doesn't like it anymore)
    
    Change-Id: I59872f6e7fbdfc73875a45912b93d01b4379aec7

diff --git a/sfx2/inc/sfx2/XmlIdRegistry.hxx b/sfx2/inc/sfx2/XmlIdRegistry.hxx
index 691bfaa..38db1f9 100644
--- a/sfx2/inc/sfx2/XmlIdRegistry.hxx
+++ b/sfx2/inc/sfx2/XmlIdRegistry.hxx
@@ -47,13 +47,8 @@ namespace sfx2 {
 /** is i_rIdref a valid NCName ? */
 bool SFX2_DLLPUBLIC isValidNCName(::rtl::OUString const & i_rIdref);
 
-extern inline bool
-isValidXmlId(::rtl::OUString const & i_rStreamName,
-    ::rtl::OUString const & i_rIdref)
-{
-    return isValidNCName(i_rIdref) && ( i_rStreamName == "content.xml" || i_rStreamName == "styles.xml" );
-}
-
+bool SFX2_DLLPUBLIC isValidXmlId(::rtl::OUString const & i_rStreamName,
+    ::rtl::OUString const & i_rIdref);
 
 // XML ID handling ---------------------------------------------------
 
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index bbe7555..4fb52ec 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -116,6 +116,13 @@ static bool isStylesFile (::rtl::OUString const & i_rPath)
     return i_rPath == s_styles;
 }
 
+bool isValidXmlId(::rtl::OUString const & i_rStreamName,
+    ::rtl::OUString const & i_rIdref)
+{
+    return isValidNCName(i_rIdref)
+        && (isContentFile(i_rStreamName) || isStylesFile(i_rStreamName));
+}
+
 static bool isReservedFile(::rtl::OUString const & i_rPath)
 {
     return isContentFile(i_rPath) || isStylesFile(i_rPath) || i_rPath == s_meta || i_rPath == s_settings;


More information about the Libreoffice-commits mailing list