~ubuntu-branches/ubuntu/wily/scribus/wily-proposed

« back to all changes in this revision

Viewing changes to scribus/text/storytext.h

  • Committer: Package Import Robot
  • Author(s): Oleksandr Moskalenko
  • Date: 2012-02-09 21:50:56 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120209215056-2wrx1ara0jbm7fi5
Tags: 1.4.0.dfsg+r17287-1
* New upstream stable release upload into Debian (Closes: #654703).
* Applied the Ubuntu armel patch.
* Removed non-free color swatches from resources.
* debian/control:
  - Moved icc-profiles from Recommends to Suggests (Closes: #655885).
  - Updated Standards-Version to 3.9.2.
  - Updated extended description per lintian warning.
* debian/rules:
  - Update mailcap (Closes: #630751). A request for mime.types update has
    been sent to the mime-support maintainer.
  - Added build-arch and build-indep targets per lintian warning.
* debian/patches:
  - top_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't copy extra docs and changelogs.
  - scribus_cmakelists.patch - don't install the non-free "doc" dir.
  - profiles_cmakelists.patch - don't install non-free sRGB profile.
* debian/copyright: 
  - Converted to the DEP5 machine readable foramt.
  - Added licenses for free color swatches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
        virtual void saxx(SaxHandler& handler, const Xml_string& elemtag) const;
103
103
        virtual void saxx(SaxHandler& handler)                     const { saxx(handler, saxxDefaultElem); }
104
104
        
 
105
        int  cursorPosition() const;
 
106
        void setCursorPosition(int pos, bool relative = false);
 
107
        void normalizeCursorPosition();
 
108
        int  normalizedCursorPosition();
 
109
 
105
110
        void clear();
106
111
        StoryText copy() const;
 
112
        // Insert chars from another StoryText object at current cursor position
 
113
        void insert(const StoryText& other, bool onlySelection = false);
 
114
        // Insert chars from another StoryText object at specific position
107
115
        void insert(int pos, const StoryText& other, bool onlySelection = false);
 
116
        // Append chars from another StoryText object
108
117
        void append(const StoryText& other) { insert(length(), other, false); }
 
118
        // Remove len chars at specific position
109
119
        void removeChars(int pos, uint len);
 
120
        // Insert chars at current cursor position
 
121
        void insertChars(QString txt, bool applyNeighbourStyle = false);
 
122
        // Insert chars ar specific position
110
123
        void insertChars(int pos, QString txt, bool applyNeighbourStyle = false);
 
124
        // Insert inline object at current cursor position
 
125
        void insertObject(PageItem* obj);
 
126
        // Insert object at specific position
111
127
        void insertObject(int pos, PageItem* obj);
112
128
        void replaceChar(int pos, QChar ch);
113
129
 
114
130
        void hyphenateWord(int pos, uint len, char* hyphens);
115
131
        
116
132
        int length() const;
117
 
        QChar text(int pos) const;
 
133
        // Get char at current cursor position
 
134
        QChar   text() const;
 
135
        // Get char at specific position
 
136
        QChar   text(int pos) const;
 
137
        // Get text with len chars at specific position
118
138
        QString text(int pos, uint len) const;
 
139
 
 
140
        bool hasObject(int pos) const;
119
141
        PageItem* object(int pos) const;
120
142
        
121
143
        int nextCharPos(int c);
127
149
        int nextFramePos(int c);
128
150
        int prevFramePos(int c);
129
151
        
 
152
        // Get charstyle at current cursor position
 
153
        const CharStyle& charStyle() const;
 
154
        // Get charstyle at specific position
130
155
        const CharStyle& charStyle(int pos) const;
 
156
        // Get paragraph style at current cursor position
 
157
        const ParagraphStyle& paragraphStyle() const;
 
158
        // Get paragraph style at specific position
131
159
        const ParagraphStyle& paragraphStyle(int pos) const;
132
160
        const ParagraphStyle& defaultStyle() const;
133
161
        void setDefaultStyle(const ParagraphStyle& style);
139
167
        void eraseStyle(int pos, const ParagraphStyle& style);
140
168
        void replaceStyles(QMap<QString,QString> newNameForOld);
141
169
        void replaceCharStyles(QMap<QString,QString> newNameForOld);
 
170
 
 
171
        // Cleanup legacy formatting for whole story, ie remove direct
 
172
        // formatting for parameters already set at paragraph level
 
173
        void fixLegacyFormatting();
 
174
        
 
175
        // Cleanup legacy formatting for paragraph at position pos
 
176
        void fixLegacyFormatting(int pos);
142
177
        
143
178
        void getNamedResources(ResourceCollection& lists) const;
144
179
        void replaceNamedResources(ResourceCollection& newNames);
145
180
        
146
181
        uint nrOfParagraphs() const;
147
 
        int startOfParagraph(uint index) const;
148
 
        int endOfParagraph(uint index) const;
 
182
        int  startOfParagraph() const;
 
183
        int  startOfParagraph(uint index) const;
 
184
        int  endOfParagraph() const;
 
185
        int  endOfParagraph(uint index) const;
 
186
        uint nrOfParagraph() const;
149
187
        uint nrOfParagraph(int pos) const;
150
188
 
151
189
        uint nrOfRuns() const;