summaryrefslogtreecommitdiff
path: root/sw/inc/unocrsrhelper.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/inc/unocrsrhelper.hxx')
-rw-r--r--sw/inc/unocrsrhelper.hxx111
1 files changed, 109 insertions, 2 deletions
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
index 613a5e51eb89..b7e92df88b30 100644
--- a/sw/inc/unocrsrhelper.hxx
+++ b/sw/inc/unocrsrhelper.hxx
@@ -30,12 +30,25 @@
#ifndef _UNOCRSRHELPER_HXX
#define _UNOCRSRHELPER_HXX
-#include <com/sun/star/beans/XPropertyState.hpp>
-#include <unocrsr.hxx>
#include <map>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+#include <swtypes.hxx>
+#include <pam.hxx>
+
+
+class String;
+class SfxItemSet;
+class SfxItemPropertySet;
struct SfxItemPropertySimpleEntry;
+class SwTxtNode;
class SwPaM;
+class SwCursor;
+class SwUnoCrsr;
+class SwFmtColl;
+struct SwSortOptions;
class SwDoc;
namespace com{ namespace sun{ namespace star{
@@ -47,6 +60,17 @@ namespace com{ namespace sun{ namespace star{
}
}}}
+/* -----------------03.12.98 12:16-------------------
+ *
+ * --------------------------------------------------*/
+enum SwGetPropertyStatesCaller
+{
+ SW_PROPERTY_STATE_CALLER_DEFAULT,
+ SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION,
+ SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY,
+ SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT
+};
+
/* -----------------------------14.12.00 15:06--------------------------------
---------------------------------------------------------------------------*/
@@ -62,6 +86,7 @@ namespace SwUnoCursorHelper
void SetValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any& rAny );
bool FillValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any*& pAny );
};
+
sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
, SwPaM& rPam
, com::sun::star::uno::Any *pAny
@@ -102,6 +127,88 @@ namespace SwUnoCursorHelper
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ /// @param bTableMode: attributes should be applied to a table selection
+ void SetCrsrAttr(SwPaM & rPam, const SfxItemSet & rSet,
+ const SetAttrMode nAttrMode,
+ const bool bTableMode = false);
+ void GetCrsrAttr(SwPaM & rPam, SfxItemSet & rSet,
+ const bool bOnlyTxtAttr = false,
+ const bool bGetFromChrFmt = true);
+ void GetTextFromPam(SwPaM & rPam, ::rtl::OUString & rBuffer);
+ SwFmtColl * GetCurTxtFmtColl(SwPaM & rPam, const bool bConditional);
+
+ void SelectPam(SwPaM & rPam, const bool bExpand);
+ void SetString(SwCursor & rCursor, const ::rtl::OUString & rString);
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
+ CreateSortDescriptor(const bool bFromTable);
+ sal_Bool ConvertSortProperties(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& rDescriptor,
+ SwSortOptions & rSortOpt);
+
+ /// @param bTableMode: attributes should be applied to a table selection
+ void SetPropertyValue(
+ SwPaM& rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName,
+ const ::com::sun::star::uno::Any & rValue,
+ const SetAttrMode nAttrMode = nsSetAttrMode::SETATTR_DEFAULT,
+ const bool bTableMode = false)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Any GetPropertyValue(
+ SwPaM& rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyState > GetPropertyStates(
+ SwPaM & rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const SwGetPropertyStatesCaller eCaller =
+ SW_PROPERTY_STATE_CALLER_DEFAULT)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::beans::PropertyState GetPropertyState(
+ SwPaM & rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ void SetPropertyToDefault(
+ SwPaM & rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Any GetPropertyDefault(
+ SwPaM & rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ bool SetPageDesc(
+ const ::com::sun::star::uno::Any& rValue,
+ SwDoc & rDoc, SfxItemSet & rSet);
+ void SetTxtFmtColl(const ::com::sun::star::uno::Any & rAny, SwPaM & rPaM)
+ throw (::com::sun::star::lang::IllegalArgumentException);
+ bool SetCursorPropertyValue(
+ SfxItemPropertySimpleEntry const& rEntry,
+ ::com::sun::star::uno::Any const& rValue,
+ SwPaM & rPam, SfxItemSet & rItemSet)
+ throw (::com::sun::star::lang::IllegalArgumentException);
+
} // namespace SwUnoCursorHelper
#endif