summaryrefslogtreecommitdiff
path: root/svx/source/sdr/attribute
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-08-19 22:04:20 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-08-19 22:04:20 +0000
commit55b91120c9747161ec3eee904394485dabb01eab (patch)
tree07403bf8015557295efbe9abdfad9cfcc9a973e9 /svx/source/sdr/attribute
parentd2439eee3490494faefd9f8f1317fd297e11b27c (diff)
INTEGRATION: CWS aw033 (1.1.2); FILE ADDED
2008/08/19 16:46:28 cl 1.1.2.8: fixed license files 2008/05/27 14:49:57 aw 1.1.2.7: #i39532# changes DEV300 m12 resync corrections 2008/04/16 05:30:44 aw 1.1.2.6: diverse optimisations and fixes for primitives. Support for LazyInvalidation. 2008/04/04 06:07:48 aw 1.1.2.5: #i39532# added primitive support for tables 2008/03/18 07:15:23 aw 1.1.2.4: #i39532# changes after resync 2007/08/13 15:34:32 aw 1.1.2.3: #i39532# changes after resync 2006/10/19 10:58:46 aw 1.1.2.2: #i39532# primitive 2006/08/09 17:09:44 aw 1.1.2.1: #i39532#
Diffstat (limited to 'svx/source/sdr/attribute')
-rw-r--r--svx/source/sdr/attribute/sdrtextattribute.cxx107
1 files changed, 107 insertions, 0 deletions
diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx
new file mode 100644
index 000000000000..1c7c7773c543
--- /dev/null
+++ b/svx/source/sdr/attribute/sdrtextattribute.cxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrtextattribute.cxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <svx/sdr/attribute/sdrtextattribute.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/outlobj.hxx>
+#include <svx/editobj.hxx>
+#include <svx/flditem.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ SdrTextAttribute::SdrTextAttribute(
+ const SdrText& rSdrText,
+ XFormTextStyle eFormTextStyle,
+ sal_Int32 aTextLeftDistance,
+ sal_Int32 aTextUpperDistance,
+ sal_Int32 aTextRightDistance,
+ sal_Int32 aTextLowerDistance,
+ bool bContour,
+ bool bFitToSize,
+ bool bHideContour,
+ bool bBlink,
+ bool bScroll)
+ : mrSdrText(rSdrText),
+ mpOutlinerParaObject(rSdrText.GetOutlinerParaObject()),
+ meFormTextStyle(eFormTextStyle),
+ maTextLeftDistance(aTextLeftDistance),
+ maTextUpperDistance(aTextUpperDistance),
+ maTextRightDistance(aTextRightDistance),
+ maTextLowerDistance(aTextLowerDistance),
+ mbContour(bContour),
+ mbFitToSize(bFitToSize),
+ mbHideContour(bHideContour),
+ mbBlink(bBlink),
+ mbScroll(bScroll)
+ {
+ }
+
+ bool SdrTextAttribute::operator==(const SdrTextAttribute& rCandidate) const
+ {
+ const bool bOutlinerParaObjectSameAddress(mpOutlinerParaObject == rCandidate.mpOutlinerParaObject);
+
+ return (bOutlinerParaObjectSameAddress
+ && getFormTextStyle() == rCandidate.getFormTextStyle()
+ && getTextLeftDistance() == rCandidate.getTextLeftDistance()
+ && getTextUpperDistance() == rCandidate.getTextUpperDistance()
+ && getTextRightDistance() == rCandidate.getTextRightDistance()
+ && getTextLowerDistance() == rCandidate.getTextLowerDistance()
+ && isContour() == rCandidate.isContour()
+ && isFitToSize() == rCandidate.isFitToSize()
+ && isHideContour() == rCandidate.isHideContour()
+ && isBlink() == rCandidate.isBlink()
+ && isScroll() == rCandidate.isScroll());
+ }
+
+ void SdrTextAttribute::getBlinkTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList) const
+ {
+ if(isBlink())
+ {
+ mrSdrText.GetObject().impGetBlinkTextTiming(rAnimList);
+ }
+ }
+
+ void SdrTextAttribute::getScrollTextTiming(drawinglayer::animation::AnimationEntryList& rAnimList, double fFrameLength, double fTextLength) const
+ {
+ if(isScroll())
+ {
+ mrSdrText.GetObject().impGetScrollTextTiming(rAnimList, fFrameLength, fTextLength);
+ }
+ }
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// eof