summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-12-01 14:32:36 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-12-01 14:32:36 +0000
commite03758b783f4abc66c3a4f8106eb4e78aa68047a (patch)
tree4551878383347e002db7961efacd7029a6b83dba
parent7acb54010535511927fd7325a5fb0cd04d588ae7 (diff)
INTEGRATION: CWS swautomatic01 (1.1.2); FILE ADDED
2006/08/24 11:17:35 ama 1.1.2.9: #i65476#: Cached automatic styles 2006/08/09 08:43:07 fme 1.1.2.8: #i64576# Automatic styles 2006/06/29 13:07:44 fme 1.1.2.7: #i65476# AutoStyles 2006/06/15 11:57:49 ama 1.1.2.6: #i65476#: Automatic Styles 2006/06/13 10:28:36 fme 1.1.2.5: #i65476#: Automatic Styles 2006/06/06 14:50:55 ama 1.1.2.4: #i65476#: Automatic styles 2006/06/02 13:04:04 ama 1.1.2.3: #i65476#: Automatic Styles 2006/05/29 10:24:48 ama 1.1.2.2: #i65476#: Automatic Styles 2006/05/29 09:54:16 ama 1.1.2.1: #i65476#: Automatic Styles
-rw-r--r--sw/inc/istyleaccess.hxx77
1 files changed, 77 insertions, 0 deletions
diff --git a/sw/inc/istyleaccess.hxx b/sw/inc/istyleaccess.hxx
new file mode 100644
index 0000000000..118b94dec0
--- /dev/null
+++ b/sw/inc/istyleaccess.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: istyleaccess.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2006-12-01 15:32:36 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+#ifndef _ISTYLEACCESS_HXX
+#define _ISTYLEACCESS_HXX
+
+#include <vector>
+#include <svtools/stylepool.hxx>
+
+/*--------------------------------------------------------------------
+ Management of (automatic) styles
+ --------------------------------------------------------------------*/
+
+class SwStyleHandle;
+
+class IStyleAccess
+{
+public:
+
+ enum SwAutoStyleFamily
+ {
+ AUTO_STYLE_CHAR,
+ AUTO_STYLE_RUBY,
+ AUTO_STYLE_PARA,
+ AUTO_STYLE_NOTXT
+ };
+
+ virtual ~IStyleAccess() {}
+
+ virtual StylePool::SfxItemSet_Pointer_t getAutomaticStyle( const SfxItemSet& rSet,
+ SwAutoStyleFamily eFamily ) = 0;
+ virtual void getAllStyles( std::vector<StylePool::SfxItemSet_Pointer_t> &rStyles,
+ SwAutoStyleFamily eFamily ) = 0;
+ // It's slow to iterate through a stylepool looking for a special name, but if
+ // the style has been inserted via "cacheAutomaticStyle" instead of "getAutomaticStyle",
+ // it's faster
+ virtual StylePool::SfxItemSet_Pointer_t getByName( const rtl::OUString& rName,
+ SwAutoStyleFamily eFamily ) = 0;
+ // insert the style to the pool and the cache (used during import)
+ virtual StylePool::SfxItemSet_Pointer_t cacheAutomaticStyle( const SfxItemSet& rSet,
+ SwAutoStyleFamily eFamily ) = 0;
+ // To release the cached styles (shared_pointer!)
+ virtual void clearCaches() = 0;
+};
+
+#endif // _ISTYLEACCESS_HXX